LsUserDao.xml 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168
  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.liang.dao.LsUserDao">
  4. <resultMap type="com.liang.entity.SysLsUserEntity" id="SysLsUser">
  5. <result property="id" column="ID" jdbcType="INTEGER"/>
  6. <result property="xm" column="XM" jdbcType="VARCHAR"/>
  7. <result property="xb" column="XB" jdbcType="VARCHAR"/>
  8. <result property="sfzh" column="SFZH" jdbcType="VARCHAR"/>
  9. <result property="phone" column="PHONE" jdbcType="VARCHAR"/>
  10. <result property="ygzed" column="YGZED" jdbcType="VARCHAR"/>
  11. <result property="byxy" column="BYXX" jdbcType="VARCHAR"/>
  12. <result property="zy" column="ZY" jdbcType="VARCHAR"/>
  13. <result property="xl" column="XL" jdbcType="VARCHAR"/>
  14. <result property="gznr" column="GZNR" jdbcType="VARCHAR"/>
  15. <result property="qpsj" column="QSRQ" jdbcType="VARCHAR"/>
  16. <result property="dqsj" column="JSRQ" jdbcType="VARCHAR"/>
  17. <result property="cjr" column="CJR" jdbcType="INTEGER"/>
  18. <result property="cjsj" column="CJSJ" jdbcType="VARCHAR"/>
  19. <result property="zt" column="ZT" jdbcType="INTEGER"/>
  20. <result property="fysq" column="FYSQ" jdbcType="INTEGER"/>
  21. <result property="xmfzr" column="XMFZR" jdbcType="INTEGER"/>
  22. <result property="bzfy" column="BZFY" jdbcType="VARCHAR"/>
  23. <result property="gzdd" column="GZDD" jdbcType="VARCHAR"/>
  24. <result property="kyfh" column="KYFH" jdbcType="VARCHAR"/>
  25. <result property="x" column="X" jdbcType="VARCHAR"/>
  26. </resultMap>
  27. <select id="UserAll" resultMap="SysLsUser">
  28. SELECT * FROM sta_TempMember
  29. WHERE X = 1
  30. <if test="xm != null and xm != ''">
  31. and XM like '%'+#{xm}+'%'
  32. </if>
  33. <if test="xl != null and xl != ''">
  34. and xl = #{xl}
  35. </if>
  36. <if test="zt != null and zt != ''">
  37. and ZT = #{zt}
  38. </if>
  39. <if test="sfzh != null and sfzh != ''">
  40. and SFZH = #{sfzh}
  41. </if>
  42. order by cjsj DESC
  43. </select>
  44. <insert id="saveOperLog" keyProperty="id" useGeneratedKeys="true">
  45. insert into sta_TempMember
  46. (
  47. XM
  48. ,XB
  49. ,SFZH
  50. ,PHONE
  51. ,BYXX
  52. ,ZY
  53. ,XL
  54. ,GZNR
  55. ,QSRQ
  56. ,JSRQ
  57. ,CJR
  58. ,CJSJ
  59. ,ZT
  60. ,FYSQ
  61. ,XMFZR
  62. ,BZFY
  63. ,GZDD
  64. ,KYFH
  65. ,X
  66. )values(
  67. #{xm}
  68. ,#{xb}
  69. ,#{sfzh}
  70. ,#{phone}
  71. ,#{byxy}
  72. ,#{zy}
  73. ,#{xl}
  74. ,#{gznr}
  75. ,#{qpsj}
  76. ,#{dqsj}
  77. ,#{cjr}
  78. ,#{cjsj}
  79. ,0
  80. ,#{fysq}
  81. ,#{xmfzr}
  82. ,#{bzfy}
  83. ,#{gzdd}
  84. ,#{kyfh}
  85. ,1
  86. )
  87. </insert>
  88. <delete id="deleteUser" >
  89. delete * from
  90. sta_TempMember
  91. where
  92. id = #{id}
  93. </delete>
  94. <delete id="batchDelete">
  95. delete from sys_post_lsry
  96. where ID in
  97. <foreach item="item" index="index" collection="idList" open = "(" separator = "," close = ")">
  98. #{item}
  99. </foreach>
  100. </delete>
  101. <update id="upDate" parameterType="com.liang.entity.SysLsUserEntity">
  102. UPDATE sta_TempMember
  103. set
  104. XM = #{xm},
  105. XB = #{xb},
  106. SFZH = #{sfzh},
  107. PHONE = #{phone},
  108. BYXX = #{byxy},
  109. ZY = #{zy},
  110. xl = #{xl},
  111. GZNR = #{gznr},
  112. QSRQ = #{qpsj},
  113. JSRQ = #{dqsj},
  114. CJR = #{cjr},
  115. CJSJ = #{cjsj},
  116. ZT = #{zt},
  117. FYSQ = #{fysq},
  118. XMFZR = #{xmfzr},
  119. BZFY = #{bzfy},
  120. ZB = #{zb},
  121. GZDD = #{gzdd},
  122. X = #{x}
  123. where ID = #{id}
  124. </update>
  125. <select id="getLsuserID" resultMap="SysLsUser">
  126. SELECT *FROM sta_TempMember
  127. WHERE
  128. X = 1
  129. <if test="ID != null and ID !='' ">
  130. and ID = #{ID}
  131. </if>
  132. </select>
  133. <select id="getUserxm" resultMap="SysLsUser">
  134. SELECT *FROM sta_TempMember
  135. WHERE
  136. X = 1
  137. <if test="xm != null and xm !='' ">
  138. and XM = #{xm}
  139. </if>
  140. <if test="sfzh != null and sfzh != ''">
  141. and sfzh = #{sfzh}
  142. </if>
  143. </select>
  144. <select id="getZb" resultMap="SysLsUser">
  145. SELECT * FROM sta_TempMember
  146. where
  147. x = 1
  148. <if test="zb != null and zb != ''">
  149. and ZB = #{zb}
  150. </if>
  151. </select>
  152. </mapper>