From e7c78f306418b196b4885952aea0b5255458a61e Mon Sep 17 00:00:00 2001 From: hanrenchun Date: Wed, 29 Nov 2023 15:32:59 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E5=87=BA=E8=AD=A6=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config/application.properties | 9 +- .../domain/JcjCjxxViewOracle.java | 535 ++++++++++++++++++ .../mapper/JcjCjxxViewOracleMapper.java | 27 + .../service/JcjCjxxViewOracleService.java | 18 + .../impl/JcjCjxxViewOracleServiceImpl.java | 40 ++ .../impl/TJksbglOracleServiceImpl.java | 6 - .../ssf/mysqloracletest/task/JcjCjxxTask.java | 114 ++++ .../mysqloracletest/utils/ConfigParam.java | 1 + .../mapper/JcjCjxxViewMapperOracle.xml | 125 ++++ .../resources/mapper/VSySyrkMysqlMapper.xml | 4 +- 10 files changed, 867 insertions(+), 12 deletions(-) create mode 100644 src/main/java/com/ssf/mysqloracletest/domain/JcjCjxxViewOracle.java create mode 100644 src/main/java/com/ssf/mysqloracletest/mapper/JcjCjxxViewOracleMapper.java create mode 100644 src/main/java/com/ssf/mysqloracletest/service/JcjCjxxViewOracleService.java create mode 100644 src/main/java/com/ssf/mysqloracletest/service/impl/JcjCjxxViewOracleServiceImpl.java create mode 100644 src/main/java/com/ssf/mysqloracletest/task/JcjCjxxTask.java create mode 100644 src/main/resources/mapper/JcjCjxxViewMapperOracle.xml diff --git a/config/application.properties b/config/application.properties index 9cd1765..0c798ca 100644 --- a/config/application.properties +++ b/config/application.properties @@ -1,11 +1,12 @@ -#ʵеַ봦 +#ʵ�е�ַ���봦���� sydzSwitch=false -#βѯ +#���β�ѯ������ oncesCounts=10000 syfwSwitch=false -syrkSwitch=false -jksbSwitch=true +syrkSwitch=true +jksbSwitch=false +cjxxSwitch=false diff --git a/src/main/java/com/ssf/mysqloracletest/domain/JcjCjxxViewOracle.java b/src/main/java/com/ssf/mysqloracletest/domain/JcjCjxxViewOracle.java new file mode 100644 index 0000000..f596a50 --- /dev/null +++ b/src/main/java/com/ssf/mysqloracletest/domain/JcjCjxxViewOracle.java @@ -0,0 +1,535 @@ +package com.ssf.mysqloracletest.domain; + +import com.baomidou.mybatisplus.annotation.TableName; +import lombok.Data; + +import java.io.Serializable; + +/** + * + * @TableName jcj_cjxx_view + */ +@TableName(value ="jcj_cjxx_view") +@Data +public class JcjCjxxViewOracle implements Serializable { + /** + * + */ + private String cjbh; + + /** + * + */ + private String jjbh; + + /** + * + */ + private String jjdbh; + + /** + * + */ + private String pjdbh; + + /** + * + */ + private String fklyh; + + /** + * + */ + private String cjlb; + + /** + * + */ + private String cjsj; + + /** + * + */ + private String ddxcsj; + + /** + * + */ + private String cjxzqh; + + /** + * + */ + private String cjjlx; + + /** + * + */ + private String cjmlph; + + /** + * + */ + private String cjmphz; + + /** + * + */ + private String cjxz; + + /** + * + */ + private String sfcs; + + /** + * + */ + private String fsyy; + + /** + * + */ + private String tqqk; + + /** + * + */ + private String jqsx; + + /** + * + */ + private String cjr; + + /** + * + */ + private String cjrhzxs; + + /** + * + */ + private String cjrlxfs; + + /** + * + */ + private String sfxq; + + /** + * + */ + private String sfsjsx; + + /** + * + */ + private String sfsjxx; + + /** + * + */ + private String cljgnr; + + /** + * + */ + private String bccljg; + + /** + * + */ + private String ssxxqk; + + /** + * + */ + private String cjfksj; + + /** + * + */ + private String spsj; + + /** + * + */ + private String zbld; + + /** + * + */ + private String zbldxm; + + /** + * + */ + private String ldclsj; + + /** + * + */ + private String cjjg; + + /** + * + */ + private String cjysjsdw; + + /** + * + */ + private String cjysjsr; + + /** + * + */ + private String cjysjssj; + + /** + * + */ + private String cdjl; + + /** + * + */ + private String cdjdc; + + /** + * + */ + private String cdcz; + + /** + * + */ + private String jjfns; + + /** + * + */ + private String jjets; + + /** + * + */ + private String jjrzs; + + /** + * + */ + private String jzqz; + + /** + * + */ + private String jzsy; + + /** + * + */ + private String rysss; + + /** + * + */ + private String rysws; + + /** + * + */ + private String lzscrs; + + /** + * + */ + private String phxxaj; + + /** + * + */ + private String phxsaj; + + /** + * + */ + private String phzaaj; + + /** + * + */ + private String tprf; + + /** + * + */ + private String zhzacy; + + /** + * + */ + private String zjjjss; + + /** + * + */ + private String whss; + + /** + * + */ + private String ajslr; + + /** + * + */ + private String ajsldw; + + /** + * + */ + private String glajbh; + + /** + * + */ + private String glajzt; + + /** + * + */ + private String gisX; + + /** + * + */ + private String gisY; + + /** + * + */ + private String djdw; + + /** + * + */ + private String djr; + + /** + * + */ + private String djsj; + + /** + * + */ + private String xgr; + + /** + * + */ + private String xgsj; + + /** + * + */ + private String xgdw; + + /** + * + */ + private String djrxm; + + /** + * + */ + private String djdwmc; + + /** + * + */ + private String xgrxm; + + /** + * + */ + private String xgdwmc; + + /** + * + */ + private String cjdw; + + /** + * + */ + private String cjdwmc; + + /** + * + */ + private String cjxxdd; + + /** + * + */ + private String zblddw; + + /** + * + */ + private String zblddwmc; + + /** + * + */ + private String spxgsj; + + /** + * + */ + private String yzb; + + /** + * + */ + private String xzb; + + /** + * + */ + private String bzsj; + + /** + * + */ + private String bzdw; + + /** + * + */ + private String bzr; + + /** + * + */ + private String bzrxm; + + /** + * + */ + private String bzdwmc; + + /** + * + */ + private String gxsj; + + /** + * + */ + private String gxrxm; + + /** + * + */ + private String gxr; + + /** + * + */ + private String gxdwmc; + + /** + * + */ + private String gxdw; + + /** + * + */ + private String cjlbmc; + + /** + * + */ + private String cjxzqhmc; + + /** + * + */ + private String cjjlxmc; + + /** + * + */ + private String cjmphzmc; + + /** + * + */ + private String sfcsmc; + + /** + * + */ + private String fsyymc; + + /** + * + */ + private String tqqkmc; + + /** + * + */ + private String sfxqmc; + + /** + * + */ + private String cjjgmc; + + /** + * + */ + private String ajslrmc; + + /** + * + */ + private String ajsldwmc; + + /** + * + */ + private String glajztmc; + + /** + * + */ + private String wsRksj; + + /** + * + */ + private String wsXgsj; + + /** + * + */ + private String wsYxx; + + /** + * + */ + private String jqsxmc; + + /** + * + */ + private String rywksj; + +} \ No newline at end of file diff --git a/src/main/java/com/ssf/mysqloracletest/mapper/JcjCjxxViewOracleMapper.java b/src/main/java/com/ssf/mysqloracletest/mapper/JcjCjxxViewOracleMapper.java new file mode 100644 index 0000000..2cd93e7 --- /dev/null +++ b/src/main/java/com/ssf/mysqloracletest/mapper/JcjCjxxViewOracleMapper.java @@ -0,0 +1,27 @@ +package com.ssf.mysqloracletest.mapper; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.ssf.mysqloracletest.domain.JcjCjxxViewOracle; +import org.apache.ibatis.annotations.Mapper; +import java.util.List; +import java.util.Map; + +/** +* @author 28758 +* @description 针对表【jcj_cjxx_view】的数据库操作Mapper +* @createDate 2023-11-29 09:28:09 +* @Entity com.ssf.mysqloracletest.domain.JcjCjxxView + * +*/ + +@Mapper +public interface JcjCjxxViewOracleMapper extends BaseMapper { + + public int countCjxx(); + + public List getCjxxList(Map map); +} + + + + diff --git a/src/main/java/com/ssf/mysqloracletest/service/JcjCjxxViewOracleService.java b/src/main/java/com/ssf/mysqloracletest/service/JcjCjxxViewOracleService.java new file mode 100644 index 0000000..47f4b0c --- /dev/null +++ b/src/main/java/com/ssf/mysqloracletest/service/JcjCjxxViewOracleService.java @@ -0,0 +1,18 @@ +package com.ssf.mysqloracletest.service; + +import com.baomidou.mybatisplus.extension.service.IService; +import com.ssf.mysqloracletest.domain.JcjCjxxViewOracle; + +import java.util.List; +import java.util.Map; + +/** +* @author 28758 +* @description 针对表【jcj_cjxx_view】的数据库操作Service +* @createDate 2023-11-29 09:28:09 +*/ +public interface JcjCjxxViewOracleService extends IService { + public int countCjxx(); + + public List getCjxxList(Map map); +} diff --git a/src/main/java/com/ssf/mysqloracletest/service/impl/JcjCjxxViewOracleServiceImpl.java b/src/main/java/com/ssf/mysqloracletest/service/impl/JcjCjxxViewOracleServiceImpl.java new file mode 100644 index 0000000..b9c056b --- /dev/null +++ b/src/main/java/com/ssf/mysqloracletest/service/impl/JcjCjxxViewOracleServiceImpl.java @@ -0,0 +1,40 @@ +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.JcjCjxxViewOracle; +import com.ssf.mysqloracletest.mapper.JcjCjxxViewOracleMapper; +import com.ssf.mysqloracletest.service.JcjCjxxViewOracleService; +import org.springframework.stereotype.Service; + +import javax.annotation.Resource; +import java.util.List; +import java.util.Map; + +/** +* @author 28758 +* @description 针对表【jcj_cjxx_view】的数据库操作Service实现 +* @createDate 2023-11-29 09:28:09 +*/ +@Service +@DS("oracleSydz") +public class JcjCjxxViewOracleServiceImpl extends ServiceImpl + implements JcjCjxxViewOracleService { + @Resource + private JcjCjxxViewOracleMapper oracleMapper; + + @Override + public int countCjxx(){ + return oracleMapper.countCjxx(); + } + + @Override + public List getCjxxList(Map map) { + return oracleMapper.getCjxxList(map); + } + +} + + + + diff --git a/src/main/java/com/ssf/mysqloracletest/service/impl/TJksbglOracleServiceImpl.java b/src/main/java/com/ssf/mysqloracletest/service/impl/TJksbglOracleServiceImpl.java index ceb3402..6295211 100644 --- a/src/main/java/com/ssf/mysqloracletest/service/impl/TJksbglOracleServiceImpl.java +++ b/src/main/java/com/ssf/mysqloracletest/service/impl/TJksbglOracleServiceImpl.java @@ -1,14 +1,8 @@ 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.TJksbglMysql; import com.ssf.mysqloracletest.domain.TJksbglOracle; -import com.ssf.mysqloracletest.domain.VSySydzOracle; -import com.ssf.mysqloracletest.mapper.TJksbglMysqlMapper; import com.ssf.mysqloracletest.mapper.TJksbglOracleMapper; -import com.ssf.mysqloracletest.mapper.VSySydzOracleMapper; -import com.ssf.mysqloracletest.service.TJksbglMysqlService; import com.ssf.mysqloracletest.service.TJksbglOracleService; import org.springframework.stereotype.Service; diff --git a/src/main/java/com/ssf/mysqloracletest/task/JcjCjxxTask.java b/src/main/java/com/ssf/mysqloracletest/task/JcjCjxxTask.java new file mode 100644 index 0000000..59d830d --- /dev/null +++ b/src/main/java/com/ssf/mysqloracletest/task/JcjCjxxTask.java @@ -0,0 +1,114 @@ +package com.ssf.mysqloracletest.task; + +import com.ssf.mysqloracletest.domain.JcjCjxxViewMysql; +import com.ssf.mysqloracletest.domain.JcjCjxxViewOracle; +import com.ssf.mysqloracletest.service.JcjCjxxViewMysqlService; +import com.ssf.mysqloracletest.service.JcjCjxxViewOracleService; +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 JcjCjxxTask { + + private static final Logger logger = LoggerFactory.getLogger(JcjCjxxTask.class); + + @Resource + private JcjCjxxViewMysqlService cjxxMysqlService; + + @Resource + private JcjCjxxViewOracleService cjxxOracleService; + + final int oncesCounts = NumKit.checkInt(ConfigParam.oncesCounts) == 0 ? 1000 : NumKit.checkInt(ConfigParam.oncesCounts); + + private boolean cjxxTag = false; + + /** + * 连云港 对接海康平台获取人员基础数据 + * // + */ + @Scheduled(initialDelay = 100, fixedDelay = 3000) + public void transcjxx() { + + if (cjxxTag) { + return; + } + + if (!"true".equals(ConfigParam.cjxxSwitch)) { + return; + } + + + try { + int countcjxx = cjxxOracleService.countCjxx(); + logger.info("countcjxx:" + countcjxx); + + if (countcjxx > 0) { + + cjxxTag = true; + + int count = countcjxx / oncesCounts; + CountDownLatch latch = new CountDownLatch(count); + ExecutorService cjxxPool = Executors.newFixedThreadPool(50); + + for (int i = 0; i <= count; i++) { + Map cjxxMap = new HashMap(); + cjxxMap.put("rowStart", i * oncesCounts); + cjxxMap.put("rowEnd", (i + 1) * oncesCounts); + cjxxPool.submit(() -> { + try { + List cjxxs = cjxxOracleService.getCjxxList(cjxxMap); + for (JcjCjxxViewOracle cjxx : cjxxs) { + JcjCjxxViewMysql sBean = new JcjCjxxViewMysql(); + BeanUtils.copyProperties(cjxx, sBean); + //确定一个数据是否唯一 + JcjCjxxViewMysql checkcjxx = cjxxMysqlService.selectCjxxById(cjxx.getCjbh()); + if (checkcjxx == null) { + cjxxMysqlService.insertCjxx(sBean); + logger.info("cjxx-" + cjxx.getCjbh() + ":插入成功"); + } else { + cjxxMysqlService.updateCjxxById(sBean); + logger.info("cjxx-" + cjxx.getCjbh() + ":更新成功"); + } + } + } catch (Exception e) { + logger.info("cjxxs:" + e.getMessage()); + } + latch.countDown(); + }); + logger.info("cjxxMap数据总量:" + countcjxx + "," + "当前处理下标:" + cjxxMap.get("rowStart") + "/" + cjxxMap.get("rowEnd")); + } + + try { + // Wait for all threads to complete + latch.await(); + } catch (InterruptedException e) { + e.printStackTrace(); + } + // 关闭线程池 + cjxxPool.shutdown(); + } + + } catch (Exception e) { + logger.info(StringKit.getTrace(e)); + } + } + + +} diff --git a/src/main/java/com/ssf/mysqloracletest/utils/ConfigParam.java b/src/main/java/com/ssf/mysqloracletest/utils/ConfigParam.java index d03059c..a8389ee 100644 --- a/src/main/java/com/ssf/mysqloracletest/utils/ConfigParam.java +++ b/src/main/java/com/ssf/mysqloracletest/utils/ConfigParam.java @@ -15,5 +15,6 @@ public class ConfigParam { public static String syrkSwitch = StringKit.toString(PropertiesUtil.queryPropertiesByKey("syrkSwitch")); public static String jksbSwitch = StringKit.toString(PropertiesUtil.queryPropertiesByKey("jksbSwitch")); + public static String cjxxSwitch = StringKit.toString(PropertiesUtil.queryPropertiesByKey("cjxxSwitch")); } diff --git a/src/main/resources/mapper/JcjCjxxViewMapperOracle.xml b/src/main/resources/mapper/JcjCjxxViewMapperOracle.xml new file mode 100644 index 0000000..9839239 --- /dev/null +++ b/src/main/resources/mapper/JcjCjxxViewMapperOracle.xml @@ -0,0 +1,125 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/main/resources/mapper/VSySyrkMysqlMapper.xml b/src/main/resources/mapper/VSySyrkMysqlMapper.xml index ef7b48d..8872b2b 100644 --- a/src/main/resources/mapper/VSySyrkMysqlMapper.xml +++ b/src/main/resources/mapper/VSySyrkMysqlMapper.xml @@ -50,7 +50,7 @@ YSBZK_RKSJ=#{YSBZK_RKSJ}, YSBZK_GXSJ=#{YSBZK_GXSJ}, - where ID = #{id} + where ID = #{ID} From b80f6b63902d03d4f4ee4419535a91676a97940c Mon Sep 17 00:00:00 2001 From: hanrenchun Date: Wed, 29 Nov 2023 15:57:44 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E5=A4=84=E8=AD=A6=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../domain/JcjCjxxViewMysql.java | 297 ++++++++++++ .../mapper/JcjCjxxViewMysqlMapper.java | 25 + .../service/JcjCjxxViewMysqlService.java | 19 + .../impl/JcjCjxxViewMysqlServiceImpl.java | 42 ++ .../mapper/JcjCjxxViewMapperMysql.xml | 448 ++++++++++++++++++ 5 files changed, 831 insertions(+) create mode 100644 src/main/java/com/ssf/mysqloracletest/domain/JcjCjxxViewMysql.java create mode 100644 src/main/java/com/ssf/mysqloracletest/mapper/JcjCjxxViewMysqlMapper.java create mode 100644 src/main/java/com/ssf/mysqloracletest/service/JcjCjxxViewMysqlService.java create mode 100644 src/main/java/com/ssf/mysqloracletest/service/impl/JcjCjxxViewMysqlServiceImpl.java create mode 100644 src/main/resources/mapper/JcjCjxxViewMapperMysql.xml diff --git a/src/main/java/com/ssf/mysqloracletest/domain/JcjCjxxViewMysql.java b/src/main/java/com/ssf/mysqloracletest/domain/JcjCjxxViewMysql.java new file mode 100644 index 0000000..8cf53dc --- /dev/null +++ b/src/main/java/com/ssf/mysqloracletest/domain/JcjCjxxViewMysql.java @@ -0,0 +1,297 @@ +package com.ssf.mysqloracletest.domain; + +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableField; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import java.io.Serializable; +import lombok.Data; + +/** + * + * @TableName jcj_cjxx_view + */ +@TableName(value ="jcj_cjxx_view") +@Data +public class JcjCjxxViewMysql implements Serializable { + /** + * + */ + private String cjbh; + private String jjbh; + private String jjdbh; + private String pjdbh; + private String fklyh; + private String cjlb; + private String cjsj; + private String ddxcsj; + private String cjxzqh; + private String cjjlx; + private String cjmlph; + private String cjmphz; + private String cjxz; + private String sfcs; + private String fsyy; + private String tqqk; + private String jqsx; + private String cjr; + private String cjrhzxs; + private String cjrlxfs; + private String sfxq; + private String sfsjsx; + private String sfsjxx; + private String cljgnr; + private String bccljg; + private String ssxxqk; + private String cjfksj; + private String spsj; + private String zbld; + private String zbldxm; + private String ldclsj; + private String cjjg; + private String cjysjsdw; + private String cjysjsr; + private String cjysjssj; + private String cdjl; + private String cdjdc; + private String cdcz; + private String jjfns; + private String jjets; + private String jjrzs; + private String jzqz; + private String jzsy; + private String rysss; + private String rysws; + private String lzscrs; + private String phxxaj; + private String phxsaj; + private String phzaaj; + private String tprf; + private String zhzacy; + private String zjjjss; + private String whss; + private String ajslr; + private String ajsldw; + private String glajbh; + private String glajzt; + private String gisX; + private String gisY; + private String djdw; + private String djr; + + /** + * + */ + private String djsj; + + /** + * + */ + private String xgr; + + /** + * + */ + private String xgsj; + + /** + * + */ + private String xgdw; + + /** + * + */ + private String djrxm; + + /** + * + */ + private String djdwmc; + + /** + * + */ + private String xgrxm; + + /** + * + */ + private String xgdwmc; + + /** + * + */ + private String cjdw; + + /** + * + */ + private String cjdwmc; + + /** + * + */ + private String cjxxdd; + + /** + * + */ + private String zblddw; + + /** + * + */ + private String zblddwmc; + + /** + * + */ + private String spxgsj; + + /** + * + */ + private String yzb; + + /** + * + */ + private String xzb; + + /** + * + */ + private String bzsj; + + /** + * + */ + private String bzdw; + + /** + * + */ + private String bzr; + + /** + * + */ + private String bzrxm; + + /** + * + */ + private String bzdwmc; + + /** + * + */ + private String gxsj; + + /** + * + */ + private String gxrxm; + + /** + * + */ + private String gxr; + + /** + * + */ + private String gxdwmc; + + /** + * + */ + private String gxdw; + + /** + * + */ + private String cjlbmc; + + /** + * + */ + private String cjxzqhmc; + + /** + * + */ + private String cjjlxmc; + + /** + * + */ + private String cjmphzmc; + + /** + * + */ + private String sfcsmc; + + /** + * + */ + private String fsyymc; + + /** + * + */ + private String tqqkmc; + + /** + * + */ + private String sfxqmc; + + /** + * + */ + private String cjjgmc; + + /** + * + */ + private String ajslrmc; + + /** + * + */ + private String ajsldwmc; + + /** + * + */ + private String glajztmc; + + /** + * + */ + private String wsRksj; + + /** + * + */ + private String wsXgsj; + + /** + * + */ + private String wsYxx; + + /** + * + */ + private String jqsxmc; + + /** + * + */ + private String rywksj; + +} \ No newline at end of file diff --git a/src/main/java/com/ssf/mysqloracletest/mapper/JcjCjxxViewMysqlMapper.java b/src/main/java/com/ssf/mysqloracletest/mapper/JcjCjxxViewMysqlMapper.java new file mode 100644 index 0000000..867e156 --- /dev/null +++ b/src/main/java/com/ssf/mysqloracletest/mapper/JcjCjxxViewMysqlMapper.java @@ -0,0 +1,25 @@ +package com.ssf.mysqloracletest.mapper; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.ssf.mysqloracletest.domain.JcjCjxxViewMysql; +import org.apache.ibatis.annotations.Mapper; + +/** +* @author 28758 +* @description 针对表【jcj_cjxx_view】的数据库操作Mapper +* @createDate 2023-11-29 09:28:09 +* @Entity com.ssf.mysqloracletest.domain.JcjCjxxView +*/ +@Mapper +public interface JcjCjxxViewMysqlMapper extends BaseMapper { + public JcjCjxxViewMysql selectCjxxById(String id); + + public int insertCjxx(JcjCjxxViewMysql bean); + + public int updateCjxxById(JcjCjxxViewMysql bean); + +} + + + + diff --git a/src/main/java/com/ssf/mysqloracletest/service/JcjCjxxViewMysqlService.java b/src/main/java/com/ssf/mysqloracletest/service/JcjCjxxViewMysqlService.java new file mode 100644 index 0000000..c0ee611 --- /dev/null +++ b/src/main/java/com/ssf/mysqloracletest/service/JcjCjxxViewMysqlService.java @@ -0,0 +1,19 @@ +package com.ssf.mysqloracletest.service; + +import com.baomidou.mybatisplus.extension.service.IService; +import com.ssf.mysqloracletest.domain.JcjCjxxViewMysql; +import com.ssf.mysqloracletest.domain.JcjCjxxViewMysql; + +/** +* @author 28758 +* @description 针对表【jcj_cjxx_view】的数据库操作Service +* @createDate 2023-11-29 09:28:09 +*/ +public interface JcjCjxxViewMysqlService extends IService { + public JcjCjxxViewMysql selectCjxxById(String id); + + public int insertCjxx(JcjCjxxViewMysql tjks); + + public int updateCjxxById(JcjCjxxViewMysql tjks); + +} diff --git a/src/main/java/com/ssf/mysqloracletest/service/impl/JcjCjxxViewMysqlServiceImpl.java b/src/main/java/com/ssf/mysqloracletest/service/impl/JcjCjxxViewMysqlServiceImpl.java new file mode 100644 index 0000000..c1b3cd7 --- /dev/null +++ b/src/main/java/com/ssf/mysqloracletest/service/impl/JcjCjxxViewMysqlServiceImpl.java @@ -0,0 +1,42 @@ +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.JcjCjxxViewMysql; +import com.ssf.mysqloracletest.mapper.JcjCjxxViewMysqlMapper; +import com.ssf.mysqloracletest.service.JcjCjxxViewMysqlService; +import lombok.RequiredArgsConstructor; +import org.springframework.stereotype.Service; + +/** +* @author 28758 +* @description 针对表【jcj_cjxx_view】的数据库操作Service实现 +* @createDate 2023-11-29 09:28:09 +*/ +@Service +@DS("mysql") +@RequiredArgsConstructor +public class JcjCjxxViewMysqlServiceImpl extends ServiceImpl + implements JcjCjxxViewMysqlService { + private final JcjCjxxViewMysqlMapper jcjCjxxViewMysqlMapper; + + @Override + public JcjCjxxViewMysql selectCjxxById(String id) { + return jcjCjxxViewMysqlMapper.selectCjxxById(id); + } + + @Override + public int insertCjxx(JcjCjxxViewMysql tjks) { + return jcjCjxxViewMysqlMapper.insertCjxx(tjks); + } + + @Override + public int updateCjxxById(JcjCjxxViewMysql tjks) { + return jcjCjxxViewMysqlMapper.updateCjxxById(tjks); + } + +} + + + + diff --git a/src/main/resources/mapper/JcjCjxxViewMapperMysql.xml b/src/main/resources/mapper/JcjCjxxViewMapperMysql.xml new file mode 100644 index 0000000..4bb40c2 --- /dev/null +++ b/src/main/resources/mapper/JcjCjxxViewMapperMysql.xml @@ -0,0 +1,448 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + insert into jcj_cjxx_view + + CJBH, + JJBH, + JJDBH, + PJDBH, + FKLYH, + CJLB, + CJSJ, + DDXCSJ, + CJXZQH, + CJJLX, + CJMLPH, + CJMPHZ, + CJXZ, + SFCS, + FSYY, + TQQK, + JQSX, + CJR, + CJRHZXS, + CJRLXFS, + SFXQ, + SFSJSX, + SFSJXX, + CLJGNR, + BCCLJG, + SSXXQK, + CJFKSJ, + SPSJ, + ZBLD, + ZBLDXM, + LDCLSJ, + CJJG, + CJYSJSDW, + CJYSJSR, + CJYSJSSJ, + CDJL, + CDJDC, + CDCZ, + JJFNS, + JJETS, + JJRZS, + JZQZ, + JZSY, + RYSSS, + RYSWS, + LZSCRS, + PHXXAJ, + PHXSAJ, + PHZAAJ, + TPRF, + ZHZACY, + ZJJJSS, + WHSS, + AJSLR, + AJSLDW, + GLAJBH, + GLAJZT, + GIS_X, + GIS_Y, + DJDW, + DJR, + DJSJ, + XGR, + XGSJ, + XGDW, + DJRXM, + DJDWMC, + XGRXM, + XGDWMC, + CJDW, + CJDWMC, + CJXXDD, + ZBLDDW, + ZBLDDWMC, + SPXGSJ, + YZB, + XZB, + BZSJ, + BZDW, + BZR, + BZRXM, + BZDWMC, + GXSJ, + GXRXM, + GXR, + GXDWMC, + GXDW, + CJLBMC, + CJXZQHMC, + CJJLXMC, + CJMPHZMC, + SFCSMC, + FSYYMC, + TQQKMC, + SFXQMC, + CJJGMC, + AJSLRMC, + AJSLDWMC, + GLAJZTMC, + WS_RKSJ, + WS_XGSJ, + WS_YXX, + JQSXMC, + RYWKSJ, + + + #{CJBH}, + #{JJBH}, + #{JJDBH}, + #{PJDBH}, + #{FKLYH}, + #{CJLB}, + #{CJSJ}, + #{DDXCSJ}, + #{CJXZQH}, + #{CJJLX}, + #{CJMLPH}, + #{CJMPHZ}, + #{CJXZ}, + #{SFCS}, + #{FSYY}, + #{TQQK}, + #{JQSX}, + #{CJR}, + #{CJRHZXS}, + #{CJRLXFS}, + #{SFXQ}, + #{SFSJSX}, + #{SFSJXX}, + #{CLJGNR}, + #{BCCLJG}, + #{SSXXQK}, + #{CJFKSJ}, + #{SPSJ}, + #{ZBLD}, + #{ZBLDXM}, + #{LDCLSJ}, + #{CJJG}, + #{CJYSJSDW}, + #{CJYSJSR}, + #{CJYSJSSJ}, + #{CDJL}, + #{CDJDC}, + #{CDCZ}, + #{JJFNS}, + #{JJETS}, + #{JJRZS}, + #{JZQZ}, + #{JZSY}, + #{RYSSS}, + #{RYSWS}, + #{LZSCRS}, + #{PHXXAJ}, + #{PHXSAJ}, + #{PHZAAJ}, + #{TPRF}, + #{ZHZACY}, + #{ZJJJSS}, + #{WHSS}, + #{AJSLR}, + #{AJSLDW}, + #{GLAJBH}, + #{GLAJZT}, + #{GIS_X}, + #{GIS_Y}, + #{DJDW}, + #{DJR}, + #{DJSJ}, + #{XGR}, + #{XGSJ}, + #{XGDW}, + #{DJRXM}, + #{DJDWMC}, + #{XGRXM}, + #{XGDWMC}, + #{CJDW}, + #{CJDWMC}, + #{CJXXDD}, + #{ZBLDDW}, + #{ZBLDDWMC}, + #{SPXGSJ}, + #{YZB}, + #{XZB}, + #{BZSJ}, + #{BZDW}, + #{BZR}, + #{BZRXM}, + #{BZDWMC}, + #{GXSJ}, + #{GXRXM}, + #{GXR}, + #{GXDWMC}, + #{GXDW}, + #{CJLBMC}, + #{CJXZQHMC}, + #{CJJLXMC}, + #{CJMPHZMC}, + #{SFCSMC}, + #{FSYYMC}, + #{TQQKMC}, + #{SFXQMC}, + #{CJJGMC}, + #{AJSLRMC}, + #{AJSLDWMC}, + #{GLAJZTMC}, + #{WS_RKSJ}, + #{WS_XGSJ}, + #{WS_YXX}, + #{JQSXMC}, + #{RYWKSJ}, + + + + + update jcj_cjxx_view + + CJBH=#{CJBH}, + JJBH=#{JJBH}, + JJDBH=#{JJDBH}, + PJDBH=#{PJDBH}, + FKLYH=#{FKLYH}, + CJLB=#{CJLB}, + CJSJ=#{CJSJ}, + DDXCSJ=#{DDXCSJ}, + CJXZQH=#{CJXZQH}, + CJJLX=#{CJJLX}, + CJMLPH=#{CJMLPH}, + CJMPHZ=#{CJMPHZ}, + CJXZ=#{CJXZ}, + SFCS=#{SFCS}, + FSYY=#{FSYY}, + TQQK=#{TQQK}, + JQSX=#{JQSX}, + CJR=#{CJR}, + CJRHZXS=#{CJRHZXS}, + CJRLXFS=#{CJRLXFS}, + SFXQ=#{SFXQ}, + SFSJSX=#{SFSJSX}, + SFSJXX=#{SFSJXX}, + CLJGNR=#{CLJGNR}, + BCCLJG=#{BCCLJG}, + SSXXQK=#{SSXXQK}, + CJFKSJ=#{CJFKSJ}, + SPSJ=#{SPSJ}, + ZBLD=#{ZBLD}, + ZBLDXM=#{ZBLDXM}, + LDCLSJ=#{LDCLSJ}, + CJJG=#{CJJG}, + CJYSJSDW=#{CJYSJSDW}, + CJYSJSR=#{CJYSJSR}, + CJYSJSSJ=#{CJYSJSSJ}, + CDJL=#{CDJL}, + CDJDC=#{CDJDC}, + CDCZ=#{CDCZ}, + JJFNS=#{JJFNS}, + JJETS=#{JJETS}, + JJRZS=#{JJRZS}, + JZQZ=#{JZQZ}, + JZSY=#{JZSY}, + RYSSS=#{RYSSS}, + RYSWS=#{RYSWS}, + LZSCRS=#{LZSCRS}, + PHXXAJ=#{PHXXAJ}, + PHXSAJ=#{PHXSAJ}, + PHZAAJ=#{PHZAAJ}, + TPRF=#{TPRF}, + ZHZACY=#{ZHZACY}, + ZJJJSS=#{ZJJJSS}, + WHSS=#{WHSS}, + AJSLR=#{AJSLR}, + AJSLDW=#{AJSLDW}, + GLAJBH=#{GLAJBH}, + GLAJZT=#{GLAJZT}, + GIS_X=#{GIS_X}, + GIS_Y=#{GIS_Y}, + DJDW=#{DJDW}, + DJR=#{DJR}, + DJSJ=#{DJSJ}, + XGR=#{XGR}, + XGSJ=#{XGSJ}, + XGDW=#{XGDW}, + DJRXM=#{DJRXM}, + DJDWMC=#{DJDWMC}, + XGRXM=#{XGRXM}, + XGDWMC=#{XGDWMC}, + CJDW=#{CJDW}, + CJDWMC=#{CJDWMC}, + CJXXDD=#{CJXXDD}, + ZBLDDW=#{ZBLDDW}, + ZBLDDWMC=#{ZBLDDWMC}, + SPXGSJ=#{SPXGSJ}, + YZB=#{YZB}, + XZB=#{XZB}, + BZSJ=#{BZSJ}, + BZDW=#{BZDW}, + BZR=#{BZR}, + BZRXM=#{BZRXM}, + BZDWMC=#{BZDWMC}, + GXSJ=#{GXSJ}, + GXRXM=#{GXRXM}, + GXR=#{GXR}, + GXDWMC=#{GXDWMC}, + GXDW=#{GXDW}, + CJLBMC=#{CJLBMC}, + CJXZQHMC=#{CJXZQHMC}, + CJJLXMC=#{CJJLXMC}, + CJMPHZMC=#{CJMPHZMC}, + SFCSMC=#{SFCSMC}, + FSYYMC=#{FSYYMC}, + TQQKMC=#{TQQKMC}, + SFXQMC=#{SFXQMC}, + CJJGMC=#{CJJGMC}, + AJSLRMC=#{AJSLRMC}, + AJSLDWMC=#{AJSLDWMC}, + GLAJZTMC=#{GLAJZTMC}, + WS_RKSJ=#{WS_RKSJ}, + WS_XGSJ=#{WS_XGSJ}, + WS_YXX=#{WS_YXX}, + JQSXMC=#{JQSXMC}, + RYWKSJ=#{RYWKSJ}, + + where CJBH = #{CJBH} + + +