实有房屋

develop
Angel 10 months ago
parent f2f9c9def8
commit 811b4ea864

@ -2,3 +2,5 @@
sydzSwitch=false
#单次查询数据量
oncesCounts=10000
syfwSwitch=true

@ -0,0 +1,151 @@
package com.ssf.mysqloracletest.domain;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import lombok.Data;
/**
* (VSySyfw)
*
* @author makejava
* @since 2023-11-28 16:03:26
*/
@Data
public class VSySyfwMysql {
private String zjlid;
private String ysxtjrzj;
//
private String xxscPdbz;
private String dah;
private String jcwh;
private String fwid;
private String fwlx;
private String fwdz;
private String fwxz;
private String fwlb;
private String fwjg;
private String fjs;
private String mj;
private String czyt;
private String djrq;
//姓名
private String xm;
private String sfzh;
private String xb;
private String hjdqx;
private String hjdxz;
private String xzdqx;
private String xzdxz;
private String dwmc;
private String dwxz;
private String lxdh;
private String lrrid;
private String lrr;
private String lrsj;
private String xgrid;
private String xgrxm;
private String xgsj;
private String tbbs;
private String tbsj;
private String memo;
private String bz;
private String dqrq;
private String sjfwid;
private String dyhcode;
private String pcsdm;
private String jwqid;
private String ssys;
private String sno;
private String zxrq;
private String zxyy;
private String lkbzdzid;
private String lkbzdzmc;
private String fwzt;
private String czfwbm;
private String czfwqm;
private String tbmemo;
private String sfcz;
private String jzlx;
private String fwdj;
private String zdfw;
private String zdry;
private String sfqz;
private String zjlx;
private String zflx;
private String cws;
private String czrzjlx;
private String czrzjhm;
private String czrxm;
private String czrlxdh;
private String cdcJym;
private String ysbzkRksj;
private String ysbzkGxsj;
}

@ -0,0 +1,138 @@
package com.ssf.mysqloracletest.domain;
import lombok.Data;
@Data
public class VSySyfwOracle {
private String zjlid;
private String ysxtjrzj;
private String xxscPdbz;
private String dah;
private String jcwh;
private String fwid;
private String fwlx;
private String fwdz;
private String fwxz;
private String fwlb;
private String fwjg;
private String fjs;
private String mj;
private String czyt;
private String djrq;
private String xm;
private String sfzh;
private String xb;
private String hjdqx;
private String hjdxz;
private String xzdqx;
private String xzdxz;
private String dwmc;
private String dwxz;
private String lxdh;
private String lrrid;
private String lrr;
private String lrsj;
private String xgrid;
private String xgrxm;
private String xgsj;
private String tbbs;
private String tbsj;
private String memo;
private String bz;
private String dqrq;
private String sjfwid;
private String dyhcode;
private String pcsdm;
private String jwqid;
private String ssys;
private String sno;
private String zxrq;
private String zxyy;
private String lkbzdzid;
private String lkbzdzmc;
private String fwzt;
private String czfwbm;
private String czfwqm;
private String tbmemo;
private String sfcz;
private String jzlx;
private String fwdj;
private String zdfw;
private String zdry;
private String sfqz;
private String zjlx;
private String zflx;
private String cws;
private String czrzjlx;
private String czrzjhm;
private String czrxm;
private String czrlxdh;
private String cdcJym;
private String ysbzkRksj;
private String ysbzkGxsj;
}

@ -0,0 +1,22 @@
package com.ssf.mysqloracletest.mapper;
import com.ssf.mysqloracletest.domain.VSySyfwMysql;
import org.apache.ibatis.annotations.Mapper;
/**
* (VSySyfw)访
*
* @author makejava
* @since 2023-11-28 16:03:25
*/
@Mapper
public interface VSySyfwMysqlMapper {
public VSySyfwMysql selectVSySyfwById(String id);
public int insertVSySyfw(VSySyfwMysql bean);
public int updateVSySyfwById(VSySyfwMysql bean);
}

@ -0,0 +1,14 @@
package com.ssf.mysqloracletest.mapper;
import com.ssf.mysqloracletest.domain.VSySyfwOracle;
import org.apache.ibatis.annotations.Mapper;
import java.util.List;
import java.util.Map;
@Mapper
public interface VSySyfwOracleMapper {
public int countSyfw();
public List<VSySyfwOracle> getSyfwList(Map map);
}

@ -0,0 +1,19 @@
package com.ssf.mysqloracletest.service;
import com.ssf.mysqloracletest.domain.VSySyfwMysql;
/**
* (VSySyfw)
*
* @author makejava
* @since 2023-11-28 16:03:26
*/
public interface VSySyfwMysqlService {
public VSySyfwMysql selectVSySyfwById(String id);
public int insertVSySyfw(VSySyfwMysql syfw);
public int updateVSySyfwById(VSySyfwMysql syfw);
}

