parent
1f32b259bc
commit
d7260291fb
@ -0,0 +1,30 @@
|
|||||||
|
package com.ssf.mysqloracletest.domain;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @TableName v_sy_sydw_cyry
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class VSySydwCyryMysql implements Serializable {
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
private String ID;
|
||||||
|
private String DWID;
|
||||||
|
private String GJ;
|
||||||
|
private String ZJLX;
|
||||||
|
private String ZJHM;
|
||||||
|
private String XM;
|
||||||
|
private String XB;
|
||||||
|
private String MZ;
|
||||||
|
private String LXDH;
|
||||||
|
private String ZT;
|
||||||
|
private String RYFL;
|
||||||
|
private String YSBZK_RKSJ;
|
||||||
|
private String YSBZK_GXSJ;
|
||||||
|
private String DWMC;
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,32 @@
|
|||||||
|
package com.ssf.mysqloracletest.domain;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @TableName v_sy_sydw_cyry
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class VSySydwCyryOracle implements Serializable {
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
private String ID;
|
||||||
|
private String DWID;
|
||||||
|
private String GJ;
|
||||||
|
private String ZJLX;
|
||||||
|
private String ZJHM;
|
||||||
|
private String XM;
|
||||||
|
private String XB;
|
||||||
|
private String MZ;
|
||||||
|
private String LXDH;
|
||||||
|
private String ZT;
|
||||||
|
private String RYFL;
|
||||||
|
private String YSBZK_RKSJ;
|
||||||
|
private String YSBZK_GXSJ;
|
||||||
|
private String DWMC;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,25 @@
|
|||||||
|
package com.ssf.mysqloracletest.mapper;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import com.ssf.mysqloracletest.domain.VSySydwCyryMysql;
|
||||||
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author 28758
|
||||||
|
* @description 针对表【v_sy_sydw_cyry】的数据库操作Mapper
|
||||||
|
* @createDate 2023-11-29 20:30:59
|
||||||
|
* @Entity com.ssf.mysqloracletest.domain.VSySydwCyry
|
||||||
|
*/
|
||||||
|
@Mapper
|
||||||
|
public interface VSySydwCyryMysqlMapper extends BaseMapper<VSySydwCyryMysql> {
|
||||||
|
|
||||||
|
public VSySydwCyryMysql selectVSyCyryById(String id);
|
||||||
|
|
||||||
|
public int insertVSySyrk(VSySydwCyryMysql bean);
|
||||||
|
|
||||||
|
public int updateVSyCyryById(VSySydwCyryMysql bean);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -0,0 +1,27 @@
|
|||||||
|
package com.ssf.mysqloracletest.mapper;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import com.ssf.mysqloracletest.domain.VSySydwCyryMysql;
|
||||||
|
import com.ssf.mysqloracletest.domain.VSySydwCyryOracle;
|
||||||
|
import com.ssf.mysqloracletest.domain.ZhxfZdrygkRyjbxxViewOracle;
|
||||||
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author 28758
|
||||||
|
* @description 针对表【v_sy_sydw_cyry】的数据库操作Mapper
|
||||||
|
* @createDate 2023-11-29 20:30:59
|
||||||
|
* @Entity com.ssf.mysqloracletest.domain.VSySydwCyry
|
||||||
|
*/
|
||||||
|
@Mapper
|
||||||
|
public interface VSySydwCyryOracleMapper extends BaseMapper<VSySydwCyryOracle> {
|
||||||
|
public int countCyry();
|
||||||
|
|
||||||
|
public List<VSySydwCyryOracle> getCyryList(Map map);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -0,0 +1,18 @@
|
|||||||
|
package com.ssf.mysqloracletest.service;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
import com.ssf.mysqloracletest.domain.VSySydwCyryMysql;
|
||||||
|
import com.ssf.mysqloracletest.domain.ZhxfZdrygkRyjbxxViewMysql;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author 28758
|
||||||
|
* @description 针对表【v_sy_sydw_cyry】的数据库操作Service
|
||||||
|
* @createDate 2023-11-29 20:30:59
|
||||||
|
*/
|
||||||
|
public interface VSySydwCyryMysqlService extends IService<VSySydwCyryMysql> {
|
||||||
|
public VSySydwCyryMysql selectCyryById(String id);
|
||||||
|
|
||||||
|
public int insertCyry(VSySydwCyryMysql syrk);
|
||||||
|
|
||||||
|
public int updateCyryById(VSySydwCyryMysql syrk);
|
||||||
|
}
|
@ -0,0 +1,19 @@
|
|||||||
|
package com.ssf.mysqloracletest.service;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
import com.ssf.mysqloracletest.domain.VSySydwCyryMysql;
|
||||||
|
import com.ssf.mysqloracletest.domain.VSySydwCyryOracle;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author 28758
|
||||||
|
* @description 针对表【v_sy_sydw_cyry】的数据库操作Service
|
||||||
|
* @createDate 2023-11-29 20:30:59
|
||||||
|
*/
|
||||||
|
public interface VSySydwCyryOracleService extends IService<VSySydwCyryOracle> {
|
||||||
|
public int countCyry();
|
||||||
|
|
||||||
|
public List<VSySydwCyryOracle> getCyryList(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.impl.ServiceImpl;
|
||||||
|
import com.ssf.mysqloracletest.domain.VSySydwCyryMysql;
|
||||||
|
import com.ssf.mysqloracletest.domain.VSySydwCyryMysql;
|
||||||
|
import com.ssf.mysqloracletest.mapper.VSySydwCyryMysqlMapper;
|
||||||
|
import com.ssf.mysqloracletest.mapper.VSySydwCyryMysqlMapper;
|
||||||
|
import com.ssf.mysqloracletest.service.VSySydwCyryMysqlService;
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author 28758
|
||||||
|
* @description 针对表【v_sy_sydw_cyry】的数据库操作Service实现
|
||||||
|
* @createDate 2023-11-29 20:30:59
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
@DS("mysql")
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
public class VSySydwCyryMysqlServiceImpl extends ServiceImpl<VSySydwCyryMysqlMapper, VSySydwCyryMysql>
|
||||||
|
implements VSySydwCyryMysqlService {
|
||||||
|
|
||||||
|
private final VSySydwCyryMysqlMapper vSySydwCyryMysqlMapper;
|
||||||
|
|
||||||
|
public VSySydwCyryMysql selectCyryById(String id) {
|
||||||
|
return vSySydwCyryMysqlMapper.selectVSyCyryById(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
public int insertCyry(VSySydwCyryMysql syrk) {
|
||||||
|
return vSySydwCyryMysqlMapper.insertVSySyrk(syrk);
|
||||||
|
}
|
||||||
|
|
||||||
|
public int updateCyryById(VSySydwCyryMysql syrk) {
|
||||||
|
return vSySydwCyryMysqlMapper.updateVSyCyryById(syrk);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -0,0 +1,43 @@
|
|||||||
|
package com.ssf.mysqloracletest.service.impl;
|
||||||
|
|
||||||
|
import com.baomidou.dynamic.datasource.annotation.DS;
|
||||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import com.ssf.mysqloracletest.domain.VSySydwCyryMysql;
|
||||||
|
import com.ssf.mysqloracletest.domain.VSySydwCyryOracle;
|
||||||
|
import com.ssf.mysqloracletest.mapper.VSySydwCyryMysqlMapper;
|
||||||
|
import com.ssf.mysqloracletest.mapper.VSySydwCyryOracleMapper;
|
||||||
|
import com.ssf.mysqloracletest.service.VSySydwCyryMysqlService;
|
||||||
|
import com.ssf.mysqloracletest.service.VSySydwCyryOracleService;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author 28758
|
||||||
|
* @description 针对表【v_sy_sydw_cyry】的数据库操作Service实现
|
||||||
|
* @createDate 2023-11-29 20:30:59
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
@DS("oracleSydz")
|
||||||
|
public class VSySydwCyryOracleServiceImpl extends ServiceImpl<VSySydwCyryOracleMapper, VSySydwCyryOracle>
|
||||||
|
implements VSySydwCyryOracleService {
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private VSySydwCyryOracleMapper oracleMapper;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int countCyry() {
|
||||||
|
return oracleMapper.countCyry();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<VSySydwCyryOracle> getCyryList(Map map) {
|
||||||
|
return oracleMapper.getCyryList(map);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -0,0 +1,114 @@
|
|||||||
|
package com.ssf.mysqloracletest.task;
|
||||||
|
|
||||||
|
import com.ssf.mysqloracletest.domain.VSySydwCyryMysql;
|
||||||
|
import com.ssf.mysqloracletest.domain.VSySydwCyryOracle;
|
||||||
|
import com.ssf.mysqloracletest.service.VSySydwCyryMysqlService;
|
||||||
|
import com.ssf.mysqloracletest.service.VSySydwCyryOracleService;
|
||||||
|
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 CyryTask {
|
||||||
|
|
||||||
|
private static final Logger logger = LoggerFactory.getLogger(CyryTask.class);
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private VSySydwCyryMysqlService vSySydwCyryMysqlService;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private VSySydwCyryOracleService vSySydwCyryOracleService;
|
||||||
|
|
||||||
|
final int oncesCounts = NumKit.checkInt(ConfigParam.oncesCounts) == 0 ? 1000 : NumKit.checkInt(ConfigParam.oncesCounts);
|
||||||
|
|
||||||
|
private boolean cyryTag = false;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 连云港 对接海康平台获取人员基础数据
|
||||||
|
* //
|
||||||
|
*/
|
||||||
|
@Scheduled(initialDelay = 100, fixedDelay = 3000)
|
||||||
|
public void transcyry() {
|
||||||
|
|
||||||
|
if (cyryTag) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!"true".equals(ConfigParam.cyrySwitch)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
try {
|
||||||
|
int countcyry = vSySydwCyryOracleService.countCyry();
|
||||||
|
logger.info("countcyry:" + countcyry);
|
||||||
|
|
||||||
|
if (countcyry > 0) {
|
||||||
|
|
||||||
|
cyryTag = true;
|
||||||
|
|
||||||
|
int count = countcyry / oncesCounts;
|
||||||
|
CountDownLatch latch = new CountDownLatch(count);
|
||||||
|
ExecutorService cyryPool = Executors.newFixedThreadPool(50);
|
||||||
|
|
||||||
|
for (int i = 0; i <= count; i++) {
|
||||||
|
Map cyryMap = new HashMap();
|
||||||
|
cyryMap.put("rowStart", i * oncesCounts);
|
||||||
|
cyryMap.put("rowEnd", (i + 1) * oncesCounts);
|
||||||
|
cyryPool.submit(() -> {
|
||||||
|
try {
|
||||||
|
List<VSySydwCyryOracle> cyrys = vSySydwCyryOracleService.getCyryList(cyryMap);
|
||||||
|
for (VSySydwCyryOracle cyry : cyrys) {
|
||||||
|
VSySydwCyryMysql sBean = new VSySydwCyryMysql();
|
||||||
|
BeanUtils.copyProperties(cyry, sBean);
|
||||||
|
//确定一个数据是否唯一
|
||||||
|
VSySydwCyryMysql checkcyry = vSySydwCyryMysqlService.selectCyryById(cyry.getID());
|
||||||
|
if (checkcyry == null) {
|
||||||
|
vSySydwCyryMysqlService.insertCyry(sBean);
|
||||||
|
logger.info("cyry-" + cyry.getID() + ":插入成功");
|
||||||
|
} else {
|
||||||
|
vSySydwCyryMysqlService.updateCyryById(sBean);
|
||||||
|
logger.info("cyry-" + cyry.getID() + ":更新成功");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} catch (Exception e) {
|
||||||
|
logger.info("cyrys:" + e.getMessage());
|
||||||
|
}
|
||||||
|
latch.countDown();
|
||||||
|
});
|
||||||
|
logger.info("cyryMap数据总量:" + countcyry + "," + "当前处理下标:" + cyryMap.get("rowStart") + "/" + cyryMap.get("rowEnd"));
|
||||||
|
}
|
||||||
|
|
||||||
|
try {
|
||||||
|
// Wait for all threads to complete
|
||||||
|
latch.await();
|
||||||
|
} catch (InterruptedException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
// 关闭线程池
|
||||||
|
cyryPool.shutdown();
|
||||||
|
}
|
||||||
|
|
||||||
|
} catch (Exception e) {
|
||||||
|
logger.info(StringKit.getTrace(e));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,93 @@
|
|||||||
|
<?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.VSySydwCyryMysqlMapper">
|
||||||
|
|
||||||
|
<resultMap id="BaseResultMap" type="com.ssf.mysqloracletest.domain.VSySydwCyryMysql">
|
||||||
|
<result property="ID" column="ID" jdbcType="VARCHAR"/>
|
||||||
|
<result property="DWID" column="DWID" jdbcType="VARCHAR"/>
|
||||||
|
<result property="GJ" column="GJ" jdbcType="VARCHAR"/>
|
||||||
|
<result property="ZJLX" column="ZJLX" jdbcType="VARCHAR"/>
|
||||||
|
<result property="ZJHM" column="ZJHM" jdbcType="VARCHAR"/>
|
||||||
|
<result property="XM" column="XM" jdbcType="VARCHAR"/>
|
||||||
|
<result property="XB" column="XB" jdbcType="VARCHAR"/>
|
||||||
|
<result property="MZ" column="MZ" jdbcType="VARCHAR"/>
|
||||||
|
<result property="LXDH" column="LXDH" jdbcType="VARCHAR"/>
|
||||||
|
<result property="ZT" column="ZT" jdbcType="VARCHAR"/>
|
||||||
|
<result property="RYFL" column="RYFL" jdbcType="VARCHAR"/>
|
||||||
|
<result property="YSBZK_RKSJ" column="YSBZK_RKSJ" jdbcType="VARCHAR"/>
|
||||||
|
<result property="YSBZK_GXSJ" column="YSBZK_GXSJ" jdbcType="VARCHAR"/>
|
||||||
|
<result property="DWMC" column="DWMC" jdbcType="VARCHAR"/>
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
|
||||||
|
<select id="selectVSyCyryById" parameterType="java.lang.String" resultMap="BaseResultMap">
|
||||||
|
select *
|
||||||
|
from v_sy_sydw_cyry
|
||||||
|
where ID = #{ID}
|
||||||
|
limit 1
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<insert id="insertVSySyrk" parameterType="com.ssf.mysqloracletest.domain.VSySydwCyryMysql" useGeneratedKeys="true"
|
||||||
|
keyProperty="id">
|
||||||
|
insert into v_sy_sydw_cyry
|
||||||
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="ID != null and ID != '' ">ID ,</if>
|
||||||
|
<if test="DWID != null and DWID != '' ">DWID ,</if>
|
||||||
|
<if test="GJ != null and GJ != '' ">GJ ,</if>
|
||||||
|
<if test="ZJLX != null and ZJLX != '' ">ZJLX ,</if>
|
||||||
|
<if test="ZJHM != null and ZJHM != '' ">ZJHM ,</if>
|
||||||
|
<if test="XM != null and XM != '' ">XM ,</if>
|
||||||
|
<if test="XB != null and XB != '' ">XB ,</if>
|
||||||
|
<if test="MZ != null and MZ != '' ">MZ ,</if>
|
||||||
|
<if test="LXDH != null and LXDH != '' ">LXDH ,</if>
|
||||||
|
<if test="ZT != null and ZT != '' ">ZT ,</if>
|
||||||
|
<if test="RYFL != null and RYFL != '' ">RYFL ,</if>
|
||||||
|
<if test="YSBZK_RKSJ != null and YSBZK_RKSJ != '' ">YSBZK_RKSJ,</if>
|
||||||
|
<if test="YSBZK_GXSJ != null and YSBZK_GXSJ != '' ">YSBZK_GXSJ,</if>
|
||||||
|
<if test="DWMC != null and DWMC != '' ">DWMC ,</if>
|
||||||
|
|
||||||
|
|
||||||
|
</trim>
|
||||||
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="ID != null and ID != '' ">#{ID },</if>
|
||||||
|
<if test="DWID != null and DWID != '' ">#{DWID },</if>
|
||||||
|
<if test="GJ != null and GJ != '' ">#{GJ },</if>
|
||||||
|
<if test="ZJLX != null and ZJLX != '' ">#{ZJLX },</if>
|
||||||
|
<if test="ZJHM != null and ZJHM != '' ">#{ZJHM },</if>
|
||||||
|
<if test="XM != null and XM != '' ">#{XM },</if>
|
||||||
|
<if test="XB != null and XB != '' ">#{XB },</if>
|
||||||
|
<if test="MZ != null and MZ != '' ">#{MZ },</if>
|
||||||
|
<if test="LXDH != null and LXDH != '' ">#{LXDH },</if>
|
||||||
|
<if test="ZT != null and ZT != '' ">#{ZT },</if>
|
||||||
|
<if test="RYFL != null and RYFL != '' ">#{RYFL },</if>
|
||||||
|
<if test="YSBZK_RKSJ != null and YSBZK_RKSJ != '' ">#{YSBZK_RKSJ},</if>
|
||||||
|
<if test="YSBZK_GXSJ != null and YSBZK_GXSJ != '' ">#{YSBZK_GXSJ},</if>
|
||||||
|
<if test="DWMC != null and DWMC != '' ">#{DWMC },</if>
|
||||||
|
|
||||||
|
</trim>
|
||||||
|
</insert>
|
||||||
|
|
||||||
|
<update id="updateVSyCyryById" parameterType="com.ssf.mysqloracletest.domain.VSySydwCyryMysql">
|
||||||
|
update v_sy_sydw_cyry
|
||||||
|
<trim prefix="SET" suffixOverrides=",">
|
||||||
|
<if test="ID != null and ID != '' ">ID =#{ID },</if>
|
||||||
|
<if test="DWID != null and DWID != '' ">DWID =#{DWID },</if>
|
||||||
|
<if test="GJ != null and GJ != '' ">GJ =#{GJ },</if>
|
||||||
|
<if test="ZJLX != null and ZJLX != '' ">ZJLX =#{ZJLX },</if>
|
||||||
|
<if test="ZJHM != null and ZJHM != '' ">ZJHM =#{ZJHM },</if>
|
||||||
|
<if test="XM != null and XM != '' ">XM =#{XM },</if>
|
||||||
|
<if test="XB != null and XB != '' ">XB =#{XB },</if>
|
||||||
|
<if test="MZ != null and MZ != '' ">MZ =#{MZ },</if>
|
||||||
|
<if test="LXDH != null and LXDH != '' ">LXDH =#{LXDH },</if>
|
||||||
|
<if test="ZT != null and ZT != '' ">ZT =#{ZT },</if>
|
||||||
|
<if test="RYFL != null and RYFL != '' ">RYFL =#{RYFL },</if>
|
||||||
|
<if test="YSBZK_RKSJ != null and YSBZK_RKSJ != '' ">YSBZK_RKSJ=#{YSBZK_RKSJ},</if>
|
||||||
|
<if test="YSBZK_GXSJ != null and YSBZK_GXSJ != '' ">YSBZK_GXSJ=#{YSBZK_GXSJ},</if>
|
||||||
|
<if test="DWMC != null and DWMC != '' ">DWMC =#{DWMC },</if>
|
||||||
|
|
||||||
|
</trim>
|
||||||
|
where ID = #{ID}
|
||||||
|
</update>
|
||||||
|
</mapper>
|
@ -0,0 +1,36 @@
|
|||||||
|
<?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.VSySydwCyryOracleMapper">
|
||||||
|
|
||||||
|
<select id="countCyry" resultType="int">
|
||||||
|
select count(*)
|
||||||
|
from SYX_JWYSJ.V_SY_SYDW_CYRY
|
||||||
|
</select>
|
||||||
|
|
||||||
|
|
||||||
|
<resultMap id="BaseResultMap" type="com.ssf.mysqloracletest.domain.VSySydwCyryOracle">
|
||||||
|
<result property="ID" column="ID" jdbcType="VARCHAR"/>
|
||||||
|
<result property="DWID" column="DWID" jdbcType="VARCHAR"/>
|
||||||
|
<result property="GJ" column="GJ" jdbcType="VARCHAR"/>
|
||||||
|
<result property="ZJLX" column="ZJLX" jdbcType="VARCHAR"/>
|
||||||
|
<result property="ZJHM" column="ZJHM" jdbcType="VARCHAR"/>
|
||||||
|
<result property="XM" column="XM" jdbcType="VARCHAR"/>
|
||||||
|
<result property="XB" column="XB" jdbcType="VARCHAR"/>
|
||||||
|
<result property="MZ" column="MZ" jdbcType="VARCHAR"/>
|
||||||
|
<result property="LXDH" column="LXDH" jdbcType="VARCHAR"/>
|
||||||
|
<result property="ZT" column="ZT" jdbcType="VARCHAR"/>
|
||||||
|
<result property="RYFL" column="RYFL" jdbcType="VARCHAR"/>
|
||||||
|
<result property="YSBZK_RKSJ" column="YSBZK_RKSJ" jdbcType="VARCHAR"/>
|
||||||
|
<result property="YSBZK_GXSJ" column="YSBZK_GXSJ" jdbcType="VARCHAR"/>
|
||||||
|
<result property="DWMC" column="DWMC" jdbcType="VARCHAR"/>
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
<select id="getCyryList" parameterType="java.util.Map" resultMap="BaseResultMap">
|
||||||
|
SELECT t2.*
|
||||||
|
FROM (SELECT ROWNUM rn, t1.* FROM (SELECT * FROM SYX_JWYSJ.V_SY_SYDW_CYRY) t1 WHERE ROWNUM<![CDATA[ <= ]]> ${rowEnd}) t2
|
||||||
|
WHERE t2.rn <![CDATA[ >= ]]> ${rowStart}
|
||||||
|
</select>
|
||||||
|
|
||||||
|
</mapper>
|
Loading…
Reference in new issue