parent
290561b8ec
commit
02a560a8b9
@ -0,0 +1,69 @@
|
||||
package com.ssf.mysqloracletest.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* @TableName zhxf_zdrygk_ryjbxx_view
|
||||
*/
|
||||
@Data
|
||||
public class ZhxfZdrygkRyjbxxViewMysql implements Serializable {
|
||||
|
||||
private String RYJBXXID;
|
||||
private String XM;
|
||||
private String XMPY;
|
||||
private String YWXM;
|
||||
private String CYM;
|
||||
private String XB;
|
||||
private String CSRQ;
|
||||
private String ZJLX;
|
||||
private String ZJHM;
|
||||
private String GJ;
|
||||
private String HYZK;
|
||||
private String ZC;
|
||||
private String MZ;
|
||||
private String JG;
|
||||
private String CH;
|
||||
private String ZJXY;
|
||||
private String ZZMM;
|
||||
private String WHCD;
|
||||
private String BYZK;
|
||||
private String RYSF;
|
||||
private String ZYLB;
|
||||
private String ZWBH;
|
||||
private String DNABH;
|
||||
private String QTZJLX;
|
||||
private String QTZJHM;
|
||||
private String GZDW;
|
||||
private String HJDQH;
|
||||
private String HJDXZ;
|
||||
private String HJDJWDZB;
|
||||
private String HJDZRQ;
|
||||
private String HJDZRQDM;
|
||||
private String XZDHQ;
|
||||
private String XZDXZ;
|
||||
private String XZDZRQ;
|
||||
private String XZDZRQDM;
|
||||
private String XZDJWDZB;
|
||||
private String ZDRRYLBBJ;
|
||||
private String ZDRYXL;
|
||||
private String GXDWMC;
|
||||
private String GXDWDM;
|
||||
private String YXX;
|
||||
private String BZXX;
|
||||
private String RYLY;
|
||||
private String DJRXM;
|
||||
private String DJRSFZH;
|
||||
private String DJRDWMC;
|
||||
private String DJRDWDM;
|
||||
private String DJSJ;
|
||||
private String XZDJWDZBDZ;
|
||||
private String CJFS;
|
||||
private String SJHM;
|
||||
private String YWSJHM;
|
||||
private String CXZT;
|
||||
|
||||
}
|
@ -0,0 +1,69 @@
|
||||
package com.ssf.mysqloracletest.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
*
|
||||
* @TableName zhxf_zdrygk_ryjbxx_view
|
||||
*/
|
||||
@Data
|
||||
public class ZhxfZdrygkRyjbxxViewOracle implements Serializable {
|
||||
|
||||
|
||||
private String RYJBXXID;
|
||||
private String XM;
|
||||
private String XMPY;
|
||||
private String YWXM;
|
||||
private String CYM;
|
||||
private String XB;
|
||||
private String CSRQ;
|
||||
private String ZJLX;
|
||||
private String ZJHM;
|
||||
private String GJ;
|
||||
private String HYZK;
|
||||
private String ZC;
|
||||
private String MZ;
|
||||
private String JG;
|
||||
private String CH;
|
||||
private String ZJXY;
|
||||
private String ZZMM;
|
||||
private String WHCD;
|
||||
private String BYZK;
|
||||
private String RYSF;
|
||||
private String ZYLB;
|
||||
private String ZWBH;
|
||||
private String DNABH;
|
||||
private String QTZJLX;
|
||||
private String QTZJHM;
|
||||
private String GZDW;
|
||||
private String HJDQH;
|
||||
private String HJDXZ;
|
||||
private String HJDJWDZB;
|
||||
private String HJDZRQ;
|
||||
private String HJDZRQDM;
|
||||
private String XZDHQ;
|
||||
private String XZDXZ;
|
||||
private String XZDZRQ;
|
||||
private String XZDZRQDM;
|
||||
private String XZDJWDZB;
|
||||
private String ZDRRYLBBJ;
|
||||
private String ZDRYXL;
|
||||
private String GXDWMC;
|
||||
private String GXDWDM;
|
||||
private String YXX;
|
||||
private String BZXX;
|
||||
private String RYLY;
|
||||
private String DJRXM;
|
||||
private String DJRSFZH;
|
||||
private String DJRDWMC;
|
||||
private String DJRDWDM;
|
||||
private String DJSJ;
|
||||
private String XZDJWDZBDZ;
|
||||
private String CJFS;
|
||||
private String SJHM;
|
||||
private String YWSJHM;
|
||||
private String CXZT;
|
||||
}
|
@ -0,0 +1,26 @@
|
||||
package com.ssf.mysqloracletest.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.ssf.mysqloracletest.domain.ZhxfZdrygkRyjbxxViewMysql;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* @author 28758
|
||||
* @description 针对表【zhxf_zdrygk_ryjbxx_view】的数据库操作Mapper
|
||||
* @createDate 2023-11-29 15:58:49
|
||||
* @Entity com.ssf.mysqloracletest.domain.ZhxfZdrygkRyjbxxView
|
||||
*/
|
||||
@Mapper
|
||||
public interface ZhxfZdrygkRyjbxxViewMysqlMapper extends BaseMapper<ZhxfZdrygkRyjbxxViewMysql> {
|
||||
|
||||
public ZhxfZdrygkRyjbxxViewMysql selectZdryById(String id);
|
||||
|
||||
public int insertZdry(ZhxfZdrygkRyjbxxViewMysql bean);
|
||||
|
||||
public int updateZdryById(ZhxfZdrygkRyjbxxViewMysql bean);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
@ -0,0 +1,25 @@
|
||||
package com.ssf.mysqloracletest.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.ssf.mysqloracletest.domain.ZhxfZdrygkRyjbxxViewOracle;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @author 28758
|
||||
* @description 针对表【zhxf_zdrygk_ryjbxx_view】的数据库操作Mapper
|
||||
* @createDate 2023-11-29 15:58:49
|
||||
* @Entity com.ssf.mysqloracletest.domain.ZhxfZdrygkRyjbxxView
|
||||
*/
|
||||
@Mapper
|
||||
public interface ZhxfZdrygkRyjbxxViewOracleMapper extends BaseMapper<ZhxfZdrygkRyjbxxViewOracle> {
|
||||
public int countZdry();
|
||||
|
||||
public List<ZhxfZdrygkRyjbxxViewOracle> getZdryList(Map map);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
@ -0,0 +1,18 @@
|
||||
package com.ssf.mysqloracletest.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.ssf.mysqloracletest.domain.ZhxfZdrygkRyjbxxViewMysql;
|
||||
|
||||
/**
|
||||
* @author 28758
|
||||
* @description 针对表【zhxf_zdrygk_ryjbxx_view】的数据库操作Service
|
||||
* @createDate 2023-11-29 15:58:49
|
||||
*/
|
||||
public interface ZhxfZdrygkRyjbxxViewMysqlService extends IService<ZhxfZdrygkRyjbxxViewMysql> {
|
||||
public ZhxfZdrygkRyjbxxViewMysql selectZdryjbxxById(String id);
|
||||
|
||||
public int insertZdryjbxx(ZhxfZdrygkRyjbxxViewMysql syrk);
|
||||
|
||||
public int updateZdryjbxxById(ZhxfZdrygkRyjbxxViewMysql syrk);
|
||||
|
||||
}
|
@ -0,0 +1,18 @@
|
||||
package com.ssf.mysqloracletest.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.ssf.mysqloracletest.domain.ZhxfZdrygkRyjbxxViewOracle;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @author 28758
|
||||
* @description 针对表【zhxf_zdrygk_ryjbxx_view】的数据库操作Service
|
||||
* @createDate 2023-11-29 15:58:49
|
||||
*/
|
||||
public interface ZhxfZdrygkRyjbxxViewOracleService extends IService<ZhxfZdrygkRyjbxxViewOracle> {
|
||||
public int countZdry();
|
||||
|
||||
public List<ZhxfZdrygkRyjbxxViewOracle> getZdryList(Map map);
|
||||
}
|
@ -0,0 +1,41 @@
|
||||
package com.ssf.mysqloracletest.service.impl;
|
||||
|
||||
import com.baomidou.dynamic.datasource.annotation.DS;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.ssf.mysqloracletest.domain.ZhxfZdrygkRyjbxxViewMysql;
|
||||
import com.ssf.mysqloracletest.mapper.ZhxfZdrygkRyjbxxViewMysqlMapper;
|
||||
import com.ssf.mysqloracletest.service.ZhxfZdrygkRyjbxxViewMysqlService;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* @author 28758
|
||||
* @description 针对表【zhxf_zdrygk_ryjbxx_view】的数据库操作Service实现
|
||||
* @createDate 2023-11-29 15:58:49
|
||||
*/
|
||||
@Service
|
||||
@DS("mysql")
|
||||
@RequiredArgsConstructor
|
||||
public class ZhxfZdrygkRyjbxxViewMysqlServiceImpl extends ServiceImpl<ZhxfZdrygkRyjbxxViewMysqlMapper, ZhxfZdrygkRyjbxxViewMysql>
|
||||
implements ZhxfZdrygkRyjbxxViewMysqlService {
|
||||
|
||||
private final ZhxfZdrygkRyjbxxViewMysqlMapper zhxfZdrygkRyjbxxViewMysqlMapper;
|
||||
|
||||
public ZhxfZdrygkRyjbxxViewMysql selectZdryjbxxById(String id) {
|
||||
return zhxfZdrygkRyjbxxViewMysqlMapper.selectZdryById(id);
|
||||
}
|
||||
|
||||
public int insertZdryjbxx(ZhxfZdrygkRyjbxxViewMysql syrk) {
|
||||
return zhxfZdrygkRyjbxxViewMysqlMapper.insertZdry(syrk);
|
||||
}
|
||||
|
||||
public int updateZdryjbxxById(ZhxfZdrygkRyjbxxViewMysql syrk) {
|
||||
return zhxfZdrygkRyjbxxViewMysqlMapper.updateZdryById(syrk);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
@ -0,0 +1,41 @@
|
||||
package com.ssf.mysqloracletest.service.impl;
|
||||
|
||||
import com.baomidou.dynamic.datasource.annotation.DS;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.ssf.mysqloracletest.domain.ZhxfZdrygkRyjbxxViewOracle;
|
||||
import com.ssf.mysqloracletest.mapper.ZhxfZdrygkRyjbxxViewOracleMapper;
|
||||
import com.ssf.mysqloracletest.service.ZhxfZdrygkRyjbxxViewOracleService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @author 28758
|
||||
* @description 针对表【zhxf_zdrygk_ryjbxx_view】的数据库操作Service实现
|
||||
* @createDate 2023-11-29 15:58:49
|
||||
*/
|
||||
@Service
|
||||
@DS("oracleSydz")
|
||||
public class ZhxfZdrygkRyjbxxViewOracleServiceImpl extends ServiceImpl<ZhxfZdrygkRyjbxxViewOracleMapper, ZhxfZdrygkRyjbxxViewOracle>
|
||||
implements ZhxfZdrygkRyjbxxViewOracleService {
|
||||
@Resource
|
||||
private ZhxfZdrygkRyjbxxViewOracleMapper oracleMapper;
|
||||
|
||||
@Override
|
||||
public int countZdry() {
|
||||
return oracleMapper.countZdry();
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ZhxfZdrygkRyjbxxViewOracle> getZdryList(Map map) {
|
||||
return oracleMapper.getZdryList(map);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
@ -0,0 +1,114 @@
|
||||
package com.ssf.mysqloracletest.task;
|
||||
|
||||
import com.ssf.mysqloracletest.domain.ZhxfZdrygkRyjbxxViewMysql;
|
||||
import com.ssf.mysqloracletest.domain.ZhxfZdrygkRyjbxxViewOracle;
|
||||
import com.ssf.mysqloracletest.service.ZhxfZdrygkRyjbxxViewMysqlService;
|
||||
import com.ssf.mysqloracletest.service.ZhxfZdrygkRyjbxxViewOracleService;
|
||||
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 ZdryJbxxTask {
|
||||
|
||||
private static final Logger logger = LoggerFactory.getLogger(ZdryJbxxTask.class);
|
||||
|
||||
@Resource
|
||||
private ZhxfZdrygkRyjbxxViewMysqlService zdryMysqlService;
|
||||
|
||||
@Resource
|
||||
private ZhxfZdrygkRyjbxxViewOracleService zdryOracleService;
|
||||
|
||||
final int oncesCounts = NumKit.checkInt(ConfigParam.oncesCounts) == 0 ? 1000 : NumKit.checkInt(ConfigParam.oncesCounts);
|
||||
|
||||
private boolean zdryTag = false;
|
||||
|
||||
/**
|
||||
* 连云港 对接海康平台获取人员基础数据
|
||||
* //
|
||||
*/
|
||||
@Scheduled(initialDelay = 100, fixedDelay = 3000)
|
||||
public void transzdry() {
|
||||
|
||||
if (zdryTag) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (!"true".equals(ConfigParam.zdrySwitch)) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
try {
|
||||
int countzdry = zdryOracleService.countZdry();
|
||||
logger.info("countzdry:" + countzdry);
|
||||
|
||||
if (countzdry > 0) {
|
||||
|
||||
zdryTag = true;
|
||||
|
||||
int count = countzdry / oncesCounts;
|
||||
CountDownLatch latch = new CountDownLatch(count);
|
||||
ExecutorService zdryPool = Executors.newFixedThreadPool(50);
|
||||
|
||||
for (int i = 0; i <= count; i++) {
|
||||
Map zdryMap = new HashMap();
|
||||
zdryMap.put("rowStart", i * oncesCounts);
|
||||
zdryMap.put("rowEnd", (i + 1) * oncesCounts);
|
||||
zdryPool.submit(() -> {
|
||||
try {
|
||||
List<ZhxfZdrygkRyjbxxViewOracle> zdrys = zdryOracleService.getZdryList(zdryMap);
|
||||
for (ZhxfZdrygkRyjbxxViewOracle zdry : zdrys) {
|
||||
ZhxfZdrygkRyjbxxViewMysql sBean = new ZhxfZdrygkRyjbxxViewMysql();
|
||||
BeanUtils.copyProperties(zdry, sBean);
|
||||
//确定一个数据是否唯一
|
||||
ZhxfZdrygkRyjbxxViewMysql checkzdry = zdryMysqlService.selectZdryjbxxById(zdry.getRYJBXXID());
|
||||
if (checkzdry == null) {
|
||||
zdryMysqlService.insertZdryjbxx(sBean);
|
||||
logger.info("zdry-" + zdry.getRYJBXXID() + ":插入成功");
|
||||
} else {
|
||||
zdryMysqlService.updateZdryjbxxById(sBean);
|
||||
logger.info("zdry-" + zdry.getRYJBXXID() + ":更新成功");
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
logger.info("zdrys:" + e.getMessage());
|
||||
}
|
||||
latch.countDown();
|
||||
});
|
||||
logger.info("zdryMap数据总量:" + countzdry + "," + "当前处理下标:" + zdryMap.get("rowStart") + "/" + zdryMap.get("rowEnd"));
|
||||
}
|
||||
|
||||
try {
|
||||
// Wait for all threads to complete
|
||||
latch.await();
|
||||
} catch (InterruptedException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
// 关闭线程池
|
||||
zdryPool.shutdown();
|
||||
}
|
||||
|
||||
} catch (Exception e) {
|
||||
logger.info(StringKit.getTrace(e));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,247 @@
|
||||
<?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.ZhxfZdrygkRyjbxxViewMysqlMapper">
|
||||
|
||||
<resultMap id="BaseResultMap" type="com.ssf.mysqloracletest.domain.ZhxfZdrygkRyjbxxViewMysql">
|
||||
<result property="RYJBXXID" column="RYJBXXID" jdbcType="VARCHAR"/>
|
||||
<result property="XM" column="XM" jdbcType="VARCHAR"/>
|
||||
<result property="XMPY" column="XMPY" jdbcType="VARCHAR"/>
|
||||
<result property="YWXM" column="YWXM" jdbcType="VARCHAR"/>
|
||||
<result property="CYM" column="CYM" jdbcType="VARCHAR"/>
|
||||
<result property="XB" column="XB" jdbcType="VARCHAR"/>
|
||||
<result property="CSRQ" column="CSRQ" jdbcType="VARCHAR"/>
|
||||
<result property="ZJLX" column="ZJLX" jdbcType="VARCHAR"/>
|
||||
<result property="ZJHM" column="ZJHM" jdbcType="VARCHAR"/>
|
||||
<result property="GJ" column="GJ" jdbcType="VARCHAR"/>
|
||||
<result property="HYZK" column="HYZK" jdbcType="VARCHAR"/>
|
||||
<result property="ZC" column="ZC" jdbcType="VARCHAR"/>
|
||||
<result property="CH" column="CH" jdbcType="VARCHAR"/>
|
||||
<result property="ZJXY" column="ZJXY" jdbcType="VARCHAR"/>
|
||||
<result property="ZZMM" column="ZZMM" jdbcType="VARCHAR"/>
|
||||
<result property="WHCD" column="WHCD" jdbcType="VARCHAR"/>
|
||||
<result property="BYZK" column="BYZK" jdbcType="VARCHAR"/>
|
||||
<result property="RYSF" column="RYSF" jdbcType="VARCHAR"/>
|
||||
<result property="ZYLB" column="ZYLB" jdbcType="VARCHAR"/>
|
||||
<result property="ZWBH" column="ZWBH" jdbcType="VARCHAR"/>
|
||||
<result property="DNABH" column="DNABH" jdbcType="VARCHAR"/>
|
||||
<result property="QTZJLX" column="QTZJLX" jdbcType="VARCHAR"/>
|
||||
<result property="QTZJHM" column="QTZJHM" jdbcType="VARCHAR"/>
|
||||
<result property="GZDW" column="GZDW" jdbcType="VARCHAR"/>
|
||||
<result property="HJDQH" column="HJDQH" jdbcType="VARCHAR"/>
|
||||
<result property="HJDXZ" column="HJDXZ" jdbcType="VARCHAR"/>
|
||||
<result property="HJDJWDZB" column="HJDJWDZB" jdbcType="VARCHAR"/>
|
||||
<result property="HJDZRQ" column="HJDZRQ" jdbcType="VARCHAR"/>
|
||||
<result property="HJDZRQDM" column="HJDZRQDM" jdbcType="VARCHAR"/>
|
||||
<result property="XZDHQ" column="XZDHQ" jdbcType="VARCHAR"/>
|
||||
<result property="XZDXZ" column="XZDXZ" jdbcType="VARCHAR"/>
|
||||
<result property="XZDZRQ" column="XZDZRQ" jdbcType="VARCHAR"/>
|
||||
<result property="XZDZRQDM" column="XZDZRQDM" jdbcType="VARCHAR"/>
|
||||
<result property="XZDJWDZB" column="XZDJWDZB" jdbcType="VARCHAR"/>
|
||||
<result property="ZDRRYLBBJ" column="ZDRRYLBBJ" jdbcType="VARCHAR"/>
|
||||
<result property="ZDRYXL" column="ZDRYXL" jdbcType="VARCHAR"/>
|
||||
<result property="GXDWMC" column="GXDWMC" jdbcType="VARCHAR"/>
|
||||
<result property="GXDWDM" column="GXDWDM" jdbcType="VARCHAR"/>
|
||||
<result property="YXX" column="YXX" jdbcType="VARCHAR"/>
|
||||
<result property="BZXX" column="BZXX" jdbcType="VARCHAR"/>
|
||||
<result property="RYLY" column="RYLY" jdbcType="VARCHAR"/>
|
||||
<result property="DJRXM" column="DJRXM" jdbcType="VARCHAR"/>
|
||||
<result property="DJRSFZH" column="DJRSFZH" jdbcType="VARCHAR"/>
|
||||
<result property="DJRDWMC" column="DJRDWMC" jdbcType="VARCHAR"/>
|
||||
<result property="DJRDWDM" column="DJRDWDM" jdbcType="VARCHAR"/>
|
||||
<result property="DJSJ" column="DJSJ" jdbcType="VARCHAR"/>
|
||||
<result property="XZDJWDZBDZ" column="XZDJWDZBDZ" jdbcType="VARCHAR"/>
|
||||
<result property="CJFS" column="CJFS" jdbcType="VARCHAR"/>
|
||||
<result property="SJHM" column="SJHM" jdbcType="VARCHAR"/>
|
||||
<result property="YWSJHM" column="YWSJHM" jdbcType="VARCHAR"/>
|
||||
<result property="CXZT" column="CXZT" jdbcType="VARCHAR"/>
|
||||
</resultMap>
|
||||
|
||||
|
||||
<select id="selectZdryById" parameterType="java.lang.String" resultMap="BaseResultMap">
|
||||
select *
|
||||
from zhxf_zdrygk_ryjbxx_view
|
||||
where RYJBXXID = #{RYJBXXID}
|
||||
limit 1
|
||||
</select>
|
||||
|
||||
<insert id="insertZdry" parameterType="com.ssf.mysqloracletest.domain.ZhxfZdrygkRyjbxxViewMysql" useGeneratedKeys="true"
|
||||
keyProperty="id">
|
||||
insert into zhxf_zdrygk_ryjbxx_view
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="RYJBXXID != null and RYJBXXID != '' ">RYJBXXID ,</if>
|
||||
<if test="XM != null and XM != '' ">XM ,</if>
|
||||
<if test="XMPY != null and XMPY != '' ">XMPY ,</if>
|
||||
<if test="YWXM != null and YWXM != '' ">YWXM ,</if>
|
||||
<if test="CYM != null and CYM != '' ">CYM ,</if>
|
||||
<if test="XB != null and XB != '' ">XB ,</if>
|
||||
<if test="CSRQ != null and CSRQ != '' ">CSRQ ,</if>
|
||||
<if test="ZJLX != null and ZJLX != '' ">ZJLX ,</if>
|
||||
<if test="ZJHM != null and ZJHM != '' ">ZJHM ,</if>
|
||||
<if test="GJ != null and GJ != '' ">GJ ,</if>
|
||||
<if test="HYZK != null and HYZK != '' ">HYZK ,</if>
|
||||
<if test="ZC != null and ZC != '' ">ZC ,</if>
|
||||
<if test="MZ != null and MZ != '' ">MZ ,</if>
|
||||
<if test="JG != null and JG != '' ">JG ,</if>
|
||||
<if test="CH != null and CH != '' ">CH ,</if>
|
||||
<if test="ZJXY != null and ZJXY != '' ">ZJXY ,</if>
|
||||
<if test="ZZMM != null and ZZMM != '' ">ZZMM ,</if>
|
||||
<if test="WHCD != null and WHCD != '' ">WHCD ,</if>
|
||||
<if test="BYZK != null and BYZK != '' ">BYZK ,</if>
|
||||
<if test="RYSF != null and RYSF != '' ">RYSF ,</if>
|
||||
<if test="ZYLB != null and ZYLB != '' ">ZYLB ,</if>
|
||||
<if test="ZWBH != null and ZWBH != '' ">ZWBH ,</if>
|
||||
<if test="DNABH != null and DNABH != '' ">DNABH ,</if>
|
||||
<if test="QTZJLX != null and QTZJLX != '' ">QTZJLX ,</if>
|
||||
<if test="QTZJHM != null and QTZJHM != '' ">QTZJHM ,</if>
|
||||
<if test="GZDW != null and GZDW != '' ">GZDW ,</if>
|
||||
<if test="HJDQH != null and HJDQH != '' ">HJDQH ,</if>
|
||||
<if test="HJDXZ != null and HJDXZ != '' ">HJDXZ ,</if>
|
||||
<if test="HJDJWDZB != null and HJDJWDZB != '' ">HJDJWDZB ,</if>
|
||||
<if test="HJDZRQ != null and HJDZRQ != '' ">HJDZRQ ,</if>
|
||||
<if test="HJDZRQDM != null and HJDZRQDM != '' ">HJDZRQDM ,</if>
|
||||
<if test="XZDHQ != null and XZDHQ != '' ">XZDHQ ,</if>
|
||||
<if test="XZDXZ != null and XZDXZ != '' ">XZDXZ ,</if>
|
||||
<if test="XZDZRQ != null and XZDZRQ != '' ">XZDZRQ ,</if>
|
||||
<if test="XZDZRQDM != null and XZDZRQDM != '' ">XZDZRQDM ,</if>
|
||||
<if test="XZDJWDZB != null and XZDJWDZB != '' ">XZDJWDZB ,</if>
|
||||
<if test="ZDRRYLBBJ != null and ZDRRYLBBJ != '' ">ZDRRYLBBJ ,</if>
|
||||
<if test="ZDRYXL != null and ZDRYXL != '' ">ZDRYXL ,</if>
|
||||
<if test="GXDWMC != null and GXDWMC != '' ">GXDWMC ,</if>
|
||||
<if test="GXDWDM != null and GXDWDM != '' ">GXDWDM ,</if>
|
||||
<if test="YXX != null and YXX != '' ">YXX ,</if>
|
||||
<if test="BZXX != null and BZXX != '' ">BZXX ,</if>
|
||||
<if test="RYLY != null and RYLY != '' ">RYLY ,</if>
|
||||
<if test="DJRXM != null and DJRXM != '' ">DJRXM ,</if>
|
||||
<if test="DJRSFZH != null and DJRSFZH != '' ">DJRSFZH ,</if>
|
||||
<if test="DJRDWMC != null and DJRDWMC != '' ">DJRDWMC ,</if>
|
||||
<if test="DJRDWDM != null and DJRDWDM != '' ">DJRDWDM ,</if>
|
||||
<if test="DJSJ != null and DJSJ != '' ">DJSJ ,</if>
|
||||
<if test="XZDJWDZBDZ != null and XZDJWDZBDZ != '' ">XZDJWDZBDZ,</if>
|
||||
<if test="CJFS != null and CJFS != '' ">CJFS ,</if>
|
||||
<if test="SJHM != null and SJHM != '' ">SJHM ,</if>
|
||||
<if test="YWSJHM != null and YWSJHM != '' ">YWSJHM ,</if>
|
||||
<if test="CXZT != null and CXZT != '' ">CXZT ,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="RYJBXXID != null and RYJBXXID != '' ">#{RYJBXXID },</if>
|
||||
<if test="XM != null and XM != '' ">#{XM },</if>
|
||||
<if test="XMPY != null and XMPY != '' ">#{XMPY },</if>
|
||||
<if test="YWXM != null and YWXM != '' ">#{YWXM },</if>
|
||||
<if test="CYM != null and CYM != '' ">#{CYM },</if>
|
||||
<if test="XB != null and XB != '' ">#{XB },</if>
|
||||
<if test="CSRQ != null and CSRQ != '' ">#{CSRQ },</if>
|
||||
<if test="ZJLX != null and ZJLX != '' ">#{ZJLX },</if>
|
||||
<if test="ZJHM != null and ZJHM != '' ">#{ZJHM },</if>
|
||||
<if test="GJ != null and GJ != '' ">#{GJ },</if>
|
||||
<if test="HYZK != null and HYZK != '' ">#{HYZK },</if>
|
||||
<if test="ZC != null and ZC != '' ">#{ZC },</if>
|
||||
<if test="MZ != null and MZ != '' ">#{MZ },</if>
|
||||
<if test="JG != null and JG != '' ">#{JG },</if>
|
||||
<if test="CH != null and CH != '' ">#{CH },</if>
|
||||
<if test="ZJXY != null and ZJXY != '' ">#{ZJXY },</if>
|
||||
<if test="ZZMM != null and ZZMM != '' ">#{ZZMM },</if>
|
||||
<if test="WHCD != null and WHCD != '' ">#{WHCD },</if>
|
||||
<if test="BYZK != null and BYZK != '' ">#{BYZK },</if>
|
||||
<if test="RYSF != null and RYSF != '' ">#{RYSF },</if>
|
||||
<if test="ZYLB != null and ZYLB != '' ">#{ZYLB },</if>
|
||||
<if test="ZWBH != null and ZWBH != '' ">#{ZWBH },</if>
|
||||
<if test="DNABH != null and DNABH != '' ">#{DNABH },</if>
|
||||
<if test="QTZJLX != null and QTZJLX != '' ">#{QTZJLX },</if>
|
||||
<if test="QTZJHM != null and QTZJHM != '' ">#{QTZJHM },</if>
|
||||
<if test="GZDW != null and GZDW != '' ">#{GZDW },</if>
|
||||
<if test="HJDQH != null and HJDQH != '' ">#{HJDQH },</if>
|
||||
<if test="HJDXZ != null and HJDXZ != '' ">#{HJDXZ },</if>
|
||||
<if test="HJDJWDZB != null and HJDJWDZB != '' ">#{HJDJWDZB },</if>
|
||||
<if test="HJDZRQ != null and HJDZRQ != '' ">#{HJDZRQ },</if>
|
||||
<if test="HJDZRQDM != null and HJDZRQDM != '' ">#{HJDZRQDM },</if>
|
||||
<if test="XZDHQ != null and XZDHQ != '' ">#{XZDHQ },</if>
|
||||
<if test="XZDXZ != null and XZDXZ != '' ">#{XZDXZ },</if>
|
||||
<if test="XZDZRQ != null and XZDZRQ != '' ">#{XZDZRQ },</if>
|
||||
<if test="XZDZRQDM != null and XZDZRQDM != '' ">#{XZDZRQDM },</if>
|
||||
<if test="XZDJWDZB != null and XZDJWDZB != '' ">#{XZDJWDZB },</if>
|
||||
<if test="ZDRRYLBBJ != null and ZDRRYLBBJ != '' ">#{ZDRRYLBBJ },</if>
|
||||
<if test="ZDRYXL != null and ZDRYXL != '' ">#{ZDRYXL },</if>
|
||||
<if test="GXDWMC != null and GXDWMC != '' ">#{GXDWMC },</if>
|
||||
<if test="GXDWDM != null and GXDWDM != '' ">#{GXDWDM },</if>
|
||||
<if test="YXX != null and YXX != '' ">#{YXX },</if>
|
||||
<if test="BZXX != null and BZXX != '' ">#{BZXX },</if>
|
||||
<if test="RYLY != null and RYLY != '' ">#{RYLY },</if>
|
||||
<if test="DJRXM != null and DJRXM != '' ">#{DJRXM },</if>
|
||||
<if test="DJRSFZH != null and DJRSFZH != '' ">#{DJRSFZH },</if>
|
||||
<if test="DJRDWMC != null and DJRDWMC != '' ">#{DJRDWMC },</if>
|
||||
<if test="DJRDWDM != null and DJRDWDM != '' ">#{DJRDWDM },</if>
|
||||
<if test="DJSJ != null and DJSJ != '' ">#{DJSJ },</if>
|
||||
<if test="XZDJWDZBDZ != null and XZDJWDZBDZ != '' ">#{XZDJWDZBDZ},</if>
|
||||
<if test="CJFS != null and CJFS != '' ">#{CJFS },</if>
|
||||
<if test="SJHM != null and SJHM != '' ">#{SJHM },</if>
|
||||
<if test="YWSJHM != null and YWSJHM != '' ">#{YWSJHM },</if>
|
||||
<if test="CXZT != null and CXZT != '' ">#{CXZT },</if>
|
||||
|
||||
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateZdryById" parameterType="com.ssf.mysqloracletest.domain.ZhxfZdrygkRyjbxxViewMysql">
|
||||
update zhxf_zdrygk_ryjbxx_view
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="RYJBXXID != null and RYJBXXID != '' ">RYJBXXID =#{RYJBXXID },</if>
|
||||
<if test="XM != null and XM != '' ">XM =#{XM },</if>
|
||||
<if test="XMPY != null and XMPY != '' ">XMPY =#{XMPY },</if>
|
||||
<if test="YWXM != null and YWXM != '' ">YWXM =#{YWXM },</if>
|
||||
<if test="CYM != null and CYM != '' ">CYM =#{CYM },</if>
|
||||
<if test="XB != null and XB != '' ">XB =#{XB },</if>
|
||||
<if test="CSRQ != null and CSRQ != '' ">CSRQ =#{CSRQ },</if>
|
||||
<if test="ZJLX != null and ZJLX != '' ">ZJLX =#{ZJLX },</if>
|
||||
<if test="ZJHM != null and ZJHM != '' ">ZJHM =#{ZJHM },</if>
|
||||
<if test="GJ != null and GJ != '' ">GJ =#{GJ },</if>
|
||||
<if test="HYZK != null and HYZK != '' ">HYZK =#{HYZK },</if>
|
||||
<if test="ZC != null and ZC != '' ">ZC =#{ZC },</if>
|
||||
<if test="MZ != null and MZ != '' ">MZ =#{MZ },</if>
|
||||
<if test="JG != null and JG != '' ">JG =#{JG },</if>
|
||||
<if test="CH != null and CH != '' ">CH =#{CH },</if>
|
||||
<if test="ZJXY != null and ZJXY != '' ">ZJXY =#{ZJXY },</if>
|
||||
<if test="ZZMM != null and ZZMM != '' ">ZZMM =#{ZZMM },</if>
|
||||
<if test="WHCD != null and WHCD != '' ">WHCD =#{WHCD },</if>
|
||||
<if test="BYZK != null and BYZK != '' ">BYZK =#{BYZK },</if>
|
||||
<if test="RYSF != null and RYSF != '' ">RYSF =#{RYSF },</if>
|
||||
<if test="ZYLB != null and ZYLB != '' ">ZYLB =#{ZYLB },</if>
|
||||
<if test="ZWBH != null and ZWBH != '' ">ZWBH =#{ZWBH },</if>
|
||||
<if test="DNABH != null and DNABH != '' ">DNABH =#{DNABH },</if>
|
||||
<if test="QTZJLX != null and QTZJLX != '' ">QTZJLX =#{QTZJLX },</if>
|
||||
<if test="QTZJHM != null and QTZJHM != '' ">QTZJHM =#{QTZJHM },</if>
|
||||
<if test="GZDW != null and GZDW != '' ">GZDW =#{GZDW },</if>
|
||||
<if test="HJDQH != null and HJDQH != '' ">HJDQH =#{HJDQH },</if>
|
||||
<if test="HJDXZ != null and HJDXZ != '' ">HJDXZ =#{HJDXZ },</if>
|
||||
<if test="HJDJWDZB != null and HJDJWDZB != '' ">HJDJWDZB =#{HJDJWDZB },</if>
|
||||
<if test="HJDZRQ != null and HJDZRQ != '' ">HJDZRQ =#{HJDZRQ },</if>
|
||||
<if test="HJDZRQDM != null and HJDZRQDM != '' ">HJDZRQDM =#{HJDZRQDM },</if>
|
||||
<if test="XZDHQ != null and XZDHQ != '' ">XZDHQ =#{XZDHQ },</if>
|
||||
<if test="XZDXZ != null and XZDXZ != '' ">XZDXZ =#{XZDXZ },</if>
|
||||
<if test="XZDZRQ != null and XZDZRQ != '' ">XZDZRQ =#{XZDZRQ },</if>
|
||||
<if test="XZDZRQDM != null and XZDZRQDM != '' ">XZDZRQDM =#{XZDZRQDM },</if>
|
||||
<if test="XZDJWDZB != null and XZDJWDZB != '' ">XZDJWDZB =#{XZDJWDZB },</if>
|
||||
<if test="ZDRRYLBBJ != null and ZDRRYLBBJ != '' ">ZDRRYLBBJ =#{ZDRRYLBBJ },</if>
|
||||
<if test="ZDRYXL != null and ZDRYXL != '' ">ZDRYXL =#{ZDRYXL },</if>
|
||||
<if test="GXDWMC != null and GXDWMC != '' ">GXDWMC =#{GXDWMC },</if>
|
||||
<if test="GXDWDM != null and GXDWDM != '' ">GXDWDM =#{GXDWDM },</if>
|
||||
<if test="YXX != null and YXX != '' ">YXX =#{YXX },</if>
|
||||
<if test="BZXX != null and BZXX != '' ">BZXX =#{BZXX },</if>
|
||||
<if test="RYLY != null and RYLY != '' ">RYLY =#{RYLY },</if>
|
||||
<if test="DJRXM != null and DJRXM != '' ">DJRXM =#{DJRXM },</if>
|
||||
<if test="DJRSFZH != null and DJRSFZH != '' ">DJRSFZH =#{DJRSFZH },</if>
|
||||
<if test="DJRDWMC != null and DJRDWMC != '' ">DJRDWMC =#{DJRDWMC },</if>
|
||||
<if test="DJRDWDM != null and DJRDWDM != '' ">DJRDWDM =#{DJRDWDM },</if>
|
||||
<if test="DJSJ != null and DJSJ != '' ">DJSJ =#{DJSJ },</if>
|
||||
<if test="XZDJWDZBDZ != null and XZDJWDZBDZ != '' ">XZDJWDZBDZ=#{XZDJWDZBDZ},</if>
|
||||
<if test="CJFS != null and CJFS != '' ">CJFS =#{CJFS },</if>
|
||||
<if test="SJHM != null and SJHM != '' ">SJHM =#{SJHM },</if>
|
||||
<if test="YWSJHM != null and YWSJHM != '' ">YWSJHM =#{YWSJHM },</if>
|
||||
<if test="CXZT != null and CXZT != '' ">CXZT =#{CXZT },</if>
|
||||
|
||||
</trim>
|
||||
where RYJBXXID = #{RYJBXXID}
|
||||
</update>
|
||||
|
||||
</mapper>
|
@ -0,0 +1,72 @@
|
||||
<?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.ZhxfZdrygkRyjbxxViewOracleMapper">
|
||||
<select id="countZdry" resultType="int">
|
||||
select count(*)
|
||||
from SYX_JWSZPT.ZHXF_ZDRYGK_RYJBXX_VIEW
|
||||
</select>
|
||||
|
||||
|
||||
<resultMap id="BaseResultMap" type="com.ssf.mysqloracletest.domain.ZhxfZdrygkRyjbxxViewOracle">
|
||||
<result property="RYJBXXID" column="RYJBXXID" jdbcType="VARCHAR"/>
|
||||
<result property="XM" column="XM" jdbcType="VARCHAR"/>
|
||||
<result property="XMPY" column="XMPY" jdbcType="VARCHAR"/>
|
||||
<result property="YWXM" column="YWXM" jdbcType="VARCHAR"/>
|
||||
<result property="CYM" column="CYM" jdbcType="VARCHAR"/>
|
||||
<result property="XB" column="XB" jdbcType="VARCHAR"/>
|
||||
<result property="CSRQ" column="CSRQ" jdbcType="VARCHAR"/>
|
||||
<result property="ZJLX" column="ZJLX" jdbcType="VARCHAR"/>
|
||||
<result property="ZJHM" column="ZJHM" jdbcType="VARCHAR"/>
|
||||
<result property="GJ" column="GJ" jdbcType="VARCHAR"/>
|
||||
<result property="HYZK" column="HYZK" jdbcType="VARCHAR"/>
|
||||
<result property="ZC" column="ZC" jdbcType="VARCHAR"/>
|
||||
<result property="CH" column="CH" jdbcType="VARCHAR"/>
|
||||
<result property="ZJXY" column="ZJXY" jdbcType="VARCHAR"/>
|
||||
<result property="ZZMM" column="ZZMM" jdbcType="VARCHAR"/>
|
||||
<result property="WHCD" column="WHCD" jdbcType="VARCHAR"/>
|
||||
<result property="BYZK" column="BYZK" jdbcType="VARCHAR"/>
|
||||
<result property="RYSF" column="RYSF" jdbcType="VARCHAR"/>
|
||||
<result property="ZYLB" column="ZYLB" jdbcType="VARCHAR"/>
|
||||
<result property="ZWBH" column="ZWBH" jdbcType="VARCHAR"/>
|
||||
<result property="DNABH" column="DNABH" jdbcType="VARCHAR"/>
|
||||
<result property="QTZJLX" column="QTZJLX" jdbcType="VARCHAR"/>
|
||||
<result property="QTZJHM" column="QTZJHM" jdbcType="VARCHAR"/>
|
||||
<result property="GZDW" column="GZDW" jdbcType="VARCHAR"/>
|
||||
<result property="HJDQH" column="HJDQH" jdbcType="VARCHAR"/>
|
||||
<result property="HJDXZ" column="HJDXZ" jdbcType="VARCHAR"/>
|
||||
<result property="HJDJWDZB" column="HJDJWDZB" jdbcType="VARCHAR"/>
|
||||
<result property="HJDZRQ" column="HJDZRQ" jdbcType="VARCHAR"/>
|
||||
<result property="HJDZRQDM" column="HJDZRQDM" jdbcType="VARCHAR"/>
|
||||
<result property="XZDHQ" column="XZDHQ" jdbcType="VARCHAR"/>
|
||||
<result property="XZDXZ" column="XZDXZ" jdbcType="VARCHAR"/>
|
||||
<result property="XZDZRQ" column="XZDZRQ" jdbcType="VARCHAR"/>
|
||||
<result property="XZDZRQDM" column="XZDZRQDM" jdbcType="VARCHAR"/>
|
||||
<result property="XZDJWDZB" column="XZDJWDZB" jdbcType="VARCHAR"/>
|
||||
<result property="ZDRRYLBBJ" column="ZDRRYLBBJ" jdbcType="VARCHAR"/>
|
||||
<result property="ZDRYXL" column="ZDRYXL" jdbcType="VARCHAR"/>
|
||||
<result property="GXDWMC" column="GXDWMC" jdbcType="VARCHAR"/>
|
||||
<result property="GXDWDM" column="GXDWDM" jdbcType="VARCHAR"/>
|
||||
<result property="YXX" column="YXX" jdbcType="VARCHAR"/>
|
||||
<result property="BZXX" column="BZXX" jdbcType="VARCHAR"/>
|
||||
<result property="RYLY" column="RYLY" jdbcType="VARCHAR"/>
|
||||
<result property="DJRXM" column="DJRXM" jdbcType="VARCHAR"/>
|
||||
<result property="DJRSFZH" column="DJRSFZH" jdbcType="VARCHAR"/>
|
||||
<result property="DJRDWMC" column="DJRDWMC" jdbcType="VARCHAR"/>
|
||||
<result property="DJRDWDM" column="DJRDWDM" jdbcType="VARCHAR"/>
|
||||
<result property="DJSJ" column="DJSJ" jdbcType="VARCHAR"/>
|
||||
<result property="XZDJWDZBDZ" column="XZDJWDZBDZ" jdbcType="VARCHAR"/>
|
||||
<result property="CJFS" column="CJFS" jdbcType="VARCHAR"/>
|
||||
<result property="SJHM" column="SJHM" jdbcType="VARCHAR"/>
|
||||
<result property="YWSJHM" column="YWSJHM" jdbcType="VARCHAR"/>
|
||||
<result property="CXZT" column="CXZT" jdbcType="VARCHAR"/>
|
||||
</resultMap>
|
||||
|
||||
<select id="getZdryList" parameterType="java.util.Map" resultMap="BaseResultMap">
|
||||
SELECT t2.*
|
||||
FROM (SELECT ROWNUM rn, t1.* FROM (SELECT * FROM SYX_JWSZPT.ZHXF_ZDRYGK_RYJBXX_VIEW) t1 WHERE ROWNUM<![CDATA[ <= ]]> ${rowEnd}) t2
|
||||
WHERE t2.rn <![CDATA[ >= ]]> ${rowStart}
|
||||
</select>
|
||||
|
||||
</mapper>
|
Loading…
Reference in new issue