@ -0,0 +1,13 @@
package com.ssf.mysqloracletest.service;
import com.ssf.mysqloracletest.domain.VSySyfwOracle;
import java.util.List;
import java.util.Map;
public interface VSySyfwOracleService {
public int countSyfw();
public List<VSySyfwOracle> getSyfwList(Map map);
}

@ -4,6 +4,7 @@ import com.baomidou.dynamic.datasource.annotation.DS;
import com.ssf.mysqloracletest.domain.VSySydzOracle;
import com.ssf.mysqloracletest.mapper.VSySydzOracleMapper;
import com.ssf.mysqloracletest.service.VSySydzOracleService;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;

@ -0,0 +1,41 @@
package com.ssf.mysqloracletest.service.impl;
import com.baomidou.dynamic.datasource.annotation.DS;
import com.ssf.mysqloracletest.domain.VSySyfwMysql;
import com.ssf.mysqloracletest.mapper.VSySyfwMysqlMapper;
import com.ssf.mysqloracletest.mapper.VSySyfwMysqlMapper;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;
import com.ssf.mysqloracletest.service.VSySyfwMysqlService;
/**
* (VSySyfw)
*
* @author makejava
* @since 2023-11-28 16:03:26
*/
@Service
@DS("mysql")
@RequiredArgsConstructor
public class VSySyfwMysqlServiceImpl implements VSySyfwMysqlService {
private final VSySyfwMysqlMapper sySyfwMysqlMapper;
@Override
public VSySyfwMysql selectVSySyfwById(String id) {
return sySyfwMysqlMapper.selectVSySyfwById(id);
}
@Override
public int insertVSySyfw(VSySyfwMysql syfw) {
return 0;
}
@Override
public int updateVSySyfwById(VSySyfwMysql syfw) {
return 0;
}
}

@ -0,0 +1,29 @@
package com.ssf.mysqloracletest.service.impl;
import com.baomidou.dynamic.datasource.annotation.DS;
import com.ssf.mysqloracletest.domain.VSySyfwOracle;
import com.ssf.mysqloracletest.mapper.VSySyfwOracleMapper;
import com.ssf.mysqloracletest.service.VSySyfwOracleService;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.List;
import java.util.Map;
@Service
@DS("oracleSydz")
public class VSySyfwOracleServiceImpl implements VSySyfwOracleService {
@Resource
private VSySyfwOracleMapper oracleMapper;
@Override
public int countSyfw() {
return oracleMapper.countSyfw();
}
@Override
public List<VSySyfwOracle> getSyfwList(Map map) {
return oracleMapper.getSyfwList(map);
}
}

