parent
a5caa7b050
commit
829e5e2ee5
@ -0,0 +1,166 @@
|
||||
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 java.util.Date;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 久居未出住户信息表
|
||||
* @TableName model_longtimein_user_info
|
||||
*/
|
||||
@TableName(value ="model_longtimein_user_info")
|
||||
@Data
|
||||
public class ModelLongtimeinUserInfo implements Serializable {
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
@TableId(type = IdType.AUTO)
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 小区编码
|
||||
*/
|
||||
private String placeCode;
|
||||
|
||||
/**
|
||||
* 小区名称
|
||||
*/
|
||||
private String placeName;
|
||||
|
||||
/**
|
||||
* 网格编码
|
||||
*/
|
||||
private String gridCode;
|
||||
|
||||
/**
|
||||
* 网格名称
|
||||
*/
|
||||
private String gridName;
|
||||
|
||||
/**
|
||||
* 楼栋编号
|
||||
*/
|
||||
private String buildingCode;
|
||||
|
||||
/**
|
||||
* 楼栋名称
|
||||
*/
|
||||
private String buildingName;
|
||||
|
||||
/**
|
||||
* 单元编码
|
||||
*/
|
||||
private String unitCode;
|
||||
|
||||
/**
|
||||
* 单元名称
|
||||
*/
|
||||
private String unitName;
|
||||
|
||||
/**
|
||||
* 房屋编码
|
||||
*/
|
||||
private String homeCode;
|
||||
|
||||
/**
|
||||
* 房屋名称
|
||||
*/
|
||||
private String homeName;
|
||||
|
||||
/**
|
||||
* 人员姓名
|
||||
*/
|
||||
private String userName;
|
||||
|
||||
/**
|
||||
* 人员照片
|
||||
*/
|
||||
private String userPic;
|
||||
|
||||
/**
|
||||
* 证件类型
|
||||
*/
|
||||
private Integer identityType;
|
||||
|
||||
/**
|
||||
* 证件号码
|
||||
*/
|
||||
private String idcard;
|
||||
|
||||
/**
|
||||
* 联系电话
|
||||
*/
|
||||
private String phone;
|
||||
|
||||
/**
|
||||
* 关爱人员标签
|
||||
*/
|
||||
private Integer caringLabel;
|
||||
|
||||
/**
|
||||
* 近期出现时间
|
||||
*/
|
||||
private Long lastTime;
|
||||
|
||||
/**
|
||||
* 至今居家天数
|
||||
*/
|
||||
private Integer homeDays;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
private Date createtime;
|
||||
|
||||
/**
|
||||
* 创建者
|
||||
*/
|
||||
private Integer createby;
|
||||
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
private Date updatetime;
|
||||
|
||||
/**
|
||||
* 更新者
|
||||
*/
|
||||
private Integer updateby;
|
||||
|
||||
/**
|
||||
* 0:不活跃,1:活跃
|
||||
*/
|
||||
private Integer isactive;
|
||||
|
||||
/**
|
||||
* 扩展字段c1
|
||||
*/
|
||||
private String c1;
|
||||
|
||||
/**
|
||||
* 扩展字段c2
|
||||
*/
|
||||
private String c2;
|
||||
|
||||
/**
|
||||
* 扩展字段c3
|
||||
*/
|
||||
private String c3;
|
||||
|
||||
/**
|
||||
* 扩展字段c4
|
||||
*/
|
||||
private String c4;
|
||||
|
||||
/**
|
||||
* 扩展字段c5
|
||||
*/
|
||||
private String c5;
|
||||
|
||||
@TableField(exist = false)
|
||||
private static final long serialVersionUID = 1L;
|
||||
}
|
@ -0,0 +1,166 @@
|
||||
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 java.util.Date;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 久出未归住户信息表
|
||||
* @TableName model_longtimeout_user_info
|
||||
*/
|
||||
@TableName(value ="model_longtimeout_user_info")
|
||||
@Data
|
||||
public class ModelLongtimeoutUserInfo implements Serializable {
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
@TableId(type = IdType.AUTO)
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 小区编码
|
||||
*/
|
||||
private String placeCode;
|
||||
|
||||
/**
|
||||
* 小区名称
|
||||
*/
|
||||
private String placeName;
|
||||
|
||||
/**
|
||||
* 网格编码
|
||||
*/
|
||||
private String gridCode;
|
||||
|
||||
/**
|
||||
* 网格名称
|
||||
*/
|
||||
private String gridName;
|
||||
|
||||
/**
|
||||
* 楼栋编号
|
||||
*/
|
||||
private String buildingCode;
|
||||
|
||||
/**
|
||||
* 楼栋名称
|
||||
*/
|
||||
private String buildingName;
|
||||
|
||||
/**
|
||||
* 单元编码
|
||||
*/
|
||||
private String unitCode;
|
||||
|
||||
/**
|
||||
* 单元名称
|
||||
*/
|
||||
private String unitName;
|
||||
|
||||
/**
|
||||
* 房屋编码
|
||||
*/
|
||||
private String homeCode;
|
||||
|
||||
/**
|
||||
* 房屋名称
|
||||
*/
|
||||
private String homeName;
|
||||
|
||||
/**
|
||||
* 人员姓名
|
||||
*/
|
||||
private String userName;
|
||||
|
||||
/**
|
||||
* 人员照片
|
||||
*/
|
||||
private String userPic;
|
||||
|
||||
/**
|
||||
* 证件类型
|
||||
*/
|
||||
private Integer identityType;
|
||||
|
||||
/**
|
||||
* 证件号码
|
||||
*/
|
||||
private String idcard;
|
||||
|
||||
/**
|
||||
* 联系电话
|
||||
*/
|
||||
private String phone;
|
||||
|
||||
/**
|
||||
* 关爱人员标签
|
||||
*/
|
||||
private Integer caringLabel;
|
||||
|
||||
/**
|
||||
* 近期出现时间
|
||||
*/
|
||||
private Long lastTime;
|
||||
|
||||
/**
|
||||
* 至今离开天数
|
||||
*/
|
||||
private Integer leaveDays;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
private Date createtime;
|
||||
|
||||
/**
|
||||
* 创建者
|
||||
*/
|
||||
private Integer createby;
|
||||
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
private Date updatetime;
|
||||
|
||||
/**
|
||||
* 更新者
|
||||
*/
|
||||
private Integer updateby;
|
||||
|
||||
/**
|
||||
* 0:不活跃,1:活跃
|
||||
*/
|
||||
private Integer isactive;
|
||||
|
||||
/**
|
||||
* 扩展字段c1
|
||||
*/
|
||||
private String c1;
|
||||
|
||||
/**
|
||||
* 扩展字段c2
|
||||
*/
|
||||
private String c2;
|
||||
|
||||
/**
|
||||
* 扩展字段c3
|
||||
*/
|
||||
private String c3;
|
||||
|
||||
/**
|
||||
* 扩展字段c4
|
||||
*/
|
||||
private String c4;
|
||||
|
||||
/**
|
||||
* 扩展字段c5
|
||||
*/
|
||||
private String c5;
|
||||
|
||||
@TableField(exist = false)
|
||||
private static final long serialVersionUID = 1L;
|
||||
}
|
@ -0,0 +1,21 @@
|
||||
package com.ssf.mysqloracletest.mapper;
|
||||
|
||||
import com.ssf.mysqloracletest.domain.ModelLongtimeinUserInfo;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* @author 28758
|
||||
* @description 针对表【model_longtimein_user_info(久居未出住户信息表)】的数据库操作Mapper
|
||||
* @createDate 2024-03-21 09:47:58
|
||||
* @Entity com.ssf.mysqloracletest.domain.ModelLongtimeinUserInfo
|
||||
*/
|
||||
@Mapper
|
||||
public interface ModelLongtimeinUserInfoMapper extends BaseMapper<ModelLongtimeinUserInfo> {
|
||||
|
||||
public void cleanModelLongtimeinUserInfo();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
@ -0,0 +1,21 @@
|
||||
package com.ssf.mysqloracletest.mapper;
|
||||
|
||||
import com.ssf.mysqloracletest.domain.ModelLongtimeoutUserInfo;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* @author 28758
|
||||
* @description 针对表【model_longtimeout_user_info(久出未归住户信息表)】的数据库操作Mapper
|
||||
* @createDate 2024-03-21 09:48:19
|
||||
* @Entity com.ssf.mysqloracletest.domain.ModelLongtimeoutUserInfo
|
||||
*/
|
||||
@Mapper
|
||||
public interface ModelLongtimeoutUserInfoMapper extends BaseMapper<ModelLongtimeoutUserInfo> {
|
||||
|
||||
void cleanModelLongtimeoutUserInfo();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
@ -0,0 +1,13 @@
|
||||
package com.ssf.mysqloracletest.service;
|
||||
|
||||
import com.ssf.mysqloracletest.domain.ModelLongtimeinUserInfo;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
/**
|
||||
* @author 28758
|
||||
* @description 针对表【model_longtimein_user_info(久居未出住户信息表)】的数据库操作Service
|
||||
* @createDate 2024-03-21 09:47:58
|
||||
*/
|
||||
public interface ModelLongtimeinUserInfoService extends IService<ModelLongtimeinUserInfo> {
|
||||
|
||||
}
|
@ -0,0 +1,13 @@
|
||||
package com.ssf.mysqloracletest.service;
|
||||
|
||||
import com.ssf.mysqloracletest.domain.ModelLongtimeoutUserInfo;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
/**
|
||||
* @author 28758
|
||||
* @description 针对表【model_longtimeout_user_info(久出未归住户信息表)】的数据库操作Service
|
||||
* @createDate 2024-03-21 09:48:19
|
||||
*/
|
||||
public interface ModelLongtimeoutUserInfoService extends IService<ModelLongtimeoutUserInfo> {
|
||||
|
||||
}
|
@ -0,0 +1,24 @@
|
||||
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.ModelLongtimeinUserInfo;
|
||||
import com.ssf.mysqloracletest.service.ModelLongtimeinUserInfoService;
|
||||
import com.ssf.mysqloracletest.mapper.ModelLongtimeinUserInfoMapper;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* @author 28758
|
||||
* @description 针对表【model_longtimein_user_info(久居未出住户信息表)】的数据库操作Service实现
|
||||
* @createDate 2024-03-21 09:47:58
|
||||
*/
|
||||
@Service
|
||||
@DS("mysql")
|
||||
public class ModelLongtimeinUserInfoServiceImpl extends ServiceImpl<ModelLongtimeinUserInfoMapper, ModelLongtimeinUserInfo>
|
||||
implements ModelLongtimeinUserInfoService{
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
@ -0,0 +1,24 @@
|
||||
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.ModelLongtimeoutUserInfo;
|
||||
import com.ssf.mysqloracletest.service.ModelLongtimeoutUserInfoService;
|
||||
import com.ssf.mysqloracletest.mapper.ModelLongtimeoutUserInfoMapper;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* @author 28758
|
||||
* @description 针对表【model_longtimeout_user_info(久出未归住户信息表)】的数据库操作Service实现
|
||||
* @createDate 2024-03-21 09:48:19
|
||||
*/
|
||||
@Service
|
||||
@DS("mysql")
|
||||
public class ModelLongtimeoutUserInfoServiceImpl extends ServiceImpl<ModelLongtimeoutUserInfoMapper, ModelLongtimeoutUserInfo>
|
||||
implements ModelLongtimeoutUserInfoService{
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
@ -0,0 +1,171 @@
|
||||
package com.ssf.mysqloracletest.task;
|
||||
|
||||
import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
|
||||
import com.ssf.mysqloracletest.domain.BasePlaceInfo;
|
||||
import com.ssf.mysqloracletest.domain.BaseUserInfo;
|
||||
import com.ssf.mysqloracletest.domain.ModelLongtimeoutUserInfo;
|
||||
import com.ssf.mysqloracletest.domain.TransitUserRecord;
|
||||
import com.ssf.mysqloracletest.mapper.ModelLongtimeoutUserInfoMapper;
|
||||
import com.ssf.mysqloracletest.service.BasePlaceInfoService;
|
||||
import com.ssf.mysqloracletest.service.BaseUserInfoService;
|
||||
import com.ssf.mysqloracletest.service.ModelLongtimeoutUserInfoService;
|
||||
import com.ssf.mysqloracletest.service.TransitUserRecordService;
|
||||
import com.ssf.mysqloracletest.utils.ConfigParam;
|
||||
import com.ssf.mysqloracletest.utils.DateTool;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.scheduling.annotation.Scheduled;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@Component
|
||||
@RequiredArgsConstructor
|
||||
public class ModelLongtimeoutUserTask {
|
||||
|
||||
private static final Logger logger = LoggerFactory.getLogger(ModelLongtimeoutUserTask.class);
|
||||
|
||||
@Resource
|
||||
DateTool dateTool;
|
||||
|
||||
private final BasePlaceInfoService basePlaceInfoService;
|
||||
|
||||
private final BaseUserInfoService baseUserInfoService;
|
||||
|
||||
private final TransitUserRecordService transitUserRecordService;
|
||||
|
||||
private final ModelLongtimeoutUserInfoService modelLongtimeoutUserInfoService;
|
||||
|
||||
private final ModelLongtimeoutUserInfoMapper modelLongtimeoutUserInfoMapper;
|
||||
|
||||
@Scheduled(initialDelay = 100, fixedDelay = 3000)
|
||||
// @Scheduled(cron = "0 0 0 * * ?") // 每天凌晨执行
|
||||
public void goalPersonLongTimeNotBack() {
|
||||
|
||||
if (!"true".equals(ConfigParam.PersonLongTimeNotBackSwitch)) {
|
||||
return;
|
||||
}
|
||||
String nearlyDays = "30";
|
||||
String leaveDays = "30";
|
||||
|
||||
logger.info("goalPersonLongTimeNotBack 人员分析 久出未归住户 nearlyDays:" + nearlyDays + ", leaveDays:" + leaveDays + ", threadName:" + Thread.currentThread().getName());
|
||||
if (StringUtils.isBlank(nearlyDays)
|
||||
|| StringUtils.isBlank(leaveDays)) {
|
||||
return;
|
||||
}
|
||||
try {
|
||||
Integer.parseInt(leaveDays);
|
||||
Integer.parseInt(nearlyDays);
|
||||
nearlyDays = nearlyDays.trim();
|
||||
} catch (Exception ex) {
|
||||
return;
|
||||
}
|
||||
List<BasePlaceInfo> villageBaseInfos = basePlaceInfoService.queryVillageInfos();
|
||||
if (CollectionUtils.isEmpty(villageBaseInfos)) {
|
||||
return;
|
||||
}
|
||||
long leaveDaysLong = Integer.parseInt(leaveDays) * 24 * 60 * 60L;
|
||||
//清空临时结果表为入数据做准备
|
||||
modelLongtimeoutUserInfoMapper.cleanModelLongtimeoutUserInfo();
|
||||
|
||||
String villageCode = "";
|
||||
for (BasePlaceInfo villageBaseInfo : villageBaseInfos) {
|
||||
villageCode = villageBaseInfo.getPlaceCode();
|
||||
if (StringUtils.isBlank(villageCode)) {
|
||||
continue;
|
||||
}
|
||||
List<BaseUserInfo> villageUserInfos = queryVillageUserInfos(villageCode);
|
||||
if (CollectionUtils.isEmpty(villageUserInfos)) {
|
||||
return;
|
||||
}
|
||||
List<ModelLongtimeoutUserInfo> modelLongtimeOutUserInfos = new ArrayList<>();
|
||||
for (BaseUserInfo villageUserInfo : villageUserInfos) {
|
||||
if (StringUtils.isBlank(villageUserInfo.getIdCard())) {
|
||||
continue;
|
||||
}
|
||||
// 1.查询人脸抓拍记录表最新一条(方向字段没有的不算)
|
||||
Map<String, Object> map = new HashMap<>();
|
||||
map.put("startTime", dateTool.getDayStart(Integer.parseInt(nearlyDays)));
|
||||
map.put("endTime", dateTool.getDayEnd(1));
|
||||
map.put("villageCode", villageCode);
|
||||
map.put("idCard", villageUserInfo.getIdCard());
|
||||
//根据身份证号查询一条最新有进出的抓拍数据
|
||||
List<TransitUserRecord> villageUserRecords = transitUserRecordService
|
||||
.lambdaQuery().eq(TransitUserRecord::getIdCard,villageUserInfo.getIdCard())
|
||||
.eq(TransitUserRecord::getPlaceCode,villageCode)
|
||||
.between(TransitUserRecord::getPartitionField,dateTool.getDayStart(Integer.parseInt(nearlyDays)),dateTool.getDayEnd(1))
|
||||
.orderByDesc(TransitUserRecord::getPassTime)
|
||||
.list();
|
||||
try {
|
||||
if (CollectionUtils.isNotEmpty(villageUserRecords)) {
|
||||
TransitUserRecord villageUserRecord = villageUserRecords.get(0);
|
||||
//获取最新一条,如果方向为出,则进一步模型分析(久出未归)
|
||||
if (null == villageUserRecord.getDirection() || villageUserRecord.getDirection() != 1) {
|
||||
if (System.currentTimeMillis() / 1000 - villageUserRecord.getPassTime() - leaveDaysLong > 0) {
|
||||
ModelLongtimeoutUserInfo modelLongtimeoutUserInfo = new ModelLongtimeoutUserInfo();
|
||||
modelLongtimeoutUserInfo.setPlaceCode(villageUserInfo.getPlaceCode());
|
||||
modelLongtimeoutUserInfo.setPlaceName(villageUserInfo.getPlaceName());
|
||||
modelLongtimeoutUserInfo.setGridCode(villageUserInfo.getGridCode());
|
||||
modelLongtimeoutUserInfo.setGridName(villageUserInfo.getGridName());
|
||||
modelLongtimeoutUserInfo.setBuildingCode(villageUserInfo.getBuildingCode());
|
||||
modelLongtimeoutUserInfo.setBuildingName(villageUserInfo.getBuildingName());
|
||||
modelLongtimeoutUserInfo.setUnitCode(villageUserInfo.getUnitCode());
|
||||
modelLongtimeoutUserInfo.setUnitName(villageUserInfo.getUnitName());
|
||||
modelLongtimeoutUserInfo.setHomeCode(villageUserInfo.getHomeCode());
|
||||
modelLongtimeoutUserInfo.setHomeName(villageUserInfo.getHomeName());
|
||||
modelLongtimeoutUserInfo.setUserName(villageUserInfo.getUserName());
|
||||
modelLongtimeoutUserInfo.setUserPic(villageUserRecord.getGlobalPic());
|
||||
modelLongtimeoutUserInfo.setIdcard(villageUserInfo.getIdCard());
|
||||
modelLongtimeoutUserInfo.setPhone(villageUserInfo.getPhone());
|
||||
modelLongtimeoutUserInfo.setLastTime(villageUserRecord.getPassTime());
|
||||
modelLongtimeoutUserInfo.setLeaveDays(getInOutDays(villageUserRecord.getPassTime()));
|
||||
modelLongtimeoutUserInfo.setC1(villageUserRecord.getDeviceAddress());
|
||||
modelLongtimeOutUserInfos.add(modelLongtimeoutUserInfo);
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
// 3.久出未归住户入库
|
||||
if (modelLongtimeOutUserInfos.size() > 0) {
|
||||
for (ModelLongtimeoutUserInfo modelLongtimeoutUserInfo : modelLongtimeOutUserInfos){
|
||||
modelLongtimeoutUserInfoService.save(modelLongtimeoutUserInfo);
|
||||
}
|
||||
}
|
||||
villageUserInfos.clear();
|
||||
modelLongtimeOutUserInfos.clear();
|
||||
}
|
||||
logger.info("goalPersonLongTimeNotBack 人员分析 久出未归住户 结束, 时间:" + dateTool.getDateTime(System.currentTimeMillis() / 1000));
|
||||
}
|
||||
|
||||
private List<BaseUserInfo> queryVillageUserInfos(String villageCode) {
|
||||
BaseUserInfo villageUserInfo = new BaseUserInfo();
|
||||
villageUserInfo.setPlaceCode(villageCode);
|
||||
List<BaseUserInfo> villageUserInfos = baseUserInfoService.lambdaQuery()
|
||||
.isNotNull(BaseUserInfo::getIdCard)
|
||||
.eq(BaseUserInfo::getPlaceCode,villageCode).list();
|
||||
if (CollectionUtils.isEmpty(villageUserInfos)) {
|
||||
return new ArrayList<>();
|
||||
}
|
||||
return villageUserInfos;
|
||||
}
|
||||
|
||||
public int getInOutDays(long time) {
|
||||
int l = Integer.parseInt(String.valueOf((System.currentTimeMillis() / 1000 - time)));
|
||||
int r = l % (3600 * 24);
|
||||
l = l / (3600 * 24);
|
||||
if (r > 0) {
|
||||
return (l + 1);
|
||||
} else {
|
||||
return l;
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,55 @@
|
||||
<?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.ModelLongtimeinUserInfoMapper">
|
||||
|
||||
<resultMap id="BaseResultMap" type="com.ssf.mysqloracletest.domain.ModelLongtimeinUserInfo">
|
||||
<id property="id" column="id" jdbcType="BIGINT"/>
|
||||
<result property="placeCode" column="place_code" jdbcType="VARCHAR"/>
|
||||
<result property="placeName" column="place_name" jdbcType="VARCHAR"/>
|
||||
<result property="gridCode" column="grid_code" jdbcType="VARCHAR"/>
|
||||
<result property="gridName" column="grid_name" jdbcType="VARCHAR"/>
|
||||
<result property="buildingCode" column="building_code" jdbcType="VARCHAR"/>
|
||||
<result property="buildingName" column="building_name" jdbcType="VARCHAR"/>
|
||||
<result property="unitCode" column="unit_code" jdbcType="VARCHAR"/>
|
||||
<result property="unitName" column="unit_name" jdbcType="VARCHAR"/>
|
||||
<result property="homeCode" column="home_code" jdbcType="VARCHAR"/>
|
||||
<result property="homeName" column="home_name" jdbcType="VARCHAR"/>
|
||||
<result property="userName" column="user_name" jdbcType="VARCHAR"/>
|
||||
<result property="userPic" column="user_pic" jdbcType="VARCHAR"/>
|
||||
<result property="identityType" column="identity_type" jdbcType="TINYINT"/>
|
||||
<result property="idcard" column="idcard" jdbcType="VARCHAR"/>
|
||||
<result property="phone" column="phone" jdbcType="VARCHAR"/>
|
||||
<result property="caringLabel" column="caring_label" jdbcType="TINYINT"/>
|
||||
<result property="lastTime" column="last_time" jdbcType="BIGINT"/>
|
||||
<result property="homeDays" column="home_days" jdbcType="INTEGER"/>
|
||||
<result property="createtime" column="createtime" jdbcType="TIMESTAMP"/>
|
||||
<result property="createby" column="createby" jdbcType="INTEGER"/>
|
||||
<result property="updatetime" column="updatetime" jdbcType="TIMESTAMP"/>
|
||||
<result property="updateby" column="updateby" jdbcType="INTEGER"/>
|
||||
<result property="isactive" column="isactive" jdbcType="TINYINT"/>
|
||||
<result property="c1" column="c1" jdbcType="VARCHAR"/>
|
||||
<result property="c2" column="c2" jdbcType="VARCHAR"/>
|
||||
<result property="c3" column="c3" jdbcType="VARCHAR"/>
|
||||
<result property="c4" column="c4" jdbcType="VARCHAR"/>
|
||||
<result property="c5" column="c5" jdbcType="VARCHAR"/>
|
||||
</resultMap>
|
||||
|
||||
<sql id="Base_Column_List">
|
||||
id,place_code,place_name,
|
||||
grid_code,grid_name,building_code,
|
||||
building_name,unit_code,unit_name,
|
||||
home_code,home_name,user_name,
|
||||
user_pic,identity_type,idcard,
|
||||
phone,caring_label,last_time,
|
||||
home_days,createtime,createby,
|
||||
updatetime,updateby,isactive,
|
||||
c1,c2,c3,
|
||||
c4,c5
|
||||
</sql>
|
||||
|
||||
<update id="cleanModelLongtimeinUserInfo">
|
||||
truncate table model_longtimein_user_info
|
||||
</update>
|
||||
</mapper>
|
@ -0,0 +1,56 @@
|
||||
<?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.ModelLongtimeoutUserInfoMapper">
|
||||
|
||||
<resultMap id="BaseResultMap" type="com.ssf.mysqloracletest.domain.ModelLongtimeoutUserInfo">
|
||||
<id property="id" column="id" jdbcType="BIGINT"/>
|
||||
<result property="placeCode" column="place_code" jdbcType="VARCHAR"/>
|
||||
<result property="placeName" column="place_name" jdbcType="VARCHAR"/>
|
||||
<result property="gridCode" column="grid_code" jdbcType="VARCHAR"/>
|
||||
<result property="gridName" column="grid_name" jdbcType="VARCHAR"/>
|
||||
<result property="buildingCode" column="building_code" jdbcType="VARCHAR"/>
|
||||
<result property="buildingName" column="building_name" jdbcType="VARCHAR"/>
|
||||
<result property="unitCode" column="unit_code" jdbcType="VARCHAR"/>
|
||||
<result property="unitName" column="unit_name" jdbcType="VARCHAR"/>
|
||||
<result property="homeCode" column="home_code" jdbcType="VARCHAR"/>
|
||||
<result property="homeName" column="home_name" jdbcType="VARCHAR"/>
|
||||
<result property="userName" column="user_name" jdbcType="VARCHAR"/>
|
||||
<result property="userPic" column="user_pic" jdbcType="VARCHAR"/>
|
||||
<result property="identityType" column="identity_type" jdbcType="TINYINT"/>
|
||||
<result property="idcard" column="idcard" jdbcType="VARCHAR"/>
|
||||
<result property="phone" column="phone" jdbcType="VARCHAR"/>
|
||||
<result property="caringLabel" column="caring_label" jdbcType="TINYINT"/>
|
||||
<result property="lastTime" column="last_time" jdbcType="BIGINT"/>
|
||||
<result property="leaveDays" column="leave_days" jdbcType="INTEGER"/>
|
||||
<result property="createtime" column="createtime" jdbcType="TIMESTAMP"/>
|
||||
<result property="createby" column="createby" jdbcType="INTEGER"/>
|
||||
<result property="updatetime" column="updatetime" jdbcType="TIMESTAMP"/>
|
||||
<result property="updateby" column="updateby" jdbcType="INTEGER"/>
|
||||
<result property="isactive" column="isactive" jdbcType="TINYINT"/>
|
||||
<result property="c1" column="c1" jdbcType="VARCHAR"/>
|
||||
<result property="c2" column="c2" jdbcType="VARCHAR"/>
|
||||
<result property="c3" column="c3" jdbcType="VARCHAR"/>
|
||||
<result property="c4" column="c4" jdbcType="VARCHAR"/>
|
||||
<result property="c5" column="c5" jdbcType="VARCHAR"/>
|
||||
</resultMap>
|
||||
|
||||
<sql id="Base_Column_List">
|
||||
id,place_code,place_name,
|
||||
grid_code,grid_name,building_code,
|
||||
building_name,unit_code,unit_name,
|
||||
home_code,home_name,user_name,
|
||||
user_pic,identity_type,idcard,
|
||||
phone,caring_label,last_time,
|
||||
leave_days,createtime,createby,
|
||||
updatetime,updateby,isactive,
|
||||
c1,c2,c3,
|
||||
c4,c5
|
||||
</sql>
|
||||
|
||||
<update id="cleanModelLongtimeoutUserInfo">
|
||||
truncate table model_longtimeout_user_info
|
||||
</update>
|
||||
|
||||
</mapper>
|
Loading…
Reference in new issue