StaffAppAuthServiceDaoImplMapper.xml 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <!DOCTYPE mapper
  3. PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
  4. "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
  5. <mapper namespace="staffAppAuthServiceDaoImpl">
  6. <!-- 保存员工微信认证信息 add by wuxw 2018-07-03 -->
  7. <insert id="saveStaffAppAuthInfo" parameterType="Map">
  8. insert into staff_app_auth(
  9. au_id,app_type,open_id,state,store_id,open_name,staff_id
  10. ) values (
  11. #{auId},#{appType},#{openId},#{state},#{storeId},#{openName},#{staffId}
  12. )
  13. </insert>
  14. <!-- 查询员工微信认证信息 add by wuxw 2018-07-03 -->
  15. <select id="getStaffAppAuthInfo" parameterType="Map" resultType="Map">
  16. select t.au_id,t.au_id auId,t.app_type,t.app_type appType,t.open_id,t.open_id openId,t.status_cd,t.status_cd
  17. statusCd,t.state,t.store_id,t.store_id storeId,t.open_name,t.open_name openName,t.staff_id,t.staff_id staffId,
  18. t.create_time createTime
  19. from staff_app_auth t
  20. where 1 =1
  21. <if test="auId !=null and auId != ''">
  22. and t.au_id= #{auId}
  23. </if>
  24. <if test="appType !=null and appType != ''">
  25. and t.app_type= #{appType}
  26. </if>
  27. <if test="openId !=null and openId != ''">
  28. and t.open_id= #{openId}
  29. </if>
  30. <if test="statusCd !=null and statusCd != ''">
  31. and t.status_cd= #{statusCd}
  32. </if>
  33. <if test="state !=null and state != ''">
  34. and t.state= #{state}
  35. </if>
  36. <if test="storeId !=null and storeId != ''">
  37. and t.store_id= #{storeId}
  38. </if>
  39. <if test="openName !=null and openName != ''">
  40. and t.open_name= #{openName}
  41. </if>
  42. <if test="staffId !=null and staffId != ''">
  43. and t.staff_id= #{staffId}
  44. </if>
  45. order by t.create_time desc
  46. <if test="page != -1 and page != null ">
  47. limit #{page}, #{row}
  48. </if>
  49. </select>
  50. <!-- 修改员工微信认证信息 add by wuxw 2018-07-03 -->
  51. <update id="updateStaffAppAuthInfo" parameterType="Map">
  52. update staff_app_auth t set t.status_cd = #{statusCd}
  53. <if test="openId !=null and openId != ''">
  54. , t.open_id= #{openId}
  55. </if>
  56. <if test="state !=null and state != ''">
  57. , t.state= #{state}
  58. </if>
  59. <if test="openName !=null and openName != ''">
  60. , t.open_name= #{openName}
  61. </if>
  62. where 1=1
  63. <if test="auId !=null and auId != ''">
  64. and t.au_id= #{auId}
  65. </if>
  66. <if test="storeId !=null and storeId != ''">
  67. and t.store_id= #{storeId}
  68. </if>
  69. <if test="staffId !=null and staffId != ''">
  70. and t.staff_id= #{staffId}
  71. </if>
  72. <if test="appType !=null and appType != ''">
  73. and t.app_type= #{appType}
  74. </if>
  75. </update>
  76. <!-- 查询员工微信认证数量 add by wuxw 2018-07-03 -->
  77. <select id="queryStaffAppAuthsCount" parameterType="Map" resultType="Map">
  78. select count(1) count
  79. from staff_app_auth t
  80. where 1 =1
  81. <if test="auId !=null and auId != ''">
  82. and t.au_id= #{auId}
  83. </if>
  84. <if test="appType !=null and appType != ''">
  85. and t.app_type= #{appType}
  86. </if>
  87. <if test="openId !=null and openId != ''">
  88. and t.open_id= #{openId}
  89. </if>
  90. <if test="statusCd !=null and statusCd != ''">
  91. and t.status_cd= #{statusCd}
  92. </if>
  93. <if test="state !=null and state != ''">
  94. and t.state= #{state}
  95. </if>
  96. <if test="storeId !=null and storeId != ''">
  97. and t.store_id= #{storeId}
  98. </if>
  99. <if test="openName !=null and openName != ''">
  100. and t.open_name= #{openName}
  101. </if>
  102. <if test="staffId !=null and staffId != ''">
  103. and t.staff_id= #{staffId}
  104. </if>
  105. </select>
  106. </mapper>