//新增
<insert id="insertSelectiveList" useGeneratedKeys="true" parameterType="java.util.List">
insert into common_user (user_id, user_account, user_name,
password, nick_name, avatar,
salt, mobile, tel,
email, status, isdel, create_time,
last_mod_time, create_user_id, mod_user_id,
open_id, region_code, region_name
)
values
<foreach collection="list" item="item" index="index" separator="," close=";">
(#{item.userId,jdbcType=BIGINT}, #{item.userAccount,jdbcType=VARCHAR}, #{item.userName,jdbcType=VARCHAR},
#{item.password,jdbcType=VARCHAR}, #{item.nickName,jdbcType=VARCHAR}, #{item.avatar,jdbcType=VARCHAR},
#{item.salt,jdbcType=VARCHAR}, #{item.mobile,jdbcType=VARCHAR}, #{item.tel,jdbcType=VARCHAR},
#{item.email,jdbcType=VARCHAR}, #{item.status,jdbcType=CHAR}, #{item.isdel,jdbcType=CHAR}, #{item.createTime,jdbcType=TIMESTAMP},
#{item.lastModTime,jdbcType=TIMESTAMP}, #{item.createUserId,jdbcType=BIGINT}, #{item.modUserId,jdbcType=BIGINT},
#{item.openId,jdbcType=VARCHAR}, #{item.regionCode,jdbcType=VARCHAR}, #{item.regionName,jdbcType=VARCHAR}
)
</foreach>
</insert>
//删除
<delete id="deluserByaccount" parameterType="java.util.ArrayList" >
delete from common_user
<where>
user_account in (
<foreach collection="list" item="code" index="index" separator=",">
#{code}
</foreach>
)
</where>
</delete>
//更新
<update id="updateMemberList" parameterType="java.util.List" >
<foreach collection="list" item="item" index="index" open="" close="" separator=";">
update common_party_member
<set >
<if test="name != null" >
name = #{item.name,jdbcType=VARCHAR},
</if>
<if test="sex != null" >
sex = #{item.sex,jdbcType=VARCHAR},
</if>
<if test="provinceCode != null" >
province_code = #{item.provinceCode,jdbcType=VARCHAR},
</if>
<if test="cityCode != null" >
city_code = #{item.cityCode,jdbcType=VARCHAR},
</if>
<if test="areaCode != null" >
area_code = #{item.areaCode,jdbcType=VARCHAR},
</if>

<if test="salt != null" >
salt = #{item.salt,jdbcType=VARCHAR},
</if>
<if test="idNumber != null" >
id_number = #{item.idNumber,jdbcType=VARCHAR},
</if>
<if test="education != null" >
education = #{item.education,jdbcType=VARCHAR},
</if>

<if test="address != null" >
address = #{item.address,jdbcType=VARCHAR},
</if>
<if test="mobile != null" >
mobile = #{item.mobile,jdbcType=VARCHAR},
</if>
<if test="company != null" >
company = #{item.company,jdbcType=VARCHAR},
</if>

<if test="jobTitle != null" >
job_title = #{item.jobTitle,jdbcType=VARCHAR},
</if>

<if test="birthday != null" >
birthday = #{item.birthday,jdbcType=TIMESTAMP},
</if>

<if test="memberProperties != null" >
member_properties = #{item.memberProperties,jdbcType=TINYINT},
</if>

<if test="innerPartyPositon != null" >
inner_party_positon = #{item.innerPartyPositon,jdbcType=VARCHAR},
</if>

<if test="partyTime != null" >
party_time = #{item.partyTime,jdbcType=VARCHAR},
</if>
<if test="partyOrganId != null" >
party_organ_id = #{item.partyOrganId,jdbcType=BIGINT},
</if>
<if test="isPartyAdmin != null" >
is_party_admin = #{item.isPartyAdmin,jdbcType=CHAR},
</if>
<if test="isMemberOnline != null" >
is_member_online = #{item.isMemberOnline,jdbcType=CHAR},
</if>
<if test="isPartyOrganActivity != null" >
is_party_organ_activity = #{item.isPartyOrganActivity,jdbcType=CHAR},
</if>
<if test="isMassOrganization != null" >
is_mass_organization = #{item.isMassOrganization,jdbcType=CHAR},
</if>

<if test="remark != null" >
remark = #{item.remark,jdbcType=VARCHAR},
</if>

<if test="modUserId != null" >
mod_user_id = #{item.modUserId,jdbcType=BIGINT},
</if>
<if test="lastModTime != null" >
last_mod_time = #{item.lastModTime,jdbcType=TIMESTAMP},
</if>

</set>
where id = #{item.id,jdbcType=BIGINT}
</foreach>
</update>

最新文章

  1. java多线程系列之 synchronized
  2. SpringMVC国际化
  3. WCF初探-6:WCF服务配置
  4. [Weekly] 2014.03.01-2014.03.08
  5. 用过的一个jquery插件实现转盘效果还不错手机兼容
  6. HDU-4614 Vases and Flowers (线段树区间更新)
  7. VIM编辑器常用功能整理笔记
  8. MBR
  9. ionic开发环境搭建
  10. Git命令非主流札记
  11. PAT (Advanced Level) 1081. Rational Sum (20)
  12. COM组件转换为.NET元数据2
  13. better-scroll不能滚动之 滚动监听-左右联动
  14. nosql:文件存储和sql数据库存储形式之外的存储系统都是nosql
  15. Jquery遍历之获取子级元素、同级元素和父级元素
  16. C#如何Json转字符串;字符串转Json;Newtonsoft.Json(Json.Net)
  17. jquery基础学习之事件篇(三)
  18. Dom操作的常用案例实现
  19. 构建微服务:快速搭建Spring Boot项目
  20. error MSB3552: Resource file &quot;**/*.resx&quot; cannot be found. [/ConsoleApp1.csproj]

热门文章

  1. Pytest 插件
  2. csv文件导入数据库中文乱码
  3. MAMP PRO 使用指南 (配置nginx 重写)
  4. react native 中 fetch获取请求头header 的token信息
  5. python生成一个WAV文件的正弦波
  6. Python 堆、栈和队列详解
  7. Quartz 2D CGGradient与CGShading实现渐变的绘制
  8. python peewee
  9. 【笔记】gitlab+openldap使用memberof筛选登录用户
  10. gitee上传VS2022已有项目