LsUserDao.xml 4.9 KB

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