后台服务
Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

wxCUserBasicChildMapper.xml 2.6 KiB

pirms 2 gadiem
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
  3. <mapper namespace="com.iformall.mapper.WxCUserBasicChildMapper">
  4. <resultMap id="BaseResultMap" type="com.iformall.domain.po.WxCUserBasicChild">
  5. <id column="id" jdbcType="BIGINT" property="id" />
  6. <result column="tenant_id" jdbcType="VARCHAR" property="tenantId" />
  7. <result column="c_user_id" jdbcType="BIGINT" property="cUserId" />
  8. <result column="name" jdbcType="VARCHAR" property="name" />
  9. <result column="sex" jdbcType="INTEGER" property="sex" />
  10. <result column="nick_name" jdbcType="VARCHAR" property="nickName" />
  11. <result column="birthdate" jdbcType="TIMESTAMP" property="birthdate"/>
  12. <result column="create_date" jdbcType="TIMESTAMP" property="createDate"/>
  13. <result column="update_date" jdbcType="TIMESTAMP" property="updateDate"/>
  14. <result column="remark" jdbcType="VARCHAR" property="remark" />
  15. </resultMap>
  16. <sql id="allColumns">
  17. `id`,`tenant_id`,`c_user_id`,`name`,`nick_name`,`birthdate`,`sex`,`remark`,`create_date`,`update_date`
  18. </sql>
  19. <sql id="dynamicWhereConditions">
  20. where del_status = 0
  21. <if test=" null != id ">
  22. and `id` = #{id}
  23. </if>
  24. <if test=" null != tenantId and '' != tenantId">
  25. and `tenant_id` = #{tenantId}
  26. </if>
  27. <if test=" null != cUserId ">
  28. and `c_user_id` = #{cUserId}
  29. </if>
  30. <if test=" null != name ">
  31. and `name` like concat('%', #{name},'%')
  32. </if>
  33. <if test=" null != nickName ">
  34. and `nick_name` like concat('%', #{nickName},'%')
  35. </if>
  36. <if test=" null != sex ">
  37. and `sex` = #{sex}
  38. </if>
  39. <if test=" null != startTime ">
  40. and create_date &gt;= #{startTime}
  41. </if>
  42. <if test=" null != endTime">
  43. and create_date &lt;= #{endTime}
  44. </if>
  45. <if test=" null != ids ">
  46. and id in
  47. <foreach collection="ids" index="index" item="idItem" open="(" separator="," close=")">
  48. #{idItem}
  49. </foreach>
  50. </if>
  51. <if test=" null != sortColumns"> order by ${sortColumns} </if>
  52. </sql>
  53. <select id="findList" parameterType="com.iformall.domain.po.WxCUserBasicChild" resultMap="BaseResultMap">
  54. select <include refid="allColumns" /> from wx_c_user_basic_child
  55. <include refid="dynamicWhereConditions" />
  56. </select>
  57. <update id="updDelById" parameterType="com.iformall.domain.po.WxCUserBasicChild">
  58. update wx_c_user_basic_child set del_status = 1 where id = #{id} and tenant_id = #{tenantId}
  59. </update>
  60. <delete id="deleteByUserBasicId" parameterType="com.iformall.domain.po.WxCUserBasicChild">
  61. delete from wx_c_user_basic_child where c_user_id = #{cUserId} and tenant_id = #{tenantId}
  62. </delete>
  63. </mapper>