PublicReleaseLogMapper.xml 7.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203
  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.PublicReleaseLogMapper">
  4. <resultMap id="BaseResultMap" type="com.goafanti.common.model.PublicReleaseLog">
  5. <!--
  6. WARNING - @mbg.generated
  7. This element is automatically generated by MyBatis Generator, do not modify.
  8. This element was generated on Thu Jun 24 11:35:04 CST 2021.
  9. -->
  10. <id column="id" jdbcType="INTEGER" property="id" />
  11. <result column="prid" jdbcType="INTEGER" property="prid" />
  12. <result column="aid" jdbcType="VARCHAR" property="aid" />
  13. <result column="remarks" jdbcType="VARCHAR" property="remarks" />
  14. <result column="status" jdbcType="INTEGER" property="status" />
  15. <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
  16. </resultMap>
  17. <resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="com.goafanti.common.model.PublicReleaseLog">
  18. <!--
  19. WARNING - @mbg.generated
  20. This element is automatically generated by MyBatis Generator, do not modify.
  21. This element was generated on Thu Jun 24 11:35:04 CST 2021.
  22. -->
  23. <result column="photo_url" jdbcType="LONGVARCHAR" property="photoUrl" />
  24. </resultMap>
  25. <sql id="Base_Column_List">
  26. <!--
  27. WARNING - @mbg.generated
  28. This element is automatically generated by MyBatis Generator, do not modify.
  29. This element was generated on Thu Jun 24 11:35:04 CST 2021.
  30. -->
  31. id, prid, aid, remarks, `status`, create_time
  32. </sql>
  33. <sql id="Blob_Column_List">
  34. <!--
  35. WARNING - @mbg.generated
  36. This element is automatically generated by MyBatis Generator, do not modify.
  37. This element was generated on Thu Jun 24 11:35:04 CST 2021.
  38. -->
  39. photo_url
  40. </sql>
  41. <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="ResultMapWithBLOBs">
  42. <!--
  43. WARNING - @mbg.generated
  44. This element is automatically generated by MyBatis Generator, do not modify.
  45. This element was generated on Thu Jun 24 11:35:04 CST 2021.
  46. -->
  47. select
  48. <include refid="Base_Column_List" />
  49. ,
  50. <include refid="Blob_Column_List" />
  51. from public_release_log
  52. where id = #{id,jdbcType=INTEGER}
  53. </select>
  54. <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
  55. <!--
  56. WARNING - @mbg.generated
  57. This element is automatically generated by MyBatis Generator, do not modify.
  58. This element was generated on Thu Jun 24 11:35:04 CST 2021.
  59. -->
  60. delete from public_release_log
  61. where id = #{id,jdbcType=INTEGER}
  62. </delete>
  63. <insert id="insert" parameterType="com.goafanti.common.model.PublicReleaseLog">
  64. <!--
  65. WARNING - @mbg.generated
  66. This element is automatically generated by MyBatis Generator, do not modify.
  67. This element was generated on Thu Jun 24 11:35:04 CST 2021.
  68. -->
  69. insert into public_release_log (id, prid, aid,
  70. remarks, `status`, create_time,
  71. photo_url)
  72. values (#{id,jdbcType=INTEGER}, #{prid,jdbcType=INTEGER}, #{aid,jdbcType=VARCHAR},
  73. #{remarks,jdbcType=VARCHAR}, #{status,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP},
  74. #{photoUrl,jdbcType=LONGVARCHAR})
  75. </insert>
  76. <insert id="insertSelective" parameterType="com.goafanti.common.model.PublicReleaseLog">
  77. <!--
  78. WARNING - @mbg.generated
  79. This element is automatically generated by MyBatis Generator, do not modify.
  80. This element was generated on Thu Jun 24 11:35:04 CST 2021.
  81. -->
  82. insert into public_release_log
  83. <trim prefix="(" suffix=")" suffixOverrides=",">
  84. <if test="id != null">
  85. id,
  86. </if>
  87. <if test="prid != null">
  88. prid,
  89. </if>
  90. <if test="aid != null">
  91. aid,
  92. </if>
  93. <if test="remarks != null">
  94. remarks,
  95. </if>
  96. <if test="status != null">
  97. `status`,
  98. </if>
  99. <if test="createTime != null">
  100. create_time,
  101. </if>
  102. <if test="photoUrl != null">
  103. photo_url,
  104. </if>
  105. </trim>
  106. <trim prefix="values (" suffix=")" suffixOverrides=",">
  107. <if test="id != null">
  108. #{id,jdbcType=INTEGER},
  109. </if>
  110. <if test="prid != null">
  111. #{prid,jdbcType=INTEGER},
  112. </if>
  113. <if test="aid != null">
  114. #{aid,jdbcType=VARCHAR},
  115. </if>
  116. <if test="remarks != null">
  117. #{remarks,jdbcType=VARCHAR},
  118. </if>
  119. <if test="status != null">
  120. #{status,jdbcType=INTEGER},
  121. </if>
  122. <if test="createTime != null">
  123. #{createTime,jdbcType=TIMESTAMP},
  124. </if>
  125. <if test="photoUrl != null">
  126. #{photoUrl,jdbcType=LONGVARCHAR},
  127. </if>
  128. </trim>
  129. </insert>
  130. <update id="updateByPrimaryKeySelective" parameterType="com.goafanti.common.model.PublicReleaseLog">
  131. <!--
  132. WARNING - @mbg.generated
  133. This element is automatically generated by MyBatis Generator, do not modify.
  134. This element was generated on Thu Jun 24 11:35:04 CST 2021.
  135. -->
  136. update public_release_log
  137. <set>
  138. <if test="prid != null">
  139. prid = #{prid,jdbcType=INTEGER},
  140. </if>
  141. <if test="aid != null">
  142. aid = #{aid,jdbcType=VARCHAR},
  143. </if>
  144. <if test="remarks != null">
  145. remarks = #{remarks,jdbcType=VARCHAR},
  146. </if>
  147. <if test="status != null">
  148. `status` = #{status,jdbcType=INTEGER},
  149. </if>
  150. <if test="createTime != null">
  151. create_time = #{createTime,jdbcType=TIMESTAMP},
  152. </if>
  153. <if test="photoUrl != null">
  154. photo_url = #{photoUrl,jdbcType=LONGVARCHAR},
  155. </if>
  156. </set>
  157. where id = #{id,jdbcType=INTEGER}
  158. </update>
  159. <update id="updateByPrimaryKeyWithBLOBs" parameterType="com.goafanti.common.model.PublicReleaseLog">
  160. <!--
  161. WARNING - @mbg.generated
  162. This element is automatically generated by MyBatis Generator, do not modify.
  163. This element was generated on Thu Jun 24 11:35:04 CST 2021.
  164. -->
  165. update public_release_log
  166. set prid = #{prid,jdbcType=INTEGER},
  167. aid = #{aid,jdbcType=VARCHAR},
  168. remarks = #{remarks,jdbcType=VARCHAR},
  169. `status` = #{status,jdbcType=INTEGER},
  170. create_time = #{createTime,jdbcType=TIMESTAMP},
  171. photo_url = #{photoUrl,jdbcType=LONGVARCHAR}
  172. where id = #{id,jdbcType=INTEGER}
  173. </update>
  174. <update id="updateByPrimaryKey" parameterType="com.goafanti.common.model.PublicReleaseLog">
  175. <!--
  176. WARNING - @mbg.generated
  177. This element is automatically generated by MyBatis Generator, do not modify.
  178. This element was generated on Thu Jun 24 11:35:04 CST 2021.
  179. -->
  180. update public_release_log
  181. set prid = #{prid,jdbcType=INTEGER},
  182. aid = #{aid,jdbcType=VARCHAR},
  183. remarks = #{remarks,jdbcType=VARCHAR},
  184. `status` = #{status,jdbcType=INTEGER},
  185. create_time = #{createTime,jdbcType=TIMESTAMP}
  186. where id = #{id,jdbcType=INTEGER}
  187. </update>
  188. <select id="listPublicReleaseLog" resultType="com.goafanti.weChat.bo.outPublicReleaseLog">
  189. select a.id,a.aid ,a.prid ,a.remarks ,a.status ,b.name aname,a.photo_url photoUrl,
  190. date_format(a.create_time ,'%Y-%m-%d %H:%i:%S') createTimes
  191. from public_release_log a left join admin b on a.aid =b.id
  192. left join public_release pr on a.prid =pr.id
  193. where 1=1
  194. <if test="id !=null">
  195. and a.prid = #{id}
  196. </if>
  197. <if test="ufid !=null">
  198. and pr.ufid = #{ufid}
  199. </if>
  200. order by a.create_time desc
  201. </select>
  202. </mapper>