HcGovTranslateDetailServiceDaoImplMapper.xml 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112
  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="hcGovTranslateDetailServiceDaoImpl">
  6. <!-- 保存信息分类信息 add by wuxw 2018-07-03 -->
  7. <insert id="saveHcGovTranslateDetailInfo" parameterType="Map">
  8. insert into hc_gov_translate_detail(
  9. tran_id,res_body,req_body,detail_id,community_id
  10. ) values (
  11. #{tranId},#{resBody},#{reqBody},#{detailId},#{communityId}
  12. )
  13. </insert>
  14. <!-- 查询信息分类信息 add by wuxw 2018-07-03 -->
  15. <select id="getHcGovTranslateDetailInfo" parameterType="Map" resultType="Map">
  16. select t.tran_id,t.tran_id tranId,t.create_time,t.create_time createTime,t.res_body,t.res_body
  17. resBody,t.req_body,t.req_body reqBody,t.detail_id,t.detail_id detailId,t.status_cd,t.status_cd
  18. statusCd,t.community_id,t.community_id communityId
  19. from hc_gov_translate_detail t
  20. where 1 =1
  21. <if test="tranId !=null and tranId != ''">
  22. and t.tran_id= #{tranId}
  23. </if>
  24. <if test="createTime !=null and createTime != ''">
  25. and t.create_time= #{createTime}
  26. </if>
  27. <if test="resBody !=null and resBody != ''">
  28. and t.res_body= #{resBody}
  29. </if>
  30. <if test="reqBody !=null and reqBody != ''">
  31. and t.req_body= #{reqBody}
  32. </if>
  33. <if test="detailId !=null and detailId != ''">
  34. and t.detail_id= #{detailId}
  35. </if>
  36. <if test="statusCd !=null and statusCd != ''">
  37. and t.status_cd= #{statusCd}
  38. </if>
  39. <if test="communityId !=null and communityId != ''">
  40. and t.community_id= #{communityId}
  41. </if>
  42. order by t.create_time desc
  43. <if test="page != -1 and page != null ">
  44. limit #{page}, #{row}
  45. </if>
  46. </select>
  47. <!-- 修改信息分类信息 add by wuxw 2018-07-03 -->
  48. <update id="updateHcGovTranslateDetailInfo" parameterType="Map">
  49. update hc_gov_translate_detail t set t.status_cd = #{statusCd}
  50. <if test="newBId != null and newBId != ''">
  51. ,t.b_id = #{newBId}
  52. </if>
  53. <if test="createTime !=null and createTime != ''">
  54. , t.create_time= #{createTime}
  55. </if>
  56. <if test="resBody !=null and resBody != ''">
  57. , t.res_body= #{resBody}
  58. </if>
  59. <if test="reqBody !=null and reqBody != ''">
  60. , t.req_body= #{reqBody}
  61. </if>
  62. where 1=1
  63. <if test="detailId !=null and detailId != ''">
  64. and t.detail_id= #{detailId}
  65. </if>
  66. <if test="tranId !=null and tranId != ''">
  67. and t.tran_id= #{tranId}
  68. </if>
  69. <if test="communityId !=null and communityId != ''">
  70. and t.community_id= #{communityId}
  71. </if>
  72. </update>
  73. <!-- 查询信息分类数量 add by wuxw 2018-07-03 -->
  74. <select id="queryHcGovTranslateDetailsCount" parameterType="Map" resultType="Map">
  75. select count(1) count
  76. from hc_gov_translate_detail t
  77. where 1 =1
  78. <if test="tranId !=null and tranId != ''">
  79. and t.tran_id= #{tranId}
  80. </if>
  81. <if test="createTime !=null and createTime != ''">
  82. and t.create_time= #{createTime}
  83. </if>
  84. <if test="resBody !=null and resBody != ''">
  85. and t.res_body= #{resBody}
  86. </if>
  87. <if test="reqBody !=null and reqBody != ''">
  88. and t.req_body= #{reqBody}
  89. </if>
  90. <if test="detailId !=null and detailId != ''">
  91. and t.detail_id= #{detailId}
  92. </if>
  93. <if test="statusCd !=null and statusCd != ''">
  94. and t.status_cd= #{statusCd}
  95. </if>
  96. <if test="communityId !=null and communityId != ''">
  97. and t.community_id= #{communityId}
  98. </if>
  99. </select>
  100. </mapper>