@ -22,7 +22,7 @@ import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
/**
*
*
*/
@Component
public class VSySydzTask {

@ -0,0 +1,118 @@
package com.ssf.mysqloracletest.task;
import com.ssf.mysqloracletest.domain.VSySydzMysql;
import com.ssf.mysqloracletest.domain.VSySydzOracle;
import com.ssf.mysqloracletest.domain.VSySyfwMysql;
import com.ssf.mysqloracletest.domain.VSySyfwOracle;
import com.ssf.mysqloracletest.service.VSySydzMysqlService;
import com.ssf.mysqloracletest.service.VSySydzOracleService;
import com.ssf.mysqloracletest.service.VSySyfwMysqlService;
import com.ssf.mysqloracletest.service.VSySyfwOracleService;
import com.ssf.mysqloracletest.utils.ConfigParam;
import com.ssf.mysqloracletest.utils.NumKit;
import com.ssf.mysqloracletest.utils.StringKit;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.BeanUtils;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;
import javax.annotation.Resource;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
/**
*
*/
@Component
public class VSySyfwTask {
private static final Logger logger = LoggerFactory.getLogger(VSySyfwTask.class);
@Resource
private VSySyfwMysqlService syfwMysqlService;
@Resource
private VSySyfwOracleService syfwOracleService;
final int oncesCounts = NumKit.checkInt(ConfigParam.oncesCounts) == 0 ? 1000 : NumKit.checkInt(ConfigParam.oncesCounts);
private boolean syfwTag = false;
/**
*
* //
*/
@Scheduled(initialDelay = 100, fixedDelay = 3000)
public void transSyfw() {
if (syfwTag) {
return;
}
if (!"true".equals(ConfigParam.syfwSwitch)) {
return;
}
try {
int countSyfw = syfwOracleService.countSyfw();
logger.info("countsyfw:" + countSyfw);
if (countSyfw > 0) {
syfwTag = true;
int count = countSyfw / oncesCounts;
CountDownLatch latch = new CountDownLatch(count);
ExecutorService syfwPool = Executors.newFixedThreadPool(50);
for (int i = 0; i <= count; i++) {
Map syfwMap = new HashMap();
syfwMap.put("rowStart", i * oncesCounts);
syfwMap.put("rowEnd", (i + 1) * oncesCounts);
syfwPool.submit(() -> {
try {
List<VSySyfwOracle> syfws = syfwOracleService.getSyfwList(syfwMap);
for (VSySyfwOracle syfw : syfws) {
VSySyfwMysql sBean = new VSySyfwMysql();
BeanUtils.copyProperties(syfw, sBean);
//确定一个数据是否唯一
VSySyfwMysql checkSyfw = syfwMysqlService.selectVSySyfwById(syfw.getZjlid());
if (checkSyfw == null) {
syfwMysqlService.insertVSySyfw(sBean);
logger.info("syfw-" + syfw.getZjlid() + ":插入成功");
} else {
syfwMysqlService.updateVSySyfwById(sBean);
logger.info("syfw-" + syfw.getZjlid() + ":更新成功");
}
}
} catch (Exception e) {
logger.info("syfws:" + e.getMessage());
}
latch.countDown();
});
logger.info("syfwMap数据总量:" + countSyfw + "," + "当前处理下标:" + syfwMap.get("rowStart") + "/" + syfwMap.get("rowEnd"));
}
try {
// Wait for all threads to complete
latch.await();
} catch (InterruptedException e) {
e.printStackTrace();
}
// 关闭线程池
syfwPool.shutdown();
}
} catch (Exception e) {
logger.info(StringKit.getTrace(e));
}
}
}

@ -10,4 +10,6 @@ public class ConfigParam {
public static String seq = File.separator;
public static String sydzSwitch = StringKit.toString(PropertiesUtil.queryPropertiesByKey("sydzSwitch"));
public static String oncesCounts = StringKit.toString(PropertiesUtil.queryPropertiesByKey("oncesCounts"));
public static String syfwSwitch = StringKit.toString(PropertiesUtil.queryPropertiesByKey("syfwSwitch"));
}

@ -13,7 +13,6 @@
<result property="DZDXTYMC" column="DZDXTYMC"/>
<result property="SJDZYSID" column="SJDZYSID"/>
<result property="DZYSID" column="DZYSID"/>
</resultMap>
<select id="selectVSySydzById" parameterType="java.lang.String" resultMap="VSySydzResult">

@ -2,7 +2,8 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="com.ssf.mysqloracletest.mapper.VSySydzOracleMapper">
<select id="countSydz" resultType="int">
select count(*) from SYX_JWYSJ.V_SY_SYDZ
select count(*)
from SYX_JWYSJ.V_SY_SYDZ
</select>
<resultMap type="com.ssf.mysqloracletest.domain.VSySydzOracle" id="SydzResult">
@ -18,7 +19,9 @@
</resultMap>
<select id="getSydzList" parameterType="java.util.Map" resultMap="SydzResult">
SELECT t2.* FROM (SELECT ROWNUM rn,t1.* FROM (SELECT * FROM SYX_JWYSJ.V_SY_SYDZ) t1 WHERE ROWNUM<![CDATA[ <= ]]> ${rowEnd}) t2 WHERE t2.rn <![CDATA[ >= ]]> ${rowStart}
SELECT t2.*
FROM (SELECT ROWNUM rn, t1.* FROM (SELECT * FROM SYX_JWYSJ.V_SY_SYDZ) t1 WHERE ROWNUM<![CDATA[ <= ]]> ${rowEnd}) t2
WHERE t2.rn <![CDATA[ >= ]]> ${rowStart}
</select>
</mapper>

@ -0,0 +1,313 @@
<?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.ssf.mysqloracletest.mapper.VSySyfwMysqlMapper">
<resultMap type="com.ssf.mysqloracletest.domain.VSySyfwMysql" id="VSySyfwResult">
<result property="zjlid" column="ZJLID"/>
<result property="ysxtjrzj" column="YSXTJRZJ"/>
<result property="xxscPdbz" column="XXSC_PDBZ"/>
<result property="dah" column="DAH"/>
<result property="jcwh" column="JCWH"/>
<result property="fwid" column="FWID"/>
<result property="fwlx" column="FWLX"/>
<result property="fwdz" column="FWDZ"/>
<result property="fwxz" column="FWXZ"/>
<result property="fwlb" column="FWLB"/>
<result property="fwjg" column="FWJG"/>
<result property="fjs" column="FJS"/>
<result property="mj" column="MJ"/>
<result property="czyt" column="CZYT"/>
<result property="djrq" column="DJRQ"/>
<result property="xm" column="XM"/>
<result property="sfzh" column="SFZH"/>
<result property="xb" column="XB"/>
<result property="hjdqx" column="HJDQX"/>
<result property="hjdxz" column="HJDXZ"/>
<result property="xzdqx" column="XZDQX"/>
<result property="xzdxz" column="XZDXZ"/>
<result property="dwmc" column="DWMC"/>
<result property="dwxz" column="DWXZ"/>
<result property="lxdh" column="LXDH"/>
<result property="lrrid" column="LRRID"/>
<result property="lrr" column="LRR"/>
<result property="lrsj" column="LRSJ"/>
<result property="xgrid" column="XGRID"/>
<result property="xgrxm" column="XGRXM"/>
<result property="xgsj" column="XGSJ"/>
<result property="tbbs" column="TBBS"/>
<result property="tbsj" column="TBSJ"/>
<result property="memo" column="MEMO"/>
<result property="bz" column="BZ"/>
<result property="dqrq" column="DQRQ"/>
<result property="sjfwid" column="SJFWID"/>
<result property="dyhcode" column="DYHCODE"/>
<result property="pcsdm" column="PCSDM"/>
<result property="jwqid" column="JWQID"/>
<result property="ssys" column="SSYS"/>
<result property="sno" column="SNO"/>
<result property="zxrq" column="ZXRQ"/>
<result property="zxyy" column="ZXYY"/>
<result property="lkbzdzid" column="LKBZDZID"/>
<result property="lkbzdzmc" column="LKBZDZMC"/>
<result property="fwzt" column="FWZT"/>
<result property="czfwbm" column="CZFWBM"/>
<result property="czfwqm" column="CZFWQM"/>
<result property="tbmemo" column="TBMEMO"/>
<result property="sfcz" column="SFCZ"/>
<result property="jzlx" column="JZLX"/>
<result property="fwdj" column="FWDJ"/>
<result property="zdfw" column="ZDFW"/>
<result property="zdry" column="ZDRY"/>
<result property="sfqz" column="SFQZ"/>
<result property="zjlx" column="ZJLX"/>
<result property="zflx" column="ZFLX"/>
<result property="cws" column="CWS"/>
<result property="czrzjlx" column="CZRZJLX"/>
<result property="czrzjhm" column="CZRZJHM"/>
<result property="czrxm" column="CZRXM"/>
<result property="czrlxdh" column="CZRLXDH"/>
<result property="cdcJym" column="CDC_JYM"/>
<result property="ysbzkRksj" column="YSBZK_RKSJ"/>
<result property="ysbzkGxsj" column="YSBZK_GXSJ"/>
</resultMap>
<select id="selectVSySyfwById" parameterType="java.lang.String" resultMap="VSySyfwResult">
select *
from v_sy_syfw
where zjlid = #{zjlid}
limit 1
</select>
<insert id="insertVSySyfw" parameterType="com.ssf.mysqloracletest.domain.VSySyfwMysql" useGeneratedKeys="true"
keyProperty="id">
insert into v_sy_syfw
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="zjlid != null and zjlid != '' ">ZJLID,</if>
<if test="ysxtjrzj != null and ysxtjrzj != ''">YSXTJRZJ,</if>
<if test="xxscPdbz != null and xxscPdbz != ''">XXSC_PDBZ,</if>
<if test="dah != null and dah != ''">DAH,</if>
<if test="jcwh != null and jcwh != ''">JCWH,</if>
<if test="fwid != null and fwid != ''">FWID,</if>
<if test="fwlx != null and fwlx != ''">FWLX,</if>
<if test="fwdz != null and fwdz != ''">FWDZ,</if>
<if test="fwxz != null and fwxz != ''">FWXZ,</if>
<if test="fwlb != null and fwlb != ''">FWLB,</if>
<if test="fwjg != null and fwjg != ''">FWJG,</if>
<if test="fjs != null and fjs != ''">FJS,</if>
<if test="mj != null and mj != ''">MJ,</if>
<if test="czyt != null and czyt != ''">CZYT,</if>
<if test="djrq != null and djrq != ''">DJRQ,</if>
<if test="xm != null and xm != ''">XM,</if>
<if test="sfzh != null and sfzh != ''">SFZH,</if>
<if test="xb != null and xb != ''">XB,</if>
<if test="hjdqx != null and hjdqx != ''">HJDQX,</if>
<if test="hjdxz != null and hjdxz != ''">HJDXZ,</if>
<if test="xzdqx != null and xzdqx != ''">XZDQX,</if>
<if test="xzdxz != null and xzdxz != ''">XZDXZ,</if>
<if test="dwmc != null and dwmc != ''">DWMC,</if>
<if test="dwxz != null and dwxz != ''">DWXZ,</if>
<if test="lxdh != null and lxdh != ''">LXDH,</if>
<if test="lrrid != null and lrrid != ''">LRRID,</if>
<if test="lrr != null and lrr != ''">LRR,</if>
<if test="lrsj != null and lrsj != ''">LRSJ,</if>
<if test="xgrid != null and xgrid != ''">XGRID,</if>
<if test="xgrxm != null and xgrxm != ''">XGRXM,</if>
<if test="xgsj != null and xgsj != ''">XGSJ,</if>
<if test="tbbs != null and tbbs != ''">TBBS,</if>
<if test="tbsj != null and tbsj != ''">TBSJ,</if>
<if test="memo != null and memo != ''">MEMO,</if>
<if test="bz != null and bz != ''">BZ,</if>
<if test="dqrq != null and dqrq != ''">DQRQ,</if>
<if test="sjfwid != null and sjfwid != ''">SJFWID,</if>
<if test="dyhcode != null and dyhcode != ''">DYHCODE,</if>
<if test="pcsdm != null and pcsdm != ''">PCSDM,</if>
<if test="jwqid != null and jwqid != ''">JWQID,</if>
<if test="ssys != null and ssys != ''">SSYS,</if>
<if test="sno != null and sno != ''">SNO,</if>
<if test="zxrq != null and zxrq != ''">ZXRQ,</if>
<if test="zxyy != null and zxyy != ''">ZXYY,</if>
<if test="lkbzdzid != null and lkbzdzid != ''">LKBZDZID,</if>
<if test="lkbzdzmc != null and lkbzdzmc != ''">LKBZDZMC,</if>
<if test="fwzt != null and fwzt != ''">FWZT,</if>
<if test="czfwbm != null and czfwbm != ''">CZFWBM,</if>
<if test="czfwqm != null and czfwqm != ''">CZFWQM,</if>
<if test="tbmemo != null and tbmemo != ''">TBMEMO,</if>
<if test="sfcz != null and sfcz != ''">SFCZ,</if>
<if test="jzlx != null and jzlx != ''">JZLX,</if>
<if test="fwdj != null and fwdj != ''">FWDJ,</if>
<if test="zdfw != null and zdfw != ''">ZDFW,</if>
<if test="zdry != null and zdry != ''">ZDRY,</if>
<if test="sfqz != null and sfqz != ''">SFQZ,</if>
<if test="zjlx != null and zjlx != ''">ZJLX,</if>
<if test="zflx != null and zflx != ''">ZFLX,</if>
<if test="cws != null and cws != ''">CWS,</if>
<if test="czrzjlx != null and czrzjlx != ''">CZRZJLX,</if>
<if test="czrzjhm != null and czrzjhm != ''">CZRZJHM,</if>
<if test="czrxm != null and czrxm != ''">CZRXM,</if>
<if test="czrlxdh != null and czrlxdh != ''">CZRLXDH,</if>
<if test="cdcJym != null and cdcJym != ''">CDC_JYM,</if>
<if test="ysbzkRksj != null and ysbzkRksj != ''">YSBZK_RKSJ,</if>
<if test="ysbzkGxsj != null and ysbzkGxsj != ''">YSBZK_GXSJ,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="zjlid != null and zjlid != '' ">#{ZJLID},</if>
<if test="ysxtjrzj != null and ysxtjrzj != ''">#{YSXTJRZJ},</if>
<if test="xxscPdbz != null and xxscPdbz != ''">#{XXSC_PDBZ},</if>
<if test="dah != null and dah != ''">#{DAH},</if>
<if test="jcwh != null and jcwh != ''">#{JCWH},</if>
<if test="fwid != null and fwid != ''">#{FWID},</if>
<if test="fwlx != null and fwlx != ''">#{FWLX},</if>
<if test="fwdz != null and fwdz != ''">#{FWDZ},</if>
<if test="fwxz != null and fwxz != ''">#{FWXZ},</if>
<if test="fwlb != null and fwlb != ''">#{FWLB},</if>
<if test="fwjg != null and fwjg != ''">#{FWJG},</if>
<if test="fjs != null and fjs != ''">#{FJS},</if>
<if test="mj != null and mj != ''">#{MJ},</if>
<if test="czyt != null and czyt != ''">#{CZYT},</if>
<if test="djrq != null and djrq != ''">#{DJRQ},</if>
<if test="xm != null and xm != ''">#{XM},</if>
<if test="sfzh != null and sfzh != ''">#{SFZH},</if>
<if test="xb != null and xb != ''">#{XB},</if>
<if test="hjdqx != null and hjdqx != ''">#{HJDQX},</if>
<if test="hjdxz != null and hjdxz != ''">#{HJDXZ},</if>
<if test="xzdqx != null and xzdqx != ''">#{XZDQX},</if>
<if test="xzdxz != null and xzdxz != ''">#{XZDXZ},</if>
<if test="dwmc != null and dwmc != ''">#{DWMC},</if>
<if test="dwxz != null and dwxz != ''">#{DWXZ},</if>
<if test="lxdh != null and lxdh != ''">#{LXDH},</if>
<if test="lrrid != null and lrrid != ''">#{LRRID},</if>
<if test="lrr != null and lrr != ''">#{LRR},</if>
<if test="lrsj != null and lrsj != ''">#{LRSJ},</if>
<if test="xgrid != null and xgrid != ''">#{XGRID},</if>
<if test="xgrxm != null and xgrxm != ''">#{XGRXM},</if>
<if test="xgsj != null and xgsj != ''">#{XGSJ},</if>
<if test="tbbs != null and tbbs != ''">#{TBBS},</if>
<if test="tbsj != null and tbsj != ''">#{TBSJ},</if>
<if test="memo != null and memo != ''">#{MEMO},</if>
<if test="bz != null and bz != ''">#{BZ},</if>
<if test="dqrq != null and dqrq != ''">#{DQRQ},</if>
<if test="sjfwid != null and sjfwid != ''">#{SJFWID},</if>
<if test="dyhcode != null and dyhcode != ''">#{DYHCODE},</if>
<if test="pcsdm != null and pcsdm != ''">#{PCSDM},</if>
<if test="jwqid != null and jwqid != ''">#{JWQID},</if>
<if test="ssys != null and ssys != ''">#{SSYS},</if>
<if test="sno != null and sno != ''">#{SNO},</if>
<if test="zxrq != null and zxrq != ''">#{ZXRQ},</if>
<if test="zxyy != null and zxyy != ''">#{ZXYY},</if>
<if test="lkbzdzid != null and lkbzdzid != ''">#{LKBZDZID},</if>
<if test="lkbzdzmc != null and lkbzdzmc != ''">#{LKBZDZMC},</if>
<if test="fwzt != null and fwzt != ''">#{FWZT},</if>
<if test="czfwbm != null and czfwbm != ''">#{CZFWBM},</if>
<if test="czfwqm != null and czfwqm != ''">#{CZFWQM},</if>
<if test="tbmemo != null and tbmemo != ''">#{TBMEMO},</if>
<if test="sfcz != null and sfcz != ''">#{SFCZ},</if>
<if test="jzlx != null and jzlx != ''">#{JZLX},</if>
<if test="fwdj != null and fwdj != ''">#{FWDJ},</if>
<if test="zdfw != null and zdfw != ''">#{ZDFW},</if>
<if test="zdry != null and zdry != ''">#{ZDRY},</if>
<if test="sfqz != null and sfqz != ''">#{SFQZ},</if>
<if test="zjlx != null and zjlx != ''">#{ZJLX},</if>
<if test="zflx != null and zflx != ''">#{ZFLX},</if>
<if test="cws != null and cws != ''">#{CWS},</if>
<if test="czrzjlx != null and czrzjlx != ''">#{CZRZJLX},</if>
<if test="czrzjhm != null and czrzjhm != ''">#{CZRZJHM},</if>
<if test="czrxm != null and czrxm != ''">#{CZRXM},</if>
<if test="czrlxdh != null and czrlxdh != ''">#{CZRLXDH},</if>
<if test="cdcJym != null and cdcJym != ''">#{CDC_JYM},</if>
<if test="ysbzkRksj != null and ysbzkRksj != ''">#{YSBZK_RKSJ},</if>
<if test="ysbzkGxsj != null and ysbzkGxsj != ''">#{YSBZK_GXSJ},</if>
</trim>
</insert>
<update id="updateVSySyfwById" parameterType="com.ssf.mysqloracletest.domain.VSySyfwMysql">
update v_sy_sydz
<trim prefix="SET" suffixOverrides=",">
<if test="zjlid != null and zjlid != '' ">zjlid = #{ZJLID},</if>
<if test="ysxtjrzj != null and ysxtjrzj != ''">ysxtjrzj=#{YSXTJRZJ},</if>
<if test="xxscPdbz != null and xxscPdbz != ''">xxscPdbz=#{XXSC_PDBZ},</if>
<if test="dah != null and dah != ''">dah=#{DAH},</if>
<if test="jcwh != null and jcwh != ''">jcwh=#{JCWH},</if>
<if test="fwid != null and fwid != ''">fwid=#{FWID},</if>
<if test="fwlx != null and fwlx != ''">fwlx=#{FWLX},</if>
<if test="fwdz != null and fwdz != ''">fwdz=#{FWDZ},</if>
<if test="fwxz != null and fwxz != ''">fwxz=#{FWXZ},</if>
<if test="fwlb != null and fwlb != ''">fwlb=#{FWLB},</if>
<if test="fwjg != null and fwjg != ''">fwjg=#{FWJG},</if>
<if test="fjs != null and fjs != ''">fjs=#{FJS},</if>
<if test="mj != null and mj != ''">mj=#{MJ},</if>
<if test="czyt != null and czyt != ''">czyt=#{CZYT},</if>
<if test="djrq != null and djrq != ''">djrq=#{DJRQ},</if>
<if test="xm != null and xm != ''">xm=#{XM},</if>
<if test="sfzh != null and sfzh != ''">sfzh=#{SFZH},</if>
<if test="xb != null and xb != ''">xb=#{XB},</if>
<if test="hjdqx != null and hjdqx != ''">hjdqx=#{HJDQX},</if>
<if test="hjdxz != null and hjdxz != ''">hjdxz=#{HJDXZ},</if>
<if test="xzdqx != null and xzdqx != ''">xzdqx=#{XZDQX},</if>
<if test="xzdxz != null and xzdxz != ''">xzdxz=#{XZDXZ},</if>
<if test="dwmc != null and dwmc != ''">dwmc=#{DWMC},</if>
<if test="dwxz != null and dwxz != ''">dwxz=#{DWXZ},</if>
<if test="lxdh != null and lxdh != ''">lxdh=#{LXDH},</if>
<if test="lrrid != null and lrrid != ''">lrrid=#{LRRID},</if>
<if test="lrr != null and lrr != ''">lrr=#{LRR},</if>
<if test="lrsj != null and lrsj != ''">lrsj=#{LRSJ},</if>
<if test="xgrid != null and xgrid != ''">xgrid=#{XGRID},</if>
<if test="xgrxm != null and xgrxm != ''">xgrxm=#{XGRXM},</if>
<if test="xgsj != null and xgsj != ''">xgsj=#{XGSJ},</if>
<if test="tbbs != null and tbbs != ''">tbbs=#{TBBS},</if>
<if test="tbsj != null and tbsj != ''">tbsj=#{TBSJ},</if>
<if test="memo != null and memo != ''">memo=#{MEMO},</if>
<if test="bz != null and bz != ''">bz=#{BZ},</if>
<if test="dqrq != null and dqrq != ''">dqrq=#{DQRQ},</if>
<if test="sjfwid != null and sjfwid != ''">sjfwid=#{SJFWID},</if>
<if test="dyhcode != null and dyhcode != ''">dyhcode=#{DYHCODE},</if>
<if test="pcsdm != null and pcsdm != ''">pcsdm=#{PCSDM},</if>
<if test="jwqid != null and jwqid != ''">jwqid=#{JWQID},</if>
<if test="ssys != null and ssys != ''">ssys=#{SSYS},</if>
<if test="sno != null and sno != ''">sno=#{SNO},</if>
<if test="zxrq != null and zxrq != ''">zxrq=#{ZXRQ},</if>
<if test="zxyy != null and zxyy != ''">zxyy=#{ZXYY},</if>
<if test="lkbzdzid != null and lkbzdzid != ''">lkbzdzid=#{LKBZDZID},</if>
<if test="lkbzdzmc != null and lkbzdzmc != ''">lkbzdzmc=#{LKBZDZMC},</if>
<if test="fwzt != null and fwzt != ''">fwzt=#{FWZT},</if>
<if test="czfwbm != null and czfwbm != ''">czfwbm=#{CZFWBM},</if>
<if test="czfwqm != null and czfwqm != ''">czfwqm=#{CZFWQM},</if>
<if test="tbmemo != null and tbmemo != ''">tbmemo=#{TBMEMO},</if>
<if test="sfcz != null and sfcz != ''">sfcz=#{SFCZ},</if>
<if test="jzlx != null and jzlx != ''">jzlx=#{JZLX},</if>
<if test="fwdj != null and fwdj != ''">fwdj=#{FWDJ},</if>
<if test="zdfw != null and zdfw != ''">zdfw=#{ZDFW},</if>
<if test="zdry != null and zdry != ''">zdry=#{ZDRY},</if>
<if test="sfqz != null and sfqz != ''">sfqz=#{SFQZ},</if>
<if test="zjlx != null and zjlx != ''">zjlx=#{ZJLX},</if>
<if test="zflx != null and zflx != ''">zflx=#{ZFLX},</if>
<if test="cws != null and cws != ''">cws=#{CWS},</if>
<if test="czrzjlx != null and czrzjlx != ''">czrzjlx=#{CZRZJLX},</if>
<if test="czrzjhm != null and czrzjhm != ''">czrzjhm=#{CZRZJHM},</if>
<if test="czrxm != null and czrxm != ''">czrxm=#{CZRXM},</if>
<if test="czrlxdh != null and czrlxdh != ''">czrlxdh=#{CZRLXDH},</if>
<if test="cdcJym != null and cdcJym != ''">cdcJym=#{CDC_JYM},</if>
<if test="ysbzkRksj != null and ysbzkRksj != ''">ysbzkRksj=#{YSBZK_RKSJ},</if>
<if test="ysbzkGxsj != null and ysbzkGxsj != ''">ysbzkGxsj=#{YSBZK_GXSJ},</if>
</trim>
where DZDXMC = #{DZDXMC}
</update>
</mapper>

@ -0,0 +1,85 @@
<?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.ssf.mysqloracletest.mapper.VSySyfwOracleMapper">
<select id="countSyfw" resultType="int">
select count(*)
from SYX_JWYSJ.V_SY_SYFW
</select>
<resultMap type="com.ssf.mysqloracletest.domain.VSySyfwOracle" id="SyfwResult">
<result property="zjlid" column="ZJLID"/>
<result property="ysxtjrzj" column="YSXTJRZJ"/>
<result property="xxscPdbz" column="XXSC_PDBZ"/>
<result property="dah" column="DAH"/>
<result property="jcwh" column="JCWH"/>
<result property="fwid" column="FWID"/>
<result property="fwlx" column="FWLX"/>
<result property="fwdz" column="FWDZ"/>
<result property="fwxz" column="FWXZ"/>
<result property="fwlb" column="FWLB"/>
<result property="fwjg" column="FWJG"/>
<result property="fjs" column="FJS"/>
<result property="mj" column="MJ"/>
<result property="czyt" column="CZYT"/>
<result property="djrq" column="DJRQ"/>
<result property="xm" column="XM"/>
<result property="sfzh" column="SFZH"/>
<result property="xb" column="XB"/>
<result property="hjdqx" column="HJDQX"/>
<result property="hjdxz" column="HJDXZ"/>
<result property="xzdqx" column="XZDQX"/>
<result property="xzdxz" column="XZDXZ"/>
<result property="dwmc" column="DWMC"/>
<result property="dwxz" column="DWXZ"/>
<result property="lxdh" column="LXDH"/>
<result property="lrrid" column="LRRID"/>
<result property="lrr" column="LRR"/>
<result property="lrsj" column="LRSJ"/>
<result property="xgrid" column="XGRID"/>
<result property="xgrxm" column="XGRXM"/>
<result property="xgsj" column="XGSJ"/>
<result property="tbbs" column="TBBS"/>
<result property="tbsj" column="TBSJ"/>
<result property="memo" column="MEMO"/>
<result property="bz" column="BZ"/>
<result property="dqrq" column="DQRQ"/>
<result property="sjfwid" column="SJFWID"/>
<result property="dyhcode" column="DYHCODE"/>
<result property="pcsdm" column="PCSDM"/>
<result property="jwqid" column="JWQID"/>
<result property="ssys" column="SSYS"/>
<result property="sno" column="SNO"/>
<result property="zxrq" column="ZXRQ"/>
<result property="zxyy" column="ZXYY"/>
<result property="lkbzdzid" column="LKBZDZID"/>
<result property="lkbzdzmc" column="LKBZDZMC"/>
<result property="fwzt" column="FWZT"/>
<result property="czfwbm" column="CZFWBM"/>
<result property="czfwqm" column="CZFWQM"/>
<result property="tbmemo" column="TBMEMO"/>
<result property="sfcz" column="SFCZ"/>
<result property="jzlx" column="JZLX"/>
<result property="fwdj" column="FWDJ"/>
<result property="zdfw" column="ZDFW"/>
<result property="zdry" column="ZDRY"/>
<result property="sfqz" column="SFQZ"/>
<result property="zjlx" column="ZJLX"/>
<result property="zflx" column="ZFLX"/>
<result property="cws" column="CWS"/>
<result property="czrzjlx" column="CZRZJLX"/>
<result property="czrzjhm" column="CZRZJHM"/>
<result property="czrxm" column="CZRXM"/>
<result property="czrlxdh" column="CZRLXDH"/>
<result property="cdcJym" column="CDC_JYM"/>
<result property="ysbzkRksj" column="YSBZK_RKSJ"/>
<result property="ysbzkGxsj" column="YSBZK_GXSJ"/>
</resultMap>
<select id="getSyfwList" parameterType="java.util.Map" resultMap="SyfwResult">
SELECT t2.*
FROM (SELECT ROWNUM rn, t1.* FROM (SELECT * FROM SYX_JWYSJ.V_SY_SYFW) t1 WHERE ROWNUM<![CDATA[ <= ]]> ${rowEnd}) t2
WHERE t2.rn <![CDATA[ >= ]]> ${rowStart}
</select>
</mapper>
Loading…
Cancel
Save