UserServiceFollowMapper.xml 9.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237
  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.goafanti.common.dao.UserServiceFollowMapper">
  4. <resultMap id="BaseResultMap" type="com.goafanti.common.model.UserServiceFollow">
  5. <!--
  6. WARNING - @mbg.generated
  7. This element is automatically generated by MyBatis Generator, do not modify.
  8. This element was generated on Fri May 28 13:37:12 CST 2021.
  9. -->
  10. <id column="id" jdbcType="INTEGER" property="id" />
  11. <result column="uid" jdbcType="VARCHAR" property="uid" />
  12. <result column="aid" jdbcType="VARCHAR" property="aid" />
  13. <result column="add_wechat" jdbcType="INTEGER" property="addWechat" />
  14. <result column="wechat" jdbcType="VARCHAR" property="wechat" />
  15. <result column="renewal" jdbcType="INTEGER" property="renewal" />
  16. <result column="renewal_time" jdbcType="TIMESTAMP" property="renewalTime" />
  17. <result column="sign_project_id" jdbcType="VARCHAR" property="signProjectId" />
  18. <result column="sign_project" jdbcType="VARCHAR" property="signProject" />
  19. <result column="remarks" jdbcType="VARCHAR" property="remarks" />
  20. <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
  21. <result column="tech_satisfaction" jdbcType="INTEGER" property="techSatisfaction" />
  22. <result column="business_satisfaction" jdbcType="INTEGER" property="businessSatisfaction" />
  23. </resultMap>
  24. <sql id="Base_Column_List">
  25. <!--
  26. WARNING - @mbg.generated
  27. This element is automatically generated by MyBatis Generator, do not modify.
  28. This element was generated on Fri May 28 13:37:12 CST 2021.
  29. -->
  30. id, `uid`, aid, add_wechat, wechat, renewal, renewal_time, sign_project_id, sign_project,
  31. remarks, create_time, tech_satisfaction, business_satisfaction
  32. </sql>
  33. <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
  34. <!--
  35. WARNING - @mbg.generated
  36. This element is automatically generated by MyBatis Generator, do not modify.
  37. This element was generated on Fri May 28 13:37:12 CST 2021.
  38. -->
  39. select
  40. <include refid="Base_Column_List" />
  41. from user_service_follow
  42. where id = #{id,jdbcType=INTEGER}
  43. </select>
  44. <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
  45. <!--
  46. WARNING - @mbg.generated
  47. This element is automatically generated by MyBatis Generator, do not modify.
  48. This element was generated on Fri May 28 13:37:12 CST 2021.
  49. -->
  50. delete from user_service_follow
  51. where id = #{id,jdbcType=INTEGER}
  52. </delete>
  53. <insert id="insert" parameterType="com.goafanti.common.model.UserServiceFollow">
  54. <!--
  55. WARNING - @mbg.generated
  56. This element is automatically generated by MyBatis Generator, do not modify.
  57. This element was generated on Fri May 28 13:37:12 CST 2021.
  58. -->
  59. insert into user_service_follow (id, `uid`, aid,
  60. add_wechat, wechat, renewal,
  61. renewal_time, sign_project_id, sign_project,
  62. remarks, create_time, tech_satisfaction,
  63. business_satisfaction)
  64. values (#{id,jdbcType=INTEGER}, #{uid,jdbcType=VARCHAR}, #{aid,jdbcType=VARCHAR},
  65. #{addWechat,jdbcType=INTEGER}, #{wechat,jdbcType=VARCHAR}, #{renewal,jdbcType=INTEGER},
  66. #{renewalTime,jdbcType=TIMESTAMP}, #{signProjectId,jdbcType=VARCHAR}, #{signProject,jdbcType=VARCHAR},
  67. #{remarks,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, #{techSatisfaction,jdbcType=INTEGER},
  68. #{businessSatisfaction,jdbcType=INTEGER})
  69. </insert>
  70. <insert id="insertSelective" parameterType="com.goafanti.common.model.UserServiceFollow">
  71. <!--
  72. WARNING - @mbg.generated
  73. This element is automatically generated by MyBatis Generator, do not modify.
  74. This element was generated on Fri May 28 13:37:12 CST 2021.
  75. -->
  76. insert into user_service_follow
  77. <trim prefix="(" suffix=")" suffixOverrides=",">
  78. <if test="id != null">
  79. id,
  80. </if>
  81. <if test="uid != null">
  82. `uid`,
  83. </if>
  84. <if test="aid != null">
  85. aid,
  86. </if>
  87. <if test="addWechat != null">
  88. add_wechat,
  89. </if>
  90. <if test="wechat != null">
  91. wechat,
  92. </if>
  93. <if test="renewal != null">
  94. renewal,
  95. </if>
  96. <if test="renewalTime != null">
  97. renewal_time,
  98. </if>
  99. <if test="signProjectId != null">
  100. sign_project_id,
  101. </if>
  102. <if test="signProject != null">
  103. sign_project,
  104. </if>
  105. <if test="remarks != null">
  106. remarks,
  107. </if>
  108. <if test="createTime != null">
  109. create_time,
  110. </if>
  111. <if test="techSatisfaction != null">
  112. tech_satisfaction,
  113. </if>
  114. <if test="businessSatisfaction != null">
  115. business_satisfaction,
  116. </if>
  117. </trim>
  118. <trim prefix="values (" suffix=")" suffixOverrides=",">
  119. <if test="id != null">
  120. #{id,jdbcType=INTEGER},
  121. </if>
  122. <if test="uid != null">
  123. #{uid,jdbcType=VARCHAR},
  124. </if>
  125. <if test="aid != null">
  126. #{aid,jdbcType=VARCHAR},
  127. </if>
  128. <if test="addWechat != null">
  129. #{addWechat,jdbcType=INTEGER},
  130. </if>
  131. <if test="wechat != null">
  132. #{wechat,jdbcType=VARCHAR},
  133. </if>
  134. <if test="renewal != null">
  135. #{renewal,jdbcType=INTEGER},
  136. </if>
  137. <if test="renewalTime != null">
  138. #{renewalTime,jdbcType=TIMESTAMP},
  139. </if>
  140. <if test="signProjectId != null">
  141. #{signProjectId,jdbcType=VARCHAR},
  142. </if>
  143. <if test="signProject != null">
  144. #{signProject,jdbcType=VARCHAR},
  145. </if>
  146. <if test="remarks != null">
  147. #{remarks,jdbcType=VARCHAR},
  148. </if>
  149. <if test="createTime != null">
  150. #{createTime,jdbcType=TIMESTAMP},
  151. </if>
  152. <if test="techSatisfaction != null">
  153. #{techSatisfaction,jdbcType=INTEGER},
  154. </if>
  155. <if test="businessSatisfaction != null">
  156. #{businessSatisfaction,jdbcType=INTEGER},
  157. </if>
  158. </trim>
  159. </insert>
  160. <update id="updateByPrimaryKeySelective" parameterType="com.goafanti.common.model.UserServiceFollow">
  161. <!--
  162. WARNING - @mbg.generated
  163. This element is automatically generated by MyBatis Generator, do not modify.
  164. This element was generated on Fri May 28 13:37:12 CST 2021.
  165. -->
  166. update user_service_follow
  167. <set>
  168. <if test="uid != null">
  169. `uid` = #{uid,jdbcType=VARCHAR},
  170. </if>
  171. <if test="aid != null">
  172. aid = #{aid,jdbcType=VARCHAR},
  173. </if>
  174. <if test="addWechat != null">
  175. add_wechat = #{addWechat,jdbcType=INTEGER},
  176. </if>
  177. <if test="wechat != null">
  178. wechat = #{wechat,jdbcType=VARCHAR},
  179. </if>
  180. <if test="renewal != null">
  181. renewal = #{renewal,jdbcType=INTEGER},
  182. </if>
  183. <if test="renewalTime != null">
  184. renewal_time = #{renewalTime,jdbcType=TIMESTAMP},
  185. </if>
  186. <if test="signProjectId != null">
  187. sign_project_id = #{signProjectId,jdbcType=VARCHAR},
  188. </if>
  189. <if test="signProject != null">
  190. sign_project = #{signProject,jdbcType=VARCHAR},
  191. </if>
  192. <if test="remarks != null">
  193. remarks = #{remarks,jdbcType=VARCHAR},
  194. </if>
  195. <if test="createTime != null">
  196. create_time = #{createTime,jdbcType=TIMESTAMP},
  197. </if>
  198. <if test="techSatisfaction != null">
  199. tech_satisfaction = #{techSatisfaction,jdbcType=INTEGER},
  200. </if>
  201. <if test="businessSatisfaction != null">
  202. business_satisfaction = #{businessSatisfaction,jdbcType=INTEGER},
  203. </if>
  204. </set>
  205. where id = #{id,jdbcType=INTEGER}
  206. </update>
  207. <update id="updateByPrimaryKey" parameterType="com.goafanti.common.model.UserServiceFollow">
  208. <!--
  209. WARNING - @mbg.generated
  210. This element is automatically generated by MyBatis Generator, do not modify.
  211. This element was generated on Fri May 28 13:37:12 CST 2021.
  212. -->
  213. update user_service_follow
  214. set `uid` = #{uid,jdbcType=VARCHAR},
  215. aid = #{aid,jdbcType=VARCHAR},
  216. add_wechat = #{addWechat,jdbcType=INTEGER},
  217. wechat = #{wechat,jdbcType=VARCHAR},
  218. renewal = #{renewal,jdbcType=INTEGER},
  219. renewal_time = #{renewalTime,jdbcType=TIMESTAMP},
  220. sign_project_id = #{signProjectId,jdbcType=VARCHAR},
  221. sign_project = #{signProject,jdbcType=VARCHAR},
  222. remarks = #{remarks,jdbcType=VARCHAR},
  223. create_time = #{createTime,jdbcType=TIMESTAMP},
  224. tech_satisfaction = #{techSatisfaction,jdbcType=INTEGER},
  225. business_satisfaction = #{businessSatisfaction,jdbcType=INTEGER}
  226. where id = #{id,jdbcType=INTEGER}
  227. </update>
  228. <select id="listUseServiceFollow" resultType="com.goafanti.user.bo.OutUserServiceFollow">
  229. select a.id, a.`uid`, a.aid, a.add_wechat addWechat, a.wechat, renewal, a.renewal_time renewalTime, a.sign_project_id signProjectId,
  230. a.sign_project signProject, a.create_time createTime ,date_format(a.renewal_time,'%Y-%m-%d') as renewalTimes,
  231. date_format(a.create_time,'%Y-%m-%d %H:%i:%S') as createTimes,a.remarks,b.name adminName,a.tech_satisfaction techSatisfaction,
  232. a.business_satisfaction businessSatisfaction
  233. from user_service_follow a left join admin b on a.aid =b.id
  234. where uid = #{uid}
  235. order by a.create_time desc
  236. </select>
  237. </mapper>