parent
2b346567ed
commit
854d5da804
@ -1,60 +1,104 @@
|
||||
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 v_sy_syrk
|
||||
*/
|
||||
@Data
|
||||
@TableName(value = "v_sy_syrk")
|
||||
public class VSySyrkMysql implements Serializable {
|
||||
/**
|
||||
*
|
||||
*
|
||||
*/
|
||||
@TableField(value = "ZJLID")
|
||||
private String ZJLID;
|
||||
@TableField(value = "YSXTJRZJ")
|
||||
private String YSXTJRZJ;
|
||||
@TableField(value = "XXSC_PDBZ")
|
||||
private String XXSC_PDBZ;
|
||||
@TableField(value = "ID")
|
||||
private String ID;
|
||||
@TableField(value = "RYFJID")
|
||||
private String RYFJID;
|
||||
@TableField(value = "RYID")
|
||||
private String RYID;
|
||||
@TableField(value = "SFZH")
|
||||
private String SFZH;
|
||||
@TableField(value = "XM")
|
||||
private String XM;
|
||||
@TableField(value = "XB")
|
||||
private String XB;
|
||||
@TableField(value = "MZ")
|
||||
private String MZ;
|
||||
@TableField(value = "HYZK")
|
||||
private String HYZK;
|
||||
@TableField(value = "WHCD")
|
||||
private String WHCD;
|
||||
@TableField(value = "CSRQ")
|
||||
private String CSRQ;
|
||||
@TableField(value = "SJHM")
|
||||
private String SJHM;
|
||||
@TableField(value = "LXDH")
|
||||
private String LXDH;
|
||||
@TableField(value = "HJSSXQ")
|
||||
private String HJSSXQ;
|
||||
@TableField(value = "HJDXZ")
|
||||
private String HJDXZ;
|
||||
@TableField(value = "XJZDXZ")
|
||||
private String XJZDXZ;
|
||||
@TableField(value = "RYLX")
|
||||
private String RYLX;
|
||||
@TableField(value = "PCSDM")
|
||||
private String PCSDM;
|
||||
@TableField(value = "PCSMC")
|
||||
private String PCSMC;
|
||||
@TableField(value = "CJWHDM")
|
||||
private String CJWHDM;
|
||||
@TableField(value = "CJWHMC")
|
||||
private String CJWHMC;
|
||||
@TableField(value = "JWQDM")
|
||||
private String JWQDM;
|
||||
@TableField(value = "JWQMC")
|
||||
private String JWQMC;
|
||||
@TableField(value = "WGDM")
|
||||
private String WGDM;
|
||||
@TableField(value = "WGMC")
|
||||
private String WGMC;
|
||||
@TableField(value = "JZWID")
|
||||
private String JZWID;
|
||||
@TableField(value = "FJID")
|
||||
private String FJID;
|
||||
@TableField(value = "FJDM")
|
||||
private String FJDM;
|
||||
@TableField(value = "XQID")
|
||||
private String XQID;
|
||||
@TableField(value = "STS")
|
||||
private String STS;
|
||||
@TableField(value = "CR_ID")
|
||||
private String CR_ID;
|
||||
@TableField(value = "CR_MC")
|
||||
private String CR_MC;
|
||||
@TableField(value = "CR_DT")
|
||||
private String CR_DT;
|
||||
@TableField(value = "CH_ID")
|
||||
private String CH_ID;
|
||||
@TableField(value = "CH_MC")
|
||||
private String CH_MC;
|
||||
@TableField(value = "CH_DT")
|
||||
private String CH_DT;
|
||||
@TableField(value = "CDC_JYM")
|
||||
private String CDC_JYM;
|
||||
@TableField(value = "YSBZK_RKSJ")
|
||||
private String YSBZK_RKSJ;
|
||||
@TableField(value = "YSBZK_GXSJ")
|
||||
private String YSBZK_GXSJ;
|
||||
@TableField(value = "status")
|
||||
private String status;
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,239 @@
|
||||
package com.ssf.mysqloracletest.domain;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* TODO
|
||||
*
|
||||
* @author dinosuar
|
||||
* @version 1.0
|
||||
* @String 2021/2/24 15:04
|
||||
**/
|
||||
@Data
|
||||
public class VillageActualUserInfo {
|
||||
|
||||
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 公安部-记录唯一标识
|
||||
*/
|
||||
// @Excel(name = "公安部-记录唯一标识")
|
||||
private String gaRecordId;
|
||||
|
||||
/**
|
||||
* 建筑物ID
|
||||
*/
|
||||
// @Excel(name = "建筑物ID")
|
||||
private String buildingId;
|
||||
|
||||
/**
|
||||
* 人员房屋ID
|
||||
*/
|
||||
// @Excel(name = "人员房屋ID")
|
||||
private String userHomeId;
|
||||
|
||||
/**
|
||||
* 源数据实有人口ID
|
||||
*/
|
||||
// @Excel(name = "源数据实有人口ID")
|
||||
private String actualUserId;
|
||||
|
||||
/**
|
||||
* 记录唯一ID
|
||||
*/
|
||||
// @Excel(name = "记录唯一ID")
|
||||
private String recordId;
|
||||
|
||||
/**
|
||||
* 网格代码
|
||||
*/
|
||||
// @Excel(name = "网格代码")
|
||||
private String gridCode;
|
||||
|
||||
/**
|
||||
* 网格名称
|
||||
*/
|
||||
// @Excel(name = "网格名称")
|
||||
private String gridName;
|
||||
|
||||
/**
|
||||
* 房屋ID
|
||||
*/
|
||||
// @Excel(name = "房屋ID")
|
||||
private String homeId;
|
||||
|
||||
/**
|
||||
* 房屋代码
|
||||
*/
|
||||
// @Excel(name = "房屋代码")
|
||||
private String homeCode;
|
||||
|
||||
/**
|
||||
* 警务区编码
|
||||
*/
|
||||
// @Excel(name = "警务区编码")
|
||||
private String policeDistrictCode;
|
||||
|
||||
/**
|
||||
* 警务区名称
|
||||
*/
|
||||
// @Excel(name = "警务区名称")
|
||||
private String policeDistrict;
|
||||
|
||||
/**
|
||||
* 派出所名称
|
||||
*/
|
||||
// @Excel(name = "派出所名称")
|
||||
private String policeStationName;
|
||||
|
||||
/**
|
||||
* 派出所代码
|
||||
*/
|
||||
// @Excel(name = "派出所代码")
|
||||
private String policeStationCode;
|
||||
|
||||
/**
|
||||
* 人员类别
|
||||
*/
|
||||
// @Excel(name = "人员类别")
|
||||
private String personCategory;
|
||||
|
||||
/**
|
||||
* 姓名
|
||||
*/
|
||||
// @Excel(name = "姓名")
|
||||
private String userName;
|
||||
|
||||
/**
|
||||
* 证件号码
|
||||
*/
|
||||
// @Excel(name = "证件号码")
|
||||
private String idcard;
|
||||
|
||||
/**
|
||||
* 手机号码
|
||||
*/
|
||||
// @Excel(name = "手机号码")
|
||||
private String phone;
|
||||
|
||||
/**
|
||||
* 联系电话
|
||||
*/
|
||||
// @Excel(name = "联系电话")
|
||||
private String landline;
|
||||
|
||||
/**
|
||||
* 性别
|
||||
*/
|
||||
// @Excel(name = "性别")
|
||||
private String sex;
|
||||
|
||||
/**
|
||||
* 民族
|
||||
*/
|
||||
// @Excel(name = "民族")
|
||||
private String nation;
|
||||
|
||||
/**
|
||||
* 婚姻状况
|
||||
*/
|
||||
// @Excel(name = "婚姻状况")
|
||||
private String marriage;
|
||||
|
||||
/**
|
||||
* 学历
|
||||
*/
|
||||
// @Excel(name = "学历")
|
||||
private String education;
|
||||
|
||||
/**
|
||||
* 出生日期
|
||||
*/
|
||||
// @JsonFormat(pattern = "yyyy-MM-dd")
|
||||
// @Excel(name = "出生日期", width = 30, StringFormat = "yyyy-MM-dd")
|
||||
private String birthday;
|
||||
|
||||
/**
|
||||
* 户籍
|
||||
*/
|
||||
// @Excel(name = "户籍")
|
||||
private String houseHoldRegister;
|
||||
|
||||
/**
|
||||
* 户籍地址
|
||||
*/
|
||||
// @Excel(name = "户籍地址")
|
||||
private String houseHoldAddress;
|
||||
|
||||
/**
|
||||
* 实际居住地
|
||||
*/
|
||||
// @Excel(name = "实际居住地")
|
||||
private String habitation;
|
||||
|
||||
/**
|
||||
* 社区/村编码
|
||||
*/
|
||||
// @Excel(name = "社区/村编码")
|
||||
private String blockCode;
|
||||
|
||||
/**
|
||||
* 社区/村名称
|
||||
*/
|
||||
// @Excel(name = "社区/村名称")
|
||||
private String blockName;
|
||||
|
||||
/**
|
||||
* 数据有效状态
|
||||
*/
|
||||
// @Excel(name = "数据有效状态")
|
||||
private String dateStatus;
|
||||
|
||||
/**
|
||||
* 0:不活跃,1:活跃
|
||||
*/
|
||||
// @Excel(name = "0:不活跃,1:活跃")
|
||||
private String isactive;
|
||||
|
||||
/**
|
||||
* 扩展字段c1
|
||||
*/
|
||||
// @Excel(name = "扩展字段c1")
|
||||
private String c1;
|
||||
private String c1New;
|
||||
|
||||
/**
|
||||
* 扩展字段c2
|
||||
*/
|
||||
// @Excel(name = "扩展字段c2")
|
||||
private String c2;
|
||||
|
||||
/**
|
||||
* 扩展字段c3
|
||||
*/
|
||||
// @Excel(name = "扩展字段c3")
|
||||
private String c3;
|
||||
|
||||
/**
|
||||
* 扩展字段c4
|
||||
*/
|
||||
// @Excel(name = "扩展字段c4")
|
||||
private String c4;
|
||||
|
||||
/**
|
||||
* 扩展字段c5
|
||||
*/
|
||||
// @Excel(name = "扩展字段c5")
|
||||
private String c5;
|
||||
private String createtimeV;
|
||||
private String updatetimeV;
|
||||
private String picStatus;
|
||||
private String userPic;
|
||||
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,60 @@
|
||||
package com.ssf.mysqloracletest.mapper;
|
||||
|
||||
import com.ssf.mysqloracletest.domain.VillageActualUserInfo;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 文章内容
|
||||
*
|
||||
* @author chglee
|
||||
* @email 1992lcg@163.com
|
||||
* @date 2017-10-03 16:17:48
|
||||
*/
|
||||
@Mapper
|
||||
public interface VillageActualUserInfoMapper {
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public VillageActualUserInfo selectVillageActualUserInfoById(Long id);
|
||||
|
||||
public VillageActualUserInfo selectVillageActualUserInfoByIdcard(String idcard);
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public List<VillageActualUserInfo> selectVillageActualUserInfoList(VillageActualUserInfo bean);
|
||||
|
||||
public List<VillageActualUserInfo> selectVillageActualUserInfoListAndPicExists(VillageActualUserInfo bean);
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public int insertVillageActualUserInfo(VillageActualUserInfo bean);
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public int updateVillageActualUserInfo(VillageActualUserInfo bean);
|
||||
|
||||
public int updateVillageActualUserInfoByIdcard(VillageActualUserInfo bean);
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public int deleteVillageActualUserInfoById(Long id);
|
||||
|
||||
public int deleteVillageActualUserInfoByUpdatetime(VillageActualUserInfo bean);
|
||||
|
||||
/**
|
||||
* 批量删除形体抓拍记录
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteVillageActualUserInfoByIds(Long[] ids);
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,52 @@
|
||||
package com.ssf.mysqloracletest.service;
|
||||
|
||||
import com.ssf.mysqloracletest.domain.VillageActualUserInfo;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 文章内容
|
||||
*
|
||||
* @author chglee
|
||||
* @email 1992lcg@163.com
|
||||
* @date 2017-09-09 10:03:34
|
||||
*/
|
||||
public interface VillageActualUserInfoService {
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public VillageActualUserInfo selectVillageActualUserInfoById(Long id);
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public List<VillageActualUserInfo> selectVillageActualUserInfoList(VillageActualUserInfo villageActualUserInfo);
|
||||
|
||||
public List<VillageActualUserInfo> selectVillageActualUserInfoListAndPicExists(VillageActualUserInfo villageActualUserInfo);
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public int insertVillageActualUserInfo(VillageActualUserInfo villageActualUserInfo);
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public int updateVillageActualUserInfo(VillageActualUserInfo villageActualUserInfo);
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public int deleteVillageActualUserInfoByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public int deleteVillageActualUserInfoById(Long id);
|
||||
|
||||
public int deleteVillageActualUserInfoByUpdatetime(VillageActualUserInfo bean);
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,158 @@
|
||||
package com.ssf.mysqloracletest.service.impl;
|
||||
|
||||
import com.baomidou.dynamic.datasource.annotation.DS;
|
||||
import com.ssf.mysqloracletest.domain.VillageActualUserInfo;
|
||||
import com.ssf.mysqloracletest.mapper.VillageActualUserInfoMapper;
|
||||
import com.ssf.mysqloracletest.service.VillageActualUserInfoService;
|
||||
import com.ssf.mysqloracletest.utils.ConfigParam;
|
||||
import com.ssf.mysqloracletest.utils.StringKit;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.io.File;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
/**
|
||||
* 形体抓拍记录Service业务层处理
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2023-04-17
|
||||
*/
|
||||
@Service
|
||||
@DS("mysqlSy")
|
||||
public class VillageActualUserInfoServiceImpl implements VillageActualUserInfoService {
|
||||
|
||||
private static final Logger logger = LoggerFactory.getLogger(VillageActualUserInfoServiceImpl.class);
|
||||
|
||||
@Resource
|
||||
private VillageActualUserInfoMapper ActualUserInfoDao;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@Override
|
||||
public VillageActualUserInfo selectVillageActualUserInfoById(Long id) {
|
||||
VillageActualUserInfo v = ActualUserInfoDao.selectVillageActualUserInfoById(id);
|
||||
return v;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public VillageActualUserInfo selectVillageActualUserInfoByIdcard(String idcard) {
|
||||
VillageActualUserInfo v = ActualUserInfoDao.selectVillageActualUserInfoByIdcard(idcard);
|
||||
return v;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@Override
|
||||
public List<VillageActualUserInfo> selectVillageActualUserInfoList(VillageActualUserInfo villageActualUserInfo) {
|
||||
List<VillageActualUserInfo> list = ActualUserInfoDao.selectVillageActualUserInfoList(villageActualUserInfo);
|
||||
return list;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@Override
|
||||
public List<VillageActualUserInfo> selectVillageActualUserInfoListAndPicExists(VillageActualUserInfo villageActualUserInfo) {
|
||||
List<VillageActualUserInfo> list = ActualUserInfoDao.selectVillageActualUserInfoListAndPicExists(villageActualUserInfo);
|
||||
return list;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@Override
|
||||
public int insertVillageActualUserInfo(VillageActualUserInfo villageActualUserInfo) {
|
||||
return ActualUserInfoDao.insertVillageActualUserInfo(villageActualUserInfo);
|
||||
}
|
||||
|
||||
public int saveOrUpdate(VillageActualUserInfo villageActualUserInfo) {
|
||||
try {
|
||||
String idcard = StringKit.toString(villageActualUserInfo.getIdcard());
|
||||
VillageActualUserInfo bean = selectVillageActualUserInfoByIdcard(idcard);
|
||||
int res = 0;
|
||||
if (bean == null) {
|
||||
villageActualUserInfo.setC1("1");
|
||||
res = ActualUserInfoDao.insertVillageActualUserInfo(villageActualUserInfo);
|
||||
} else {
|
||||
VillageActualUserInfo beanUp = new VillageActualUserInfo();
|
||||
BeanUtils.copyProperties(villageActualUserInfo, beanUp);
|
||||
updateVillageActualUserInfoByIdcard(beanUp);
|
||||
}
|
||||
return res;
|
||||
} catch (Exception e) {
|
||||
logger.info(StringKit.getTrace(e));
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@Override
|
||||
public int updateVillageActualUserInfo(VillageActualUserInfo villageActualUserInfo) {
|
||||
return ActualUserInfoDao.updateVillageActualUserInfo(villageActualUserInfo);
|
||||
}
|
||||
|
||||
public int updateVillageActualUserInfoByIdcard(VillageActualUserInfo bean) {
|
||||
VillageActualUserInfo beanCheck = selectVillageActualUserInfoByIdcard(bean.getIdcard());
|
||||
|
||||
String versionCheck = StringKit.toString(beanCheck.getC1());
|
||||
String c1 = "".equals(StringKit.toString(bean.getC1())) ? "1" : bean.getC1();
|
||||
int version = Integer.valueOf(c1);
|
||||
bean.setC1(StringKit.toString(version));
|
||||
bean.setC1New(StringKit.toString(version + 1));
|
||||
if ("".equals(versionCheck) || c1.equals(versionCheck)) {
|
||||
return ActualUserInfoDao.updateVillageActualUserInfoByIdcard(bean);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@Override
|
||||
public int deleteVillageActualUserInfoByIds(Long[] ids) {
|
||||
return ActualUserInfoDao.deleteVillageActualUserInfoByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@Override
|
||||
public int deleteVillageActualUserInfoById(Long id) {
|
||||
return ActualUserInfoDao.deleteVillageActualUserInfoById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int deleteVillageActualUserInfoByUpdatetime(VillageActualUserInfo bean) {
|
||||
return ActualUserInfoDao.deleteVillageActualUserInfoByUpdatetime(bean);
|
||||
}
|
||||
|
||||
|
||||
private static String getFolderPath(String picpath) {
|
||||
String floderPath;
|
||||
Date date = new Date();
|
||||
SimpleDateFormat simpleDate = new SimpleDateFormat("yyyyMMdd");
|
||||
String day = simpleDate.format(date);
|
||||
floderPath = picpath + ConfigParam.seq + "userinfo" + ConfigParam.seq + day + ConfigParam.seq;
|
||||
File fileFloderPath = new File(floderPath);
|
||||
//创建文件夹
|
||||
if (!fileFloderPath.exists()) {
|
||||
fileFloderPath.mkdirs();
|
||||
}
|
||||
return floderPath;
|
||||
}
|
||||
|
||||
|
||||
}
|
@ -1 +1 @@
|
||||
server:
port: 5678
spring:
datasource:
dynamic:
primary: mysql #设置默认的数据源或者数据源组,默认值即为master
strict: false #设置严格模式,默认false不启动. 启动后再为匹配到指定数据源时候回抛出异常,不启动会使用默认数据源.
datasource:
oracleSydz:
url: jdbc:mysql://121.41.91.94:12036/yhzafk?useUnicode=true&characterEncoding=utf8&useSSL=false&allowMultiQueries=true&serverTimezone=GMT
driver-class-name: com.mysql.cj.jdbc.Driver
username: root
password: '!QAZ1qaz'
mysql:
url: jdbc:mysql://121.41.91.94:12036/yhzafk?useUnicode=true&characterEncoding=utf8&useSSL=false&allowMultiQueries=true&serverTimezone=GMT
driver-class-name: com.mysql.cj.jdbc.Driver
username: root
password: '!QAZ1qaz'
mybatis-plus:
mapper-locations:
- classpath:mapper/*.xml
|
||||
server:
port: 1204
spring:
datasource:
dynamic:
primary: mysql #设置默认的数据源或者数据源组,默认值即为master
strict: false #设置严格模式,默认false不启动. 启动后再为匹配到指定数据源时候回抛出异常,不启动会使用默认数据源.
datasource:
oracleSydz:
url: jdbc:mysql://121.41.91.94:12036/yhzafk?useUnicode=true&characterEncoding=utf8&useSSL=false&allowMultiQueries=true&serverTimezone=GMT
driver-class-name: com.mysql.cj.jdbc.Driver
username: root
password: '!QAZ1qaz'
mysql:
url: jdbc:mysql://121.41.91.94:12036/yhzafk?useUnicode=true&characterEncoding=utf8&useSSL=false&allowMultiQueries=true&serverTimezone=GMT
driver-class-name: com.mysql.cj.jdbc.Driver
username: root
password: '!QAZ1qaz'
mysqlSy:
url: jdbc:mysql://121.41.91.94:12036/watu3?useUnicode=true&characterEncoding=utf8&useSSL=false&allowMultiQueries=true&serverTimezone=GMT
driver-class-name: com.mysql.cj.jdbc.Driver
username: root
password: '!QAZ1qaz'
mybatis-plus:
mapper-locations:
- classpath:mapper/*.xml
|
@ -0,0 +1,342 @@
|
||||
<?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.VillageActualUserInfoMapper">
|
||||
|
||||
<resultMap type="com.ssf.mysqloracletest.domain.VillageActualUserInfo" id="VillageActualUserInfoResult">
|
||||
<result property="id" column="id"/>
|
||||
<result property="gaRecordId" column="ga_record_id"/>
|
||||
<result property="buildingId" column="building_id"/>
|
||||
<result property="userHomeId" column="user_home_id"/>
|
||||
<result property="actualUserId" column="actual_user_id"/>
|
||||
<result property="recordId" column="record_id"/>
|
||||
<result property="gridCode" column="grid_code"/>
|
||||
<result property="gridName" column="grid_name"/>
|
||||
<result property="homeId" column="home_id"/>
|
||||
<result property="homeCode" column="home_code"/>
|
||||
<result property="policeDistrictCode" column="police_district_code"/>
|
||||
<result property="policeDistrict" column="police_district"/>
|
||||
<result property="policeStationName" column="police_station_name"/>
|
||||
<result property="policeStationCode" column="police_station_code"/>
|
||||
<result property="personCategory" column="person_category"/>
|
||||
<result property="userName" column="user_name"/>
|
||||
<result property="idcard" column="idcard"/>
|
||||
<result property="phone" column="phone"/>
|
||||
<result property="landline" column="landline"/>
|
||||
<result property="sex" column="sex"/>
|
||||
<result property="nation" column="nation"/>
|
||||
<result property="marriage" column="marriage"/>
|
||||
<result property="education" column="education"/>
|
||||
<result property="birthday" column="birthday"/>
|
||||
<result property="houseHoldRegister" column="house_hold_register"/>
|
||||
<result property="houseHoldAddress" column="house_hold_address"/>
|
||||
<result property="habitation" column="habitation"/>
|
||||
<result property="blockCode" column="block_code"/>
|
||||
<result property="blockName" column="block_name"/>
|
||||
<result property="dateStatus" column="date_status"/>
|
||||
<result property="isactive" column="isactive"/>
|
||||
<result property="c1" column="c1"/>
|
||||
<result property="c2" column="c2"/>
|
||||
<result property="c3" column="c3"/>
|
||||
<result property="c4" column="c4"/>
|
||||
<result property="c5" column="c5"/>
|
||||
<result property="userPic" column="user_pic"/>
|
||||
<result property="picStatus" column="pic_status"/>
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectVillageActualUserInfoVo">
|
||||
select
|
||||
id,
|
||||
ga_record_id,
|
||||
building_id,
|
||||
user_home_id,
|
||||
actual_user_id,
|
||||
record_id,
|
||||
grid_code,
|
||||
grid_name,
|
||||
home_id,
|
||||
home_code,
|
||||
police_district_code,
|
||||
police_district,
|
||||
police_station_name,
|
||||
police_station_code,
|
||||
person_category,
|
||||
user_name,
|
||||
idcard,
|
||||
phone,
|
||||
landline,
|
||||
sex,
|
||||
nation,
|
||||
marriage,
|
||||
education,
|
||||
birthday,
|
||||
house_hold_register,
|
||||
house_hold_address,
|
||||
habitation,
|
||||
block_code,
|
||||
block_name,
|
||||
date_status,
|
||||
user_pic,
|
||||
pic_status,
|
||||
isactive,
|
||||
c1,
|
||||
c2,
|
||||
c3,
|
||||
c4,
|
||||
c5
|
||||
from
|
||||
village_actual_user_info
|
||||
</sql>
|
||||
|
||||
<select id="selectVillageActualUserInfoList" parameterType="com.ssf.mysqloracletest.domain.VillageActualUserInfo"
|
||||
resultMap="VillageActualUserInfoResult">
|
||||
<include refid="selectVillageActualUserInfoVo"/>
|
||||
<where>
|
||||
<if test="gaRecordId != null and gaRecordId != ''">and ga_record_id = #{gaRecordId}</if>
|
||||
<if test="buildingId != null and buildingId != ''">and building_id = #{buildingId}</if>
|
||||
<if test="userHomeId != null and userHomeId != ''">and user_home_id = #{userHomeId}</if>
|
||||
<if test="actualUserId != null and actualUserId != ''">and actual_user_id = #{actualUserId}</if>
|
||||
<if test="recordId != null and recordId != ''">and record_id = #{recordId}</if>
|
||||
<if test="gridCode != null and gridCode != ''">and grid_code = #{gridCode}</if>
|
||||
<if test="gridName != null and gridName != ''">and grid_name like concat('%', #{gridName}, '%')</if>
|
||||
<if test="homeId != null and homeId != ''">and home_id = #{homeId}</if>
|
||||
<if test="homeCode != null and homeCode != ''">and home_code = #{homeCode}</if>
|
||||
<if test="policeDistrictCode != null and policeDistrictCode != ''">and police_district_code =
|
||||
#{policeDistrictCode}
|
||||
</if>
|
||||
<if test="policeDistrict != null and policeDistrict != ''">and police_district = #{policeDistrict}</if>
|
||||
<if test="policeStationName != null and policeStationName != ''">and police_station_name like concat('%',
|
||||
#{policeStationName}, '%')
|
||||
</if>
|
||||
<if test="policeStationCode != null and policeStationCode != ''">and police_station_code =
|
||||
#{policeStationCode}
|
||||
</if>
|
||||
<if test="personCategory != null ">and person_category = #{personCategory}</if>
|
||||
<if test="userName != null and userName != ''">and user_name like concat('%', #{userName}, '%')</if>
|
||||
<if test="idcard != null and idcard != ''">and idcard like concat('%', #{idcard}, '%')</if>
|
||||
<if test="phone != null and phone != ''">and phone = #{phone}</if>
|
||||
<if test="landline != null and landline != ''">and landline = #{landline}</if>
|
||||
<if test="sex != null ">and sex = #{sex}</if>
|
||||
<if test="nation != null ">and nation = #{nation}</if>
|
||||
<if test="marriage != null ">and marriage = #{marriage}</if>
|
||||
<if test="education != null ">and education = #{education}</if>
|
||||
<if test="birthday != null ">and birthday = #{birthday}</if>
|
||||
<if test="houseHoldRegister != null and houseHoldRegister != ''">and house_hold_register =
|
||||
#{houseHoldRegister}
|
||||
</if>
|
||||
<if test="houseHoldAddress != null and houseHoldAddress != ''">and house_hold_address =
|
||||
#{houseHoldAddress}
|
||||
</if>
|
||||
<if test="habitation != null and habitation != ''">and habitation = #{habitation}</if>
|
||||
<if test="blockCode != null and blockCode != ''">and block_code = #{blockCode}</if>
|
||||
<if test="blockName != null and blockName != ''">and block_name like concat('%', #{blockName}, '%')</if>
|
||||
<if test="dateStatus != null and dateStatus != ''">and date_status = #{dateStatus}</if>
|
||||
<if test="isactive != null ">and isactive = #{isactive}</if>
|
||||
<if test="c1 != null and c1 != ''">and c1 = #{c1}</if>
|
||||
<if test="c2 != null and c2 != ''">and c2 = #{c2}</if>
|
||||
<if test="c3 != null and c3 != ''">and c3 = #{c3}</if>
|
||||
<if test="c4 != null and c4 != ''">and c4 = #{c4}</if>
|
||||
<if test="c5 != null and c5 != ''">and c5 = #{c5}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectVillageActualUserInfoListAndPicExists" parameterType="com.ssf.mysqloracletest.domain.VillageActualUserInfo"
|
||||
resultMap="VillageActualUserInfoResult">
|
||||
<include refid="selectVillageActualUserInfoVo"/>
|
||||
where idcard like concat('%', #{idcard}, '%') and user_pic is null and pic_status is null limit 1000
|
||||
</select>
|
||||
|
||||
<select id="selectVillageActualUserInfoById" parameterType="Long" resultMap="VillageActualUserInfoResult">
|
||||
<include refid="selectVillageActualUserInfoVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<select id="selectVillageActualUserInfoByIdcard" parameterType="String" resultMap="VillageActualUserInfoResult">
|
||||
<include refid="selectVillageActualUserInfoVo"/>
|
||||
where idcard = #{idcard} limit 1
|
||||
</select>
|
||||
|
||||
<insert id="insertVillageActualUserInfo" parameterType="com.ssf.mysqloracletest.domain.VillageActualUserInfo"
|
||||
useGeneratedKeys="true" keyProperty="id">
|
||||
insert into village_actual_user_info
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="gaRecordId != null">ga_record_id,</if>
|
||||
<if test="buildingId != null">building_id,</if>
|
||||
<if test="userHomeId != null">user_home_id,</if>
|
||||
<if test="actualUserId != null">actual_user_id,</if>
|
||||
<if test="recordId != null">record_id,</if>
|
||||
<if test="gridCode != null">grid_code,</if>
|
||||
<if test="gridName != null">grid_name,</if>
|
||||
<if test="homeId != null">home_id,</if>
|
||||
<if test="homeCode != null">home_code,</if>
|
||||
<if test="policeDistrictCode != null">police_district_code,</if>
|
||||
<if test="policeDistrict != null">police_district,</if>
|
||||
<if test="policeStationName != null">police_station_name,</if>
|
||||
<if test="policeStationCode != null">police_station_code,</if>
|
||||
<if test="personCategory != null">person_category,</if>
|
||||
<if test="userName != null">user_name,</if>
|
||||
<if test="idcard != null">idcard,</if>
|
||||
<if test="phone != null">phone,</if>
|
||||
<if test="landline != null">landline,</if>
|
||||
<if test="sex != null">sex,</if>
|
||||
<if test="nation != null">nation,</if>
|
||||
<if test="marriage != null">marriage,</if>
|
||||
<if test="education != null">education,</if>
|
||||
<if test="birthday != null">birthday,</if>
|
||||
<if test="houseHoldRegister != null">house_hold_register,</if>
|
||||
<if test="houseHoldAddress != null">house_hold_address,</if>
|
||||
<if test="habitation != null">habitation,</if>
|
||||
<if test="blockCode != null">block_code,</if>
|
||||
<if test="blockName != null">block_name,</if>
|
||||
<if test="dateStatus != null">date_status,</if>
|
||||
<if test="isactive != null">isactive,</if>
|
||||
<if test="c1 != null">c1,</if>
|
||||
<if test="c2 != null">c2,</if>
|
||||
<if test="c3 != null">c3,</if>
|
||||
<if test="c4 != null">c4,</if>
|
||||
<if test="c5 != null">c5,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="gaRecordId != null">#{gaRecordId},</if>
|
||||
<if test="buildingId != null">#{buildingId},</if>
|
||||
<if test="userHomeId != null">#{userHomeId},</if>
|
||||
<if test="actualUserId != null">#{actualUserId},</if>
|
||||
<if test="recordId != null">#{recordId},</if>
|
||||
<if test="gridCode != null">#{gridCode},</if>
|
||||
<if test="gridName != null">#{gridName},</if>
|
||||
<if test="homeId != null">#{homeId},</if>
|
||||
<if test="homeCode != null">#{homeCode},</if>
|
||||
<if test="policeDistrictCode != null">#{policeDistrictCode},</if>
|
||||
<if test="policeDistrict != null">#{policeDistrict},</if>
|
||||
<if test="policeStationName != null">#{policeStationName},</if>
|
||||
<if test="policeStationCode != null">#{policeStationCode},</if>
|
||||
<if test="personCategory != null">#{personCategory},</if>
|
||||
<if test="userName != null">#{userName},</if>
|
||||
<if test="idcard != null">#{idcard},</if>
|
||||
<if test="phone != null">#{phone},</if>
|
||||
<if test="landline != null">#{landline},</if>
|
||||
<if test="sex != null">#{sex},</if>
|
||||
<if test="nation != null">#{nation},</if>
|
||||
<if test="marriage != null">#{marriage},</if>
|
||||
<if test="education != null">#{education},</if>
|
||||
<if test="birthday != null">#{birthday},</if>
|
||||
<if test="houseHoldRegister != null">#{houseHoldRegister},</if>
|
||||
<if test="houseHoldAddress != null">#{houseHoldAddress},</if>
|
||||
<if test="habitation != null">#{habitation},</if>
|
||||
<if test="blockCode != null">#{blockCode},</if>
|
||||
<if test="blockName != null">#{blockName},</if>
|
||||
<if test="dateStatus != null">#{dateStatus},</if>
|
||||
<if test="isactive != null">#{isactive},</if>
|
||||
<if test="c1 != null">#{c1},</if>
|
||||
<if test="c2 != null">#{c2},</if>
|
||||
<if test="c3 != null">#{c3},</if>
|
||||
<if test="c4 != null">#{c4},</if>
|
||||
<if test="c5 != null">#{c5},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateVillageActualUserInfo" parameterType="com.ssf.mysqloracletest.domain.VillageActualUserInfo">
|
||||
update village_actual_user_info
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="gaRecordId != null">ga_record_id = #{gaRecordId},</if>
|
||||
<if test="buildingId != null">building_id = #{buildingId},</if>
|
||||
<if test="userHomeId != null">user_home_id = #{userHomeId},</if>
|
||||
<if test="actualUserId != null">actual_user_id = #{actualUserId},</if>
|
||||
<if test="recordId != null">record_id = #{recordId},</if>
|
||||
<if test="gridCode != null">grid_code = #{gridCode},</if>
|
||||
<if test="gridName != null">grid_name = #{gridName},</if>
|
||||
<if test="homeId != null">home_id = #{homeId},</if>
|
||||
<if test="homeCode != null">home_code = #{homeCode},</if>
|
||||
<if test="policeDistrictCode != null">police_district_code = #{policeDistrictCode},</if>
|
||||
<if test="policeDistrict != null">police_district = #{policeDistrict},</if>
|
||||
<if test="policeStationName != null">police_station_name = #{policeStationName},</if>
|
||||
<if test="policeStationCode != null">police_station_code = #{policeStationCode},</if>
|
||||
<if test="personCategory != null">person_category = #{personCategory},</if>
|
||||
<if test="userName != null">user_name = #{userName},</if>
|
||||
<if test="idcard != null">idcard = #{idcard},</if>
|
||||
<if test="phone != null">phone = #{phone},</if>
|
||||
<if test="landline != null">landline = #{landline},</if>
|
||||
<if test="sex != null">sex = #{sex},</if>
|
||||
<if test="nation != null">nation = #{nation},</if>
|
||||
<if test="marriage != null">marriage = #{marriage},</if>
|
||||
<if test="education != null">education = #{education},</if>
|
||||
<if test="birthday != null">birthday = #{birthday},</if>
|
||||
<if test="houseHoldRegister != null">house_hold_register = #{houseHoldRegister},</if>
|
||||
<if test="houseHoldAddress != null">house_hold_address = #{houseHoldAddress},</if>
|
||||
<if test="habitation != null">habitation = #{habitation},</if>
|
||||
<if test="blockCode != null">block_code = #{blockCode},</if>
|
||||
<if test="blockName != null">block_name = #{blockName},</if>
|
||||
<if test="dateStatus != null">date_status = #{dateStatus},</if>
|
||||
<if test="isactive != null">isactive = #{isactive},</if>
|
||||
<if test="c1 != null">c1 = #{c1},</if>
|
||||
<if test="c2 != null">c2 = #{c2},</if>
|
||||
<if test="c3 != null">c3 = #{c3},</if>
|
||||
<if test="c4 != null">c4 = #{c4},</if>
|
||||
<if test="c5 != null">c5 = #{c5},</if>
|
||||
<if test="picStatus != null">pic_status = #{picStatus},</if>
|
||||
<if test="userPic != null">user_pic = #{userPic},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<update id="updateVillageActualUserInfoByIdcard"
|
||||
parameterType="com.ssf.mysqloracletest.domain.VillageActualUserInfo">
|
||||
update village_actual_user_info
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="gaRecordId != null">ga_record_id = #{gaRecordId},</if>
|
||||
<if test="buildingId != null">building_id = #{buildingId},</if>
|
||||
<if test="userHomeId != null">user_home_id = #{userHomeId},</if>
|
||||
<if test="actualUserId != null">actual_user_id = #{actualUserId},</if>
|
||||
<if test="recordId != null">record_id = #{recordId},</if>
|
||||
<if test="gridCode != null">grid_code = #{gridCode},</if>
|
||||
<if test="gridName != null">grid_name = #{gridName},</if>
|
||||
<if test="homeId != null">home_id = #{homeId},</if>
|
||||
<if test="homeCode != null">home_code = #{homeCode},</if>
|
||||
<if test="policeDistrictCode != null">police_district_code = #{policeDistrictCode},</if>
|
||||
<if test="policeDistrict != null">police_district = #{policeDistrict},</if>
|
||||
<if test="policeStationName != null">police_station_name = #{policeStationName},</if>
|
||||
<if test="policeStationCode != null">police_station_code = #{policeStationCode},</if>
|
||||
<if test="personCategory != null">person_category = #{personCategory},</if>
|
||||
<if test="userName != null">user_name = #{userName},</if>
|
||||
<if test="idcard != null">idcard = #{idcard},</if>
|
||||
<if test="phone != null">phone = #{phone},</if>
|
||||
<if test="landline != null">landline = #{landline},</if>
|
||||
<if test="sex != null">sex = #{sex},</if>
|
||||
<if test="nation != null">nation = #{nation},</if>
|
||||
<if test="marriage != null">marriage = #{marriage},</if>
|
||||
<if test="education != null">education = #{education},</if>
|
||||
<if test="birthday != null">birthday = #{birthday},</if>
|
||||
<if test="houseHoldRegister != null">house_hold_register = #{houseHoldRegister},</if>
|
||||
<if test="houseHoldAddress != null">house_hold_address = #{houseHoldAddress},</if>
|
||||
<if test="habitation != null">habitation = #{habitation},</if>
|
||||
<if test="blockCode != null">block_code = #{blockCode},</if>
|
||||
<if test="blockName != null">block_name = #{blockName},</if>
|
||||
<if test="dateStatus != null">date_status = #{dateStatus},</if>
|
||||
<if test="isactive != null">isactive = #{isactive},</if>
|
||||
<if test="c2 != null">c2 = #{c2},</if>
|
||||
<if test="c3 != null">c3 = #{c3},</if>
|
||||
<if test="c4 != null">c4 = #{c4},</if>
|
||||
<if test="c5 != null">c5 = #{c5},</if>
|
||||
<if test="c1 != null and c1 != ''">c1 = #{c1New},</if>
|
||||
</trim>
|
||||
where idcard = #{idcard} and c1 = #{c1}
|
||||
</update>
|
||||
|
||||
<delete id="deleteVillageActualUserInfoById" parameterType="Long">
|
||||
delete from village_actual_user_info where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteVillageActualUserInfoByIds" parameterType="String">
|
||||
delete from village_actual_user_info where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
|
||||
<delete id="deleteVillageActualUserInfoByUpdatetime"
|
||||
parameterType="com.ssf.mysqloracletest.domain.VillageActualUserInfo">
|
||||
delete from village_actual_user_info where DATE_FORMAT(updatetime, '%Y-%m-%d') != '${updatetimeV}'
|
||||
</delete>
|
||||
</mapper>
|
Loading…
Reference in new issue