ckMapper.xml 2.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  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.cxfws.demo.mapper.CkMapper">
  4. <resultMap type="map" id="ckLastUpdateInfo" autoMapping="true">
  5. <id column="ID" property="id" />
  6. </resultMap>
  7. <!-- <resultMap type="com.cxfws.client.service.gq.GqEntity" id="gqResultMap" autoMapping = "true"> -->
  8. <resultMap type="map" id="ckResultMap" autoMapping = "true">
  9. </resultMap>
  10. <sql id="cksql">
  11. SFTB, TBZT, YGRJ, YTHGCGRJ, SCYCKMJ, JTJID, CPYRJ, YKRJ, CKZMJ, CKRL, CKGS, YGRL,
  12. YTCRJ, LSTCRJ, SNTCRJ, QTSCYCKRJ, SCYCKRJ, WXPCKMJ, RECORD_STATUS, JD, WD, CKMC, CKYTMC, CKYT,
  13. SSGKGLBM, SSJYR, WXPCK, SZGK, CKLX, ID, SZD, SSMT, SZGQ,
  14. UPDATE_DATE_TIME, CREATE_DATE_TIME, SZZYQ, SSBW, KCSCLX, YCKID, XKZID, AQID
  15. </sql>
  16. <select id="ckLastUpdateTime" parameterType="java.lang.String" resultMap="ckLastUpdateInfo">
  17. select t.TABLENAME ,t.UPDATETIME from TIMETABLE t where TABLENAME = 'JToA_Ck'
  18. </select>
  19. <update id="upckLastUpdateTime" parameterType="java.util.Map">
  20. update TIMETABLE t set t.UPDATETIME = current_timestamp where TABLENAME = 'JToA_Ck'
  21. </update>
  22. <select id="queryAllCk" resultMap="ckResultMap">
  23. select
  24. <include refid="cksql"/>
  25. from GK_BASIC_JSJY_JYR_CK where SFTB = 'Y'
  26. </select>
  27. <select id="queryCkByCkid" parameterType="java.lang.String" resultMap="ckResultMap">
  28. select
  29. <include refid="cksql"/>
  30. from GK_BASIC_JSJY_JYR_CK where rownum = 1 and ID = #{CKID,jdbcType=VARCHAR}
  31. </select>
  32. <select id="queryCkBySsjyr" parameterType="java.lang.String" resultMap="ckResultMap">
  33. select
  34. <include refid="cksql"/>
  35. from GK_BASIC_JSJY_JYR_CK where ssjyr = #{SSJYR,jdbcType=VARCHAR}
  36. </select>
  37. <update id="updateCkAqid" parameterType="java.util.Map">
  38. update GK_BASIC_JSJY_JYR_CK t set t.AQID ='${AQID}' where t.id = '${ID}'
  39. </update>
  40. <update id="updateCkTbzt" parameterType="java.util.Map">
  41. update GK_BASIC_JSJY_JYR_CK t set t.TBZT ='${TBZT}' where t.id = '${ID}'
  42. </update>
  43. <select id="queryDeleteCk" parameterType="java.lang.String" resultMap="ckResultMap">
  44. select
  45. <include refid="cksql"/>
  46. from GK_BASIC_JSJY_JYR_CK where SFTB = 'Y' and (TBZT='N' or TBZT='Z') and RECORD_STATUS = '9' and aqid is not null
  47. </select>
  48. <update id="updateDeleteStatus" parameterType="java.util.Map">
  49. update GK_BASIC_JSJY_JYR_CK t set TBZT = decode(TBZT,'N','A','Z','Y') where t.aqid = #{id}
  50. </update>
  51. <select id="querySyncCk" parameterType="java.lang.String" resultMap="ckResultMap">
  52. select
  53. <include refid="cksql"/>
  54. from GK_BASIC_JSJY_JYR_CK where SFTB = 'Y' and (TBZT='N' or TBZT='Z') and RECORD_STATUS = '1'
  55. </select>
  56. <update id="updateSyncStatus" parameterType="java.util.Map">
  57. update GK_BASIC_JSJY_JYR_CK t set aqid = '${aqid}' ,TBZT = decode(TBZT,'N','A','Z','Y') where t.id = '${ckid}'
  58. </update>
  59. </mapper>