12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667 |
- <?xml version="1.0" encoding="UTF-8" ?>
- <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
- <mapper namespace="com.cxfws.demo.mapper.CkMapper">
- <resultMap type="map" id="ckLastUpdateInfo" autoMapping="true">
- <id column="ID" property="id" />
- </resultMap>
-
- <!-- <resultMap type="com.cxfws.client.service.gq.GqEntity" id="gqResultMap" autoMapping = "true"> -->
- <resultMap type="map" id="ckResultMap" autoMapping = "true">
- </resultMap>
- <sql id="cksql">
- SFTB, TBZT, YGRJ, YTHGCGRJ, SCYCKMJ, JTJID, CPYRJ, YKRJ, CKZMJ, CKRL, CKGS, YGRL,
- YTCRJ, LSTCRJ, SNTCRJ, QTSCYCKRJ, SCYCKRJ, WXPCKMJ, RECORD_STATUS, JD, WD, CKMC, CKYTMC, CKYT,
- SSGKGLBM, SSJYR, WXPCK, SZGK, CKLX, ID, SZD, SSMT, SZGQ,
- UPDATE_DATE_TIME, CREATE_DATE_TIME, SZZYQ, SSBW, KCSCLX, YCKID, XKZID, AQID
- </sql>
- <select id="ckLastUpdateTime" parameterType="java.lang.String" resultMap="ckLastUpdateInfo">
- select t.TABLENAME ,t.UPDATETIME from TIMETABLE t where TABLENAME = 'JToA_Ck'
- </select>
- <update id="upckLastUpdateTime" parameterType="java.util.Map">
- update TIMETABLE t set t.UPDATETIME = current_timestamp where TABLENAME = 'JToA_Ck'
- </update>
-
- <select id="queryAllCk" resultMap="ckResultMap">
- select
- <include refid="cksql"/>
- from GK_BASIC_JSJY_JYR_CK where SFTB = 'Y'
- </select>
- <select id="queryCkByCkid" parameterType="java.lang.String" resultMap="ckResultMap">
- select
- <include refid="cksql"/>
- from GK_BASIC_JSJY_JYR_CK where rownum = 1 and ID = #{CKID,jdbcType=VARCHAR}
- </select>
-
- <select id="queryCkBySsjyr" parameterType="java.lang.String" resultMap="ckResultMap">
- select
- <include refid="cksql"/>
- from GK_BASIC_JSJY_JYR_CK where ssjyr = #{SSJYR,jdbcType=VARCHAR}
- </select>
-
- <update id="updateCkAqid" parameterType="java.util.Map">
- update GK_BASIC_JSJY_JYR_CK t set t.AQID ='${AQID}' where t.id = '${ID}'
- </update>
- <update id="updateCkTbzt" parameterType="java.util.Map">
- update GK_BASIC_JSJY_JYR_CK t set t.TBZT ='${TBZT}' where t.id = '${ID}'
- </update>
-
- <select id="queryDeleteCk" parameterType="java.lang.String" resultMap="ckResultMap">
- select
- <include refid="cksql"/>
- from GK_BASIC_JSJY_JYR_CK where SFTB = 'Y' and (TBZT='N' or TBZT='Z') and RECORD_STATUS = '9' and aqid is not null
- </select>
-
- <update id="updateDeleteStatus" parameterType="java.util.Map">
- update GK_BASIC_JSJY_JYR_CK t set TBZT = decode(TBZT,'N','A','Z','Y') where t.aqid = #{id}
- </update>
-
- <select id="querySyncCk" parameterType="java.lang.String" resultMap="ckResultMap">
- select
- <include refid="cksql"/>
- from GK_BASIC_JSJY_JYR_CK where SFTB = 'Y' and (TBZT='N' or TBZT='Z') and RECORD_STATUS = '1'
- </select>
-
- <update id="updateSyncStatus" parameterType="java.util.Map">
- update GK_BASIC_JSJY_JYR_CK t set aqid = '${aqid}' ,TBZT = decode(TBZT,'N','A','Z','Y') where t.id = '${ckid}'
- </update>
- </mapper>
|