diff --git a/ptos_diplomatist/src/main/java/com/ccsens/ptos_diplomatist/api/DomainController.java b/ptos_diplomatist/src/main/java/com/ccsens/ptos_diplomatist/api/DomainController.java index e6c42cb..d9bb05d 100644 --- a/ptos_diplomatist/src/main/java/com/ccsens/ptos_diplomatist/api/DomainController.java +++ b/ptos_diplomatist/src/main/java/com/ccsens/ptos_diplomatist/api/DomainController.java @@ -1,9 +1,12 @@ package com.ccsens.ptos_diplomatist.api; import cn.hutool.extra.servlet.ServletUtil; +import com.ccsens.ptos_diplomatist.bean.dto.DomainDto; import com.ccsens.ptos_diplomatist.bean.dto.HeartbeatDto; +import com.ccsens.ptos_diplomatist.bean.dto.ProjectDto; import com.ccsens.ptos_diplomatist.bean.dto.UserDto; import com.ccsens.ptos_diplomatist.bean.vo.DomainVo; +import com.ccsens.ptos_diplomatist.bean.vo.ProjectVo; import com.ccsens.ptos_diplomatist.service.IDomainService; import com.ccsens.util.JsonResponse; import io.swagger.annotations.Api; @@ -28,22 +31,22 @@ public class DomainController { @Resource private IDomainService domainService; - @ApiOperation(value = "查询用户关联的域列表(PT--传达室)", notes = "") - @RequestMapping(value = "/query", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) - public JsonResponse> queryDomainByPt(@ApiParam @Validated @RequestBody UserDto.PhoneAndIdCard params) throws Exception{ - log.info("PT查询用户关联的域列表:{}",params); - - log.info("PT查询用户关联的域列表返回:{}",params); - return JsonResponse.newInstance().ok(); + @ApiOperation(value = "查询用户关联的其他域的项目信息(PT--传达室)", notes = "") + @RequestMapping(value = "/ptDomainProject", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) + public JsonResponse> queryDomainProject(HttpServletRequest request, @ApiParam @Validated @RequestBody ProjectDto.QueryProjectByPhone params) throws Exception{ + log.info("PT查询用户关联的其他域的项目信息:{}",params); + List projectInfos = domainService.queryDomainProject(params); + log.info("PT查询用户关联的其他域的项目信息返回:{}",projectInfos); + return JsonResponse.newInstance().ok(projectInfos); } - @ApiOperation(value = "根据用户信息查询用户的访问权限(传达室--传达室)", notes = "") - @RequestMapping(value = "/queryByIdc", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) - public JsonResponse queryDomainByIdc(@ApiParam @Validated @RequestBody UserDto.PhoneAndIdCard params) throws Exception{ + @ApiOperation(value = "接受其他传达室的信息请求本域项目列表(传达室--传达室)", notes = "") + @RequestMapping(value = "/idcDomainProject", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) + public JsonResponse> idcDomainProject(HttpServletRequest request,@ApiParam @Validated @RequestBody HeartbeatDto.SendDomain params) throws Exception{ log.info("根据用户信息查询用户的访问权限:{}",params); - - log.info("根据用户信息查询用户的访问权限返回:{}",params); - return JsonResponse.newInstance().ok(); + List projectInfos = domainService.idcDomainProject(params); + log.info("根据用户信息查询用户的访问权限返回:{}",projectInfos); + return JsonResponse.newInstance().ok(projectInfos); } @ApiOperation(value = "接收私域的请求返回域列表", notes = "") diff --git a/ptos_diplomatist/src/main/java/com/ccsens/ptos_diplomatist/bean/dto/DomainDto.java b/ptos_diplomatist/src/main/java/com/ccsens/ptos_diplomatist/bean/dto/DomainDto.java new file mode 100644 index 0000000..0e651bf --- /dev/null +++ b/ptos_diplomatist/src/main/java/com/ccsens/ptos_diplomatist/bean/dto/DomainDto.java @@ -0,0 +1,29 @@ +package com.ccsens.ptos_diplomatist.bean.dto; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * @author 逗 + */ +@Data +public class DomainDto { + @Data + @ApiModel("PT请求其他域的信息") + public static class TallToOtherDomain{ + @ApiModelProperty("请求的接口路径") + private String url; + @ApiModelProperty("参数") + private String param; + } + + @Data + @ApiModel("传达室至传达室域之间传递的信息") + public static class RequestInfo { + @ApiModelProperty("域code") + private String code; + @ApiModelProperty("签名后信息") + private byte[] data; + } +} diff --git a/ptos_diplomatist/src/main/java/com/ccsens/ptos_diplomatist/bean/dto/HeartbeatDto.java b/ptos_diplomatist/src/main/java/com/ccsens/ptos_diplomatist/bean/dto/HeartbeatDto.java index 13fc2cb..bd1fdb8 100644 --- a/ptos_diplomatist/src/main/java/com/ccsens/ptos_diplomatist/bean/dto/HeartbeatDto.java +++ b/ptos_diplomatist/src/main/java/com/ccsens/ptos_diplomatist/bean/dto/HeartbeatDto.java @@ -14,10 +14,6 @@ public class HeartbeatDto { public static class SendDomain { @ApiModelProperty("域code") private String code; - @ApiModelProperty("发送时的时间戳") - private Long timestamp; - @ApiModelProperty("随机码") - private String noncestr; @ApiModelProperty("签名后信息") private byte[] data; } @@ -33,5 +29,9 @@ public class HeartbeatDto { private String code; @ApiModelProperty("ip") private String host; + @ApiModelProperty("发送时的时间戳") + private Long timestamp; + @ApiModelProperty("随机码") + private String noncestr; } } diff --git a/ptos_diplomatist/src/main/java/com/ccsens/ptos_diplomatist/bean/dto/ProjectDto.java b/ptos_diplomatist/src/main/java/com/ccsens/ptos_diplomatist/bean/dto/ProjectDto.java new file mode 100644 index 0000000..00d6942 --- /dev/null +++ b/ptos_diplomatist/src/main/java/com/ccsens/ptos_diplomatist/bean/dto/ProjectDto.java @@ -0,0 +1,67 @@ +package com.ccsens.ptos_diplomatist.bean.dto; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.util.List; + +/** + * @author 逗 + */ +@Data +public class ProjectDto { + + @Data + @ApiModel("用户查询可见的项目") + public static class QueryProjectDto{ + @ApiModelProperty("开始时间") + private Long startTime; + @ApiModelProperty("结束时间") + private Long endTime; + } + + @Data + @ApiModel("根据手机号查找用户能看的项目列表") + public static class QueryProjectByPhone{ + @ApiModelProperty("开始时间") + private Long startTime; + @ApiModelProperty("结束时间") + private Long endTime; + @ApiModelProperty("结束时间") + private List phone; + } + + @Data + @ApiModel("心跳里的域信息") + public static class MessageDomainInfo { + @ApiModelProperty("域id") + private Long id; + @ApiModelProperty("域名称") + private String name; + @ApiModelProperty("域code") + private String code; + @ApiModelProperty("ip") + private String host; + @ApiModelProperty("发送时的时间戳") + private Long timestamp; + @ApiModelProperty("随机码") + private String noncestr; + @ApiModelProperty("随机码") + private QueryProjectByPhone projectByPhone; + + public MessageDomainInfo() { + } + + public MessageDomainInfo(Long id, String name, String code, String host, Long timestamp, String noncestr, QueryProjectByPhone projectByPhone) { + this.id = id; + this.name = name; + this.code = code; + this.host = host; + this.timestamp = timestamp; + this.noncestr = noncestr; + this.projectByPhone = projectByPhone; + } + } + +} diff --git a/ptos_diplomatist/src/main/java/com/ccsens/ptos_diplomatist/bean/dto/UserDto.java b/ptos_diplomatist/src/main/java/com/ccsens/ptos_diplomatist/bean/dto/UserDto.java index e9ce26e..943e66e 100644 --- a/ptos_diplomatist/src/main/java/com/ccsens/ptos_diplomatist/bean/dto/UserDto.java +++ b/ptos_diplomatist/src/main/java/com/ccsens/ptos_diplomatist/bean/dto/UserDto.java @@ -12,26 +12,28 @@ import java.util.List; @Data public class UserDto { - @Data - @ApiModel("用户身份证和手机号") - public static class PhoneAndIdCard{ - @ApiModelProperty("手机号") - private String phone; - @ApiModelProperty("身份证号") - private String idCard; - } - - @Data - @ApiModel("域内用户信息") - public static class DomainUser{ - @ApiModelProperty("手机号") - private String name; - @ApiModelProperty("身份证号") - private String code; - @ApiModelProperty("身份证号") - private String domainName; - @ApiModelProperty("身份证号") - private List userList; - } + + +// @Data +// @ApiModel("用户身份证和手机号") +// public static class PhoneAndIdCard{ +// @ApiModelProperty("手机号") +// private String phone; +// @ApiModelProperty("身份证号") +// private String idCard; +// } + +// @Data +// @ApiModel("域内用户信息") +// public static class DomainUser{ +// @ApiModelProperty("手机号") +// private String name; +// @ApiModelProperty("身份证号") +// private String code; +// @ApiModelProperty("身份证号") +// private String domainName; +// @ApiModelProperty("身份证号") +// private List userList; +// } } diff --git a/ptos_diplomatist/src/main/java/com/ccsens/ptos_diplomatist/bean/vo/ProjectVo.java b/ptos_diplomatist/src/main/java/com/ccsens/ptos_diplomatist/bean/vo/ProjectVo.java new file mode 100644 index 0000000..bcb781f --- /dev/null +++ b/ptos_diplomatist/src/main/java/com/ccsens/ptos_diplomatist/bean/vo/ProjectVo.java @@ -0,0 +1,103 @@ +package com.ccsens.ptos_diplomatist.bean.vo; + +import cn.hutool.core.util.ObjectUtil; +import com.ccsens.util.WebConstant; +import com.fasterxml.jackson.annotation.JsonIgnore; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.util.List; + +/** + * @author 逗 + */ +@Data +public class ProjectVo { + + @Data + @ApiModel("域信息") + public static class DomainInfo{ + @ApiModelProperty("id") + private Long id; + @ApiModelProperty("域名") + private String name; + @ApiModelProperty("域code") + private String code; + @ApiModelProperty("域访问前缀") + private String url; + @ApiModelProperty("是否是自身 0否 1是") + private byte self; + @ApiModelProperty("业务列表") + private List businessList; + } + @Data + @ApiModel("业务信息") + public static class BusinessInfo{ + @ApiModelProperty("业务id") + private Long businessId; + @ApiModelProperty("业务名") + private String businessName; + @ApiModelProperty("业务code") + private String businessCode; + @ApiModelProperty("业务访问前缀") + private String url; + @ApiModelProperty("项目列表") + private List projectList; + } + + @Data + @ApiModel("日历下项目列表信息") + public static class ProjectInfo{ + @ApiModelProperty("id") + private Long id; + @ApiModelProperty("项目名") + private String name; + @ApiModelProperty("开始时间") + private Long startTime; + @ApiModelProperty("结束时间") + private Long endTime; + @ApiModelProperty("项目完成状态(0-未开始,1-进行中,2-暂停,3-已完成)") + private byte status; + @ApiModelProperty("访问路径)") + private String url; + @ApiModelProperty("所属域code") + private String domainCode; + @ApiModelProperty("所属业务code") + private String businessCode; + @ApiModelProperty("子项目") + private List sonProjectList; + @JsonIgnore + @ApiModelProperty("父级id") + private Long parentId; + + public Byte getStatus() { + long current = System.currentTimeMillis(); + if(ObjectUtil.isNull(getStartTime()) || ObjectUtil.isNull(getEndTime())) { + return null; + } + if(getStartTime() > current){ + this.status = (byte) WebConstant.EVENT_PROCESS.Pending.value; + }else if(getEndTime() < current){ + this.status = (byte) WebConstant.EVENT_PROCESS.Expired.value; + }else{ + this.status = (byte) WebConstant.EVENT_PROCESS.Processing.value; + } + return this.status; + } + + public ProjectInfo() { + } + + public ProjectInfo(Long id, String name, Long startTime, Long endTime, String url, String domainCode, String businessCode) { + this.id = id; + this.name = name; + this.startTime = startTime; + this.endTime = endTime; + this.url = url; + this.domainCode = domainCode; + this.businessCode = businessCode; + } + } + +} diff --git a/ptos_diplomatist/src/main/java/com/ccsens/ptos_diplomatist/persist/dao/IdcDomainDao.java b/ptos_diplomatist/src/main/java/com/ccsens/ptos_diplomatist/persist/dao/IdcDomainDao.java index a277c97..dd797a7 100644 --- a/ptos_diplomatist/src/main/java/com/ccsens/ptos_diplomatist/persist/dao/IdcDomainDao.java +++ b/ptos_diplomatist/src/main/java/com/ccsens/ptos_diplomatist/persist/dao/IdcDomainDao.java @@ -41,4 +41,11 @@ public interface IdcDomainDao extends IdcDomainMapper { * @return 返回公域信息 */ IdcDomain getPubDomain(); + + /** + * 查询所有在线的域 + * @param lastAnswerTime 判断离线时间 + * @return 返回域列表 + */ + List getOnlineDomain(@Param("now")Long now, @Param("lastAnswerTime") Long lastAnswerTime); } diff --git a/ptos_diplomatist/src/main/java/com/ccsens/ptos_diplomatist/service/DomainService.java b/ptos_diplomatist/src/main/java/com/ccsens/ptos_diplomatist/service/DomainService.java index 9a390bf..c4ad283 100644 --- a/ptos_diplomatist/src/main/java/com/ccsens/ptos_diplomatist/service/DomainService.java +++ b/ptos_diplomatist/src/main/java/com/ccsens/ptos_diplomatist/service/DomainService.java @@ -11,11 +11,16 @@ import cn.hutool.crypto.asymmetric.RSA; import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSONArray; import com.alibaba.fastjson.JSONObject; +import com.ccsens.ptos_diplomatist.bean.dto.DomainDto; import com.ccsens.ptos_diplomatist.bean.dto.HeartbeatDto; +import com.ccsens.ptos_diplomatist.bean.dto.ProjectDto; import com.ccsens.ptos_diplomatist.bean.po.IdcDomain; import com.ccsens.ptos_diplomatist.bean.vo.DomainVo; +import com.ccsens.ptos_diplomatist.bean.vo.ProjectVo; import com.ccsens.ptos_diplomatist.persist.dao.IdcDomainDao; import com.ccsens.ptos_diplomatist.util.DiplomatistCodeError; +import com.ccsens.ptos_diplomatist.util.DiplomatistConstant; +import com.ccsens.ptos_diplomatist.util.RSAUtil; import com.ccsens.util.RestTemplateUtil; import com.ccsens.util.exception.BaseException; import lombok.extern.slf4j.Slf4j; @@ -25,6 +30,7 @@ import org.springframework.transaction.annotation.Propagation; import org.springframework.transaction.annotation.Transactional; import javax.annotation.Resource; +import java.util.ArrayList; import java.util.List; /** @@ -41,7 +47,27 @@ public class DomainService implements IDomainService { @Override public List heartbeatQueryList(HeartbeatDto.SendDomain param, String clientIp) { + //验证其他域发来的信息是否合法 + byte[] decode = verifyDomainMessage(param); + //转换成对象 + HeartbeatDto.MessageDomainInfo domainInfo = JSON.parseObject(StrUtil.str(decode, CharsetUtil.CHARSET_UTF_8), HeartbeatDto.MessageDomainInfo.class); + //验证ip白名单是否匹配 + if(domainInfo == null || !domainInfo.getHost().equals(clientIp)){ + log.info("白名单不匹配:{}---实际请求{}",domainInfo,clientIp); +// throw new BaseException(ptos_diplomatistCodeError.GET_DOMAIN_ERROR); + } //TODO 验证通讯时间 + //TODO 随机字符 + //查询除了自身的所有域信息并返回 + return domainDao.queryAllDomain(); + } + + /** + * 验证其他域发来的信息是否合法 + * @param param 其他域发来的信息 + * @return 返回解密后的信息 + */ + public byte[] verifyDomainMessage(HeartbeatDto.SendDomain param) { //根据code查找发送方域信息 IdcDomain idcDomains = domainDao.getByCode(param.getCode()); if(ObjectUtil.isNull(idcDomains)){ @@ -56,38 +82,11 @@ public class DomainService implements IDomainService { throw new BaseException(DiplomatistCodeError.GET_DOMAIN_ERROR); } //根据发送方公钥验证签名 - byte[] decrypt; - try { - RSA pub = new RSA(null, idcDomains.getPublicKey()); - decrypt = pub.decrypt(param.getData(), KeyType.PublicKey); - }catch (Exception e){ - log.info("验证签名失败:{}",e); - throw new BaseException(DiplomatistCodeError.GET_DOMAIN_ERROR); - } //查询自身域信息 IdcDomain selfDomains = domainDao.getOneself(); - HeartbeatDto.MessageDomainInfo domainInfo; - try { - //根据自身私钥解密 - RSA pri = new RSA(selfDomains.getPrivateKey(),null); - byte[] decrypt2 = pri.decrypt(decrypt, KeyType.PrivateKey); - log.info("解密未报错"); - //转换成对象 - domainInfo = JSON.parseObject(StrUtil.str(decrypt2, CharsetUtil.CHARSET_UTF_8), HeartbeatDto.MessageDomainInfo.class); - }catch (Exception e){ - log.info("解密失败:{}",e); - throw new BaseException(DiplomatistCodeError.GET_DOMAIN_ERROR); - } - //验证ip白名单是否匹配 - if(domainInfo == null || !domainInfo.getHost().equals(clientIp)){ - log.info("白名单不匹配:{}---实际请求{}",domainInfo,clientIp); -// throw new BaseException(ptos_diplomatistCodeError.GET_DOMAIN_ERROR); - } - //查询除了自身的所有域信息并返回 - return domainDao.queryAllDomain(); + return RSAUtil.decode(param.getData(), idcDomains.getPublicKey(), selfDomains.getPrivateKey()); } - /** * 定时请求公域更新自身域列表信息 */ @@ -102,24 +101,19 @@ public class DomainService implements IDomainService { msgDomainInfo.setName(selfDomains.getName()); msgDomainInfo.setCode(selfDomains.getCode()); msgDomainInfo.setHost(selfDomains.getHost()); + msgDomainInfo.setTimestamp(System.currentTimeMillis()); + //TODO 随机码 + msgDomainInfo.setNoncestr(""); //查询自身的公域 IdcDomain pubDomain = domainDao.getPubDomain(); if(ObjectUtil.isNull(pubDomain)){ return; } - //使用对方的公钥加密 - RSA pub = new RSA(null, pubDomain.getPublicKey()); - byte[] encrypt = pub.encrypt(StrUtil.bytes(JSON.toJSONString(msgDomainInfo), CharsetUtil.CHARSET_UTF_8), KeyType.PublicKey); - //使用自己的私钥签名 - RSA pri = new RSA(selfDomains.getPrivateKey(),null); - byte[] encrypt2 = pri.encrypt(encrypt, KeyType.PrivateKey); - + byte[] encrypt = RSAUtil.encrypt(JSON.toJSONString(msgDomainInfo), pubDomain.getPublicKey(), selfDomains.getPrivateKey()); //生成发送的对象 HeartbeatDto.SendDomain sendDomain = new HeartbeatDto.SendDomain(); sendDomain.setCode(selfDomains.getCode()); - sendDomain.setTimestamp(System.currentTimeMillis()); - //TODO 随机码 - sendDomain.setData(encrypt2); + sendDomain.setData(encrypt); //发送请求 String url = pubDomain.getUrl() + "/domain/list"; // String url = "http://localhost:7280/domain/list"; @@ -182,4 +176,111 @@ public class DomainService implements IDomainService { } } } + + @Override + public List queryDomainProject(ProjectDto.QueryProjectByPhone params) { + List projectInfoList = new ArrayList<>(); + //查询自身域信息 + IdcDomain selfDomains = domainDao.getOneself(); + if(ObjectUtil.isNull(selfDomains)){ + return null; + } + //需要加密的信息 + ProjectDto.MessageDomainInfo messageDomainInfo = new ProjectDto.MessageDomainInfo(selfDomains.getId(), + selfDomains.getName(),selfDomains.getName(),selfDomains.getHost(),System.currentTimeMillis(),"",params); + + //查询所有在线的域列表 + List idcDomains = domainDao.getOnlineDomain(System.currentTimeMillis(), DiplomatistConstant.LAST_ANSWER_TIME); + if(CollectionUtil.isNotEmpty(idcDomains)){ + idcDomains.forEach(idcDomain -> { + //使用对方的公钥加密 + byte[] encrypt = RSAUtil.encrypt(JSON.toJSONString(messageDomainInfo), idcDomain.getPublicKey(), selfDomains.getPrivateKey()); + //生成发送的对象 + HeartbeatDto.SendDomain sendDomain = new HeartbeatDto.SendDomain(); + sendDomain.setCode(selfDomains.getCode()); + sendDomain.setData(encrypt); + //发送请求 + String url = idcDomain.getUrl() + "/domain/idcDomainProject"; + log.info("调用接口:{}--{}", url, sendDomain); + JSONObject jsonObject = null; + try { + String postBody = RestTemplateUtil.postBody(url, sendDomain); + jsonObject = JSONObject.parseObject(postBody); + }catch (Exception e){ + log.error("调用接口失败",e); + } + if(ObjectUtil.isNotNull(jsonObject)){ + log.info("接口返回:{}", jsonObject); + //请求正确返回则修改最后应答时间,否则无操作 + Integer code = jsonObject.getInteger("code"); + if (code != null && code == 200) { + JSONArray data = jsonObject.getJSONArray("data"); + if(CollectionUtil.isNotEmpty(data)){ + for (Object object : data) { + ProjectVo.ProjectInfo projectInfo; + try { + JSONObject object1 = (JSONObject) object; + projectInfo = object1.toJavaObject(ProjectVo.ProjectInfo.class); + projectInfoList.add(projectInfo); + }catch (Exception e){ + log.error("项目转换失败"+e); + } + } + } + } + } + }); + } + return projectInfoList; + } + + @Override + public List idcDomainProject(HeartbeatDto.SendDomain params) { + List projectInfos = new ArrayList<>(); + //验证信息是否正确 + byte[] decode = verifyDomainMessage(params); + //转换为自己需要的对象 + ProjectDto.MessageDomainInfo messageDomainInfo = null; + try { + messageDomainInfo = JSON.parseObject(StrUtil.str(decode, CharsetUtil.CHARSET_UTF_8), ProjectDto.MessageDomainInfo.class); + }catch (Exception e){ + log.error("获取信息失败",e); + return null; + } + if(ObjectUtil.isNotNull(messageDomainInfo)){ + //请求本域tall查找项目列表 + //发送请求 + //TODO 连接 + String url = "/project/byPhone"; + log.info("调用接口:{}--{}", url, messageDomainInfo.getProjectByPhone()); + JSONObject jsonObject = null; + try { + String postBody = RestTemplateUtil.postBody(url, messageDomainInfo.getProjectByPhone()); + jsonObject = JSONObject.parseObject(postBody); + }catch (Exception e){ + log.error("调用接口失败",e); + } + if(ObjectUtil.isNotNull(jsonObject)){ + log.info("接口返回:{}", jsonObject); + //请求正确返回则修改最后应答时间,否则无操作 + Integer code = jsonObject.getInteger("code"); + if (code != null && code == 200) { + JSONArray data = jsonObject.getJSONArray("data"); + if(CollectionUtil.isNotEmpty(data)){ + for (Object object : data) { + ProjectVo.ProjectInfo projectInfo; + try { + JSONObject object1 = (JSONObject) object; + projectInfo = object1.toJavaObject(ProjectVo.ProjectInfo.class); + projectInfos.add(projectInfo); + }catch (Exception e){ + log.error("项目转换失败"+e); + } + } + } + } + } + } + return projectInfos; + } } diff --git a/ptos_diplomatist/src/main/java/com/ccsens/ptos_diplomatist/service/HeartbeatService.java b/ptos_diplomatist/src/main/java/com/ccsens/ptos_diplomatist/service/HeartbeatService.java index 152d463..d3d36f3 100644 --- a/ptos_diplomatist/src/main/java/com/ccsens/ptos_diplomatist/service/HeartbeatService.java +++ b/ptos_diplomatist/src/main/java/com/ccsens/ptos_diplomatist/service/HeartbeatService.java @@ -12,6 +12,7 @@ import com.ccsens.ptos_diplomatist.bean.dto.HeartbeatDto; import com.ccsens.ptos_diplomatist.bean.po.IdcDomain; import com.ccsens.ptos_diplomatist.persist.dao.IdcDomainDao; import com.ccsens.ptos_diplomatist.util.DiplomatistCodeError; +import com.ccsens.ptos_diplomatist.util.RSAUtil; import com.ccsens.util.RestTemplateUtil; import com.ccsens.util.exception.BaseException; import lombok.extern.slf4j.Slf4j; @@ -36,8 +37,6 @@ public class HeartbeatService implements IHeartbeatService { @Override public void inHeartbeat(HeartbeatDto.SendDomain param, String clientIp) { - - //TODO 验证通讯时间 //根据code查找发送方域信息 IdcDomain idcDomains = domainDao.getByCode(param.getCode()); if(ObjectUtil.isNull(idcDomains)){ @@ -51,33 +50,16 @@ public class HeartbeatService implements IHeartbeatService { log.info("不接受对方的请求"); throw new BaseException(DiplomatistCodeError.HEARTBEAT_ERROR); } - //根据发送方公钥验证签名 - byte[] decrypt; - try { - RSA pub = new RSA(null, idcDomains.getPublicKey()); - decrypt = pub.decrypt(param.getData(), KeyType.PublicKey); - }catch (Exception e){ - log.info("验证签名失败:{}",e); - throw new BaseException(DiplomatistCodeError.HEARTBEAT_ERROR); - } - //查询自身域信息 IdcDomain selfDomains = domainDao.getOneself(); - HeartbeatDto.MessageDomainInfo domainInfo; - try { - //根据自身私钥解密 - RSA pri = new RSA(selfDomains.getPrivateKey(),null); - byte[] decrypt2 = pri.decrypt(decrypt, KeyType.PrivateKey); - //转换成对象 - domainInfo = JSON.parseObject(StrUtil.str(decrypt2, CharsetUtil.CHARSET_UTF_8), HeartbeatDto.MessageDomainInfo.class); - }catch (Exception e){ - log.info("解密失败:{}",e); - throw new BaseException(DiplomatistCodeError.HEARTBEAT_ERROR); - } + byte[] decode = RSAUtil.decode(param.getData(), idcDomains.getPublicKey(), selfDomains.getPrivateKey()); + HeartbeatDto.MessageDomainInfo domainInfo = JSON.parseObject(StrUtil.str(decode, CharsetUtil.CHARSET_UTF_8), HeartbeatDto.MessageDomainInfo.class); //验证ip白名单是否匹配 if(domainInfo == null || !domainInfo.getHost().equals(clientIp)){ log.info("白名单不匹配:{}---实际请求{}",domainInfo,clientIp); // throw new BaseException(ptos_diplomatistCodeError.HEARTBEAT_ERROR); } + //TODO 验证通讯时间 + //TODO 随机字符 } @@ -95,7 +77,9 @@ public class HeartbeatService implements IHeartbeatService { domainInfo.setName(selfDomains.getName()); domainInfo.setCode(selfDomains.getCode()); domainInfo.setHost(selfDomains.getHost()); - + domainInfo.setTimestamp(System.currentTimeMillis()); + //TODO 随机码 + domainInfo.setNoncestr(""); //查找需要轮询的域 List idcDomains = domainDao.getPolling(); if(CollectionUtil.isNotEmpty(idcDomains)){ @@ -104,17 +88,11 @@ public class HeartbeatService implements IHeartbeatService { idcDomain.setLastAskTime(System.currentTimeMillis()); domainDao.updateByPrimaryKeySelective(idcDomain); //使用对方的公钥加密 - RSA pub = new RSA(null, idcDomain.getPublicKey()); - byte[] encrypt = pub.encrypt(StrUtil.bytes(JSON.toJSONString(domainInfo), CharsetUtil.CHARSET_UTF_8), KeyType.PublicKey); - //使用自己的私钥签名 - RSA pri = new RSA(selfDomains.getPrivateKey(),null); - byte[] encrypt2 = pri.encrypt(encrypt, KeyType.PrivateKey); + byte[] encrypt = RSAUtil.encrypt(JSON.toJSONString(domainInfo), idcDomain.getPublicKey(), selfDomains.getPrivateKey()); //生成发送的对象 HeartbeatDto.SendDomain sendDomain = new HeartbeatDto.SendDomain(); sendDomain.setCode(selfDomains.getCode()); - sendDomain.setTimestamp(System.currentTimeMillis()); - //TODO 随机码 - sendDomain.setData(encrypt2); + sendDomain.setData(encrypt); //发送心跳 String url = idcDomain.getUrl() + "/heart"; log.info("调用接口:{}--{}", url, sendDomain); diff --git a/ptos_diplomatist/src/main/java/com/ccsens/ptos_diplomatist/service/IDomainService.java b/ptos_diplomatist/src/main/java/com/ccsens/ptos_diplomatist/service/IDomainService.java index 687167e..a658fe8 100644 --- a/ptos_diplomatist/src/main/java/com/ccsens/ptos_diplomatist/service/IDomainService.java +++ b/ptos_diplomatist/src/main/java/com/ccsens/ptos_diplomatist/service/IDomainService.java @@ -1,7 +1,10 @@ package com.ccsens.ptos_diplomatist.service; +import com.ccsens.ptos_diplomatist.bean.dto.DomainDto; import com.ccsens.ptos_diplomatist.bean.dto.HeartbeatDto; +import com.ccsens.ptos_diplomatist.bean.dto.ProjectDto; import com.ccsens.ptos_diplomatist.bean.vo.DomainVo; +import com.ccsens.ptos_diplomatist.bean.vo.ProjectVo; import java.util.List; @@ -16,4 +19,25 @@ public interface IDomainService { * @return 返回域列表 */ List heartbeatQueryList(HeartbeatDto.SendDomain param, String clientIp); + +// /** +// * 访问用户关联的其他域的接口 +// * @param params 路径和参数 +// * @return 返回 +// */ +// Object queryDomainByPt(DomainDto.TallToOtherDomain params); + + /** + * 查询用户关联域内的项目列表 + * @param params 用户信息和时间 + * @return 返回项目列表 + */ + List queryDomainProject(ProjectDto.QueryProjectByPhone params); + + /** + * 其他域请求本域,返回项目信息 + * @param params 其他域的加密信息 + * @return 返回项目列表 + */ + List idcDomainProject(HeartbeatDto.SendDomain params); } diff --git a/ptos_diplomatist/src/main/java/com/ccsens/ptos_diplomatist/util/DiplomatistConstant.java b/ptos_diplomatist/src/main/java/com/ccsens/ptos_diplomatist/util/DiplomatistConstant.java index 84527d2..ad2a7c8 100644 --- a/ptos_diplomatist/src/main/java/com/ccsens/ptos_diplomatist/util/DiplomatistConstant.java +++ b/ptos_diplomatist/src/main/java/com/ccsens/ptos_diplomatist/util/DiplomatistConstant.java @@ -7,6 +7,8 @@ import java.util.Map; * @author 逗 */ public class DiplomatistConstant { + /**域离线时间 21分钟*/ + public static final Long LAST_ANSWER_TIME = 21 * 60 * 1000L; /**图片类型*/ public static final String FILE_TYPE_IMG = "bmp,jpg,jpeg,png,tif,gif,pcx,tga,exif,fpx,svg,psd,cdr,pcd,dxf,ufo,eps,ai,raw,WMF,webp"; diff --git a/ptos_diplomatist/src/main/java/com/ccsens/ptos_diplomatist/util/RSAUtil.java b/ptos_diplomatist/src/main/java/com/ccsens/ptos_diplomatist/util/RSAUtil.java new file mode 100644 index 0000000..77b1902 --- /dev/null +++ b/ptos_diplomatist/src/main/java/com/ccsens/ptos_diplomatist/util/RSAUtil.java @@ -0,0 +1,66 @@ +package com.ccsens.ptos_diplomatist.util; + +import cn.hutool.core.util.CharsetUtil; +import cn.hutool.core.util.StrUtil; +import cn.hutool.crypto.asymmetric.KeyType; +import cn.hutool.crypto.asymmetric.RSA; +import com.alibaba.fastjson.JSON; +import com.ccsens.ptos_diplomatist.bean.dto.HeartbeatDto; +import com.ccsens.ptos_diplomatist.bean.po.IdcDomain; +import com.ccsens.util.exception.BaseException; +import lombok.extern.slf4j.Slf4j; + +import java.security.PublicKey; + +/** + * @author 逗 + */ +@Slf4j +public class RSAUtil { + + /** + * 加密后签名 + * @param data 数据 + * @param pubKey 公钥 + * @param priKey 私钥 + * @return 返回加密后的数据 + */ + public static byte[] encrypt(String data, String pubKey, String priKey){ + RSA pub = new RSA(null, pubKey); + byte[] encrypt = pub.encrypt(StrUtil.bytes(data, CharsetUtil.CHARSET_UTF_8), KeyType.PublicKey); + //使用自己的私钥签名 + RSA pri = new RSA(priKey,null); + byte[] encrypt2 = pri.encrypt(encrypt, KeyType.PrivateKey); + return encrypt2; + } + + /** + * 验签后解密 + * @param data 数据 + * @param pubKey 公钥 + * @param priKey 私钥 + * @return 返回加密后的数据 + */ + public static byte[] decode(byte[] data, String pubKey, String priKey){ + byte[] decrypt; + try { + RSA pub = new RSA(null, pubKey); + decrypt = pub.decrypt(data, KeyType.PublicKey); + }catch (Exception e){ + log.info("验证签名失败:{}",e); + throw new BaseException(DiplomatistCodeError.GET_DOMAIN_ERROR); + } + try { + //根据自身私钥解密 + RSA pri = new RSA(priKey,null); + decrypt = pri.decrypt(decrypt, KeyType.PrivateKey); + log.info("解密未报错"); +// //转换成对象 +// domainInfo = JSON.parseObject(StrUtil.str(decrypt2, CharsetUtil.CHARSET_UTF_8), HeartbeatDto.MessageDomainInfo.class); + }catch (Exception e){ + log.info("解密失败:{}",e); + throw new BaseException(DiplomatistCodeError.GET_DOMAIN_ERROR); + } + return decrypt; + } +} diff --git a/ptos_diplomatist/src/main/resources/mapper_dao/SPluginDao.xml b/ptos_diplomatist/src/main/resources/mapper_dao/IdcDomainDao.xml similarity index 84% rename from ptos_diplomatist/src/main/resources/mapper_dao/SPluginDao.xml rename to ptos_diplomatist/src/main/resources/mapper_dao/IdcDomainDao.xml index 0416e86..20ed129 100644 --- a/ptos_diplomatist/src/main/resources/mapper_dao/SPluginDao.xml +++ b/ptos_diplomatist/src/main/resources/mapper_dao/IdcDomainDao.xml @@ -44,4 +44,14 @@ + \ No newline at end of file diff --git a/ptos_tall/src/main/java/com/ccsens/ptos_tall/api/ProjectController.java b/ptos_tall/src/main/java/com/ccsens/ptos_tall/api/ProjectController.java index ac39b2d..e913bbe 100644 --- a/ptos_tall/src/main/java/com/ccsens/ptos_tall/api/ProjectController.java +++ b/ptos_tall/src/main/java/com/ccsens/ptos_tall/api/ProjectController.java @@ -30,12 +30,28 @@ public class ProjectController { @Resource private IProjectService projectService; - @ApiOperation(value = "查询用户所有域下所有业务内的所有项目", notes = "") + @ApiOperation(value = "日历页获取项目列表", notes = "") @RequestMapping(value = "/query", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) - public JsonResponse> queryDomainByUser(@ApiParam @Validated @RequestBody QueryDto params) throws Exception{ + public JsonResponse> queryProjectByUser(@ApiParam @Validated @RequestBody QueryDto params) throws Exception{ log.info("查询用户所有域下所有业务内的所有项目:{}",params); - List projectInfoList = projectService.queryDomainByUser(params.getParam(),params.getUserId()); - log.info("查询用户所有域下所有业务内的所有项目"); + List projectInfoList = projectService.queryProjectByUser(params.getPhone(),params.getParam(),params.getUserId()); + log.info("返回用户所有域下所有业务内的所有项目"); return JsonResponse.newInstance().ok(projectInfoList); } + + @ApiOperation(value = "查询日历是否有小红点", notes = "查询日历是否有小红点") + @RequestMapping(value = "/day", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) + public JsonResponse> haveProjectDay(@ApiParam @Validated @RequestBody QueryDto params) throws Exception{ + List projectById = projectService.haveProjectDay(params.getParam(), params.getUserId()); + return JsonResponse.newInstance().ok(projectById); + } + + @ApiOperation(value = "根据手机号获取用户在本域的业务项目列表", notes = "") + @RequestMapping(value = "/byPhone", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) + public JsonResponse> queryProjectByPhone(@ApiParam @Validated @RequestBody QueryDto params) throws Exception{ + log.info("根据手机号获取用户在本域的业务项目列表:{}",params); + List businessInfos = projectService.queryProjectByPhone(params.getParam()); + log.info("返回手机号用户的项目"); + return JsonResponse.newInstance().ok(businessInfos); + } } diff --git a/ptos_tall/src/main/java/com/ccsens/ptos_tall/api/UserController.java b/ptos_tall/src/main/java/com/ccsens/ptos_tall/api/UserController.java index fc88a25..e2cdeb8 100644 --- a/ptos_tall/src/main/java/com/ccsens/ptos_tall/api/UserController.java +++ b/ptos_tall/src/main/java/com/ccsens/ptos_tall/api/UserController.java @@ -1,18 +1,73 @@ package com.ccsens.ptos_tall.api; +import cn.hutool.extra.servlet.ServletUtil; +import com.ccsens.ptos_tall.bean.dto.ProjectDto; +import com.ccsens.ptos_tall.bean.dto.UserDto; +import com.ccsens.ptos_tall.bean.vo.ProjectVo; +import com.ccsens.ptos_tall.bean.vo.UserVo; +import com.ccsens.ptos_tall.service.IUserService; +import com.ccsens.util.JsonResponse; +import com.ccsens.util.WebConstant; +import com.ccsens.util.bean.dto.QueryDto; +import io.jsonwebtoken.Claims; import io.swagger.annotations.Api; +import io.swagger.annotations.ApiImplicitParams; +import io.swagger.annotations.ApiOperation; +import io.swagger.annotations.ApiParam; import lombok.extern.slf4j.Slf4j; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RestController; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; + +import javax.annotation.Resource; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import java.util.List; /** * @author 逗 */ @Api(tags = "user" , description = "用户信息相关接口") @RestController -@RequestMapping("/user") +@RequestMapping("/users") @Slf4j public class UserController { + @Resource + private IUserService userService; + + @ApiOperation(value = "登录", notes = "") + @RequestMapping(value = "/signin", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) + public JsonResponse userSignin(HttpServletRequest request, @ApiParam @Validated @RequestBody UserDto.SigninDto params) throws Exception{ + log.info("登录:{}",params); +// String deviceId = request.getHeader("deviceId"); + UserVo.TokenBean tokenBean = userService.userSignin(params,"", ServletUtil.getClientIP(request)); + log.info("返回用户信息"); + return JsonResponse.newInstance().ok(tokenBean,tokenBean.getToken(),tokenBean.getRefreshToken()); + } + + @ApiOperation(value = "根据token换取用户信息", notes = "") + @RequestMapping(value = "/token", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) + public JsonResponse userByBusinessToken(HttpServletRequest request, @ApiParam @Validated @RequestBody UserDto.BusinessToken params) throws Exception{ + log.info("根据token换取用户信息:{}",params); + UserVo.BusinessUserInfo userInfo = userService.userByBusinessToken(params); + log.info("返回用户信息"); + return JsonResponse.newInstance().ok(userInfo); + } + @ApiOperation(value = "/发送验证码", notes = "") + @RequestMapping(value = "/smscode", method = RequestMethod.GET, produces = {"application/json;charset=UTF-8"}) + public JsonResponse getSmsCode(@ApiParam @RequestParam String phone, + @RequestParam(required = true) String verificationCodeId, String verificationCodeValue) throws Exception { + log.info("发送验证码,手机号:{},图形验证码id:{},值:{}",phone,verificationCodeId,verificationCodeValue); + UserVo.SmsCode smsCodeVo = userService.getSignInSmsCode(phone,verificationCodeId,verificationCodeValue); + return JsonResponse.newInstance().ok(smsCodeVo); + } + @ApiOperation(value = "图片验证码") + @ApiImplicitParams({ + }) + @RequestMapping(value = "/code", method = RequestMethod.GET, produces = {"application/json;charset=UTF-8"}) + public JsonResponse vertifyCode() throws Exception { + UserVo.VerificationCode vertifyCode = userService.getVertifyCode(); + return JsonResponse.newInstance().ok(vertifyCode); + } } diff --git a/ptos_tall/src/main/java/com/ccsens/ptos_tall/bean/dto/DomainDto.java b/ptos_tall/src/main/java/com/ccsens/ptos_tall/bean/dto/DomainDto.java new file mode 100644 index 0000000..02dcd44 --- /dev/null +++ b/ptos_tall/src/main/java/com/ccsens/ptos_tall/bean/dto/DomainDto.java @@ -0,0 +1,21 @@ +package com.ccsens.ptos_tall.bean.dto; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * @author 逗 + */ +@Data +public class DomainDto { + @Data + @ApiModel("PT请求其他域的信息") + public static class TallToOtherDomain{ + @ApiModelProperty("请求的接口路径") + private String url; + @ApiModelProperty("参数") + private String param; + } + +} diff --git a/ptos_tall/src/main/java/com/ccsens/ptos_tall/bean/dto/ProjectDto.java b/ptos_tall/src/main/java/com/ccsens/ptos_tall/bean/dto/ProjectDto.java index aec0767..04b9286 100644 --- a/ptos_tall/src/main/java/com/ccsens/ptos_tall/bean/dto/ProjectDto.java +++ b/ptos_tall/src/main/java/com/ccsens/ptos_tall/bean/dto/ProjectDto.java @@ -4,6 +4,9 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import lombok.Data; +import javax.validation.constraints.NotNull; +import java.util.List; + /** * @author 逗 */ @@ -19,4 +22,25 @@ public class ProjectDto { private Long endTime; } + @Data + @ApiModel("根据手机号查找用户能看的项目列表") + public static class QueryProjectByPhone{ + @ApiModelProperty("开始时间") + private Long startTime; + @ApiModelProperty("结束时间") + private Long endTime; + @ApiModelProperty("结束时间") + private List phone; + } + + @Data + @ApiModel("查询日历是否有项目") + public static class QueryHaveProject { + @NotNull(message = "开始时间不能为空") + @ApiModelProperty("开始时间") + private Long startTime; + @NotNull(message = "结束时间不能为空") + @ApiModelProperty("结束时间") + private Long endTime; + } } diff --git a/ptos_tall/src/main/java/com/ccsens/ptos_tall/bean/dto/UserDto.java b/ptos_tall/src/main/java/com/ccsens/ptos_tall/bean/dto/UserDto.java new file mode 100644 index 0000000..b651755 --- /dev/null +++ b/ptos_tall/src/main/java/com/ccsens/ptos_tall/bean/dto/UserDto.java @@ -0,0 +1,51 @@ +package com.ccsens.ptos_tall.bean.dto; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import javax.validation.constraints.NotBlank; +import javax.validation.constraints.NotEmpty; +import javax.validation.constraints.NotNull; +import java.util.List; + +/** + * @author 逗 + */ +@Data +public class UserDto { + + @Data + @ApiModel("登录") + public static class SigninDto{ + @ApiModelProperty("登录客户端:0-H5,1-APP") + @NotNull(message = "客户端类型异常") + private Integer client; + @ApiModelProperty("登录类型:0-wxmp(小程序),1-phone(手机),2-email(邮箱),3-accounts(账号),4-OAUTH2_Wx(微信),5-Wx_H5(网页微信),6-OAUTH2_WeiBo, 7-Wx_Enterprise(企业微信)") + @NotNull(message = "登录类型异常") + private Integer type; + @ApiModelProperty("登录信息") + @NotNull(message = "登录信息不能为空") + private SigninData data; + } + @Data + @ApiModel("登录信息") + public static class SigninData{ + @ApiModelProperty("用户标识|用户名|手机号") + private String identifier; + @ApiModelProperty("用户凭据|密码|验证码") + private String credential; + } + + @Data + @ApiModel("业务根据token获取用户信息") + public static class BusinessToken{ + @ApiModelProperty("token") + private String token; + @ApiModelProperty("appId") + private String appId; + @ApiModelProperty("secret") + private String secret; + } + +} diff --git a/ptos_tall/src/main/java/com/ccsens/ptos_tall/bean/po/IdcDomain.java b/ptos_tall/src/main/java/com/ccsens/ptos_tall/bean/po/IdcDomain.java new file mode 100644 index 0000000..bcd4897 --- /dev/null +++ b/ptos_tall/src/main/java/com/ccsens/ptos_tall/bean/po/IdcDomain.java @@ -0,0 +1,227 @@ +package com.ccsens.ptos_tall.bean.po; + +import java.io.Serializable; +import java.util.Date; + +public class IdcDomain implements Serializable { + private Long id; + + private String name; + + private String code; + + private String intro; + + private String url; + + private String host; + + private Byte self; + + private Byte pub; + + private Byte polling; + + private Byte answer; + + private Long lastUpdateTime; + + private Long lastAskTime; + + private Long lastAnswerTime; + + private String publicKey; + + private String privateKey; + + private Long operator; + + private Date createdAt; + + private Date updatedAt; + + private Byte recStatus; + + private static final long serialVersionUID = 1L; + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name == null ? null : name.trim(); + } + + public String getCode() { + return code; + } + + public void setCode(String code) { + this.code = code == null ? null : code.trim(); + } + + public String getIntro() { + return intro; + } + + public void setIntro(String intro) { + this.intro = intro == null ? null : intro.trim(); + } + + public String getUrl() { + return url; + } + + public void setUrl(String url) { + this.url = url == null ? null : url.trim(); + } + + public String getHost() { + return host; + } + + public void setHost(String host) { + this.host = host == null ? null : host.trim(); + } + + public Byte getSelf() { + return self; + } + + public void setSelf(Byte self) { + this.self = self; + } + + public Byte getPub() { + return pub; + } + + public void setPub(Byte pub) { + this.pub = pub; + } + + public Byte getPolling() { + return polling; + } + + public void setPolling(Byte polling) { + this.polling = polling; + } + + public Byte getAnswer() { + return answer; + } + + public void setAnswer(Byte answer) { + this.answer = answer; + } + + public Long getLastUpdateTime() { + return lastUpdateTime; + } + + public void setLastUpdateTime(Long lastUpdateTime) { + this.lastUpdateTime = lastUpdateTime; + } + + public Long getLastAskTime() { + return lastAskTime; + } + + public void setLastAskTime(Long lastAskTime) { + this.lastAskTime = lastAskTime; + } + + public Long getLastAnswerTime() { + return lastAnswerTime; + } + + public void setLastAnswerTime(Long lastAnswerTime) { + this.lastAnswerTime = lastAnswerTime; + } + + public String getPublicKey() { + return publicKey; + } + + public void setPublicKey(String publicKey) { + this.publicKey = publicKey == null ? null : publicKey.trim(); + } + + public String getPrivateKey() { + return privateKey; + } + + public void setPrivateKey(String privateKey) { + this.privateKey = privateKey == null ? null : privateKey.trim(); + } + + public Long getOperator() { + return operator; + } + + public void setOperator(Long operator) { + this.operator = operator; + } + + public Date getCreatedAt() { + return createdAt; + } + + public void setCreatedAt(Date createdAt) { + this.createdAt = createdAt; + } + + public Date getUpdatedAt() { + return updatedAt; + } + + public void setUpdatedAt(Date updatedAt) { + this.updatedAt = updatedAt; + } + + public Byte getRecStatus() { + return recStatus; + } + + public void setRecStatus(Byte recStatus) { + this.recStatus = recStatus; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", id=").append(id); + sb.append(", name=").append(name); + sb.append(", code=").append(code); + sb.append(", intro=").append(intro); + sb.append(", url=").append(url); + sb.append(", host=").append(host); + sb.append(", self=").append(self); + sb.append(", pub=").append(pub); + sb.append(", polling=").append(polling); + sb.append(", answer=").append(answer); + sb.append(", lastUpdateTime=").append(lastUpdateTime); + sb.append(", lastAskTime=").append(lastAskTime); + sb.append(", lastAnswerTime=").append(lastAnswerTime); + sb.append(", publicKey=").append(publicKey); + sb.append(", privateKey=").append(privateKey); + sb.append(", operator=").append(operator); + sb.append(", createdAt=").append(createdAt); + sb.append(", updatedAt=").append(updatedAt); + sb.append(", recStatus=").append(recStatus); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/ptos_tall/src/main/java/com/ccsens/ptos_tall/bean/po/IdcDomainExample.java b/ptos_tall/src/main/java/com/ccsens/ptos_tall/bean/po/IdcDomainExample.java new file mode 100644 index 0000000..2246b88 --- /dev/null +++ b/ptos_tall/src/main/java/com/ccsens/ptos_tall/bean/po/IdcDomainExample.java @@ -0,0 +1,1411 @@ +package com.ccsens.ptos_tall.bean.po; + +import java.util.ArrayList; +import java.util.Date; +import java.util.List; + +public class IdcDomainExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + public IdcDomainExample() { + oredCriteria = new ArrayList(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("id is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("id is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(Long value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(Long value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(Long value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(Long value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(Long value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(Long value) { + addCriterion("id <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("id not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(Long value1, Long value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(Long value1, Long value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andNameIsNull() { + addCriterion("name is null"); + return (Criteria) this; + } + + public Criteria andNameIsNotNull() { + addCriterion("name is not null"); + return (Criteria) this; + } + + public Criteria andNameEqualTo(String value) { + addCriterion("name =", value, "name"); + return (Criteria) this; + } + + public Criteria andNameNotEqualTo(String value) { + addCriterion("name <>", value, "name"); + return (Criteria) this; + } + + public Criteria andNameGreaterThan(String value) { + addCriterion("name >", value, "name"); + return (Criteria) this; + } + + public Criteria andNameGreaterThanOrEqualTo(String value) { + addCriterion("name >=", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLessThan(String value) { + addCriterion("name <", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLessThanOrEqualTo(String value) { + addCriterion("name <=", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLike(String value) { + addCriterion("name like", value, "name"); + return (Criteria) this; + } + + public Criteria andNameNotLike(String value) { + addCriterion("name not like", value, "name"); + return (Criteria) this; + } + + public Criteria andNameIn(List values) { + addCriterion("name in", values, "name"); + return (Criteria) this; + } + + public Criteria andNameNotIn(List values) { + addCriterion("name not in", values, "name"); + return (Criteria) this; + } + + public Criteria andNameBetween(String value1, String value2) { + addCriterion("name between", value1, value2, "name"); + return (Criteria) this; + } + + public Criteria andNameNotBetween(String value1, String value2) { + addCriterion("name not between", value1, value2, "name"); + return (Criteria) this; + } + + public Criteria andCodeIsNull() { + addCriterion("code is null"); + return (Criteria) this; + } + + public Criteria andCodeIsNotNull() { + addCriterion("code is not null"); + return (Criteria) this; + } + + public Criteria andCodeEqualTo(String value) { + addCriterion("code =", value, "code"); + return (Criteria) this; + } + + public Criteria andCodeNotEqualTo(String value) { + addCriterion("code <>", value, "code"); + return (Criteria) this; + } + + public Criteria andCodeGreaterThan(String value) { + addCriterion("code >", value, "code"); + return (Criteria) this; + } + + public Criteria andCodeGreaterThanOrEqualTo(String value) { + addCriterion("code >=", value, "code"); + return (Criteria) this; + } + + public Criteria andCodeLessThan(String value) { + addCriterion("code <", value, "code"); + return (Criteria) this; + } + + public Criteria andCodeLessThanOrEqualTo(String value) { + addCriterion("code <=", value, "code"); + return (Criteria) this; + } + + public Criteria andCodeLike(String value) { + addCriterion("code like", value, "code"); + return (Criteria) this; + } + + public Criteria andCodeNotLike(String value) { + addCriterion("code not like", value, "code"); + return (Criteria) this; + } + + public Criteria andCodeIn(List values) { + addCriterion("code in", values, "code"); + return (Criteria) this; + } + + public Criteria andCodeNotIn(List values) { + addCriterion("code not in", values, "code"); + return (Criteria) this; + } + + public Criteria andCodeBetween(String value1, String value2) { + addCriterion("code between", value1, value2, "code"); + return (Criteria) this; + } + + public Criteria andCodeNotBetween(String value1, String value2) { + addCriterion("code not between", value1, value2, "code"); + return (Criteria) this; + } + + public Criteria andIntroIsNull() { + addCriterion("intro is null"); + return (Criteria) this; + } + + public Criteria andIntroIsNotNull() { + addCriterion("intro is not null"); + return (Criteria) this; + } + + public Criteria andIntroEqualTo(String value) { + addCriterion("intro =", value, "intro"); + return (Criteria) this; + } + + public Criteria andIntroNotEqualTo(String value) { + addCriterion("intro <>", value, "intro"); + return (Criteria) this; + } + + public Criteria andIntroGreaterThan(String value) { + addCriterion("intro >", value, "intro"); + return (Criteria) this; + } + + public Criteria andIntroGreaterThanOrEqualTo(String value) { + addCriterion("intro >=", value, "intro"); + return (Criteria) this; + } + + public Criteria andIntroLessThan(String value) { + addCriterion("intro <", value, "intro"); + return (Criteria) this; + } + + public Criteria andIntroLessThanOrEqualTo(String value) { + addCriterion("intro <=", value, "intro"); + return (Criteria) this; + } + + public Criteria andIntroLike(String value) { + addCriterion("intro like", value, "intro"); + return (Criteria) this; + } + + public Criteria andIntroNotLike(String value) { + addCriterion("intro not like", value, "intro"); + return (Criteria) this; + } + + public Criteria andIntroIn(List values) { + addCriterion("intro in", values, "intro"); + return (Criteria) this; + } + + public Criteria andIntroNotIn(List values) { + addCriterion("intro not in", values, "intro"); + return (Criteria) this; + } + + public Criteria andIntroBetween(String value1, String value2) { + addCriterion("intro between", value1, value2, "intro"); + return (Criteria) this; + } + + public Criteria andIntroNotBetween(String value1, String value2) { + addCriterion("intro not between", value1, value2, "intro"); + return (Criteria) this; + } + + public Criteria andUrlIsNull() { + addCriterion("url is null"); + return (Criteria) this; + } + + public Criteria andUrlIsNotNull() { + addCriterion("url is not null"); + return (Criteria) this; + } + + public Criteria andUrlEqualTo(String value) { + addCriterion("url =", value, "url"); + return (Criteria) this; + } + + public Criteria andUrlNotEqualTo(String value) { + addCriterion("url <>", value, "url"); + return (Criteria) this; + } + + public Criteria andUrlGreaterThan(String value) { + addCriterion("url >", value, "url"); + return (Criteria) this; + } + + public Criteria andUrlGreaterThanOrEqualTo(String value) { + addCriterion("url >=", value, "url"); + return (Criteria) this; + } + + public Criteria andUrlLessThan(String value) { + addCriterion("url <", value, "url"); + return (Criteria) this; + } + + public Criteria andUrlLessThanOrEqualTo(String value) { + addCriterion("url <=", value, "url"); + return (Criteria) this; + } + + public Criteria andUrlLike(String value) { + addCriterion("url like", value, "url"); + return (Criteria) this; + } + + public Criteria andUrlNotLike(String value) { + addCriterion("url not like", value, "url"); + return (Criteria) this; + } + + public Criteria andUrlIn(List values) { + addCriterion("url in", values, "url"); + return (Criteria) this; + } + + public Criteria andUrlNotIn(List values) { + addCriterion("url not in", values, "url"); + return (Criteria) this; + } + + public Criteria andUrlBetween(String value1, String value2) { + addCriterion("url between", value1, value2, "url"); + return (Criteria) this; + } + + public Criteria andUrlNotBetween(String value1, String value2) { + addCriterion("url not between", value1, value2, "url"); + return (Criteria) this; + } + + public Criteria andHostIsNull() { + addCriterion("host is null"); + return (Criteria) this; + } + + public Criteria andHostIsNotNull() { + addCriterion("host is not null"); + return (Criteria) this; + } + + public Criteria andHostEqualTo(String value) { + addCriterion("host =", value, "host"); + return (Criteria) this; + } + + public Criteria andHostNotEqualTo(String value) { + addCriterion("host <>", value, "host"); + return (Criteria) this; + } + + public Criteria andHostGreaterThan(String value) { + addCriterion("host >", value, "host"); + return (Criteria) this; + } + + public Criteria andHostGreaterThanOrEqualTo(String value) { + addCriterion("host >=", value, "host"); + return (Criteria) this; + } + + public Criteria andHostLessThan(String value) { + addCriterion("host <", value, "host"); + return (Criteria) this; + } + + public Criteria andHostLessThanOrEqualTo(String value) { + addCriterion("host <=", value, "host"); + return (Criteria) this; + } + + public Criteria andHostLike(String value) { + addCriterion("host like", value, "host"); + return (Criteria) this; + } + + public Criteria andHostNotLike(String value) { + addCriterion("host not like", value, "host"); + return (Criteria) this; + } + + public Criteria andHostIn(List values) { + addCriterion("host in", values, "host"); + return (Criteria) this; + } + + public Criteria andHostNotIn(List values) { + addCriterion("host not in", values, "host"); + return (Criteria) this; + } + + public Criteria andHostBetween(String value1, String value2) { + addCriterion("host between", value1, value2, "host"); + return (Criteria) this; + } + + public Criteria andHostNotBetween(String value1, String value2) { + addCriterion("host not between", value1, value2, "host"); + return (Criteria) this; + } + + public Criteria andSelfIsNull() { + addCriterion("self is null"); + return (Criteria) this; + } + + public Criteria andSelfIsNotNull() { + addCriterion("self is not null"); + return (Criteria) this; + } + + public Criteria andSelfEqualTo(Byte value) { + addCriterion("self =", value, "self"); + return (Criteria) this; + } + + public Criteria andSelfNotEqualTo(Byte value) { + addCriterion("self <>", value, "self"); + return (Criteria) this; + } + + public Criteria andSelfGreaterThan(Byte value) { + addCriterion("self >", value, "self"); + return (Criteria) this; + } + + public Criteria andSelfGreaterThanOrEqualTo(Byte value) { + addCriterion("self >=", value, "self"); + return (Criteria) this; + } + + public Criteria andSelfLessThan(Byte value) { + addCriterion("self <", value, "self"); + return (Criteria) this; + } + + public Criteria andSelfLessThanOrEqualTo(Byte value) { + addCriterion("self <=", value, "self"); + return (Criteria) this; + } + + public Criteria andSelfIn(List values) { + addCriterion("self in", values, "self"); + return (Criteria) this; + } + + public Criteria andSelfNotIn(List values) { + addCriterion("self not in", values, "self"); + return (Criteria) this; + } + + public Criteria andSelfBetween(Byte value1, Byte value2) { + addCriterion("self between", value1, value2, "self"); + return (Criteria) this; + } + + public Criteria andSelfNotBetween(Byte value1, Byte value2) { + addCriterion("self not between", value1, value2, "self"); + return (Criteria) this; + } + + public Criteria andPubIsNull() { + addCriterion("pub is null"); + return (Criteria) this; + } + + public Criteria andPubIsNotNull() { + addCriterion("pub is not null"); + return (Criteria) this; + } + + public Criteria andPubEqualTo(Byte value) { + addCriterion("pub =", value, "pub"); + return (Criteria) this; + } + + public Criteria andPubNotEqualTo(Byte value) { + addCriterion("pub <>", value, "pub"); + return (Criteria) this; + } + + public Criteria andPubGreaterThan(Byte value) { + addCriterion("pub >", value, "pub"); + return (Criteria) this; + } + + public Criteria andPubGreaterThanOrEqualTo(Byte value) { + addCriterion("pub >=", value, "pub"); + return (Criteria) this; + } + + public Criteria andPubLessThan(Byte value) { + addCriterion("pub <", value, "pub"); + return (Criteria) this; + } + + public Criteria andPubLessThanOrEqualTo(Byte value) { + addCriterion("pub <=", value, "pub"); + return (Criteria) this; + } + + public Criteria andPubIn(List values) { + addCriterion("pub in", values, "pub"); + return (Criteria) this; + } + + public Criteria andPubNotIn(List values) { + addCriterion("pub not in", values, "pub"); + return (Criteria) this; + } + + public Criteria andPubBetween(Byte value1, Byte value2) { + addCriterion("pub between", value1, value2, "pub"); + return (Criteria) this; + } + + public Criteria andPubNotBetween(Byte value1, Byte value2) { + addCriterion("pub not between", value1, value2, "pub"); + return (Criteria) this; + } + + public Criteria andPollingIsNull() { + addCriterion("polling is null"); + return (Criteria) this; + } + + public Criteria andPollingIsNotNull() { + addCriterion("polling is not null"); + return (Criteria) this; + } + + public Criteria andPollingEqualTo(Byte value) { + addCriterion("polling =", value, "polling"); + return (Criteria) this; + } + + public Criteria andPollingNotEqualTo(Byte value) { + addCriterion("polling <>", value, "polling"); + return (Criteria) this; + } + + public Criteria andPollingGreaterThan(Byte value) { + addCriterion("polling >", value, "polling"); + return (Criteria) this; + } + + public Criteria andPollingGreaterThanOrEqualTo(Byte value) { + addCriterion("polling >=", value, "polling"); + return (Criteria) this; + } + + public Criteria andPollingLessThan(Byte value) { + addCriterion("polling <", value, "polling"); + return (Criteria) this; + } + + public Criteria andPollingLessThanOrEqualTo(Byte value) { + addCriterion("polling <=", value, "polling"); + return (Criteria) this; + } + + public Criteria andPollingIn(List values) { + addCriterion("polling in", values, "polling"); + return (Criteria) this; + } + + public Criteria andPollingNotIn(List values) { + addCriterion("polling not in", values, "polling"); + return (Criteria) this; + } + + public Criteria andPollingBetween(Byte value1, Byte value2) { + addCriterion("polling between", value1, value2, "polling"); + return (Criteria) this; + } + + public Criteria andPollingNotBetween(Byte value1, Byte value2) { + addCriterion("polling not between", value1, value2, "polling"); + return (Criteria) this; + } + + public Criteria andAnswerIsNull() { + addCriterion("answer is null"); + return (Criteria) this; + } + + public Criteria andAnswerIsNotNull() { + addCriterion("answer is not null"); + return (Criteria) this; + } + + public Criteria andAnswerEqualTo(Byte value) { + addCriterion("answer =", value, "answer"); + return (Criteria) this; + } + + public Criteria andAnswerNotEqualTo(Byte value) { + addCriterion("answer <>", value, "answer"); + return (Criteria) this; + } + + public Criteria andAnswerGreaterThan(Byte value) { + addCriterion("answer >", value, "answer"); + return (Criteria) this; + } + + public Criteria andAnswerGreaterThanOrEqualTo(Byte value) { + addCriterion("answer >=", value, "answer"); + return (Criteria) this; + } + + public Criteria andAnswerLessThan(Byte value) { + addCriterion("answer <", value, "answer"); + return (Criteria) this; + } + + public Criteria andAnswerLessThanOrEqualTo(Byte value) { + addCriterion("answer <=", value, "answer"); + return (Criteria) this; + } + + public Criteria andAnswerIn(List values) { + addCriterion("answer in", values, "answer"); + return (Criteria) this; + } + + public Criteria andAnswerNotIn(List values) { + addCriterion("answer not in", values, "answer"); + return (Criteria) this; + } + + public Criteria andAnswerBetween(Byte value1, Byte value2) { + addCriterion("answer between", value1, value2, "answer"); + return (Criteria) this; + } + + public Criteria andAnswerNotBetween(Byte value1, Byte value2) { + addCriterion("answer not between", value1, value2, "answer"); + return (Criteria) this; + } + + public Criteria andLastUpdateTimeIsNull() { + addCriterion("last_update_time is null"); + return (Criteria) this; + } + + public Criteria andLastUpdateTimeIsNotNull() { + addCriterion("last_update_time is not null"); + return (Criteria) this; + } + + public Criteria andLastUpdateTimeEqualTo(Long value) { + addCriterion("last_update_time =", value, "lastUpdateTime"); + return (Criteria) this; + } + + public Criteria andLastUpdateTimeNotEqualTo(Long value) { + addCriterion("last_update_time <>", value, "lastUpdateTime"); + return (Criteria) this; + } + + public Criteria andLastUpdateTimeGreaterThan(Long value) { + addCriterion("last_update_time >", value, "lastUpdateTime"); + return (Criteria) this; + } + + public Criteria andLastUpdateTimeGreaterThanOrEqualTo(Long value) { + addCriterion("last_update_time >=", value, "lastUpdateTime"); + return (Criteria) this; + } + + public Criteria andLastUpdateTimeLessThan(Long value) { + addCriterion("last_update_time <", value, "lastUpdateTime"); + return (Criteria) this; + } + + public Criteria andLastUpdateTimeLessThanOrEqualTo(Long value) { + addCriterion("last_update_time <=", value, "lastUpdateTime"); + return (Criteria) this; + } + + public Criteria andLastUpdateTimeIn(List values) { + addCriterion("last_update_time in", values, "lastUpdateTime"); + return (Criteria) this; + } + + public Criteria andLastUpdateTimeNotIn(List values) { + addCriterion("last_update_time not in", values, "lastUpdateTime"); + return (Criteria) this; + } + + public Criteria andLastUpdateTimeBetween(Long value1, Long value2) { + addCriterion("last_update_time between", value1, value2, "lastUpdateTime"); + return (Criteria) this; + } + + public Criteria andLastUpdateTimeNotBetween(Long value1, Long value2) { + addCriterion("last_update_time not between", value1, value2, "lastUpdateTime"); + return (Criteria) this; + } + + public Criteria andLastAskTimeIsNull() { + addCriterion("last_ask_time is null"); + return (Criteria) this; + } + + public Criteria andLastAskTimeIsNotNull() { + addCriterion("last_ask_time is not null"); + return (Criteria) this; + } + + public Criteria andLastAskTimeEqualTo(Long value) { + addCriterion("last_ask_time =", value, "lastAskTime"); + return (Criteria) this; + } + + public Criteria andLastAskTimeNotEqualTo(Long value) { + addCriterion("last_ask_time <>", value, "lastAskTime"); + return (Criteria) this; + } + + public Criteria andLastAskTimeGreaterThan(Long value) { + addCriterion("last_ask_time >", value, "lastAskTime"); + return (Criteria) this; + } + + public Criteria andLastAskTimeGreaterThanOrEqualTo(Long value) { + addCriterion("last_ask_time >=", value, "lastAskTime"); + return (Criteria) this; + } + + public Criteria andLastAskTimeLessThan(Long value) { + addCriterion("last_ask_time <", value, "lastAskTime"); + return (Criteria) this; + } + + public Criteria andLastAskTimeLessThanOrEqualTo(Long value) { + addCriterion("last_ask_time <=", value, "lastAskTime"); + return (Criteria) this; + } + + public Criteria andLastAskTimeIn(List values) { + addCriterion("last_ask_time in", values, "lastAskTime"); + return (Criteria) this; + } + + public Criteria andLastAskTimeNotIn(List values) { + addCriterion("last_ask_time not in", values, "lastAskTime"); + return (Criteria) this; + } + + public Criteria andLastAskTimeBetween(Long value1, Long value2) { + addCriterion("last_ask_time between", value1, value2, "lastAskTime"); + return (Criteria) this; + } + + public Criteria andLastAskTimeNotBetween(Long value1, Long value2) { + addCriterion("last_ask_time not between", value1, value2, "lastAskTime"); + return (Criteria) this; + } + + public Criteria andLastAnswerTimeIsNull() { + addCriterion("last_answer_time is null"); + return (Criteria) this; + } + + public Criteria andLastAnswerTimeIsNotNull() { + addCriterion("last_answer_time is not null"); + return (Criteria) this; + } + + public Criteria andLastAnswerTimeEqualTo(Long value) { + addCriterion("last_answer_time =", value, "lastAnswerTime"); + return (Criteria) this; + } + + public Criteria andLastAnswerTimeNotEqualTo(Long value) { + addCriterion("last_answer_time <>", value, "lastAnswerTime"); + return (Criteria) this; + } + + public Criteria andLastAnswerTimeGreaterThan(Long value) { + addCriterion("last_answer_time >", value, "lastAnswerTime"); + return (Criteria) this; + } + + public Criteria andLastAnswerTimeGreaterThanOrEqualTo(Long value) { + addCriterion("last_answer_time >=", value, "lastAnswerTime"); + return (Criteria) this; + } + + public Criteria andLastAnswerTimeLessThan(Long value) { + addCriterion("last_answer_time <", value, "lastAnswerTime"); + return (Criteria) this; + } + + public Criteria andLastAnswerTimeLessThanOrEqualTo(Long value) { + addCriterion("last_answer_time <=", value, "lastAnswerTime"); + return (Criteria) this; + } + + public Criteria andLastAnswerTimeIn(List values) { + addCriterion("last_answer_time in", values, "lastAnswerTime"); + return (Criteria) this; + } + + public Criteria andLastAnswerTimeNotIn(List values) { + addCriterion("last_answer_time not in", values, "lastAnswerTime"); + return (Criteria) this; + } + + public Criteria andLastAnswerTimeBetween(Long value1, Long value2) { + addCriterion("last_answer_time between", value1, value2, "lastAnswerTime"); + return (Criteria) this; + } + + public Criteria andLastAnswerTimeNotBetween(Long value1, Long value2) { + addCriterion("last_answer_time not between", value1, value2, "lastAnswerTime"); + return (Criteria) this; + } + + public Criteria andPublicKeyIsNull() { + addCriterion("public_key is null"); + return (Criteria) this; + } + + public Criteria andPublicKeyIsNotNull() { + addCriterion("public_key is not null"); + return (Criteria) this; + } + + public Criteria andPublicKeyEqualTo(String value) { + addCriterion("public_key =", value, "publicKey"); + return (Criteria) this; + } + + public Criteria andPublicKeyNotEqualTo(String value) { + addCriterion("public_key <>", value, "publicKey"); + return (Criteria) this; + } + + public Criteria andPublicKeyGreaterThan(String value) { + addCriterion("public_key >", value, "publicKey"); + return (Criteria) this; + } + + public Criteria andPublicKeyGreaterThanOrEqualTo(String value) { + addCriterion("public_key >=", value, "publicKey"); + return (Criteria) this; + } + + public Criteria andPublicKeyLessThan(String value) { + addCriterion("public_key <", value, "publicKey"); + return (Criteria) this; + } + + public Criteria andPublicKeyLessThanOrEqualTo(String value) { + addCriterion("public_key <=", value, "publicKey"); + return (Criteria) this; + } + + public Criteria andPublicKeyLike(String value) { + addCriterion("public_key like", value, "publicKey"); + return (Criteria) this; + } + + public Criteria andPublicKeyNotLike(String value) { + addCriterion("public_key not like", value, "publicKey"); + return (Criteria) this; + } + + public Criteria andPublicKeyIn(List values) { + addCriterion("public_key in", values, "publicKey"); + return (Criteria) this; + } + + public Criteria andPublicKeyNotIn(List values) { + addCriterion("public_key not in", values, "publicKey"); + return (Criteria) this; + } + + public Criteria andPublicKeyBetween(String value1, String value2) { + addCriterion("public_key between", value1, value2, "publicKey"); + return (Criteria) this; + } + + public Criteria andPublicKeyNotBetween(String value1, String value2) { + addCriterion("public_key not between", value1, value2, "publicKey"); + return (Criteria) this; + } + + public Criteria andPrivateKeyIsNull() { + addCriterion("private_key is null"); + return (Criteria) this; + } + + public Criteria andPrivateKeyIsNotNull() { + addCriterion("private_key is not null"); + return (Criteria) this; + } + + public Criteria andPrivateKeyEqualTo(String value) { + addCriterion("private_key =", value, "privateKey"); + return (Criteria) this; + } + + public Criteria andPrivateKeyNotEqualTo(String value) { + addCriterion("private_key <>", value, "privateKey"); + return (Criteria) this; + } + + public Criteria andPrivateKeyGreaterThan(String value) { + addCriterion("private_key >", value, "privateKey"); + return (Criteria) this; + } + + public Criteria andPrivateKeyGreaterThanOrEqualTo(String value) { + addCriterion("private_key >=", value, "privateKey"); + return (Criteria) this; + } + + public Criteria andPrivateKeyLessThan(String value) { + addCriterion("private_key <", value, "privateKey"); + return (Criteria) this; + } + + public Criteria andPrivateKeyLessThanOrEqualTo(String value) { + addCriterion("private_key <=", value, "privateKey"); + return (Criteria) this; + } + + public Criteria andPrivateKeyLike(String value) { + addCriterion("private_key like", value, "privateKey"); + return (Criteria) this; + } + + public Criteria andPrivateKeyNotLike(String value) { + addCriterion("private_key not like", value, "privateKey"); + return (Criteria) this; + } + + public Criteria andPrivateKeyIn(List values) { + addCriterion("private_key in", values, "privateKey"); + return (Criteria) this; + } + + public Criteria andPrivateKeyNotIn(List values) { + addCriterion("private_key not in", values, "privateKey"); + return (Criteria) this; + } + + public Criteria andPrivateKeyBetween(String value1, String value2) { + addCriterion("private_key between", value1, value2, "privateKey"); + return (Criteria) this; + } + + public Criteria andPrivateKeyNotBetween(String value1, String value2) { + addCriterion("private_key not between", value1, value2, "privateKey"); + return (Criteria) this; + } + + public Criteria andOperatorIsNull() { + addCriterion("operator is null"); + return (Criteria) this; + } + + public Criteria andOperatorIsNotNull() { + addCriterion("operator is not null"); + return (Criteria) this; + } + + public Criteria andOperatorEqualTo(Long value) { + addCriterion("operator =", value, "operator"); + return (Criteria) this; + } + + public Criteria andOperatorNotEqualTo(Long value) { + addCriterion("operator <>", value, "operator"); + return (Criteria) this; + } + + public Criteria andOperatorGreaterThan(Long value) { + addCriterion("operator >", value, "operator"); + return (Criteria) this; + } + + public Criteria andOperatorGreaterThanOrEqualTo(Long value) { + addCriterion("operator >=", value, "operator"); + return (Criteria) this; + } + + public Criteria andOperatorLessThan(Long value) { + addCriterion("operator <", value, "operator"); + return (Criteria) this; + } + + public Criteria andOperatorLessThanOrEqualTo(Long value) { + addCriterion("operator <=", value, "operator"); + return (Criteria) this; + } + + public Criteria andOperatorIn(List values) { + addCriterion("operator in", values, "operator"); + return (Criteria) this; + } + + public Criteria andOperatorNotIn(List values) { + addCriterion("operator not in", values, "operator"); + return (Criteria) this; + } + + public Criteria andOperatorBetween(Long value1, Long value2) { + addCriterion("operator between", value1, value2, "operator"); + return (Criteria) this; + } + + public Criteria andOperatorNotBetween(Long value1, Long value2) { + addCriterion("operator not between", value1, value2, "operator"); + return (Criteria) this; + } + + public Criteria andCreatedAtIsNull() { + addCriterion("created_at is null"); + return (Criteria) this; + } + + public Criteria andCreatedAtIsNotNull() { + addCriterion("created_at is not null"); + return (Criteria) this; + } + + public Criteria andCreatedAtEqualTo(Date value) { + addCriterion("created_at =", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtNotEqualTo(Date value) { + addCriterion("created_at <>", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtGreaterThan(Date value) { + addCriterion("created_at >", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtGreaterThanOrEqualTo(Date value) { + addCriterion("created_at >=", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtLessThan(Date value) { + addCriterion("created_at <", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtLessThanOrEqualTo(Date value) { + addCriterion("created_at <=", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtIn(List values) { + addCriterion("created_at in", values, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtNotIn(List values) { + addCriterion("created_at not in", values, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtBetween(Date value1, Date value2) { + addCriterion("created_at between", value1, value2, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtNotBetween(Date value1, Date value2) { + addCriterion("created_at not between", value1, value2, "createdAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtIsNull() { + addCriterion("updated_at is null"); + return (Criteria) this; + } + + public Criteria andUpdatedAtIsNotNull() { + addCriterion("updated_at is not null"); + return (Criteria) this; + } + + public Criteria andUpdatedAtEqualTo(Date value) { + addCriterion("updated_at =", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtNotEqualTo(Date value) { + addCriterion("updated_at <>", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtGreaterThan(Date value) { + addCriterion("updated_at >", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtGreaterThanOrEqualTo(Date value) { + addCriterion("updated_at >=", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtLessThan(Date value) { + addCriterion("updated_at <", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtLessThanOrEqualTo(Date value) { + addCriterion("updated_at <=", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtIn(List values) { + addCriterion("updated_at in", values, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtNotIn(List values) { + addCriterion("updated_at not in", values, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtBetween(Date value1, Date value2) { + addCriterion("updated_at between", value1, value2, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtNotBetween(Date value1, Date value2) { + addCriterion("updated_at not between", value1, value2, "updatedAt"); + return (Criteria) this; + } + + public Criteria andRecStatusIsNull() { + addCriterion("rec_status is null"); + return (Criteria) this; + } + + public Criteria andRecStatusIsNotNull() { + addCriterion("rec_status is not null"); + return (Criteria) this; + } + + public Criteria andRecStatusEqualTo(Byte value) { + addCriterion("rec_status =", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusNotEqualTo(Byte value) { + addCriterion("rec_status <>", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusGreaterThan(Byte value) { + addCriterion("rec_status >", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusGreaterThanOrEqualTo(Byte value) { + addCriterion("rec_status >=", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusLessThan(Byte value) { + addCriterion("rec_status <", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusLessThanOrEqualTo(Byte value) { + addCriterion("rec_status <=", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusIn(List values) { + addCriterion("rec_status in", values, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusNotIn(List values) { + addCriterion("rec_status not in", values, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusBetween(Byte value1, Byte value2) { + addCriterion("rec_status between", value1, value2, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusNotBetween(Byte value1, Byte value2) { + addCriterion("rec_status not between", value1, value2, "recStatus"); + return (Criteria) this; + } + } + + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file diff --git a/ptos_tall/src/main/java/com/ccsens/ptos_tall/bean/po/SysAuth.java b/ptos_tall/src/main/java/com/ccsens/ptos_tall/bean/po/SysAuth.java new file mode 100644 index 0000000..eed8667 --- /dev/null +++ b/ptos_tall/src/main/java/com/ccsens/ptos_tall/bean/po/SysAuth.java @@ -0,0 +1,128 @@ +package com.ccsens.ptos_tall.bean.po; + +import java.io.Serializable; +import java.util.Date; + +public class SysAuth implements Serializable { + private Long id; + + private Long userId; + + private Byte identifyType; + + private String identifier; + + private String credential; + + private String salt; + + private Long operator; + + private Date createdAt; + + private Date updatedAt; + + private Byte recStatus; + + private static final long serialVersionUID = 1L; + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public Long getUserId() { + return userId; + } + + public void setUserId(Long userId) { + this.userId = userId; + } + + public Byte getIdentifyType() { + return identifyType; + } + + public void setIdentifyType(Byte identifyType) { + this.identifyType = identifyType; + } + + public String getIdentifier() { + return identifier; + } + + public void setIdentifier(String identifier) { + this.identifier = identifier == null ? null : identifier.trim(); + } + + public String getCredential() { + return credential; + } + + public void setCredential(String credential) { + this.credential = credential == null ? null : credential.trim(); + } + + public String getSalt() { + return salt; + } + + public void setSalt(String salt) { + this.salt = salt == null ? null : salt.trim(); + } + + public Long getOperator() { + return operator; + } + + public void setOperator(Long operator) { + this.operator = operator; + } + + public Date getCreatedAt() { + return createdAt; + } + + public void setCreatedAt(Date createdAt) { + this.createdAt = createdAt; + } + + public Date getUpdatedAt() { + return updatedAt; + } + + public void setUpdatedAt(Date updatedAt) { + this.updatedAt = updatedAt; + } + + public Byte getRecStatus() { + return recStatus; + } + + public void setRecStatus(Byte recStatus) { + this.recStatus = recStatus; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", id=").append(id); + sb.append(", userId=").append(userId); + sb.append(", identifyType=").append(identifyType); + sb.append(", identifier=").append(identifier); + sb.append(", credential=").append(credential); + sb.append(", salt=").append(salt); + sb.append(", operator=").append(operator); + sb.append(", createdAt=").append(createdAt); + sb.append(", updatedAt=").append(updatedAt); + sb.append(", recStatus=").append(recStatus); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/ptos_tall/src/main/java/com/ccsens/ptos_tall/bean/po/SysAuthExample.java b/ptos_tall/src/main/java/com/ccsens/ptos_tall/bean/po/SysAuthExample.java new file mode 100644 index 0000000..b4fd69b --- /dev/null +++ b/ptos_tall/src/main/java/com/ccsens/ptos_tall/bean/po/SysAuthExample.java @@ -0,0 +1,831 @@ +package com.ccsens.ptos_tall.bean.po; + +import java.util.ArrayList; +import java.util.Date; +import java.util.List; + +public class SysAuthExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + public SysAuthExample() { + oredCriteria = new ArrayList(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("id is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("id is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(Long value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(Long value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(Long value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(Long value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(Long value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(Long value) { + addCriterion("id <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("id not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(Long value1, Long value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(Long value1, Long value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andUserIdIsNull() { + addCriterion("user_id is null"); + return (Criteria) this; + } + + public Criteria andUserIdIsNotNull() { + addCriterion("user_id is not null"); + return (Criteria) this; + } + + public Criteria andUserIdEqualTo(Long value) { + addCriterion("user_id =", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdNotEqualTo(Long value) { + addCriterion("user_id <>", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdGreaterThan(Long value) { + addCriterion("user_id >", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdGreaterThanOrEqualTo(Long value) { + addCriterion("user_id >=", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdLessThan(Long value) { + addCriterion("user_id <", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdLessThanOrEqualTo(Long value) { + addCriterion("user_id <=", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdIn(List values) { + addCriterion("user_id in", values, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdNotIn(List values) { + addCriterion("user_id not in", values, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdBetween(Long value1, Long value2) { + addCriterion("user_id between", value1, value2, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdNotBetween(Long value1, Long value2) { + addCriterion("user_id not between", value1, value2, "userId"); + return (Criteria) this; + } + + public Criteria andIdentifyTypeIsNull() { + addCriterion("identify_type is null"); + return (Criteria) this; + } + + public Criteria andIdentifyTypeIsNotNull() { + addCriterion("identify_type is not null"); + return (Criteria) this; + } + + public Criteria andIdentifyTypeEqualTo(Byte value) { + addCriterion("identify_type =", value, "identifyType"); + return (Criteria) this; + } + + public Criteria andIdentifyTypeNotEqualTo(Byte value) { + addCriterion("identify_type <>", value, "identifyType"); + return (Criteria) this; + } + + public Criteria andIdentifyTypeGreaterThan(Byte value) { + addCriterion("identify_type >", value, "identifyType"); + return (Criteria) this; + } + + public Criteria andIdentifyTypeGreaterThanOrEqualTo(Byte value) { + addCriterion("identify_type >=", value, "identifyType"); + return (Criteria) this; + } + + public Criteria andIdentifyTypeLessThan(Byte value) { + addCriterion("identify_type <", value, "identifyType"); + return (Criteria) this; + } + + public Criteria andIdentifyTypeLessThanOrEqualTo(Byte value) { + addCriterion("identify_type <=", value, "identifyType"); + return (Criteria) this; + } + + public Criteria andIdentifyTypeIn(List values) { + addCriterion("identify_type in", values, "identifyType"); + return (Criteria) this; + } + + public Criteria andIdentifyTypeNotIn(List values) { + addCriterion("identify_type not in", values, "identifyType"); + return (Criteria) this; + } + + public Criteria andIdentifyTypeBetween(Byte value1, Byte value2) { + addCriterion("identify_type between", value1, value2, "identifyType"); + return (Criteria) this; + } + + public Criteria andIdentifyTypeNotBetween(Byte value1, Byte value2) { + addCriterion("identify_type not between", value1, value2, "identifyType"); + return (Criteria) this; + } + + public Criteria andIdentifierIsNull() { + addCriterion("identifier is null"); + return (Criteria) this; + } + + public Criteria andIdentifierIsNotNull() { + addCriterion("identifier is not null"); + return (Criteria) this; + } + + public Criteria andIdentifierEqualTo(String value) { + addCriterion("identifier =", value, "identifier"); + return (Criteria) this; + } + + public Criteria andIdentifierNotEqualTo(String value) { + addCriterion("identifier <>", value, "identifier"); + return (Criteria) this; + } + + public Criteria andIdentifierGreaterThan(String value) { + addCriterion("identifier >", value, "identifier"); + return (Criteria) this; + } + + public Criteria andIdentifierGreaterThanOrEqualTo(String value) { + addCriterion("identifier >=", value, "identifier"); + return (Criteria) this; + } + + public Criteria andIdentifierLessThan(String value) { + addCriterion("identifier <", value, "identifier"); + return (Criteria) this; + } + + public Criteria andIdentifierLessThanOrEqualTo(String value) { + addCriterion("identifier <=", value, "identifier"); + return (Criteria) this; + } + + public Criteria andIdentifierLike(String value) { + addCriterion("identifier like", value, "identifier"); + return (Criteria) this; + } + + public Criteria andIdentifierNotLike(String value) { + addCriterion("identifier not like", value, "identifier"); + return (Criteria) this; + } + + public Criteria andIdentifierIn(List values) { + addCriterion("identifier in", values, "identifier"); + return (Criteria) this; + } + + public Criteria andIdentifierNotIn(List values) { + addCriterion("identifier not in", values, "identifier"); + return (Criteria) this; + } + + public Criteria andIdentifierBetween(String value1, String value2) { + addCriterion("identifier between", value1, value2, "identifier"); + return (Criteria) this; + } + + public Criteria andIdentifierNotBetween(String value1, String value2) { + addCriterion("identifier not between", value1, value2, "identifier"); + return (Criteria) this; + } + + public Criteria andCredentialIsNull() { + addCriterion("credential is null"); + return (Criteria) this; + } + + public Criteria andCredentialIsNotNull() { + addCriterion("credential is not null"); + return (Criteria) this; + } + + public Criteria andCredentialEqualTo(String value) { + addCriterion("credential =", value, "credential"); + return (Criteria) this; + } + + public Criteria andCredentialNotEqualTo(String value) { + addCriterion("credential <>", value, "credential"); + return (Criteria) this; + } + + public Criteria andCredentialGreaterThan(String value) { + addCriterion("credential >", value, "credential"); + return (Criteria) this; + } + + public Criteria andCredentialGreaterThanOrEqualTo(String value) { + addCriterion("credential >=", value, "credential"); + return (Criteria) this; + } + + public Criteria andCredentialLessThan(String value) { + addCriterion("credential <", value, "credential"); + return (Criteria) this; + } + + public Criteria andCredentialLessThanOrEqualTo(String value) { + addCriterion("credential <=", value, "credential"); + return (Criteria) this; + } + + public Criteria andCredentialLike(String value) { + addCriterion("credential like", value, "credential"); + return (Criteria) this; + } + + public Criteria andCredentialNotLike(String value) { + addCriterion("credential not like", value, "credential"); + return (Criteria) this; + } + + public Criteria andCredentialIn(List values) { + addCriterion("credential in", values, "credential"); + return (Criteria) this; + } + + public Criteria andCredentialNotIn(List values) { + addCriterion("credential not in", values, "credential"); + return (Criteria) this; + } + + public Criteria andCredentialBetween(String value1, String value2) { + addCriterion("credential between", value1, value2, "credential"); + return (Criteria) this; + } + + public Criteria andCredentialNotBetween(String value1, String value2) { + addCriterion("credential not between", value1, value2, "credential"); + return (Criteria) this; + } + + public Criteria andSaltIsNull() { + addCriterion("salt is null"); + return (Criteria) this; + } + + public Criteria andSaltIsNotNull() { + addCriterion("salt is not null"); + return (Criteria) this; + } + + public Criteria andSaltEqualTo(String value) { + addCriterion("salt =", value, "salt"); + return (Criteria) this; + } + + public Criteria andSaltNotEqualTo(String value) { + addCriterion("salt <>", value, "salt"); + return (Criteria) this; + } + + public Criteria andSaltGreaterThan(String value) { + addCriterion("salt >", value, "salt"); + return (Criteria) this; + } + + public Criteria andSaltGreaterThanOrEqualTo(String value) { + addCriterion("salt >=", value, "salt"); + return (Criteria) this; + } + + public Criteria andSaltLessThan(String value) { + addCriterion("salt <", value, "salt"); + return (Criteria) this; + } + + public Criteria andSaltLessThanOrEqualTo(String value) { + addCriterion("salt <=", value, "salt"); + return (Criteria) this; + } + + public Criteria andSaltLike(String value) { + addCriterion("salt like", value, "salt"); + return (Criteria) this; + } + + public Criteria andSaltNotLike(String value) { + addCriterion("salt not like", value, "salt"); + return (Criteria) this; + } + + public Criteria andSaltIn(List values) { + addCriterion("salt in", values, "salt"); + return (Criteria) this; + } + + public Criteria andSaltNotIn(List values) { + addCriterion("salt not in", values, "salt"); + return (Criteria) this; + } + + public Criteria andSaltBetween(String value1, String value2) { + addCriterion("salt between", value1, value2, "salt"); + return (Criteria) this; + } + + public Criteria andSaltNotBetween(String value1, String value2) { + addCriterion("salt not between", value1, value2, "salt"); + return (Criteria) this; + } + + public Criteria andOperatorIsNull() { + addCriterion("operator is null"); + return (Criteria) this; + } + + public Criteria andOperatorIsNotNull() { + addCriterion("operator is not null"); + return (Criteria) this; + } + + public Criteria andOperatorEqualTo(Long value) { + addCriterion("operator =", value, "operator"); + return (Criteria) this; + } + + public Criteria andOperatorNotEqualTo(Long value) { + addCriterion("operator <>", value, "operator"); + return (Criteria) this; + } + + public Criteria andOperatorGreaterThan(Long value) { + addCriterion("operator >", value, "operator"); + return (Criteria) this; + } + + public Criteria andOperatorGreaterThanOrEqualTo(Long value) { + addCriterion("operator >=", value, "operator"); + return (Criteria) this; + } + + public Criteria andOperatorLessThan(Long value) { + addCriterion("operator <", value, "operator"); + return (Criteria) this; + } + + public Criteria andOperatorLessThanOrEqualTo(Long value) { + addCriterion("operator <=", value, "operator"); + return (Criteria) this; + } + + public Criteria andOperatorIn(List values) { + addCriterion("operator in", values, "operator"); + return (Criteria) this; + } + + public Criteria andOperatorNotIn(List values) { + addCriterion("operator not in", values, "operator"); + return (Criteria) this; + } + + public Criteria andOperatorBetween(Long value1, Long value2) { + addCriterion("operator between", value1, value2, "operator"); + return (Criteria) this; + } + + public Criteria andOperatorNotBetween(Long value1, Long value2) { + addCriterion("operator not between", value1, value2, "operator"); + return (Criteria) this; + } + + public Criteria andCreatedAtIsNull() { + addCriterion("created_at is null"); + return (Criteria) this; + } + + public Criteria andCreatedAtIsNotNull() { + addCriterion("created_at is not null"); + return (Criteria) this; + } + + public Criteria andCreatedAtEqualTo(Date value) { + addCriterion("created_at =", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtNotEqualTo(Date value) { + addCriterion("created_at <>", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtGreaterThan(Date value) { + addCriterion("created_at >", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtGreaterThanOrEqualTo(Date value) { + addCriterion("created_at >=", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtLessThan(Date value) { + addCriterion("created_at <", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtLessThanOrEqualTo(Date value) { + addCriterion("created_at <=", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtIn(List values) { + addCriterion("created_at in", values, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtNotIn(List values) { + addCriterion("created_at not in", values, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtBetween(Date value1, Date value2) { + addCriterion("created_at between", value1, value2, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtNotBetween(Date value1, Date value2) { + addCriterion("created_at not between", value1, value2, "createdAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtIsNull() { + addCriterion("updated_at is null"); + return (Criteria) this; + } + + public Criteria andUpdatedAtIsNotNull() { + addCriterion("updated_at is not null"); + return (Criteria) this; + } + + public Criteria andUpdatedAtEqualTo(Date value) { + addCriterion("updated_at =", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtNotEqualTo(Date value) { + addCriterion("updated_at <>", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtGreaterThan(Date value) { + addCriterion("updated_at >", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtGreaterThanOrEqualTo(Date value) { + addCriterion("updated_at >=", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtLessThan(Date value) { + addCriterion("updated_at <", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtLessThanOrEqualTo(Date value) { + addCriterion("updated_at <=", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtIn(List values) { + addCriterion("updated_at in", values, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtNotIn(List values) { + addCriterion("updated_at not in", values, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtBetween(Date value1, Date value2) { + addCriterion("updated_at between", value1, value2, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtNotBetween(Date value1, Date value2) { + addCriterion("updated_at not between", value1, value2, "updatedAt"); + return (Criteria) this; + } + + public Criteria andRecStatusIsNull() { + addCriterion("rec_status is null"); + return (Criteria) this; + } + + public Criteria andRecStatusIsNotNull() { + addCriterion("rec_status is not null"); + return (Criteria) this; + } + + public Criteria andRecStatusEqualTo(Byte value) { + addCriterion("rec_status =", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusNotEqualTo(Byte value) { + addCriterion("rec_status <>", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusGreaterThan(Byte value) { + addCriterion("rec_status >", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusGreaterThanOrEqualTo(Byte value) { + addCriterion("rec_status >=", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusLessThan(Byte value) { + addCriterion("rec_status <", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusLessThanOrEqualTo(Byte value) { + addCriterion("rec_status <=", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusIn(List values) { + addCriterion("rec_status in", values, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusNotIn(List values) { + addCriterion("rec_status not in", values, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusBetween(Byte value1, Byte value2) { + addCriterion("rec_status between", value1, value2, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusNotBetween(Byte value1, Byte value2) { + addCriterion("rec_status not between", value1, value2, "recStatus"); + return (Criteria) this; + } + } + + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file diff --git a/ptos_tall/src/main/java/com/ccsens/ptos_tall/bean/po/SysSigninLog.java b/ptos_tall/src/main/java/com/ccsens/ptos_tall/bean/po/SysSigninLog.java new file mode 100644 index 0000000..cfb7743 --- /dev/null +++ b/ptos_tall/src/main/java/com/ccsens/ptos_tall/bean/po/SysSigninLog.java @@ -0,0 +1,139 @@ +package com.ccsens.ptos_tall.bean.po; + +import java.io.Serializable; +import java.util.Date; + +public class SysSigninLog implements Serializable { + private Long id; + + private Long userId; + + private Long authId; + + private Long time; + + private String deviceId; + + private Byte clientType; + + private String ipAddress; + + private Long operator; + + private Date createdAt; + + private Date updatedAt; + + private Byte recStatus; + + private static final long serialVersionUID = 1L; + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public Long getUserId() { + return userId; + } + + public void setUserId(Long userId) { + this.userId = userId; + } + + public Long getAuthId() { + return authId; + } + + public void setAuthId(Long authId) { + this.authId = authId; + } + + public Long getTime() { + return time; + } + + public void setTime(Long time) { + this.time = time; + } + + public String getDeviceId() { + return deviceId; + } + + public void setDeviceId(String deviceId) { + this.deviceId = deviceId == null ? null : deviceId.trim(); + } + + public Byte getClientType() { + return clientType; + } + + public void setClientType(Byte clientType) { + this.clientType = clientType; + } + + public String getIpAddress() { + return ipAddress; + } + + public void setIpAddress(String ipAddress) { + this.ipAddress = ipAddress == null ? null : ipAddress.trim(); + } + + public Long getOperator() { + return operator; + } + + public void setOperator(Long operator) { + this.operator = operator; + } + + public Date getCreatedAt() { + return createdAt; + } + + public void setCreatedAt(Date createdAt) { + this.createdAt = createdAt; + } + + public Date getUpdatedAt() { + return updatedAt; + } + + public void setUpdatedAt(Date updatedAt) { + this.updatedAt = updatedAt; + } + + public Byte getRecStatus() { + return recStatus; + } + + public void setRecStatus(Byte recStatus) { + this.recStatus = recStatus; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", id=").append(id); + sb.append(", userId=").append(userId); + sb.append(", authId=").append(authId); + sb.append(", time=").append(time); + sb.append(", deviceId=").append(deviceId); + sb.append(", clientType=").append(clientType); + sb.append(", ipAddress=").append(ipAddress); + sb.append(", operator=").append(operator); + sb.append(", createdAt=").append(createdAt); + sb.append(", updatedAt=").append(updatedAt); + sb.append(", recStatus=").append(recStatus); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/ptos_tall/src/main/java/com/ccsens/ptos_tall/bean/po/SysSigninLogExample.java b/ptos_tall/src/main/java/com/ccsens/ptos_tall/bean/po/SysSigninLogExample.java new file mode 100644 index 0000000..c989497 --- /dev/null +++ b/ptos_tall/src/main/java/com/ccsens/ptos_tall/bean/po/SysSigninLogExample.java @@ -0,0 +1,881 @@ +package com.ccsens.ptos_tall.bean.po; + +import java.util.ArrayList; +import java.util.Date; +import java.util.List; + +public class SysSigninLogExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + public SysSigninLogExample() { + oredCriteria = new ArrayList(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("id is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("id is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(Long value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(Long value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(Long value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(Long value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(Long value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(Long value) { + addCriterion("id <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("id not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(Long value1, Long value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(Long value1, Long value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andUserIdIsNull() { + addCriterion("user_id is null"); + return (Criteria) this; + } + + public Criteria andUserIdIsNotNull() { + addCriterion("user_id is not null"); + return (Criteria) this; + } + + public Criteria andUserIdEqualTo(Long value) { + addCriterion("user_id =", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdNotEqualTo(Long value) { + addCriterion("user_id <>", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdGreaterThan(Long value) { + addCriterion("user_id >", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdGreaterThanOrEqualTo(Long value) { + addCriterion("user_id >=", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdLessThan(Long value) { + addCriterion("user_id <", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdLessThanOrEqualTo(Long value) { + addCriterion("user_id <=", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdIn(List values) { + addCriterion("user_id in", values, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdNotIn(List values) { + addCriterion("user_id not in", values, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdBetween(Long value1, Long value2) { + addCriterion("user_id between", value1, value2, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdNotBetween(Long value1, Long value2) { + addCriterion("user_id not between", value1, value2, "userId"); + return (Criteria) this; + } + + public Criteria andAuthIdIsNull() { + addCriterion("auth_id is null"); + return (Criteria) this; + } + + public Criteria andAuthIdIsNotNull() { + addCriterion("auth_id is not null"); + return (Criteria) this; + } + + public Criteria andAuthIdEqualTo(Long value) { + addCriterion("auth_id =", value, "authId"); + return (Criteria) this; + } + + public Criteria andAuthIdNotEqualTo(Long value) { + addCriterion("auth_id <>", value, "authId"); + return (Criteria) this; + } + + public Criteria andAuthIdGreaterThan(Long value) { + addCriterion("auth_id >", value, "authId"); + return (Criteria) this; + } + + public Criteria andAuthIdGreaterThanOrEqualTo(Long value) { + addCriterion("auth_id >=", value, "authId"); + return (Criteria) this; + } + + public Criteria andAuthIdLessThan(Long value) { + addCriterion("auth_id <", value, "authId"); + return (Criteria) this; + } + + public Criteria andAuthIdLessThanOrEqualTo(Long value) { + addCriterion("auth_id <=", value, "authId"); + return (Criteria) this; + } + + public Criteria andAuthIdIn(List values) { + addCriterion("auth_id in", values, "authId"); + return (Criteria) this; + } + + public Criteria andAuthIdNotIn(List values) { + addCriterion("auth_id not in", values, "authId"); + return (Criteria) this; + } + + public Criteria andAuthIdBetween(Long value1, Long value2) { + addCriterion("auth_id between", value1, value2, "authId"); + return (Criteria) this; + } + + public Criteria andAuthIdNotBetween(Long value1, Long value2) { + addCriterion("auth_id not between", value1, value2, "authId"); + return (Criteria) this; + } + + public Criteria andTimeIsNull() { + addCriterion("time is null"); + return (Criteria) this; + } + + public Criteria andTimeIsNotNull() { + addCriterion("time is not null"); + return (Criteria) this; + } + + public Criteria andTimeEqualTo(Long value) { + addCriterion("time =", value, "time"); + return (Criteria) this; + } + + public Criteria andTimeNotEqualTo(Long value) { + addCriterion("time <>", value, "time"); + return (Criteria) this; + } + + public Criteria andTimeGreaterThan(Long value) { + addCriterion("time >", value, "time"); + return (Criteria) this; + } + + public Criteria andTimeGreaterThanOrEqualTo(Long value) { + addCriterion("time >=", value, "time"); + return (Criteria) this; + } + + public Criteria andTimeLessThan(Long value) { + addCriterion("time <", value, "time"); + return (Criteria) this; + } + + public Criteria andTimeLessThanOrEqualTo(Long value) { + addCriterion("time <=", value, "time"); + return (Criteria) this; + } + + public Criteria andTimeIn(List values) { + addCriterion("time in", values, "time"); + return (Criteria) this; + } + + public Criteria andTimeNotIn(List values) { + addCriterion("time not in", values, "time"); + return (Criteria) this; + } + + public Criteria andTimeBetween(Long value1, Long value2) { + addCriterion("time between", value1, value2, "time"); + return (Criteria) this; + } + + public Criteria andTimeNotBetween(Long value1, Long value2) { + addCriterion("time not between", value1, value2, "time"); + return (Criteria) this; + } + + public Criteria andDeviceIdIsNull() { + addCriterion("device_id is null"); + return (Criteria) this; + } + + public Criteria andDeviceIdIsNotNull() { + addCriterion("device_id is not null"); + return (Criteria) this; + } + + public Criteria andDeviceIdEqualTo(String value) { + addCriterion("device_id =", value, "deviceId"); + return (Criteria) this; + } + + public Criteria andDeviceIdNotEqualTo(String value) { + addCriterion("device_id <>", value, "deviceId"); + return (Criteria) this; + } + + public Criteria andDeviceIdGreaterThan(String value) { + addCriterion("device_id >", value, "deviceId"); + return (Criteria) this; + } + + public Criteria andDeviceIdGreaterThanOrEqualTo(String value) { + addCriterion("device_id >=", value, "deviceId"); + return (Criteria) this; + } + + public Criteria andDeviceIdLessThan(String value) { + addCriterion("device_id <", value, "deviceId"); + return (Criteria) this; + } + + public Criteria andDeviceIdLessThanOrEqualTo(String value) { + addCriterion("device_id <=", value, "deviceId"); + return (Criteria) this; + } + + public Criteria andDeviceIdLike(String value) { + addCriterion("device_id like", value, "deviceId"); + return (Criteria) this; + } + + public Criteria andDeviceIdNotLike(String value) { + addCriterion("device_id not like", value, "deviceId"); + return (Criteria) this; + } + + public Criteria andDeviceIdIn(List values) { + addCriterion("device_id in", values, "deviceId"); + return (Criteria) this; + } + + public Criteria andDeviceIdNotIn(List values) { + addCriterion("device_id not in", values, "deviceId"); + return (Criteria) this; + } + + public Criteria andDeviceIdBetween(String value1, String value2) { + addCriterion("device_id between", value1, value2, "deviceId"); + return (Criteria) this; + } + + public Criteria andDeviceIdNotBetween(String value1, String value2) { + addCriterion("device_id not between", value1, value2, "deviceId"); + return (Criteria) this; + } + + public Criteria andClientTypeIsNull() { + addCriterion("client_type is null"); + return (Criteria) this; + } + + public Criteria andClientTypeIsNotNull() { + addCriterion("client_type is not null"); + return (Criteria) this; + } + + public Criteria andClientTypeEqualTo(Byte value) { + addCriterion("client_type =", value, "clientType"); + return (Criteria) this; + } + + public Criteria andClientTypeNotEqualTo(Byte value) { + addCriterion("client_type <>", value, "clientType"); + return (Criteria) this; + } + + public Criteria andClientTypeGreaterThan(Byte value) { + addCriterion("client_type >", value, "clientType"); + return (Criteria) this; + } + + public Criteria andClientTypeGreaterThanOrEqualTo(Byte value) { + addCriterion("client_type >=", value, "clientType"); + return (Criteria) this; + } + + public Criteria andClientTypeLessThan(Byte value) { + addCriterion("client_type <", value, "clientType"); + return (Criteria) this; + } + + public Criteria andClientTypeLessThanOrEqualTo(Byte value) { + addCriterion("client_type <=", value, "clientType"); + return (Criteria) this; + } + + public Criteria andClientTypeIn(List values) { + addCriterion("client_type in", values, "clientType"); + return (Criteria) this; + } + + public Criteria andClientTypeNotIn(List values) { + addCriterion("client_type not in", values, "clientType"); + return (Criteria) this; + } + + public Criteria andClientTypeBetween(Byte value1, Byte value2) { + addCriterion("client_type between", value1, value2, "clientType"); + return (Criteria) this; + } + + public Criteria andClientTypeNotBetween(Byte value1, Byte value2) { + addCriterion("client_type not between", value1, value2, "clientType"); + return (Criteria) this; + } + + public Criteria andIpAddressIsNull() { + addCriterion("ip_address is null"); + return (Criteria) this; + } + + public Criteria andIpAddressIsNotNull() { + addCriterion("ip_address is not null"); + return (Criteria) this; + } + + public Criteria andIpAddressEqualTo(String value) { + addCriterion("ip_address =", value, "ipAddress"); + return (Criteria) this; + } + + public Criteria andIpAddressNotEqualTo(String value) { + addCriterion("ip_address <>", value, "ipAddress"); + return (Criteria) this; + } + + public Criteria andIpAddressGreaterThan(String value) { + addCriterion("ip_address >", value, "ipAddress"); + return (Criteria) this; + } + + public Criteria andIpAddressGreaterThanOrEqualTo(String value) { + addCriterion("ip_address >=", value, "ipAddress"); + return (Criteria) this; + } + + public Criteria andIpAddressLessThan(String value) { + addCriterion("ip_address <", value, "ipAddress"); + return (Criteria) this; + } + + public Criteria andIpAddressLessThanOrEqualTo(String value) { + addCriterion("ip_address <=", value, "ipAddress"); + return (Criteria) this; + } + + public Criteria andIpAddressLike(String value) { + addCriterion("ip_address like", value, "ipAddress"); + return (Criteria) this; + } + + public Criteria andIpAddressNotLike(String value) { + addCriterion("ip_address not like", value, "ipAddress"); + return (Criteria) this; + } + + public Criteria andIpAddressIn(List values) { + addCriterion("ip_address in", values, "ipAddress"); + return (Criteria) this; + } + + public Criteria andIpAddressNotIn(List values) { + addCriterion("ip_address not in", values, "ipAddress"); + return (Criteria) this; + } + + public Criteria andIpAddressBetween(String value1, String value2) { + addCriterion("ip_address between", value1, value2, "ipAddress"); + return (Criteria) this; + } + + public Criteria andIpAddressNotBetween(String value1, String value2) { + addCriterion("ip_address not between", value1, value2, "ipAddress"); + return (Criteria) this; + } + + public Criteria andOperatorIsNull() { + addCriterion("operator is null"); + return (Criteria) this; + } + + public Criteria andOperatorIsNotNull() { + addCriterion("operator is not null"); + return (Criteria) this; + } + + public Criteria andOperatorEqualTo(Long value) { + addCriterion("operator =", value, "operator"); + return (Criteria) this; + } + + public Criteria andOperatorNotEqualTo(Long value) { + addCriterion("operator <>", value, "operator"); + return (Criteria) this; + } + + public Criteria andOperatorGreaterThan(Long value) { + addCriterion("operator >", value, "operator"); + return (Criteria) this; + } + + public Criteria andOperatorGreaterThanOrEqualTo(Long value) { + addCriterion("operator >=", value, "operator"); + return (Criteria) this; + } + + public Criteria andOperatorLessThan(Long value) { + addCriterion("operator <", value, "operator"); + return (Criteria) this; + } + + public Criteria andOperatorLessThanOrEqualTo(Long value) { + addCriterion("operator <=", value, "operator"); + return (Criteria) this; + } + + public Criteria andOperatorIn(List values) { + addCriterion("operator in", values, "operator"); + return (Criteria) this; + } + + public Criteria andOperatorNotIn(List values) { + addCriterion("operator not in", values, "operator"); + return (Criteria) this; + } + + public Criteria andOperatorBetween(Long value1, Long value2) { + addCriterion("operator between", value1, value2, "operator"); + return (Criteria) this; + } + + public Criteria andOperatorNotBetween(Long value1, Long value2) { + addCriterion("operator not between", value1, value2, "operator"); + return (Criteria) this; + } + + public Criteria andCreatedAtIsNull() { + addCriterion("created_at is null"); + return (Criteria) this; + } + + public Criteria andCreatedAtIsNotNull() { + addCriterion("created_at is not null"); + return (Criteria) this; + } + + public Criteria andCreatedAtEqualTo(Date value) { + addCriterion("created_at =", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtNotEqualTo(Date value) { + addCriterion("created_at <>", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtGreaterThan(Date value) { + addCriterion("created_at >", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtGreaterThanOrEqualTo(Date value) { + addCriterion("created_at >=", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtLessThan(Date value) { + addCriterion("created_at <", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtLessThanOrEqualTo(Date value) { + addCriterion("created_at <=", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtIn(List values) { + addCriterion("created_at in", values, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtNotIn(List values) { + addCriterion("created_at not in", values, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtBetween(Date value1, Date value2) { + addCriterion("created_at between", value1, value2, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtNotBetween(Date value1, Date value2) { + addCriterion("created_at not between", value1, value2, "createdAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtIsNull() { + addCriterion("updated_at is null"); + return (Criteria) this; + } + + public Criteria andUpdatedAtIsNotNull() { + addCriterion("updated_at is not null"); + return (Criteria) this; + } + + public Criteria andUpdatedAtEqualTo(Date value) { + addCriterion("updated_at =", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtNotEqualTo(Date value) { + addCriterion("updated_at <>", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtGreaterThan(Date value) { + addCriterion("updated_at >", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtGreaterThanOrEqualTo(Date value) { + addCriterion("updated_at >=", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtLessThan(Date value) { + addCriterion("updated_at <", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtLessThanOrEqualTo(Date value) { + addCriterion("updated_at <=", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtIn(List values) { + addCriterion("updated_at in", values, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtNotIn(List values) { + addCriterion("updated_at not in", values, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtBetween(Date value1, Date value2) { + addCriterion("updated_at between", value1, value2, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtNotBetween(Date value1, Date value2) { + addCriterion("updated_at not between", value1, value2, "updatedAt"); + return (Criteria) this; + } + + public Criteria andRecStatusIsNull() { + addCriterion("rec_status is null"); + return (Criteria) this; + } + + public Criteria andRecStatusIsNotNull() { + addCriterion("rec_status is not null"); + return (Criteria) this; + } + + public Criteria andRecStatusEqualTo(Byte value) { + addCriterion("rec_status =", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusNotEqualTo(Byte value) { + addCriterion("rec_status <>", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusGreaterThan(Byte value) { + addCriterion("rec_status >", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusGreaterThanOrEqualTo(Byte value) { + addCriterion("rec_status >=", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusLessThan(Byte value) { + addCriterion("rec_status <", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusLessThanOrEqualTo(Byte value) { + addCriterion("rec_status <=", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusIn(List values) { + addCriterion("rec_status in", values, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusNotIn(List values) { + addCriterion("rec_status not in", values, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusBetween(Byte value1, Byte value2) { + addCriterion("rec_status between", value1, value2, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusNotBetween(Byte value1, Byte value2) { + addCriterion("rec_status not between", value1, value2, "recStatus"); + return (Criteria) this; + } + } + + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file diff --git a/ptos_tall/src/main/java/com/ccsens/ptos_tall/bean/po/SysUser.java b/ptos_tall/src/main/java/com/ccsens/ptos_tall/bean/po/SysUser.java new file mode 100644 index 0000000..37cc708 --- /dev/null +++ b/ptos_tall/src/main/java/com/ccsens/ptos_tall/bean/po/SysUser.java @@ -0,0 +1,194 @@ +package com.ccsens.ptos_tall.bean.po; + +import java.io.Serializable; +import java.util.Date; + +public class SysUser implements Serializable { + private Long id; + + private String name; + + private Byte gender; + + private String avatarUrl; + + private String country; + + private String province; + + private String city; + + private String phone; + + private String idCard; + + private Byte power; + + private String deviceId; + + private Byte authType; + + private Long operator; + + private Date createdAt; + + private Date updatedAt; + + private Byte recStatus; + + private static final long serialVersionUID = 1L; + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name == null ? null : name.trim(); + } + + public Byte getGender() { + return gender; + } + + public void setGender(Byte gender) { + this.gender = gender; + } + + public String getAvatarUrl() { + return avatarUrl; + } + + public void setAvatarUrl(String avatarUrl) { + this.avatarUrl = avatarUrl == null ? null : avatarUrl.trim(); + } + + public String getCountry() { + return country; + } + + public void setCountry(String country) { + this.country = country == null ? null : country.trim(); + } + + public String getProvince() { + return province; + } + + public void setProvince(String province) { + this.province = province == null ? null : province.trim(); + } + + public String getCity() { + return city; + } + + public void setCity(String city) { + this.city = city == null ? null : city.trim(); + } + + public String getPhone() { + return phone; + } + + public void setPhone(String phone) { + this.phone = phone == null ? null : phone.trim(); + } + + public String getIdCard() { + return idCard; + } + + public void setIdCard(String idCard) { + this.idCard = idCard == null ? null : idCard.trim(); + } + + public Byte getPower() { + return power; + } + + public void setPower(Byte power) { + this.power = power; + } + + public String getDeviceId() { + return deviceId; + } + + public void setDeviceId(String deviceId) { + this.deviceId = deviceId == null ? null : deviceId.trim(); + } + + public Byte getAuthType() { + return authType; + } + + public void setAuthType(Byte authType) { + this.authType = authType; + } + + public Long getOperator() { + return operator; + } + + public void setOperator(Long operator) { + this.operator = operator; + } + + public Date getCreatedAt() { + return createdAt; + } + + public void setCreatedAt(Date createdAt) { + this.createdAt = createdAt; + } + + public Date getUpdatedAt() { + return updatedAt; + } + + public void setUpdatedAt(Date updatedAt) { + this.updatedAt = updatedAt; + } + + public Byte getRecStatus() { + return recStatus; + } + + public void setRecStatus(Byte recStatus) { + this.recStatus = recStatus; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", id=").append(id); + sb.append(", name=").append(name); + sb.append(", gender=").append(gender); + sb.append(", avatarUrl=").append(avatarUrl); + sb.append(", country=").append(country); + sb.append(", province=").append(province); + sb.append(", city=").append(city); + sb.append(", phone=").append(phone); + sb.append(", idCard=").append(idCard); + sb.append(", power=").append(power); + sb.append(", deviceId=").append(deviceId); + sb.append(", authType=").append(authType); + sb.append(", operator=").append(operator); + sb.append(", createdAt=").append(createdAt); + sb.append(", updatedAt=").append(updatedAt); + sb.append(", recStatus=").append(recStatus); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/ptos_tall/src/main/java/com/ccsens/ptos_tall/bean/po/SysUserDevice.java b/ptos_tall/src/main/java/com/ccsens/ptos_tall/bean/po/SysUserDevice.java new file mode 100644 index 0000000..41596f1 --- /dev/null +++ b/ptos_tall/src/main/java/com/ccsens/ptos_tall/bean/po/SysUserDevice.java @@ -0,0 +1,117 @@ +package com.ccsens.ptos_tall.bean.po; + +import java.io.Serializable; +import java.util.Date; + +public class SysUserDevice implements Serializable { + private Long id; + + private Long userId; + + private String deviceId; + + private Byte clientType; + + private String refreshToken; + + private Long operator; + + private Date createdAt; + + private Date updatedAt; + + private Byte recStatus; + + private static final long serialVersionUID = 1L; + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public Long getUserId() { + return userId; + } + + public void setUserId(Long userId) { + this.userId = userId; + } + + public String getDeviceId() { + return deviceId; + } + + public void setDeviceId(String deviceId) { + this.deviceId = deviceId == null ? null : deviceId.trim(); + } + + public Byte getClientType() { + return clientType; + } + + public void setClientType(Byte clientType) { + this.clientType = clientType; + } + + public String getRefreshToken() { + return refreshToken; + } + + public void setRefreshToken(String refreshToken) { + this.refreshToken = refreshToken == null ? null : refreshToken.trim(); + } + + public Long getOperator() { + return operator; + } + + public void setOperator(Long operator) { + this.operator = operator; + } + + public Date getCreatedAt() { + return createdAt; + } + + public void setCreatedAt(Date createdAt) { + this.createdAt = createdAt; + } + + public Date getUpdatedAt() { + return updatedAt; + } + + public void setUpdatedAt(Date updatedAt) { + this.updatedAt = updatedAt; + } + + public Byte getRecStatus() { + return recStatus; + } + + public void setRecStatus(Byte recStatus) { + this.recStatus = recStatus; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", id=").append(id); + sb.append(", userId=").append(userId); + sb.append(", deviceId=").append(deviceId); + sb.append(", clientType=").append(clientType); + sb.append(", refreshToken=").append(refreshToken); + sb.append(", operator=").append(operator); + sb.append(", createdAt=").append(createdAt); + sb.append(", updatedAt=").append(updatedAt); + sb.append(", recStatus=").append(recStatus); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/ptos_tall/src/main/java/com/ccsens/ptos_tall/bean/po/SysUserDeviceExample.java b/ptos_tall/src/main/java/com/ccsens/ptos_tall/bean/po/SysUserDeviceExample.java new file mode 100644 index 0000000..32ffd28 --- /dev/null +++ b/ptos_tall/src/main/java/com/ccsens/ptos_tall/bean/po/SysUserDeviceExample.java @@ -0,0 +1,761 @@ +package com.ccsens.ptos_tall.bean.po; + +import java.util.ArrayList; +import java.util.Date; +import java.util.List; + +public class SysUserDeviceExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + public SysUserDeviceExample() { + oredCriteria = new ArrayList(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("id is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("id is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(Long value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(Long value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(Long value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(Long value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(Long value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(Long value) { + addCriterion("id <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("id not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(Long value1, Long value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(Long value1, Long value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andUserIdIsNull() { + addCriterion("user_id is null"); + return (Criteria) this; + } + + public Criteria andUserIdIsNotNull() { + addCriterion("user_id is not null"); + return (Criteria) this; + } + + public Criteria andUserIdEqualTo(Long value) { + addCriterion("user_id =", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdNotEqualTo(Long value) { + addCriterion("user_id <>", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdGreaterThan(Long value) { + addCriterion("user_id >", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdGreaterThanOrEqualTo(Long value) { + addCriterion("user_id >=", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdLessThan(Long value) { + addCriterion("user_id <", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdLessThanOrEqualTo(Long value) { + addCriterion("user_id <=", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdIn(List values) { + addCriterion("user_id in", values, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdNotIn(List values) { + addCriterion("user_id not in", values, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdBetween(Long value1, Long value2) { + addCriterion("user_id between", value1, value2, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdNotBetween(Long value1, Long value2) { + addCriterion("user_id not between", value1, value2, "userId"); + return (Criteria) this; + } + + public Criteria andDeviceIdIsNull() { + addCriterion("device_id is null"); + return (Criteria) this; + } + + public Criteria andDeviceIdIsNotNull() { + addCriterion("device_id is not null"); + return (Criteria) this; + } + + public Criteria andDeviceIdEqualTo(String value) { + addCriterion("device_id =", value, "deviceId"); + return (Criteria) this; + } + + public Criteria andDeviceIdNotEqualTo(String value) { + addCriterion("device_id <>", value, "deviceId"); + return (Criteria) this; + } + + public Criteria andDeviceIdGreaterThan(String value) { + addCriterion("device_id >", value, "deviceId"); + return (Criteria) this; + } + + public Criteria andDeviceIdGreaterThanOrEqualTo(String value) { + addCriterion("device_id >=", value, "deviceId"); + return (Criteria) this; + } + + public Criteria andDeviceIdLessThan(String value) { + addCriterion("device_id <", value, "deviceId"); + return (Criteria) this; + } + + public Criteria andDeviceIdLessThanOrEqualTo(String value) { + addCriterion("device_id <=", value, "deviceId"); + return (Criteria) this; + } + + public Criteria andDeviceIdLike(String value) { + addCriterion("device_id like", value, "deviceId"); + return (Criteria) this; + } + + public Criteria andDeviceIdNotLike(String value) { + addCriterion("device_id not like", value, "deviceId"); + return (Criteria) this; + } + + public Criteria andDeviceIdIn(List values) { + addCriterion("device_id in", values, "deviceId"); + return (Criteria) this; + } + + public Criteria andDeviceIdNotIn(List values) { + addCriterion("device_id not in", values, "deviceId"); + return (Criteria) this; + } + + public Criteria andDeviceIdBetween(String value1, String value2) { + addCriterion("device_id between", value1, value2, "deviceId"); + return (Criteria) this; + } + + public Criteria andDeviceIdNotBetween(String value1, String value2) { + addCriterion("device_id not between", value1, value2, "deviceId"); + return (Criteria) this; + } + + public Criteria andClientTypeIsNull() { + addCriterion("client_type is null"); + return (Criteria) this; + } + + public Criteria andClientTypeIsNotNull() { + addCriterion("client_type is not null"); + return (Criteria) this; + } + + public Criteria andClientTypeEqualTo(Byte value) { + addCriterion("client_type =", value, "clientType"); + return (Criteria) this; + } + + public Criteria andClientTypeNotEqualTo(Byte value) { + addCriterion("client_type <>", value, "clientType"); + return (Criteria) this; + } + + public Criteria andClientTypeGreaterThan(Byte value) { + addCriterion("client_type >", value, "clientType"); + return (Criteria) this; + } + + public Criteria andClientTypeGreaterThanOrEqualTo(Byte value) { + addCriterion("client_type >=", value, "clientType"); + return (Criteria) this; + } + + public Criteria andClientTypeLessThan(Byte value) { + addCriterion("client_type <", value, "clientType"); + return (Criteria) this; + } + + public Criteria andClientTypeLessThanOrEqualTo(Byte value) { + addCriterion("client_type <=", value, "clientType"); + return (Criteria) this; + } + + public Criteria andClientTypeIn(List values) { + addCriterion("client_type in", values, "clientType"); + return (Criteria) this; + } + + public Criteria andClientTypeNotIn(List values) { + addCriterion("client_type not in", values, "clientType"); + return (Criteria) this; + } + + public Criteria andClientTypeBetween(Byte value1, Byte value2) { + addCriterion("client_type between", value1, value2, "clientType"); + return (Criteria) this; + } + + public Criteria andClientTypeNotBetween(Byte value1, Byte value2) { + addCriterion("client_type not between", value1, value2, "clientType"); + return (Criteria) this; + } + + public Criteria andRefreshTokenIsNull() { + addCriterion("refresh_token is null"); + return (Criteria) this; + } + + public Criteria andRefreshTokenIsNotNull() { + addCriterion("refresh_token is not null"); + return (Criteria) this; + } + + public Criteria andRefreshTokenEqualTo(String value) { + addCriterion("refresh_token =", value, "refreshToken"); + return (Criteria) this; + } + + public Criteria andRefreshTokenNotEqualTo(String value) { + addCriterion("refresh_token <>", value, "refreshToken"); + return (Criteria) this; + } + + public Criteria andRefreshTokenGreaterThan(String value) { + addCriterion("refresh_token >", value, "refreshToken"); + return (Criteria) this; + } + + public Criteria andRefreshTokenGreaterThanOrEqualTo(String value) { + addCriterion("refresh_token >=", value, "refreshToken"); + return (Criteria) this; + } + + public Criteria andRefreshTokenLessThan(String value) { + addCriterion("refresh_token <", value, "refreshToken"); + return (Criteria) this; + } + + public Criteria andRefreshTokenLessThanOrEqualTo(String value) { + addCriterion("refresh_token <=", value, "refreshToken"); + return (Criteria) this; + } + + public Criteria andRefreshTokenLike(String value) { + addCriterion("refresh_token like", value, "refreshToken"); + return (Criteria) this; + } + + public Criteria andRefreshTokenNotLike(String value) { + addCriterion("refresh_token not like", value, "refreshToken"); + return (Criteria) this; + } + + public Criteria andRefreshTokenIn(List values) { + addCriterion("refresh_token in", values, "refreshToken"); + return (Criteria) this; + } + + public Criteria andRefreshTokenNotIn(List values) { + addCriterion("refresh_token not in", values, "refreshToken"); + return (Criteria) this; + } + + public Criteria andRefreshTokenBetween(String value1, String value2) { + addCriterion("refresh_token between", value1, value2, "refreshToken"); + return (Criteria) this; + } + + public Criteria andRefreshTokenNotBetween(String value1, String value2) { + addCriterion("refresh_token not between", value1, value2, "refreshToken"); + return (Criteria) this; + } + + public Criteria andOperatorIsNull() { + addCriterion("operator is null"); + return (Criteria) this; + } + + public Criteria andOperatorIsNotNull() { + addCriterion("operator is not null"); + return (Criteria) this; + } + + public Criteria andOperatorEqualTo(Long value) { + addCriterion("operator =", value, "operator"); + return (Criteria) this; + } + + public Criteria andOperatorNotEqualTo(Long value) { + addCriterion("operator <>", value, "operator"); + return (Criteria) this; + } + + public Criteria andOperatorGreaterThan(Long value) { + addCriterion("operator >", value, "operator"); + return (Criteria) this; + } + + public Criteria andOperatorGreaterThanOrEqualTo(Long value) { + addCriterion("operator >=", value, "operator"); + return (Criteria) this; + } + + public Criteria andOperatorLessThan(Long value) { + addCriterion("operator <", value, "operator"); + return (Criteria) this; + } + + public Criteria andOperatorLessThanOrEqualTo(Long value) { + addCriterion("operator <=", value, "operator"); + return (Criteria) this; + } + + public Criteria andOperatorIn(List values) { + addCriterion("operator in", values, "operator"); + return (Criteria) this; + } + + public Criteria andOperatorNotIn(List values) { + addCriterion("operator not in", values, "operator"); + return (Criteria) this; + } + + public Criteria andOperatorBetween(Long value1, Long value2) { + addCriterion("operator between", value1, value2, "operator"); + return (Criteria) this; + } + + public Criteria andOperatorNotBetween(Long value1, Long value2) { + addCriterion("operator not between", value1, value2, "operator"); + return (Criteria) this; + } + + public Criteria andCreatedAtIsNull() { + addCriterion("created_at is null"); + return (Criteria) this; + } + + public Criteria andCreatedAtIsNotNull() { + addCriterion("created_at is not null"); + return (Criteria) this; + } + + public Criteria andCreatedAtEqualTo(Date value) { + addCriterion("created_at =", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtNotEqualTo(Date value) { + addCriterion("created_at <>", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtGreaterThan(Date value) { + addCriterion("created_at >", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtGreaterThanOrEqualTo(Date value) { + addCriterion("created_at >=", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtLessThan(Date value) { + addCriterion("created_at <", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtLessThanOrEqualTo(Date value) { + addCriterion("created_at <=", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtIn(List values) { + addCriterion("created_at in", values, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtNotIn(List values) { + addCriterion("created_at not in", values, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtBetween(Date value1, Date value2) { + addCriterion("created_at between", value1, value2, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtNotBetween(Date value1, Date value2) { + addCriterion("created_at not between", value1, value2, "createdAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtIsNull() { + addCriterion("updated_at is null"); + return (Criteria) this; + } + + public Criteria andUpdatedAtIsNotNull() { + addCriterion("updated_at is not null"); + return (Criteria) this; + } + + public Criteria andUpdatedAtEqualTo(Date value) { + addCriterion("updated_at =", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtNotEqualTo(Date value) { + addCriterion("updated_at <>", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtGreaterThan(Date value) { + addCriterion("updated_at >", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtGreaterThanOrEqualTo(Date value) { + addCriterion("updated_at >=", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtLessThan(Date value) { + addCriterion("updated_at <", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtLessThanOrEqualTo(Date value) { + addCriterion("updated_at <=", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtIn(List values) { + addCriterion("updated_at in", values, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtNotIn(List values) { + addCriterion("updated_at not in", values, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtBetween(Date value1, Date value2) { + addCriterion("updated_at between", value1, value2, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtNotBetween(Date value1, Date value2) { + addCriterion("updated_at not between", value1, value2, "updatedAt"); + return (Criteria) this; + } + + public Criteria andRecStatusIsNull() { + addCriterion("rec_status is null"); + return (Criteria) this; + } + + public Criteria andRecStatusIsNotNull() { + addCriterion("rec_status is not null"); + return (Criteria) this; + } + + public Criteria andRecStatusEqualTo(Byte value) { + addCriterion("rec_status =", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusNotEqualTo(Byte value) { + addCriterion("rec_status <>", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusGreaterThan(Byte value) { + addCriterion("rec_status >", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusGreaterThanOrEqualTo(Byte value) { + addCriterion("rec_status >=", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusLessThan(Byte value) { + addCriterion("rec_status <", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusLessThanOrEqualTo(Byte value) { + addCriterion("rec_status <=", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusIn(List values) { + addCriterion("rec_status in", values, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusNotIn(List values) { + addCriterion("rec_status not in", values, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusBetween(Byte value1, Byte value2) { + addCriterion("rec_status between", value1, value2, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusNotBetween(Byte value1, Byte value2) { + addCriterion("rec_status not between", value1, value2, "recStatus"); + return (Criteria) this; + } + } + + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file diff --git a/ptos_tall/src/main/java/com/ccsens/ptos_tall/bean/po/SysUserExample.java b/ptos_tall/src/main/java/com/ccsens/ptos_tall/bean/po/SysUserExample.java new file mode 100644 index 0000000..957a4ce --- /dev/null +++ b/ptos_tall/src/main/java/com/ccsens/ptos_tall/bean/po/SysUserExample.java @@ -0,0 +1,1241 @@ +package com.ccsens.ptos_tall.bean.po; + +import java.util.ArrayList; +import java.util.Date; +import java.util.List; + +public class SysUserExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + public SysUserExample() { + oredCriteria = new ArrayList(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("id is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("id is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(Long value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(Long value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(Long value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(Long value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(Long value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(Long value) { + addCriterion("id <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("id not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(Long value1, Long value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(Long value1, Long value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andNameIsNull() { + addCriterion("name is null"); + return (Criteria) this; + } + + public Criteria andNameIsNotNull() { + addCriterion("name is not null"); + return (Criteria) this; + } + + public Criteria andNameEqualTo(String value) { + addCriterion("name =", value, "name"); + return (Criteria) this; + } + + public Criteria andNameNotEqualTo(String value) { + addCriterion("name <>", value, "name"); + return (Criteria) this; + } + + public Criteria andNameGreaterThan(String value) { + addCriterion("name >", value, "name"); + return (Criteria) this; + } + + public Criteria andNameGreaterThanOrEqualTo(String value) { + addCriterion("name >=", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLessThan(String value) { + addCriterion("name <", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLessThanOrEqualTo(String value) { + addCriterion("name <=", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLike(String value) { + addCriterion("name like", value, "name"); + return (Criteria) this; + } + + public Criteria andNameNotLike(String value) { + addCriterion("name not like", value, "name"); + return (Criteria) this; + } + + public Criteria andNameIn(List values) { + addCriterion("name in", values, "name"); + return (Criteria) this; + } + + public Criteria andNameNotIn(List values) { + addCriterion("name not in", values, "name"); + return (Criteria) this; + } + + public Criteria andNameBetween(String value1, String value2) { + addCriterion("name between", value1, value2, "name"); + return (Criteria) this; + } + + public Criteria andNameNotBetween(String value1, String value2) { + addCriterion("name not between", value1, value2, "name"); + return (Criteria) this; + } + + public Criteria andGenderIsNull() { + addCriterion("gender is null"); + return (Criteria) this; + } + + public Criteria andGenderIsNotNull() { + addCriterion("gender is not null"); + return (Criteria) this; + } + + public Criteria andGenderEqualTo(Byte value) { + addCriterion("gender =", value, "gender"); + return (Criteria) this; + } + + public Criteria andGenderNotEqualTo(Byte value) { + addCriterion("gender <>", value, "gender"); + return (Criteria) this; + } + + public Criteria andGenderGreaterThan(Byte value) { + addCriterion("gender >", value, "gender"); + return (Criteria) this; + } + + public Criteria andGenderGreaterThanOrEqualTo(Byte value) { + addCriterion("gender >=", value, "gender"); + return (Criteria) this; + } + + public Criteria andGenderLessThan(Byte value) { + addCriterion("gender <", value, "gender"); + return (Criteria) this; + } + + public Criteria andGenderLessThanOrEqualTo(Byte value) { + addCriterion("gender <=", value, "gender"); + return (Criteria) this; + } + + public Criteria andGenderIn(List values) { + addCriterion("gender in", values, "gender"); + return (Criteria) this; + } + + public Criteria andGenderNotIn(List values) { + addCriterion("gender not in", values, "gender"); + return (Criteria) this; + } + + public Criteria andGenderBetween(Byte value1, Byte value2) { + addCriterion("gender between", value1, value2, "gender"); + return (Criteria) this; + } + + public Criteria andGenderNotBetween(Byte value1, Byte value2) { + addCriterion("gender not between", value1, value2, "gender"); + return (Criteria) this; + } + + public Criteria andAvatarUrlIsNull() { + addCriterion("avatar_url is null"); + return (Criteria) this; + } + + public Criteria andAvatarUrlIsNotNull() { + addCriterion("avatar_url is not null"); + return (Criteria) this; + } + + public Criteria andAvatarUrlEqualTo(String value) { + addCriterion("avatar_url =", value, "avatarUrl"); + return (Criteria) this; + } + + public Criteria andAvatarUrlNotEqualTo(String value) { + addCriterion("avatar_url <>", value, "avatarUrl"); + return (Criteria) this; + } + + public Criteria andAvatarUrlGreaterThan(String value) { + addCriterion("avatar_url >", value, "avatarUrl"); + return (Criteria) this; + } + + public Criteria andAvatarUrlGreaterThanOrEqualTo(String value) { + addCriterion("avatar_url >=", value, "avatarUrl"); + return (Criteria) this; + } + + public Criteria andAvatarUrlLessThan(String value) { + addCriterion("avatar_url <", value, "avatarUrl"); + return (Criteria) this; + } + + public Criteria andAvatarUrlLessThanOrEqualTo(String value) { + addCriterion("avatar_url <=", value, "avatarUrl"); + return (Criteria) this; + } + + public Criteria andAvatarUrlLike(String value) { + addCriterion("avatar_url like", value, "avatarUrl"); + return (Criteria) this; + } + + public Criteria andAvatarUrlNotLike(String value) { + addCriterion("avatar_url not like", value, "avatarUrl"); + return (Criteria) this; + } + + public Criteria andAvatarUrlIn(List values) { + addCriterion("avatar_url in", values, "avatarUrl"); + return (Criteria) this; + } + + public Criteria andAvatarUrlNotIn(List values) { + addCriterion("avatar_url not in", values, "avatarUrl"); + return (Criteria) this; + } + + public Criteria andAvatarUrlBetween(String value1, String value2) { + addCriterion("avatar_url between", value1, value2, "avatarUrl"); + return (Criteria) this; + } + + public Criteria andAvatarUrlNotBetween(String value1, String value2) { + addCriterion("avatar_url not between", value1, value2, "avatarUrl"); + return (Criteria) this; + } + + public Criteria andCountryIsNull() { + addCriterion("country is null"); + return (Criteria) this; + } + + public Criteria andCountryIsNotNull() { + addCriterion("country is not null"); + return (Criteria) this; + } + + public Criteria andCountryEqualTo(String value) { + addCriterion("country =", value, "country"); + return (Criteria) this; + } + + public Criteria andCountryNotEqualTo(String value) { + addCriterion("country <>", value, "country"); + return (Criteria) this; + } + + public Criteria andCountryGreaterThan(String value) { + addCriterion("country >", value, "country"); + return (Criteria) this; + } + + public Criteria andCountryGreaterThanOrEqualTo(String value) { + addCriterion("country >=", value, "country"); + return (Criteria) this; + } + + public Criteria andCountryLessThan(String value) { + addCriterion("country <", value, "country"); + return (Criteria) this; + } + + public Criteria andCountryLessThanOrEqualTo(String value) { + addCriterion("country <=", value, "country"); + return (Criteria) this; + } + + public Criteria andCountryLike(String value) { + addCriterion("country like", value, "country"); + return (Criteria) this; + } + + public Criteria andCountryNotLike(String value) { + addCriterion("country not like", value, "country"); + return (Criteria) this; + } + + public Criteria andCountryIn(List values) { + addCriterion("country in", values, "country"); + return (Criteria) this; + } + + public Criteria andCountryNotIn(List values) { + addCriterion("country not in", values, "country"); + return (Criteria) this; + } + + public Criteria andCountryBetween(String value1, String value2) { + addCriterion("country between", value1, value2, "country"); + return (Criteria) this; + } + + public Criteria andCountryNotBetween(String value1, String value2) { + addCriterion("country not between", value1, value2, "country"); + return (Criteria) this; + } + + public Criteria andProvinceIsNull() { + addCriterion("province is null"); + return (Criteria) this; + } + + public Criteria andProvinceIsNotNull() { + addCriterion("province is not null"); + return (Criteria) this; + } + + public Criteria andProvinceEqualTo(String value) { + addCriterion("province =", value, "province"); + return (Criteria) this; + } + + public Criteria andProvinceNotEqualTo(String value) { + addCriterion("province <>", value, "province"); + return (Criteria) this; + } + + public Criteria andProvinceGreaterThan(String value) { + addCriterion("province >", value, "province"); + return (Criteria) this; + } + + public Criteria andProvinceGreaterThanOrEqualTo(String value) { + addCriterion("province >=", value, "province"); + return (Criteria) this; + } + + public Criteria andProvinceLessThan(String value) { + addCriterion("province <", value, "province"); + return (Criteria) this; + } + + public Criteria andProvinceLessThanOrEqualTo(String value) { + addCriterion("province <=", value, "province"); + return (Criteria) this; + } + + public Criteria andProvinceLike(String value) { + addCriterion("province like", value, "province"); + return (Criteria) this; + } + + public Criteria andProvinceNotLike(String value) { + addCriterion("province not like", value, "province"); + return (Criteria) this; + } + + public Criteria andProvinceIn(List values) { + addCriterion("province in", values, "province"); + return (Criteria) this; + } + + public Criteria andProvinceNotIn(List values) { + addCriterion("province not in", values, "province"); + return (Criteria) this; + } + + public Criteria andProvinceBetween(String value1, String value2) { + addCriterion("province between", value1, value2, "province"); + return (Criteria) this; + } + + public Criteria andProvinceNotBetween(String value1, String value2) { + addCriterion("province not between", value1, value2, "province"); + return (Criteria) this; + } + + public Criteria andCityIsNull() { + addCriterion("city is null"); + return (Criteria) this; + } + + public Criteria andCityIsNotNull() { + addCriterion("city is not null"); + return (Criteria) this; + } + + public Criteria andCityEqualTo(String value) { + addCriterion("city =", value, "city"); + return (Criteria) this; + } + + public Criteria andCityNotEqualTo(String value) { + addCriterion("city <>", value, "city"); + return (Criteria) this; + } + + public Criteria andCityGreaterThan(String value) { + addCriterion("city >", value, "city"); + return (Criteria) this; + } + + public Criteria andCityGreaterThanOrEqualTo(String value) { + addCriterion("city >=", value, "city"); + return (Criteria) this; + } + + public Criteria andCityLessThan(String value) { + addCriterion("city <", value, "city"); + return (Criteria) this; + } + + public Criteria andCityLessThanOrEqualTo(String value) { + addCriterion("city <=", value, "city"); + return (Criteria) this; + } + + public Criteria andCityLike(String value) { + addCriterion("city like", value, "city"); + return (Criteria) this; + } + + public Criteria andCityNotLike(String value) { + addCriterion("city not like", value, "city"); + return (Criteria) this; + } + + public Criteria andCityIn(List values) { + addCriterion("city in", values, "city"); + return (Criteria) this; + } + + public Criteria andCityNotIn(List values) { + addCriterion("city not in", values, "city"); + return (Criteria) this; + } + + public Criteria andCityBetween(String value1, String value2) { + addCriterion("city between", value1, value2, "city"); + return (Criteria) this; + } + + public Criteria andCityNotBetween(String value1, String value2) { + addCriterion("city not between", value1, value2, "city"); + return (Criteria) this; + } + + public Criteria andPhoneIsNull() { + addCriterion("phone is null"); + return (Criteria) this; + } + + public Criteria andPhoneIsNotNull() { + addCriterion("phone is not null"); + return (Criteria) this; + } + + public Criteria andPhoneEqualTo(String value) { + addCriterion("phone =", value, "phone"); + return (Criteria) this; + } + + public Criteria andPhoneNotEqualTo(String value) { + addCriterion("phone <>", value, "phone"); + return (Criteria) this; + } + + public Criteria andPhoneGreaterThan(String value) { + addCriterion("phone >", value, "phone"); + return (Criteria) this; + } + + public Criteria andPhoneGreaterThanOrEqualTo(String value) { + addCriterion("phone >=", value, "phone"); + return (Criteria) this; + } + + public Criteria andPhoneLessThan(String value) { + addCriterion("phone <", value, "phone"); + return (Criteria) this; + } + + public Criteria andPhoneLessThanOrEqualTo(String value) { + addCriterion("phone <=", value, "phone"); + return (Criteria) this; + } + + public Criteria andPhoneLike(String value) { + addCriterion("phone like", value, "phone"); + return (Criteria) this; + } + + public Criteria andPhoneNotLike(String value) { + addCriterion("phone not like", value, "phone"); + return (Criteria) this; + } + + public Criteria andPhoneIn(List values) { + addCriterion("phone in", values, "phone"); + return (Criteria) this; + } + + public Criteria andPhoneNotIn(List values) { + addCriterion("phone not in", values, "phone"); + return (Criteria) this; + } + + public Criteria andPhoneBetween(String value1, String value2) { + addCriterion("phone between", value1, value2, "phone"); + return (Criteria) this; + } + + public Criteria andPhoneNotBetween(String value1, String value2) { + addCriterion("phone not between", value1, value2, "phone"); + return (Criteria) this; + } + + public Criteria andIdCardIsNull() { + addCriterion("id_card is null"); + return (Criteria) this; + } + + public Criteria andIdCardIsNotNull() { + addCriterion("id_card is not null"); + return (Criteria) this; + } + + public Criteria andIdCardEqualTo(String value) { + addCriterion("id_card =", value, "idCard"); + return (Criteria) this; + } + + public Criteria andIdCardNotEqualTo(String value) { + addCriterion("id_card <>", value, "idCard"); + return (Criteria) this; + } + + public Criteria andIdCardGreaterThan(String value) { + addCriterion("id_card >", value, "idCard"); + return (Criteria) this; + } + + public Criteria andIdCardGreaterThanOrEqualTo(String value) { + addCriterion("id_card >=", value, "idCard"); + return (Criteria) this; + } + + public Criteria andIdCardLessThan(String value) { + addCriterion("id_card <", value, "idCard"); + return (Criteria) this; + } + + public Criteria andIdCardLessThanOrEqualTo(String value) { + addCriterion("id_card <=", value, "idCard"); + return (Criteria) this; + } + + public Criteria andIdCardLike(String value) { + addCriterion("id_card like", value, "idCard"); + return (Criteria) this; + } + + public Criteria andIdCardNotLike(String value) { + addCriterion("id_card not like", value, "idCard"); + return (Criteria) this; + } + + public Criteria andIdCardIn(List values) { + addCriterion("id_card in", values, "idCard"); + return (Criteria) this; + } + + public Criteria andIdCardNotIn(List values) { + addCriterion("id_card not in", values, "idCard"); + return (Criteria) this; + } + + public Criteria andIdCardBetween(String value1, String value2) { + addCriterion("id_card between", value1, value2, "idCard"); + return (Criteria) this; + } + + public Criteria andIdCardNotBetween(String value1, String value2) { + addCriterion("id_card not between", value1, value2, "idCard"); + return (Criteria) this; + } + + public Criteria andPowerIsNull() { + addCriterion("power is null"); + return (Criteria) this; + } + + public Criteria andPowerIsNotNull() { + addCriterion("power is not null"); + return (Criteria) this; + } + + public Criteria andPowerEqualTo(Byte value) { + addCriterion("power =", value, "power"); + return (Criteria) this; + } + + public Criteria andPowerNotEqualTo(Byte value) { + addCriterion("power <>", value, "power"); + return (Criteria) this; + } + + public Criteria andPowerGreaterThan(Byte value) { + addCriterion("power >", value, "power"); + return (Criteria) this; + } + + public Criteria andPowerGreaterThanOrEqualTo(Byte value) { + addCriterion("power >=", value, "power"); + return (Criteria) this; + } + + public Criteria andPowerLessThan(Byte value) { + addCriterion("power <", value, "power"); + return (Criteria) this; + } + + public Criteria andPowerLessThanOrEqualTo(Byte value) { + addCriterion("power <=", value, "power"); + return (Criteria) this; + } + + public Criteria andPowerIn(List values) { + addCriterion("power in", values, "power"); + return (Criteria) this; + } + + public Criteria andPowerNotIn(List values) { + addCriterion("power not in", values, "power"); + return (Criteria) this; + } + + public Criteria andPowerBetween(Byte value1, Byte value2) { + addCriterion("power between", value1, value2, "power"); + return (Criteria) this; + } + + public Criteria andPowerNotBetween(Byte value1, Byte value2) { + addCriterion("power not between", value1, value2, "power"); + return (Criteria) this; + } + + public Criteria andDeviceIdIsNull() { + addCriterion("device_id is null"); + return (Criteria) this; + } + + public Criteria andDeviceIdIsNotNull() { + addCriterion("device_id is not null"); + return (Criteria) this; + } + + public Criteria andDeviceIdEqualTo(String value) { + addCriterion("device_id =", value, "deviceId"); + return (Criteria) this; + } + + public Criteria andDeviceIdNotEqualTo(String value) { + addCriterion("device_id <>", value, "deviceId"); + return (Criteria) this; + } + + public Criteria andDeviceIdGreaterThan(String value) { + addCriterion("device_id >", value, "deviceId"); + return (Criteria) this; + } + + public Criteria andDeviceIdGreaterThanOrEqualTo(String value) { + addCriterion("device_id >=", value, "deviceId"); + return (Criteria) this; + } + + public Criteria andDeviceIdLessThan(String value) { + addCriterion("device_id <", value, "deviceId"); + return (Criteria) this; + } + + public Criteria andDeviceIdLessThanOrEqualTo(String value) { + addCriterion("device_id <=", value, "deviceId"); + return (Criteria) this; + } + + public Criteria andDeviceIdLike(String value) { + addCriterion("device_id like", value, "deviceId"); + return (Criteria) this; + } + + public Criteria andDeviceIdNotLike(String value) { + addCriterion("device_id not like", value, "deviceId"); + return (Criteria) this; + } + + public Criteria andDeviceIdIn(List values) { + addCriterion("device_id in", values, "deviceId"); + return (Criteria) this; + } + + public Criteria andDeviceIdNotIn(List values) { + addCriterion("device_id not in", values, "deviceId"); + return (Criteria) this; + } + + public Criteria andDeviceIdBetween(String value1, String value2) { + addCriterion("device_id between", value1, value2, "deviceId"); + return (Criteria) this; + } + + public Criteria andDeviceIdNotBetween(String value1, String value2) { + addCriterion("device_id not between", value1, value2, "deviceId"); + return (Criteria) this; + } + + public Criteria andAuthTypeIsNull() { + addCriterion("auth_type is null"); + return (Criteria) this; + } + + public Criteria andAuthTypeIsNotNull() { + addCriterion("auth_type is not null"); + return (Criteria) this; + } + + public Criteria andAuthTypeEqualTo(Byte value) { + addCriterion("auth_type =", value, "authType"); + return (Criteria) this; + } + + public Criteria andAuthTypeNotEqualTo(Byte value) { + addCriterion("auth_type <>", value, "authType"); + return (Criteria) this; + } + + public Criteria andAuthTypeGreaterThan(Byte value) { + addCriterion("auth_type >", value, "authType"); + return (Criteria) this; + } + + public Criteria andAuthTypeGreaterThanOrEqualTo(Byte value) { + addCriterion("auth_type >=", value, "authType"); + return (Criteria) this; + } + + public Criteria andAuthTypeLessThan(Byte value) { + addCriterion("auth_type <", value, "authType"); + return (Criteria) this; + } + + public Criteria andAuthTypeLessThanOrEqualTo(Byte value) { + addCriterion("auth_type <=", value, "authType"); + return (Criteria) this; + } + + public Criteria andAuthTypeIn(List values) { + addCriterion("auth_type in", values, "authType"); + return (Criteria) this; + } + + public Criteria andAuthTypeNotIn(List values) { + addCriterion("auth_type not in", values, "authType"); + return (Criteria) this; + } + + public Criteria andAuthTypeBetween(Byte value1, Byte value2) { + addCriterion("auth_type between", value1, value2, "authType"); + return (Criteria) this; + } + + public Criteria andAuthTypeNotBetween(Byte value1, Byte value2) { + addCriterion("auth_type not between", value1, value2, "authType"); + return (Criteria) this; + } + + public Criteria andOperatorIsNull() { + addCriterion("operator is null"); + return (Criteria) this; + } + + public Criteria andOperatorIsNotNull() { + addCriterion("operator is not null"); + return (Criteria) this; + } + + public Criteria andOperatorEqualTo(Long value) { + addCriterion("operator =", value, "operator"); + return (Criteria) this; + } + + public Criteria andOperatorNotEqualTo(Long value) { + addCriterion("operator <>", value, "operator"); + return (Criteria) this; + } + + public Criteria andOperatorGreaterThan(Long value) { + addCriterion("operator >", value, "operator"); + return (Criteria) this; + } + + public Criteria andOperatorGreaterThanOrEqualTo(Long value) { + addCriterion("operator >=", value, "operator"); + return (Criteria) this; + } + + public Criteria andOperatorLessThan(Long value) { + addCriterion("operator <", value, "operator"); + return (Criteria) this; + } + + public Criteria andOperatorLessThanOrEqualTo(Long value) { + addCriterion("operator <=", value, "operator"); + return (Criteria) this; + } + + public Criteria andOperatorIn(List values) { + addCriterion("operator in", values, "operator"); + return (Criteria) this; + } + + public Criteria andOperatorNotIn(List values) { + addCriterion("operator not in", values, "operator"); + return (Criteria) this; + } + + public Criteria andOperatorBetween(Long value1, Long value2) { + addCriterion("operator between", value1, value2, "operator"); + return (Criteria) this; + } + + public Criteria andOperatorNotBetween(Long value1, Long value2) { + addCriterion("operator not between", value1, value2, "operator"); + return (Criteria) this; + } + + public Criteria andCreatedAtIsNull() { + addCriterion("created_at is null"); + return (Criteria) this; + } + + public Criteria andCreatedAtIsNotNull() { + addCriterion("created_at is not null"); + return (Criteria) this; + } + + public Criteria andCreatedAtEqualTo(Date value) { + addCriterion("created_at =", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtNotEqualTo(Date value) { + addCriterion("created_at <>", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtGreaterThan(Date value) { + addCriterion("created_at >", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtGreaterThanOrEqualTo(Date value) { + addCriterion("created_at >=", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtLessThan(Date value) { + addCriterion("created_at <", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtLessThanOrEqualTo(Date value) { + addCriterion("created_at <=", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtIn(List values) { + addCriterion("created_at in", values, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtNotIn(List values) { + addCriterion("created_at not in", values, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtBetween(Date value1, Date value2) { + addCriterion("created_at between", value1, value2, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtNotBetween(Date value1, Date value2) { + addCriterion("created_at not between", value1, value2, "createdAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtIsNull() { + addCriterion("updated_at is null"); + return (Criteria) this; + } + + public Criteria andUpdatedAtIsNotNull() { + addCriterion("updated_at is not null"); + return (Criteria) this; + } + + public Criteria andUpdatedAtEqualTo(Date value) { + addCriterion("updated_at =", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtNotEqualTo(Date value) { + addCriterion("updated_at <>", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtGreaterThan(Date value) { + addCriterion("updated_at >", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtGreaterThanOrEqualTo(Date value) { + addCriterion("updated_at >=", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtLessThan(Date value) { + addCriterion("updated_at <", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtLessThanOrEqualTo(Date value) { + addCriterion("updated_at <=", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtIn(List values) { + addCriterion("updated_at in", values, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtNotIn(List values) { + addCriterion("updated_at not in", values, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtBetween(Date value1, Date value2) { + addCriterion("updated_at between", value1, value2, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtNotBetween(Date value1, Date value2) { + addCriterion("updated_at not between", value1, value2, "updatedAt"); + return (Criteria) this; + } + + public Criteria andRecStatusIsNull() { + addCriterion("rec_status is null"); + return (Criteria) this; + } + + public Criteria andRecStatusIsNotNull() { + addCriterion("rec_status is not null"); + return (Criteria) this; + } + + public Criteria andRecStatusEqualTo(Byte value) { + addCriterion("rec_status =", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusNotEqualTo(Byte value) { + addCriterion("rec_status <>", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusGreaterThan(Byte value) { + addCriterion("rec_status >", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusGreaterThanOrEqualTo(Byte value) { + addCriterion("rec_status >=", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusLessThan(Byte value) { + addCriterion("rec_status <", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusLessThanOrEqualTo(Byte value) { + addCriterion("rec_status <=", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusIn(List values) { + addCriterion("rec_status in", values, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusNotIn(List values) { + addCriterion("rec_status not in", values, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusBetween(Byte value1, Byte value2) { + addCriterion("rec_status between", value1, value2, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusNotBetween(Byte value1, Byte value2) { + addCriterion("rec_status not between", value1, value2, "recStatus"); + return (Criteria) this; + } + } + + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file diff --git a/ptos_tall/src/main/java/com/ccsens/ptos_tall/bean/vo/UserVo.java b/ptos_tall/src/main/java/com/ccsens/ptos_tall/bean/vo/UserVo.java new file mode 100644 index 0000000..1fa7c04 --- /dev/null +++ b/ptos_tall/src/main/java/com/ccsens/ptos_tall/bean/vo/UserVo.java @@ -0,0 +1,62 @@ +package com.ccsens.ptos_tall.bean.vo; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * @author 逗 + */ +@Data +public class UserVo { + @Data + @ApiModel("登录后返回用户和token信息") + public static class TokenBean { + @ApiModelProperty("用户id") + private Long id; + @ApiModelProperty("手机号") + private String phone; + @ApiModelProperty("token") + private String token; + @ApiModelProperty("刷新token") + private String refreshToken; + } + + @Data + @ApiModel("业务请求用户信息") + public static class BusinessUserInfo { + @ApiModelProperty("用户id") + private Long id; + @ApiModelProperty("手机号") + private String phone; + @ApiModelProperty("认证状态") + private String type; + } + + @Data + public static class UserSign{ + private Long userId; + private Long authId; + } + + @Data + @ApiModel("获取手机验证码") + public static class SmsCode{ + @ApiModelProperty("手机号") + private String phone; + @ApiModelProperty("有效时间(秒)") + private Integer expiredInSeconds; + @JsonIgnore + private String smsCode; + } + + @Data + @ApiModel("返回图片验证码") + public static class VerificationCode{ + @ApiModelProperty("图片验证码Id") + private String verificationCodeId; + @ApiModelProperty("图片的Base64字符串") + private String imageBase64; + } +} diff --git a/ptos_tall/src/main/java/com/ccsens/ptos_tall/persist/dao/IdcDomainDao.java b/ptos_tall/src/main/java/com/ccsens/ptos_tall/persist/dao/IdcDomainDao.java new file mode 100644 index 0000000..d08b7ac --- /dev/null +++ b/ptos_tall/src/main/java/com/ccsens/ptos_tall/persist/dao/IdcDomainDao.java @@ -0,0 +1,28 @@ +package com.ccsens.ptos_tall.persist.dao; + +import com.ccsens.ptos_tall.bean.po.IdcDomain; +import com.ccsens.ptos_tall.persist.mapper.IdcDomainMapper; +import org.apache.ibatis.annotations.Param; + +import java.util.List; + +/** + * @author 逗 + */ +public interface IdcDomainDao extends IdcDomainMapper { + /** + * 根据code查询域信息 + * @param code 域code + * @return 返回域信息 + */ + IdcDomain getByCode(@Param("code") String code); + + /** + * 查找自己的域信息 + * @return 返回域信息 + */ + IdcDomain getOneself(); + + + +} diff --git a/ptos_tall/src/main/java/com/ccsens/ptos_tall/persist/dao/SysAuthDao.java b/ptos_tall/src/main/java/com/ccsens/ptos_tall/persist/dao/SysAuthDao.java new file mode 100644 index 0000000..ca13d61 --- /dev/null +++ b/ptos_tall/src/main/java/com/ccsens/ptos_tall/persist/dao/SysAuthDao.java @@ -0,0 +1,25 @@ +package com.ccsens.ptos_tall.persist.dao; + +import com.ccsens.ptos_tall.bean.po.SysAuth; +import com.ccsens.ptos_tall.persist.mapper.SysAuthMapper; +import org.apache.ibatis.annotations.Param; + +/** + * @author 逗 + */ +public interface SysAuthDao extends SysAuthMapper { + + /** + * 根据手机号查看认证方式 + * @param phone 手机号 + * @return 返回认证信息 + */ + SysAuth getByPhone(@Param("phone") String phone); + + /** + * 根据userId获取手机号 + * @param userId userId + * @return 返回手机号 + */ + String getPhoneByUserId(@Param("userId") Long userId); +} diff --git a/ptos_tall/src/main/java/com/ccsens/ptos_tall/persist/dao/SysUserDao.java b/ptos_tall/src/main/java/com/ccsens/ptos_tall/persist/dao/SysUserDao.java new file mode 100644 index 0000000..6fd5514 --- /dev/null +++ b/ptos_tall/src/main/java/com/ccsens/ptos_tall/persist/dao/SysUserDao.java @@ -0,0 +1,9 @@ +package com.ccsens.ptos_tall.persist.dao; + +import com.ccsens.ptos_tall.persist.mapper.SysUserMapper; + +/** + * @author 逗 + */ +public interface SysUserDao extends SysUserMapper { +} diff --git a/ptos_tall/src/main/java/com/ccsens/ptos_tall/persist/mapper/IdcDomainMapper.java b/ptos_tall/src/main/java/com/ccsens/ptos_tall/persist/mapper/IdcDomainMapper.java new file mode 100644 index 0000000..86c07f8 --- /dev/null +++ b/ptos_tall/src/main/java/com/ccsens/ptos_tall/persist/mapper/IdcDomainMapper.java @@ -0,0 +1,30 @@ +package com.ccsens.ptos_tall.persist.mapper; + +import com.ccsens.ptos_tall.bean.po.IdcDomain; +import com.ccsens.ptos_tall.bean.po.IdcDomainExample; +import java.util.List; +import org.apache.ibatis.annotations.Param; + +public interface IdcDomainMapper { + long countByExample(IdcDomainExample example); + + int deleteByExample(IdcDomainExample example); + + int deleteByPrimaryKey(Long id); + + int insert(IdcDomain record); + + int insertSelective(IdcDomain record); + + List selectByExample(IdcDomainExample example); + + IdcDomain selectByPrimaryKey(Long id); + + int updateByExampleSelective(@Param("record") IdcDomain record, @Param("example") IdcDomainExample example); + + int updateByExample(@Param("record") IdcDomain record, @Param("example") IdcDomainExample example); + + int updateByPrimaryKeySelective(IdcDomain record); + + int updateByPrimaryKey(IdcDomain record); +} \ No newline at end of file diff --git a/ptos_tall/src/main/java/com/ccsens/ptos_tall/persist/mapper/SysAuthMapper.java b/ptos_tall/src/main/java/com/ccsens/ptos_tall/persist/mapper/SysAuthMapper.java new file mode 100644 index 0000000..558bfbb --- /dev/null +++ b/ptos_tall/src/main/java/com/ccsens/ptos_tall/persist/mapper/SysAuthMapper.java @@ -0,0 +1,30 @@ +package com.ccsens.ptos_tall.persist.mapper; + +import com.ccsens.ptos_tall.bean.po.SysAuth; +import com.ccsens.ptos_tall.bean.po.SysAuthExample; +import java.util.List; +import org.apache.ibatis.annotations.Param; + +public interface SysAuthMapper { + long countByExample(SysAuthExample example); + + int deleteByExample(SysAuthExample example); + + int deleteByPrimaryKey(Long id); + + int insert(SysAuth record); + + int insertSelective(SysAuth record); + + List selectByExample(SysAuthExample example); + + SysAuth selectByPrimaryKey(Long id); + + int updateByExampleSelective(@Param("record") SysAuth record, @Param("example") SysAuthExample example); + + int updateByExample(@Param("record") SysAuth record, @Param("example") SysAuthExample example); + + int updateByPrimaryKeySelective(SysAuth record); + + int updateByPrimaryKey(SysAuth record); +} \ No newline at end of file diff --git a/ptos_tall/src/main/java/com/ccsens/ptos_tall/persist/mapper/SysSigninLogMapper.java b/ptos_tall/src/main/java/com/ccsens/ptos_tall/persist/mapper/SysSigninLogMapper.java new file mode 100644 index 0000000..3b961c6 --- /dev/null +++ b/ptos_tall/src/main/java/com/ccsens/ptos_tall/persist/mapper/SysSigninLogMapper.java @@ -0,0 +1,30 @@ +package com.ccsens.ptos_tall.persist.mapper; + +import com.ccsens.ptos_tall.bean.po.SysSigninLog; +import com.ccsens.ptos_tall.bean.po.SysSigninLogExample; +import java.util.List; +import org.apache.ibatis.annotations.Param; + +public interface SysSigninLogMapper { + long countByExample(SysSigninLogExample example); + + int deleteByExample(SysSigninLogExample example); + + int deleteByPrimaryKey(Long id); + + int insert(SysSigninLog record); + + int insertSelective(SysSigninLog record); + + List selectByExample(SysSigninLogExample example); + + SysSigninLog selectByPrimaryKey(Long id); + + int updateByExampleSelective(@Param("record") SysSigninLog record, @Param("example") SysSigninLogExample example); + + int updateByExample(@Param("record") SysSigninLog record, @Param("example") SysSigninLogExample example); + + int updateByPrimaryKeySelective(SysSigninLog record); + + int updateByPrimaryKey(SysSigninLog record); +} \ No newline at end of file diff --git a/ptos_tall/src/main/java/com/ccsens/ptos_tall/persist/mapper/SysUserDeviceMapper.java b/ptos_tall/src/main/java/com/ccsens/ptos_tall/persist/mapper/SysUserDeviceMapper.java new file mode 100644 index 0000000..63485c3 --- /dev/null +++ b/ptos_tall/src/main/java/com/ccsens/ptos_tall/persist/mapper/SysUserDeviceMapper.java @@ -0,0 +1,30 @@ +package com.ccsens.ptos_tall.persist.mapper; + +import com.ccsens.ptos_tall.bean.po.SysUserDevice; +import com.ccsens.ptos_tall.bean.po.SysUserDeviceExample; +import java.util.List; +import org.apache.ibatis.annotations.Param; + +public interface SysUserDeviceMapper { + long countByExample(SysUserDeviceExample example); + + int deleteByExample(SysUserDeviceExample example); + + int deleteByPrimaryKey(Long id); + + int insert(SysUserDevice record); + + int insertSelective(SysUserDevice record); + + List selectByExample(SysUserDeviceExample example); + + SysUserDevice selectByPrimaryKey(Long id); + + int updateByExampleSelective(@Param("record") SysUserDevice record, @Param("example") SysUserDeviceExample example); + + int updateByExample(@Param("record") SysUserDevice record, @Param("example") SysUserDeviceExample example); + + int updateByPrimaryKeySelective(SysUserDevice record); + + int updateByPrimaryKey(SysUserDevice record); +} \ No newline at end of file diff --git a/ptos_tall/src/main/java/com/ccsens/ptos_tall/persist/mapper/SysUserMapper.java b/ptos_tall/src/main/java/com/ccsens/ptos_tall/persist/mapper/SysUserMapper.java new file mode 100644 index 0000000..a41279b --- /dev/null +++ b/ptos_tall/src/main/java/com/ccsens/ptos_tall/persist/mapper/SysUserMapper.java @@ -0,0 +1,30 @@ +package com.ccsens.ptos_tall.persist.mapper; + +import com.ccsens.ptos_tall.bean.po.SysUser; +import com.ccsens.ptos_tall.bean.po.SysUserExample; +import java.util.List; +import org.apache.ibatis.annotations.Param; + +public interface SysUserMapper { + long countByExample(SysUserExample example); + + int deleteByExample(SysUserExample example); + + int deleteByPrimaryKey(Long id); + + int insert(SysUser record); + + int insertSelective(SysUser record); + + List selectByExample(SysUserExample example); + + SysUser selectByPrimaryKey(Long id); + + int updateByExampleSelective(@Param("record") SysUser record, @Param("example") SysUserExample example); + + int updateByExample(@Param("record") SysUser record, @Param("example") SysUserExample example); + + int updateByPrimaryKeySelective(SysUser record); + + int updateByPrimaryKey(SysUser record); +} \ No newline at end of file diff --git a/ptos_tall/src/main/java/com/ccsens/ptos_tall/service/HeartbeatService.java b/ptos_tall/src/main/java/com/ccsens/ptos_tall/service/HeartbeatService.java index f27dbf9..2dc6980 100644 --- a/ptos_tall/src/main/java/com/ccsens/ptos_tall/service/HeartbeatService.java +++ b/ptos_tall/src/main/java/com/ccsens/ptos_tall/service/HeartbeatService.java @@ -35,7 +35,7 @@ public class HeartbeatService{ /** * 定时发送心跳信息 */ - @Scheduled(cron="0/30 * * * * ?") + @Scheduled(cron="0 */10 * * * ?") public void sendHeartbeat(){ //查找业务列表 SysBusinessExample businessExample = new SysBusinessExample(); diff --git a/ptos_tall/src/main/java/com/ccsens/ptos_tall/service/IProjectService.java b/ptos_tall/src/main/java/com/ccsens/ptos_tall/service/IProjectService.java index 3d1ed8c..9d4b054 100644 --- a/ptos_tall/src/main/java/com/ccsens/ptos_tall/service/IProjectService.java +++ b/ptos_tall/src/main/java/com/ccsens/ptos_tall/service/IProjectService.java @@ -15,5 +15,20 @@ public interface IProjectService { * @param userId userId * @return 返回项目列表 */ - List queryDomainByUser(ProjectDto.QueryProjectDto param, Long userId); + List queryProjectByUser(String phone, ProjectDto.QueryProjectDto param, Long userId); + + /** + * 根据手机号获取项目信息 + * @param param 手机号和开始结束时间 + * @return 返回业务项目列表 + */ + List queryProjectByPhone(ProjectDto.QueryProjectByPhone param); + + /** + * 查询日历是否有小红点 + * @param param 开始/结束时间 + * @param userId 用户id + * @return 是否有小红点 + */ + List haveProjectDay(ProjectDto.QueryHaveProject param, Long userId); } diff --git a/ptos_tall/src/main/java/com/ccsens/ptos_tall/service/IUserService.java b/ptos_tall/src/main/java/com/ccsens/ptos_tall/service/IUserService.java new file mode 100644 index 0000000..8bea812 --- /dev/null +++ b/ptos_tall/src/main/java/com/ccsens/ptos_tall/service/IUserService.java @@ -0,0 +1,39 @@ +package com.ccsens.ptos_tall.service; + +import com.ccsens.ptos_tall.bean.dto.UserDto; +import com.ccsens.ptos_tall.bean.vo.UserVo; + +/** + * @author 逗 + */ +public interface IUserService { + /** + * 用户登录 + * @param params 登录信息 + * @param deviceId 设备id + * @return 返回token + */ + UserVo.TokenBean userSignin(UserDto.SigninDto params, String deviceId,String clientIp); + + /** + * 业务根据token获取用户信息 + * @param params 业务app和token + * @return 返回用户信息 + */ + UserVo.BusinessUserInfo userByBusinessToken(UserDto.BusinessToken params); + + /** + * 获取手机验证码 + * @param phone 手机号 + * @param verificationCodeId 图形验证码id + * @param verificationCodeValue 图形验证码值 + * @return 返回手机号和有效期 + */ + UserVo.SmsCode getSignInSmsCode(String phone, String verificationCodeId, String verificationCodeValue) throws Exception; + + /** + * 获取图片验证码 + * @return 返回base64图片 + */ + UserVo.VerificationCode getVertifyCode(); +} diff --git a/ptos_tall/src/main/java/com/ccsens/ptos_tall/service/ProjectService.java b/ptos_tall/src/main/java/com/ccsens/ptos_tall/service/ProjectService.java index 43143fc..9913c65 100644 --- a/ptos_tall/src/main/java/com/ccsens/ptos_tall/service/ProjectService.java +++ b/ptos_tall/src/main/java/com/ccsens/ptos_tall/service/ProjectService.java @@ -1,14 +1,31 @@ package com.ccsens.ptos_tall.service; +import cn.hutool.core.collection.CollectionUtil; +import cn.hutool.core.date.DateUtil; +import cn.hutool.core.util.ObjectUtil; +import com.alibaba.fastjson.JSON; +import com.alibaba.fastjson.JSONArray; +import com.alibaba.fastjson.JSONObject; +import com.ccsens.ptos_tall.bean.dto.DomainDto; import com.ccsens.ptos_tall.bean.dto.ProjectDto; +import com.ccsens.ptos_tall.bean.po.IdcDomain; +import com.ccsens.ptos_tall.bean.po.SysBusiness; +import com.ccsens.ptos_tall.bean.po.SysBusinessExample; import com.ccsens.ptos_tall.bean.vo.ProjectVo; +import com.ccsens.ptos_tall.persist.dao.IdcDomainDao; +import com.ccsens.ptos_tall.persist.mapper.SysBusinessMapper; +import com.ccsens.ptos_tall.util.PtOsConstant; +import com.ccsens.util.RestTemplateUtil; import lombok.extern.slf4j.Slf4j; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Propagation; import org.springframework.transaction.annotation.Transactional; -import java.util.ArrayList; -import java.util.List; +import javax.annotation.Resource; +import java.text.SimpleDateFormat; +import java.util.*; +import java.util.stream.Collectors; + /** * @author 逗 */ @@ -16,18 +33,191 @@ import java.util.List; @Service @Transactional(propagation = Propagation.REQUIRED,rollbackFor = Exception.class) public class ProjectService implements IProjectService { - + @Resource + private SysBusinessMapper businessMapper; + @Resource + private IdcDomainDao domainDao; @Override - public List queryDomainByUser(ProjectDto.QueryProjectDto param, Long userId) { + public List queryProjectByUser(String phone, ProjectDto.QueryProjectDto param, Long userId) { List projectInfoList = new ArrayList<>(); + //访问传达室,请求该用户在其他域的项目信息 + ProjectDto.QueryProjectByPhone queryProjectByPhone = new ProjectDto.QueryProjectByPhone(); + queryProjectByPhone.setStartTime(param.getStartTime()); + queryProjectByPhone.setEndTime(param.getEndTime()); + queryProjectByPhone.setPhone(new ArrayList<>(Collections.singleton(phone))); + + DomainDto.TallToOtherDomain tallToOtherDomain = new DomainDto.TallToOtherDomain(); + tallToOtherDomain.setUrl("/project/byPhone"); + tallToOtherDomain.setParam(JSON.toJSONString(queryProjectByPhone)); + //发送到本域的传达室 + //查询自身域信息 + IdcDomain selfDomains = domainDao.getOneself(); + if(ObjectUtil.isNotNull(selfDomains)) { + String domainUrl = selfDomains.getUrl() + "/domain/tallToIdc"; + log.info("调用接口:{}--", domainUrl); + JSONObject jsonObject = null; + try { + String postBody = RestTemplateUtil.postBody(domainUrl, param); + jsonObject = JSONObject.parseObject(postBody); + }catch (Exception e){ + log.error("调用传达室异常", e); + } + log.info("接口返回:{}", jsonObject); + //请求正确返回则修改最后应答时间,否则无操作 + if(jsonObject != null){ + Integer code = jsonObject.getInteger("code"); + if (code != null && code == 200) { + JSONArray data = jsonObject.getJSONArray("data"); + if(CollectionUtil.isNotEmpty(data)){ + for (Object object : data) { + ProjectVo.ProjectInfo projectInfo; + try { + JSONObject object1 = (JSONObject) object; + projectInfo = object1.toJavaObject(ProjectVo.ProjectInfo.class); + projectInfoList.add(projectInfo); + }catch (Exception e){ + log.error("项目转换失败"+e); + } + } + } + } + } + } + //查询本域所有在线的业务信息 + Long lastAnswerTime = System.currentTimeMillis() - PtOsConstant.LAST_ANSWER_TIME; + SysBusinessExample businessExample = new SysBusinessExample(); + businessExample.createCriteria().andLastAnswerTimeGreaterThanOrEqualTo(lastAnswerTime).andTypeEqualTo((byte) 0); + List sysBusinesses = businessMapper.selectByExample(businessExample); + //遍历业务 + if(CollectionUtil.isNotEmpty(sysBusinesses)){ + for (SysBusiness business : sysBusinesses) { + String url = business.getUrl() + "/project/query"; + log.info("调用接口:{}--", url); + //TODO token + String postBody = RestTemplateUtil.postBody(url,param); + + JSONObject jsonObject = JSONObject.parseObject(postBody); + log.info("接口返回:{}", jsonObject); + //请求正确返回则修改最后应答时间,否则无操作 + Integer code = jsonObject.getInteger("code"); + if (code == null || code != 200) { + continue; + } + JSONArray data = jsonObject.getJSONArray("data"); + if(CollectionUtil.isNotEmpty(data)){ + for (Object object : data) { + ProjectVo.ProjectInfo projectInfo; + try { + JSONObject object1 = (JSONObject) object; + projectInfo = object1.toJavaObject(ProjectVo.ProjectInfo.class); + projectInfoList.add(projectInfo); + }catch (Exception e){ + log.error("项目转换失败"+e); + } + } + } + } + } + //TODO 排序 + //TODO 添加测试数据 - projectInfoList.add(new ProjectVo.ProjectInfo(1L,"测试项目1",1641799829000L,1641886229000L,"http://101.201.226.163/gateway/ptos/debug","dh","tall")); - projectInfoList.add(new ProjectVo.ProjectInfo(2L,"测试项目2",1641799829001L,1641886229004L,"http://101.201.226.163/gateway/ptos/debug","dh","tall")); - projectInfoList.add(new ProjectVo.ProjectInfo(3L,"测试项目3",1641799829002L,1641886229005L,"http://101.201.226.163/gateway/ptos/debug","dh","tall")); - projectInfoList.add(new ProjectVo.ProjectInfo(4L,"测试项目4",1641799829003L,1641886229006L,"http://101.201.226.163/gateway/ptos/debug","dh","tall")); + projectInfoList.add(new ProjectVo.ProjectInfo(1L,"测试项目1",1641799829000L,1644718446001L,"http://101.201.226.163/gateway/ptos/debug","dh","tall")); + projectInfoList.add(new ProjectVo.ProjectInfo(2L,"测试项目2",1641799829001L,1644718446002L,"http://101.201.226.163/gateway/ptos/debug","dh","tall")); + projectInfoList.add(new ProjectVo.ProjectInfo(3L,"测试项目3",1641799829002L,1644718446003L,"http://101.201.226.163/gateway/ptos/debug","dh","tall")); + projectInfoList.add(new ProjectVo.ProjectInfo(4L,"测试项目4",1641799829003L,1644718446004L,"http://101.201.226.163/gateway/ptos/debug","dh","tall")); + + ProjectVo.ProjectInfo projectInfo = new ProjectVo.ProjectInfo(4L,"测试项目4",1641799829003L,1644718446004L,"http://101.201.226.163/gateway/ptos/debug","dh","tall"); + List p1 = new ArrayList<>(); + p1.add(new ProjectVo.ProjectInfo(5L,"子项目1",1641799829003L,1644718446004L,"http://101.201.226.163/gateway/ptos/debug","dh","tall")); + p1.add(new ProjectVo.ProjectInfo(6L,"子项目2",1641799829003L,1644718446004L,"http://101.201.226.163/gateway/ptos/debug","dh","tall")); + projectInfo.setSonProjectList(p1); + + projectInfoList.add(projectInfo); return projectInfoList; } + + @Override + public List queryProjectByPhone(ProjectDto.QueryProjectByPhone param) { + //根据手机号查询用户信息 + //生成token + //查找所有在线的业务 + //遍历业务 + //查询用户在业务内的项目信息(带token过去) + return null; + } + + @Override + public List haveProjectDay(ProjectDto.QueryHaveProject param, Long userId) { + //返回值 + List haveProject = new ArrayList<>(); + + for (int i = 0; i < 28; i++) { + if(i < 5){ + haveProject.add("0"); + }else { + haveProject.add("1"); + } + } + +// //获取两个日期相差的天数 +// SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd"); +// Date startTimeParam = new Date(param.getStartTime()); +// Date endTimeParam = new Date(param.getEndTime()); +// long dayDifference = DateUtil.betweenDay(startTimeParam, endTimeParam, false) + 1; +// +// Long realStartTime = null; +// Long realEndTime = null; +// Long realDifference = null; +// List realDateList = new ArrayList<>(); +// //查询项目列表 +// List projectList = projectDao.queryProjectList(param.getStartTime(), param.getEndTime(), userId); +// //获取项目的时间范围 +// if (CollectionUtil.isNotEmpty(projectList)) { +// List projectStartTimeList = projectList.stream().map(ProjectVo.QueryProject::getStartTime).collect(Collectors.toList()); +// List projectEndTimeList = projectList.stream().map(ProjectVo.QueryProject::getEndTime).collect(Collectors.toList()); +// Long maxStartTime = Collections.min(projectStartTimeList); +// Long maxEndTime = Collections.max(projectEndTimeList); +// +// realStartTime = maxStartTime >= param.getStartTime() ? maxStartTime : param.getStartTime(); +// realEndTime = maxEndTime >= param.getEndTime() ? param.getEndTime() : maxEndTime; +// realDifference = DateUtil.betweenDay(new Date(realStartTime), new Date(realEndTime), false) + 1; +// GregorianCalendar calendar = new GregorianCalendar(); +// calendar.setTime(new Date(realStartTime)); +// realDateList.add(format.format(new Date(realStartTime))); +// for (int i = 1; i < realDifference; i++) { +// calendar.add(Calendar.DATE, 1); +// Date time = calendar.getTime(); +// realDateList.add(format.format(time)); +// } +// } +// //获取参数的时间范围 +// GregorianCalendar calendar = new GregorianCalendar(); +// calendar.setTime(startTimeParam); +// List dateList = new ArrayList<>(); +// dateList.add(format.format(startTimeParam)); +// for (int i = 1; i < dayDifference; i++) { +// calendar.add(Calendar.DATE, 1); +// Date time = calendar.getTime(); +// dateList.add(format.format(time)); +// } +// +// System.out.println(dateList); +// +// //比较参数时间与项目时间 +// for (int i = 0; i < dateList.size(); i++) { +// haveProject.add("0"); +// if (CollectionUtil.isNotEmpty(projectList)) { +// for (String realDate : realDateList) { +// if (dateList.get(i).equals(realDate)) { +// haveProject.set(i, "1"); +// } +// } +// } +// } + + return haveProject; + } } diff --git a/ptos_tall/src/main/java/com/ccsens/ptos_tall/service/UserService.java b/ptos_tall/src/main/java/com/ccsens/ptos_tall/service/UserService.java new file mode 100644 index 0000000..695ea2d --- /dev/null +++ b/ptos_tall/src/main/java/com/ccsens/ptos_tall/service/UserService.java @@ -0,0 +1,384 @@ +package com.ccsens.ptos_tall.service; + +import cn.hutool.core.collection.CollectionUtil; +import cn.hutool.core.lang.Snowflake; +import cn.hutool.core.util.ObjectUtil; +import cn.hutool.core.util.RandomUtil; +import cn.hutool.core.util.StrUtil; +import com.ccsens.ptos_tall.bean.dto.UserDto; +import com.ccsens.ptos_tall.bean.po.*; +import com.ccsens.ptos_tall.bean.vo.UserVo; +import com.ccsens.ptos_tall.persist.dao.SysAuthDao; +import com.ccsens.ptos_tall.persist.dao.SysUserDao; +import com.ccsens.ptos_tall.persist.mapper.SysSigninLogMapper; +import com.ccsens.ptos_tall.persist.mapper.SysUserDeviceMapper; +import com.ccsens.ptos_tall.util.PtOsCodeError; +import com.ccsens.util.*; +import com.ccsens.util.bean.wx.po.WxOauth2UserInfo; +import com.ccsens.util.exception.BaseException; +import com.ccsens.util.wx.WxGzhUtil; +import lombok.extern.slf4j.Slf4j; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Propagation; +import org.springframework.transaction.annotation.Transactional; + +import javax.annotation.Resource; +import java.util.List; +import java.util.Map; +import java.util.regex.Matcher; +import java.util.regex.Pattern; + +/** + * @author 逗 + */ +@Slf4j +@Service +@Transactional(propagation = Propagation.REQUIRED,rollbackFor = Exception.class) +public class UserService implements IUserService { + @Resource + private RedisUtil redisUtil; + @Resource + private SysUserDao sysUserDao; + @Resource + private SysAuthDao sysAuthDao; + @Resource + private Snowflake snowflake; + @Resource + private SysUserDeviceMapper userDeviceMapper; + @Resource + private SysSigninLogMapper sysSigninLogMapper; + + @Override + public UserVo.TokenBean userSignin(UserDto.SigninDto params, String deviceId, String clientIp) { + //验证客户端类型 + switch (params.getClient()) { + case 0: + case 1: + break; + default: + throw new BaseException(PtOsCodeError.CLIENT_ERROR); + } + String identifier = params.getData().getIdentifier(); + String credential = params.getData().getCredential(); + + //验证登录方式,第一版只支持手机号登录和微信登 + UserVo.UserSign userSign; + //手机号 + String phone = null; + switch (params.getType()) { + case 1: + //验证数据 + if(StrUtil.isBlank(identifier)){ + throw new BaseException(PtOsCodeError.NOT_PHONE); + } + if(StrUtil.isBlank(credential)){ + throw new BaseException(PtOsCodeError.NOT_SMS_CODE); + } + //手机号登录 + userSign = phoneLogin(identifier, credential, deviceId); + phone = identifier; + break; + case 4: + //微信登录 + WebConstant.IDENTIFY_TYPE identifyType = WebConstant.IDENTIFY_TYPE.valueOf(params.getType()); + userSign = wxLogin(identifyType,identifier); + break; + default: { + throw new BaseException(PtOsCodeError.SIGNIN_TYPE_ERROR); + } + } + //更新用户设备关联信息 + saveUserDevice(userSign.getUserId(),deviceId,params.getClient()); + //添加登录记录 + saveSigninLog(userSign,deviceId,params.getClient(),clientIp); + + //生成token + Map theMap = CollectionUtil.newHashMap(); + theMap.put("authId", String.valueOf(userSign.getAuthId())); + UserVo.TokenBean tokenBean = generateToken(userSign.getUserId(), theMap); + + tokenBean.setId(userSign.getUserId()); + if(ObjectUtil.isNull(phone)){ + //TODO 获取手机号 + phone = sysAuthDao.getPhoneByUserId(userSign.getUserId()); + } + tokenBean.setPhone(phone); + return tokenBean; + } + + /** + * 获取token + */ + private UserVo.TokenBean generateToken(Object subject, Map payLoads) { + UserVo.TokenBean tokenBean = new UserVo.TokenBean(); + //生成过期时间 + long tokenExpired = 3600 * 1000L * 2; + long refreshTokenExpired = 3600 * 1000L * 24 * 30; + + //1.生成token并缓存 + String token = JwtUtil.createJWT(subject + "",payLoads, tokenExpired,WebConstant.JWT_ACCESS_TOKEN_SECERT); + redisUtil.set(RedisKeyManager.getTokenCachedKey(subject), token, tokenExpired / 1000); + tokenBean.setToken(token); + + //生成refreshToken + String refreshToken = JwtUtil.createJWT(subject + "", payLoads, refreshTokenExpired, WebConstant.JWT_ACCESS_TOKEN_SECERT); + redisUtil.set(RedisKeyManager.getRefreshTokenCachedKey(subject), refreshToken, refreshTokenExpired / 1000); + tokenBean.setRefreshToken(refreshToken); + + //2.返回 + return tokenBean; + } + + /** + * 添加登录记录 + */ + private void saveSigninLog(UserVo.UserSign userSign, String deviceId, Integer client, String clientIp) { + SysSigninLog sysSigninLog = new SysSigninLog(); + sysSigninLog.setId(snowflake.nextId()); + sysSigninLog.setUserId(userSign.getUserId()); + sysSigninLog.setAuthId(userSign.getAuthId()); + sysSigninLog.setTime(System.currentTimeMillis()); + sysSigninLog.setDeviceId(deviceId); + sysSigninLog.setClientType(client.byteValue()); + sysSigninLog.setIpAddress(clientIp); + sysSigninLogMapper.insertSelective(sysSigninLog); + } + + /** + * 添加用户设备关联信息 + * @param userId userId + * @param deviceId 设备id + */ + private void saveUserDevice(Long userId, String deviceId,Integer client) { + //查找用户和设备的关联信息,如果为空则添加关联信息 + SysUserDeviceExample userDeviceExample = new SysUserDeviceExample(); + userDeviceExample.createCriteria().andUserIdEqualTo(userId).andDeviceIdEqualTo(deviceId); + List sysUserDevices = userDeviceMapper.selectByExample(userDeviceExample); + //不存在则添加 + if(CollectionUtil.isEmpty(sysUserDevices)){ + SysUserDevice sysUserDevice = new SysUserDevice(); + sysUserDevice.setId(snowflake.nextId()); + sysUserDevice.setUserId(userId); + sysUserDevice.setDeviceId(deviceId); + sysUserDevice.setClientType(client.byteValue()); + userDeviceMapper.insertSelective(sysUserDevice); + } + } + + /** + * 手机号登陆 + * @param phone 手机号 + * @param smsVerifyCode 验证码 + * @param deviceId 设备id + * @return 返回用户信息 + */ + private UserVo.UserSign phoneLogin(String phone, String smsVerifyCode, String deviceId) { + UserVo.UserSign userSignVo; + if (!isSmsCodeCorrect(phone, smsVerifyCode)) { + throw new BaseException(CodeEnum.SMS_CODE_CORRECT); + } + //1.查找对应账户,不存在则注册 + SysAuth theAuth = sysAuthDao.getByPhone(phone); + if (ObjectUtil.isNull(theAuth)) { + theAuth = saveUser(phone, null, WebConstant.IDENTIFY_TYPE.Phone,deviceId); + } + //返回用户id和认证id + userSignVo = new UserVo.UserSign(); + userSignVo.setUserId(theAuth.getUserId()); + userSignVo.setAuthId(theAuth.getId()); + //TODO 给所有手机号一样的角色添加userId + + return userSignVo; + } + + /** + * 微信登陆 + * @param code 微信code + * @return 返回用户信息 + */ + private UserVo.UserSign wxLogin(WebConstant.IDENTIFY_TYPE identifyType, String code) { + UserVo.UserSign userSignVo; + //获取微信信息并保存 + log.info("公众号登陆,{}", code); + WxOauth2UserInfo wxOauth2UserInfo = WxGzhUtil.getOauth2UserInfo(identifyType, code); + log.info("获取用户的微信信息,{}", wxOauth2UserInfo); + SysAuth theAuth; + if (ObjectUtil.isNull(wxOauth2UserInfo)) { + throw new BaseException(CodeEnum.NOT_SELECT_WX); + } + SysAuthExample authExample = new SysAuthExample(); + authExample.createCriteria().andIdentifyTypeEqualTo((byte) WebConstant.IDENTIFY_TYPE.OAUTH2_Wx.value) + .andIdentifierEqualTo(wxOauth2UserInfo.getOpenId()).andCredentialEqualTo(wxOauth2UserInfo.getUnionId()); + List authList = sysAuthDao.selectByExample(authExample); + if (CollectionUtil.isNotEmpty(authList)) { + theAuth = authList.get(0); + log.info("该用户已有微信登录的auth信息,{}", theAuth); + } else { + SysAuthExample sysAuthExample = new SysAuthExample(); + sysAuthExample.createCriteria().andCredentialEqualTo(wxOauth2UserInfo.getUnionId()); + List sysAuthList = sysAuthDao.selectByExample(sysAuthExample); + if (CollectionUtil.isNotEmpty(sysAuthList)) { + //添加认证方式 + theAuth = new SysAuth(); + theAuth.setId(snowflake.nextId()); + theAuth.setUserId(sysAuthList.get(0).getUserId()); + theAuth.setIdentifyType((byte) WebConstant.IDENTIFY_TYPE.OAUTH2_Wx.value); + theAuth.setIdentifier(wxOauth2UserInfo.getOpenId()); + theAuth.setCredential(wxOauth2UserInfo.getUnionId()); + sysAuthDao.insertSelective(theAuth); + } else { + //新建用户并保存微信信息 + SysUser user = new SysUser(); + user.setId(snowflake.nextId()); + user.setAvatarUrl(wxOauth2UserInfo.getHeadImgUrl()); + user.setName(wxOauth2UserInfo.getNickname()); + user.setGender((byte) wxOauth2UserInfo.getSex()); + user.setCountry(wxOauth2UserInfo.getCountry()); + user.setProvince(wxOauth2UserInfo.getProvince()); + user.setCity(wxOauth2UserInfo.getCity()); + sysUserDao.insertSelective(user); + //添加认证方式 + theAuth = new SysAuth(); + theAuth.setId(snowflake.nextId()); + theAuth.setUserId(user.getId()); + theAuth.setIdentifyType((byte) WebConstant.IDENTIFY_TYPE.OAUTH2_Wx.value); + theAuth.setIdentifier(wxOauth2UserInfo.getOpenId()); + theAuth.setCredential(wxOauth2UserInfo.getUnionId()); + sysAuthDao.insertSelective(theAuth); + } + } + //2.返回 + userSignVo = new UserVo.UserSign(); + userSignVo.setUserId(theAuth.getUserId()); + userSignVo.setAuthId(theAuth.getId()); + log.info("认证成功返回:{}", userSignVo); + return userSignVo; + } + + + /** + * 添加用户和认证方式 + * @return 认证信息 + */ + private SysAuth saveUser(String identifier, String credential, WebConstant.IDENTIFY_TYPE identifyType, String deviceId) { + //1.添加user + SysUser user = new SysUser(); + user.setId(snowflake.nextId()); + user.setDeviceId(deviceId); + user.setAuthType((byte) 1); + sysUserDao.insertSelective(user); + //2.添加auth + SysAuth auth = new SysAuth(); + auth.setId(snowflake.nextId()); + auth.setUserId(user.getId()); + auth.setIdentifyType((byte) identifyType.value); + auth.setIdentifier(identifier); + auth.setCredential(credential); + sysAuthDao.insertSelective(auth); + return auth; + } + + /** + * 判断验证码是否有效 + */ + private Boolean isSmsCodeCorrect(String phone, String smsCode) { + boolean correct = false; + if (redisUtil.hasKey(RedisKeyManager.getSigninSmsKey(phone))) { + if (smsCode.equals(redisUtil.get(RedisKeyManager.getSigninSmsKey(phone)).toString())) { + correct = true; + } + } + return correct; + } + + /** + * 通过用户查找手机号 + * @param userId userId + * @return 手机号 + */ + public String getPhone(Long userId) { + SysAuthExample authExample = new SysAuthExample(); + authExample.createCriteria().andUserIdEqualTo(userId).andIdentifyTypeEqualTo((byte) WebConstant.IDENTIFY_TYPE.Phone.value); + List sysAuthList = sysAuthDao.selectByExample(authExample); + if (CollectionUtil.isNotEmpty(sysAuthList)) { + return sysAuthList.get(0).getIdentifier(); + } else { + return null; + } + } + + @Override + public UserVo.SmsCode getSignInSmsCode(String phone, String verificationCodeId, String verificationCodeValue) { + //检查图形验证码是否正确 + String codeKey = WebConstant.IMAGE_CODE + verificationCodeId; + if (!redisUtil.hasKey(codeKey)) { + throw new BaseException(CodeEnum.VERIFICATION_CODE_PAST_IMG); + } + if (!verificationCodeValue.equals(String.valueOf(redisUtil.get(codeKey)))) { + throw new BaseException(CodeEnum.VERIFICATION_CODE_ERROR_IMG); + } + //验证一次,无论是否正确,都将缓存删除 + redisUtil.del(codeKey); + //验证手机号的正确性 + String regex = "[1]([3-9])[0-9]{9}$"; + Pattern p = Pattern.compile(regex); + Matcher m = p.matcher(phone); + boolean isMatch = m.matches(); + if (!isMatch) { + throw new BaseException(CodeEnum.PHONE_ERR); + } + + UserVo.SmsCode smsCodeVo; + //1.验证发送间隔是否大于指定间隔 + if (redisUtil.hasKey(RedisKeyManager.getSigninSmsExistKey(phone))) { + throw new BaseException(PtOsCodeError.ERROR_SEND_TOO_FAST); + } + //测试环境默认发送1111 + String verifyCode = "1111"; + if ("1".equalsIgnoreCase(PropUtil.smsCode)) { + verifyCode = RandomUtil.randomNumbers(4); + } + //3.保存到redis中 + Integer codeValidInSeconds = WebConstant.Expired_Verify_Code_In_Seconds; + Integer codeExistInSeconds = WebConstant.Exist_Verify_Code_In_Seconds; + redisUtil.set(RedisKeyManager.getSigninSmsKey(phone), verifyCode, codeValidInSeconds); + redisUtil.set(RedisKeyManager.getSigninSmsExistKey(phone), verifyCode, codeExistInSeconds); + + //5.发送验证码 + if ("1".equalsIgnoreCase(PropUtil.smsCode)) { + SmsUtil.sendSms(phone, verifyCode, "", codeValidInSeconds); + } + //6.返回 + smsCodeVo = new UserVo.SmsCode(); + smsCodeVo.setPhone(phone); + smsCodeVo.setSmsCode(verifyCode); + smsCodeVo.setExpiredInSeconds(WebConstant.Expired_Verify_Code_In_Seconds); + return smsCodeVo; + } + + @Override + public UserVo.VerificationCode getVertifyCode() { + Map codeMap = ImageCodeGeneratorUtil.generateCountCode(); + //生成一个id + long id = snowflake.nextId(); + //将两个数的和,存在redis内,key为新生成的id + String imageCodeKey = WebConstant.IMAGE_CODE + id; + redisUtil.set(imageCodeKey, codeMap.get("sum"), 90); + log.info("将图形验证码存入redis:{},,,{}", imageCodeKey,codeMap.get("sum")); + String imageBase64 = "data:image/png;base64," + ImageCodeGeneratorUtil.generateCodeImage(null, (String) codeMap.get("imageCode"), 200, 70); + + UserVo.VerificationCode vertifyCode = new UserVo.VerificationCode(); + vertifyCode.setImageBase64(imageBase64); + vertifyCode.setVerificationCodeId(String.valueOf(id)); + + return vertifyCode; + } + + @Override + public UserVo.BusinessUserInfo userByBusinessToken(UserDto.BusinessToken params) { + //验证业务的appId和secret + //根据token查找用户信息 + //返回用户信息 + return null; + } +} diff --git a/ptos_tall/src/main/java/com/ccsens/ptos_tall/util/PtOsCodeError.java b/ptos_tall/src/main/java/com/ccsens/ptos_tall/util/PtOsCodeError.java index 09de6ca..84a472e 100644 --- a/ptos_tall/src/main/java/com/ccsens/ptos_tall/util/PtOsCodeError.java +++ b/ptos_tall/src/main/java/com/ccsens/ptos_tall/util/PtOsCodeError.java @@ -7,6 +7,10 @@ import com.ccsens.util.CodeError; */ public class PtOsCodeError extends CodeError { - public static final Code NOT_WBS_SHEET = new Code(501,"找不到wbs表",true); + public static final Code CLIENT_ERROR = new Code(501,"客户端类型异常",true); + public static final Code SIGNIN_TYPE_ERROR = new Code(502,"登录类型异常",true); + public static final Code NOT_PHONE = new Code(503,"手机号不能为空",true); + public static final Code NOT_SMS_CODE = new Code(504,"请填写手机号验证码",true); + public static final Code ERROR_SEND_TOO_FAST = new Code(504,"60秒内只能发送一次,请稍后再试",true); } diff --git a/ptos_tall/src/main/java/com/ccsens/ptos_tall/util/PtOsConstant.java b/ptos_tall/src/main/java/com/ccsens/ptos_tall/util/PtOsConstant.java index 582f37f..ff2c28d 100644 --- a/ptos_tall/src/main/java/com/ccsens/ptos_tall/util/PtOsConstant.java +++ b/ptos_tall/src/main/java/com/ccsens/ptos_tall/util/PtOsConstant.java @@ -8,6 +8,9 @@ import java.util.Map; */ public class PtOsConstant { + /**业务离线时间*/ + public static final Long LAST_ANSWER_TIME = 21 * 60 * 1000L; + /**图片类型*/ public static final String FILE_TYPE_IMG = "bmp,jpg,jpeg,png,tif,gif,pcx,tga,exif,fpx,svg,psd,cdr,pcd,dxf,ufo,eps,ai,raw,WMF,webp"; /**文档类型*/ diff --git a/ptos_tall/src/main/resources/application.yml b/ptos_tall/src/main/resources/application.yml index 5abf242..2fb38e5 100644 --- a/ptos_tall/src/main/resources/application.yml +++ b/ptos_tall/src/main/resources/application.yml @@ -1,4 +1,4 @@ spring: profiles: - active: prod - include: common, util-prod + active: dev + include: common, util-dev diff --git a/ptos_tall/src/main/resources/druid-dev.yml b/ptos_tall/src/main/resources/druid-dev.yml index 0e98f98..1de2452 100644 --- a/ptos_tall/src/main/resources/druid-dev.yml +++ b/ptos_tall/src/main/resources/druid-dev.yml @@ -28,7 +28,7 @@ spring: testOnReturn: false testWhileIdle: true timeBetweenEvictionRunsMillis: 60000 - url: jdbc:mysql://101.201.226.163:3306/tall_df?useUnicode=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai&autoReconnect=true + url: jdbc:mysql://101.201.226.163:3306/tall_dh?useUnicode=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai&autoReconnect=true username: root validationQuery: SELECT 1 FROM DUAL env: CCSENS_TALL \ No newline at end of file diff --git a/ptos_tall/src/main/resources/mapper_dao/IdcDomainDao.xml b/ptos_tall/src/main/resources/mapper_dao/IdcDomainDao.xml new file mode 100644 index 0000000..c66e5b1 --- /dev/null +++ b/ptos_tall/src/main/resources/mapper_dao/IdcDomainDao.xml @@ -0,0 +1,13 @@ + + + + + + + + + \ No newline at end of file diff --git a/ptos_tall/src/main/resources/mapper_dao/SysAuthDao.xml b/ptos_tall/src/main/resources/mapper_dao/SysAuthDao.xml new file mode 100644 index 0000000..8bb8c31 --- /dev/null +++ b/ptos_tall/src/main/resources/mapper_dao/SysAuthDao.xml @@ -0,0 +1,27 @@ + + + + + + + \ No newline at end of file diff --git a/ptos_tall/src/main/resources/mapper_dao/SysUserDao.xml b/ptos_tall/src/main/resources/mapper_dao/SysUserDao.xml new file mode 100644 index 0000000..3d9cac7 --- /dev/null +++ b/ptos_tall/src/main/resources/mapper_dao/SysUserDao.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/ptos_tall/src/main/resources/mapper_raw/IdcDomainMapper.xml b/ptos_tall/src/main/resources/mapper_raw/IdcDomainMapper.xml new file mode 100644 index 0000000..22520e2 --- /dev/null +++ b/ptos_tall/src/main/resources/mapper_raw/IdcDomainMapper.xml @@ -0,0 +1,432 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + id, name, code, intro, url, host, self, pub, polling, answer, last_update_time, last_ask_time, + last_answer_time, public_key, private_key, operator, created_at, updated_at, rec_status + + + + + delete from t_idc_domain + where id = #{id,jdbcType=BIGINT} + + + delete from t_idc_domain + + + + + + insert into t_idc_domain (id, name, code, + intro, url, host, self, + pub, polling, answer, + last_update_time, last_ask_time, last_answer_time, + public_key, private_key, operator, + created_at, updated_at, rec_status + ) + values (#{id,jdbcType=BIGINT}, #{name,jdbcType=VARCHAR}, #{code,jdbcType=VARCHAR}, + #{intro,jdbcType=VARCHAR}, #{url,jdbcType=VARCHAR}, #{host,jdbcType=VARCHAR}, #{self,jdbcType=TINYINT}, + #{pub,jdbcType=TINYINT}, #{polling,jdbcType=TINYINT}, #{answer,jdbcType=TINYINT}, + #{lastUpdateTime,jdbcType=BIGINT}, #{lastAskTime,jdbcType=BIGINT}, #{lastAnswerTime,jdbcType=BIGINT}, + #{publicKey,jdbcType=VARCHAR}, #{privateKey,jdbcType=VARCHAR}, #{operator,jdbcType=BIGINT}, + #{createdAt,jdbcType=TIMESTAMP}, #{updatedAt,jdbcType=TIMESTAMP}, #{recStatus,jdbcType=TINYINT} + ) + + + insert into t_idc_domain + + + id, + + + name, + + + code, + + + intro, + + + url, + + + host, + + + self, + + + pub, + + + polling, + + + answer, + + + last_update_time, + + + last_ask_time, + + + last_answer_time, + + + public_key, + + + private_key, + + + operator, + + + created_at, + + + updated_at, + + + rec_status, + + + + + #{id,jdbcType=BIGINT}, + + + #{name,jdbcType=VARCHAR}, + + + #{code,jdbcType=VARCHAR}, + + + #{intro,jdbcType=VARCHAR}, + + + #{url,jdbcType=VARCHAR}, + + + #{host,jdbcType=VARCHAR}, + + + #{self,jdbcType=TINYINT}, + + + #{pub,jdbcType=TINYINT}, + + + #{polling,jdbcType=TINYINT}, + + + #{answer,jdbcType=TINYINT}, + + + #{lastUpdateTime,jdbcType=BIGINT}, + + + #{lastAskTime,jdbcType=BIGINT}, + + + #{lastAnswerTime,jdbcType=BIGINT}, + + + #{publicKey,jdbcType=VARCHAR}, + + + #{privateKey,jdbcType=VARCHAR}, + + + #{operator,jdbcType=BIGINT}, + + + #{createdAt,jdbcType=TIMESTAMP}, + + + #{updatedAt,jdbcType=TIMESTAMP}, + + + #{recStatus,jdbcType=TINYINT}, + + + + + + update t_idc_domain + + + id = #{record.id,jdbcType=BIGINT}, + + + name = #{record.name,jdbcType=VARCHAR}, + + + code = #{record.code,jdbcType=VARCHAR}, + + + intro = #{record.intro,jdbcType=VARCHAR}, + + + url = #{record.url,jdbcType=VARCHAR}, + + + host = #{record.host,jdbcType=VARCHAR}, + + + self = #{record.self,jdbcType=TINYINT}, + + + pub = #{record.pub,jdbcType=TINYINT}, + + + polling = #{record.polling,jdbcType=TINYINT}, + + + answer = #{record.answer,jdbcType=TINYINT}, + + + last_update_time = #{record.lastUpdateTime,jdbcType=BIGINT}, + + + last_ask_time = #{record.lastAskTime,jdbcType=BIGINT}, + + + last_answer_time = #{record.lastAnswerTime,jdbcType=BIGINT}, + + + public_key = #{record.publicKey,jdbcType=VARCHAR}, + + + private_key = #{record.privateKey,jdbcType=VARCHAR}, + + + operator = #{record.operator,jdbcType=BIGINT}, + + + created_at = #{record.createdAt,jdbcType=TIMESTAMP}, + + + updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}, + + + rec_status = #{record.recStatus,jdbcType=TINYINT}, + + + + + + + + update t_idc_domain + set id = #{record.id,jdbcType=BIGINT}, + name = #{record.name,jdbcType=VARCHAR}, + code = #{record.code,jdbcType=VARCHAR}, + intro = #{record.intro,jdbcType=VARCHAR}, + url = #{record.url,jdbcType=VARCHAR}, + host = #{record.host,jdbcType=VARCHAR}, + self = #{record.self,jdbcType=TINYINT}, + pub = #{record.pub,jdbcType=TINYINT}, + polling = #{record.polling,jdbcType=TINYINT}, + answer = #{record.answer,jdbcType=TINYINT}, + last_update_time = #{record.lastUpdateTime,jdbcType=BIGINT}, + last_ask_time = #{record.lastAskTime,jdbcType=BIGINT}, + last_answer_time = #{record.lastAnswerTime,jdbcType=BIGINT}, + public_key = #{record.publicKey,jdbcType=VARCHAR}, + private_key = #{record.privateKey,jdbcType=VARCHAR}, + operator = #{record.operator,jdbcType=BIGINT}, + created_at = #{record.createdAt,jdbcType=TIMESTAMP}, + updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}, + rec_status = #{record.recStatus,jdbcType=TINYINT} + + + + + + update t_idc_domain + + + name = #{name,jdbcType=VARCHAR}, + + + code = #{code,jdbcType=VARCHAR}, + + + intro = #{intro,jdbcType=VARCHAR}, + + + url = #{url,jdbcType=VARCHAR}, + + + host = #{host,jdbcType=VARCHAR}, + + + self = #{self,jdbcType=TINYINT}, + + + pub = #{pub,jdbcType=TINYINT}, + + + polling = #{polling,jdbcType=TINYINT}, + + + answer = #{answer,jdbcType=TINYINT}, + + + last_update_time = #{lastUpdateTime,jdbcType=BIGINT}, + + + last_ask_time = #{lastAskTime,jdbcType=BIGINT}, + + + last_answer_time = #{lastAnswerTime,jdbcType=BIGINT}, + + + public_key = #{publicKey,jdbcType=VARCHAR}, + + + private_key = #{privateKey,jdbcType=VARCHAR}, + + + operator = #{operator,jdbcType=BIGINT}, + + + created_at = #{createdAt,jdbcType=TIMESTAMP}, + + + updated_at = #{updatedAt,jdbcType=TIMESTAMP}, + + + rec_status = #{recStatus,jdbcType=TINYINT}, + + + where id = #{id,jdbcType=BIGINT} + + + update t_idc_domain + set name = #{name,jdbcType=VARCHAR}, + code = #{code,jdbcType=VARCHAR}, + intro = #{intro,jdbcType=VARCHAR}, + url = #{url,jdbcType=VARCHAR}, + host = #{host,jdbcType=VARCHAR}, + self = #{self,jdbcType=TINYINT}, + pub = #{pub,jdbcType=TINYINT}, + polling = #{polling,jdbcType=TINYINT}, + answer = #{answer,jdbcType=TINYINT}, + last_update_time = #{lastUpdateTime,jdbcType=BIGINT}, + last_ask_time = #{lastAskTime,jdbcType=BIGINT}, + last_answer_time = #{lastAnswerTime,jdbcType=BIGINT}, + public_key = #{publicKey,jdbcType=VARCHAR}, + private_key = #{privateKey,jdbcType=VARCHAR}, + operator = #{operator,jdbcType=BIGINT}, + created_at = #{createdAt,jdbcType=TIMESTAMP}, + updated_at = #{updatedAt,jdbcType=TIMESTAMP}, + rec_status = #{recStatus,jdbcType=TINYINT} + where id = #{id,jdbcType=BIGINT} + + \ No newline at end of file diff --git a/ptos_tall/src/main/resources/mapper_raw/SysAuthMapper.xml b/ptos_tall/src/main/resources/mapper_raw/SysAuthMapper.xml new file mode 100644 index 0000000..11b10ad --- /dev/null +++ b/ptos_tall/src/main/resources/mapper_raw/SysAuthMapper.xml @@ -0,0 +1,291 @@ + + + + + + + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + id, user_id, identify_type, identifier, credential, salt, operator, created_at, updated_at, + rec_status + + + + + delete from t_sys_auth + where id = #{id,jdbcType=BIGINT} + + + delete from t_sys_auth + + + + + + insert into t_sys_auth (id, user_id, identify_type, + identifier, credential, salt, + operator, created_at, updated_at, + rec_status) + values (#{id,jdbcType=BIGINT}, #{userId,jdbcType=BIGINT}, #{identifyType,jdbcType=TINYINT}, + #{identifier,jdbcType=VARCHAR}, #{credential,jdbcType=VARCHAR}, #{salt,jdbcType=VARCHAR}, + #{operator,jdbcType=BIGINT}, #{createdAt,jdbcType=TIMESTAMP}, #{updatedAt,jdbcType=TIMESTAMP}, + #{recStatus,jdbcType=TINYINT}) + + + insert into t_sys_auth + + + id, + + + user_id, + + + identify_type, + + + identifier, + + + credential, + + + salt, + + + operator, + + + created_at, + + + updated_at, + + + rec_status, + + + + + #{id,jdbcType=BIGINT}, + + + #{userId,jdbcType=BIGINT}, + + + #{identifyType,jdbcType=TINYINT}, + + + #{identifier,jdbcType=VARCHAR}, + + + #{credential,jdbcType=VARCHAR}, + + + #{salt,jdbcType=VARCHAR}, + + + #{operator,jdbcType=BIGINT}, + + + #{createdAt,jdbcType=TIMESTAMP}, + + + #{updatedAt,jdbcType=TIMESTAMP}, + + + #{recStatus,jdbcType=TINYINT}, + + + + + + update t_sys_auth + + + id = #{record.id,jdbcType=BIGINT}, + + + user_id = #{record.userId,jdbcType=BIGINT}, + + + identify_type = #{record.identifyType,jdbcType=TINYINT}, + + + identifier = #{record.identifier,jdbcType=VARCHAR}, + + + credential = #{record.credential,jdbcType=VARCHAR}, + + + salt = #{record.salt,jdbcType=VARCHAR}, + + + operator = #{record.operator,jdbcType=BIGINT}, + + + created_at = #{record.createdAt,jdbcType=TIMESTAMP}, + + + updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}, + + + rec_status = #{record.recStatus,jdbcType=TINYINT}, + + + + + + + + update t_sys_auth + set id = #{record.id,jdbcType=BIGINT}, + user_id = #{record.userId,jdbcType=BIGINT}, + identify_type = #{record.identifyType,jdbcType=TINYINT}, + identifier = #{record.identifier,jdbcType=VARCHAR}, + credential = #{record.credential,jdbcType=VARCHAR}, + salt = #{record.salt,jdbcType=VARCHAR}, + operator = #{record.operator,jdbcType=BIGINT}, + created_at = #{record.createdAt,jdbcType=TIMESTAMP}, + updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}, + rec_status = #{record.recStatus,jdbcType=TINYINT} + + + + + + update t_sys_auth + + + user_id = #{userId,jdbcType=BIGINT}, + + + identify_type = #{identifyType,jdbcType=TINYINT}, + + + identifier = #{identifier,jdbcType=VARCHAR}, + + + credential = #{credential,jdbcType=VARCHAR}, + + + salt = #{salt,jdbcType=VARCHAR}, + + + operator = #{operator,jdbcType=BIGINT}, + + + created_at = #{createdAt,jdbcType=TIMESTAMP}, + + + updated_at = #{updatedAt,jdbcType=TIMESTAMP}, + + + rec_status = #{recStatus,jdbcType=TINYINT}, + + + where id = #{id,jdbcType=BIGINT} + + + update t_sys_auth + set user_id = #{userId,jdbcType=BIGINT}, + identify_type = #{identifyType,jdbcType=TINYINT}, + identifier = #{identifier,jdbcType=VARCHAR}, + credential = #{credential,jdbcType=VARCHAR}, + salt = #{salt,jdbcType=VARCHAR}, + operator = #{operator,jdbcType=BIGINT}, + created_at = #{createdAt,jdbcType=TIMESTAMP}, + updated_at = #{updatedAt,jdbcType=TIMESTAMP}, + rec_status = #{recStatus,jdbcType=TINYINT} + where id = #{id,jdbcType=BIGINT} + + \ No newline at end of file diff --git a/ptos_tall/src/main/resources/mapper_raw/SysSigninLogMapper.xml b/ptos_tall/src/main/resources/mapper_raw/SysSigninLogMapper.xml new file mode 100644 index 0000000..e32c19e --- /dev/null +++ b/ptos_tall/src/main/resources/mapper_raw/SysSigninLogMapper.xml @@ -0,0 +1,306 @@ + + + + + + + + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + id, user_id, auth_id, time, device_id, client_type, ip_address, operator, created_at, + updated_at, rec_status + + + + + delete from t_sys_signin_log + where id = #{id,jdbcType=BIGINT} + + + delete from t_sys_signin_log + + + + + + insert into t_sys_signin_log (id, user_id, auth_id, + time, device_id, client_type, + ip_address, operator, created_at, + updated_at, rec_status) + values (#{id,jdbcType=BIGINT}, #{userId,jdbcType=BIGINT}, #{authId,jdbcType=BIGINT}, + #{time,jdbcType=BIGINT}, #{deviceId,jdbcType=VARCHAR}, #{clientType,jdbcType=TINYINT}, + #{ipAddress,jdbcType=VARCHAR}, #{operator,jdbcType=BIGINT}, #{createdAt,jdbcType=TIMESTAMP}, + #{updatedAt,jdbcType=TIMESTAMP}, #{recStatus,jdbcType=TINYINT}) + + + insert into t_sys_signin_log + + + id, + + + user_id, + + + auth_id, + + + time, + + + device_id, + + + client_type, + + + ip_address, + + + operator, + + + created_at, + + + updated_at, + + + rec_status, + + + + + #{id,jdbcType=BIGINT}, + + + #{userId,jdbcType=BIGINT}, + + + #{authId,jdbcType=BIGINT}, + + + #{time,jdbcType=BIGINT}, + + + #{deviceId,jdbcType=VARCHAR}, + + + #{clientType,jdbcType=TINYINT}, + + + #{ipAddress,jdbcType=VARCHAR}, + + + #{operator,jdbcType=BIGINT}, + + + #{createdAt,jdbcType=TIMESTAMP}, + + + #{updatedAt,jdbcType=TIMESTAMP}, + + + #{recStatus,jdbcType=TINYINT}, + + + + + + update t_sys_signin_log + + + id = #{record.id,jdbcType=BIGINT}, + + + user_id = #{record.userId,jdbcType=BIGINT}, + + + auth_id = #{record.authId,jdbcType=BIGINT}, + + + time = #{record.time,jdbcType=BIGINT}, + + + device_id = #{record.deviceId,jdbcType=VARCHAR}, + + + client_type = #{record.clientType,jdbcType=TINYINT}, + + + ip_address = #{record.ipAddress,jdbcType=VARCHAR}, + + + operator = #{record.operator,jdbcType=BIGINT}, + + + created_at = #{record.createdAt,jdbcType=TIMESTAMP}, + + + updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}, + + + rec_status = #{record.recStatus,jdbcType=TINYINT}, + + + + + + + + update t_sys_signin_log + set id = #{record.id,jdbcType=BIGINT}, + user_id = #{record.userId,jdbcType=BIGINT}, + auth_id = #{record.authId,jdbcType=BIGINT}, + time = #{record.time,jdbcType=BIGINT}, + device_id = #{record.deviceId,jdbcType=VARCHAR}, + client_type = #{record.clientType,jdbcType=TINYINT}, + ip_address = #{record.ipAddress,jdbcType=VARCHAR}, + operator = #{record.operator,jdbcType=BIGINT}, + created_at = #{record.createdAt,jdbcType=TIMESTAMP}, + updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}, + rec_status = #{record.recStatus,jdbcType=TINYINT} + + + + + + update t_sys_signin_log + + + user_id = #{userId,jdbcType=BIGINT}, + + + auth_id = #{authId,jdbcType=BIGINT}, + + + time = #{time,jdbcType=BIGINT}, + + + device_id = #{deviceId,jdbcType=VARCHAR}, + + + client_type = #{clientType,jdbcType=TINYINT}, + + + ip_address = #{ipAddress,jdbcType=VARCHAR}, + + + operator = #{operator,jdbcType=BIGINT}, + + + created_at = #{createdAt,jdbcType=TIMESTAMP}, + + + updated_at = #{updatedAt,jdbcType=TIMESTAMP}, + + + rec_status = #{recStatus,jdbcType=TINYINT}, + + + where id = #{id,jdbcType=BIGINT} + + + update t_sys_signin_log + set user_id = #{userId,jdbcType=BIGINT}, + auth_id = #{authId,jdbcType=BIGINT}, + time = #{time,jdbcType=BIGINT}, + device_id = #{deviceId,jdbcType=VARCHAR}, + client_type = #{clientType,jdbcType=TINYINT}, + ip_address = #{ipAddress,jdbcType=VARCHAR}, + operator = #{operator,jdbcType=BIGINT}, + created_at = #{createdAt,jdbcType=TIMESTAMP}, + updated_at = #{updatedAt,jdbcType=TIMESTAMP}, + rec_status = #{recStatus,jdbcType=TINYINT} + where id = #{id,jdbcType=BIGINT} + + \ No newline at end of file diff --git a/ptos_tall/src/main/resources/mapper_raw/SysUserDeviceMapper.xml b/ptos_tall/src/main/resources/mapper_raw/SysUserDeviceMapper.xml new file mode 100644 index 0000000..b10a6b0 --- /dev/null +++ b/ptos_tall/src/main/resources/mapper_raw/SysUserDeviceMapper.xml @@ -0,0 +1,276 @@ + + + + + + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + id, user_id, device_id, client_type, refresh_token, operator, created_at, updated_at, + rec_status + + + + + delete from t_sys_user_device + where id = #{id,jdbcType=BIGINT} + + + delete from t_sys_user_device + + + + + + insert into t_sys_user_device (id, user_id, device_id, + client_type, refresh_token, operator, + created_at, updated_at, rec_status + ) + values (#{id,jdbcType=BIGINT}, #{userId,jdbcType=BIGINT}, #{deviceId,jdbcType=VARCHAR}, + #{clientType,jdbcType=TINYINT}, #{refreshToken,jdbcType=VARCHAR}, #{operator,jdbcType=BIGINT}, + #{createdAt,jdbcType=TIMESTAMP}, #{updatedAt,jdbcType=TIMESTAMP}, #{recStatus,jdbcType=TINYINT} + ) + + + insert into t_sys_user_device + + + id, + + + user_id, + + + device_id, + + + client_type, + + + refresh_token, + + + operator, + + + created_at, + + + updated_at, + + + rec_status, + + + + + #{id,jdbcType=BIGINT}, + + + #{userId,jdbcType=BIGINT}, + + + #{deviceId,jdbcType=VARCHAR}, + + + #{clientType,jdbcType=TINYINT}, + + + #{refreshToken,jdbcType=VARCHAR}, + + + #{operator,jdbcType=BIGINT}, + + + #{createdAt,jdbcType=TIMESTAMP}, + + + #{updatedAt,jdbcType=TIMESTAMP}, + + + #{recStatus,jdbcType=TINYINT}, + + + + + + update t_sys_user_device + + + id = #{record.id,jdbcType=BIGINT}, + + + user_id = #{record.userId,jdbcType=BIGINT}, + + + device_id = #{record.deviceId,jdbcType=VARCHAR}, + + + client_type = #{record.clientType,jdbcType=TINYINT}, + + + refresh_token = #{record.refreshToken,jdbcType=VARCHAR}, + + + operator = #{record.operator,jdbcType=BIGINT}, + + + created_at = #{record.createdAt,jdbcType=TIMESTAMP}, + + + updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}, + + + rec_status = #{record.recStatus,jdbcType=TINYINT}, + + + + + + + + update t_sys_user_device + set id = #{record.id,jdbcType=BIGINT}, + user_id = #{record.userId,jdbcType=BIGINT}, + device_id = #{record.deviceId,jdbcType=VARCHAR}, + client_type = #{record.clientType,jdbcType=TINYINT}, + refresh_token = #{record.refreshToken,jdbcType=VARCHAR}, + operator = #{record.operator,jdbcType=BIGINT}, + created_at = #{record.createdAt,jdbcType=TIMESTAMP}, + updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}, + rec_status = #{record.recStatus,jdbcType=TINYINT} + + + + + + update t_sys_user_device + + + user_id = #{userId,jdbcType=BIGINT}, + + + device_id = #{deviceId,jdbcType=VARCHAR}, + + + client_type = #{clientType,jdbcType=TINYINT}, + + + refresh_token = #{refreshToken,jdbcType=VARCHAR}, + + + operator = #{operator,jdbcType=BIGINT}, + + + created_at = #{createdAt,jdbcType=TIMESTAMP}, + + + updated_at = #{updatedAt,jdbcType=TIMESTAMP}, + + + rec_status = #{recStatus,jdbcType=TINYINT}, + + + where id = #{id,jdbcType=BIGINT} + + + update t_sys_user_device + set user_id = #{userId,jdbcType=BIGINT}, + device_id = #{deviceId,jdbcType=VARCHAR}, + client_type = #{clientType,jdbcType=TINYINT}, + refresh_token = #{refreshToken,jdbcType=VARCHAR}, + operator = #{operator,jdbcType=BIGINT}, + created_at = #{createdAt,jdbcType=TIMESTAMP}, + updated_at = #{updatedAt,jdbcType=TIMESTAMP}, + rec_status = #{recStatus,jdbcType=TINYINT} + where id = #{id,jdbcType=BIGINT} + + \ No newline at end of file diff --git a/ptos_tall/src/main/resources/mapper_raw/SysUserMapper.xml b/ptos_tall/src/main/resources/mapper_raw/SysUserMapper.xml new file mode 100644 index 0000000..ab5c9c9 --- /dev/null +++ b/ptos_tall/src/main/resources/mapper_raw/SysUserMapper.xml @@ -0,0 +1,385 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + id, name, gender, avatar_url, country, province, city, phone, id_card, power, device_id, + auth_type, operator, created_at, updated_at, rec_status + + + + + delete from t_sys_user + where id = #{id,jdbcType=BIGINT} + + + delete from t_sys_user + + + + + + insert into t_sys_user (id, name, gender, + avatar_url, country, province, + city, phone, id_card, + power, device_id, auth_type, + operator, created_at, updated_at, + rec_status) + values (#{id,jdbcType=BIGINT}, #{name,jdbcType=VARCHAR}, #{gender,jdbcType=TINYINT}, + #{avatarUrl,jdbcType=VARCHAR}, #{country,jdbcType=VARCHAR}, #{province,jdbcType=VARCHAR}, + #{city,jdbcType=VARCHAR}, #{phone,jdbcType=VARCHAR}, #{idCard,jdbcType=VARCHAR}, + #{power,jdbcType=TINYINT}, #{deviceId,jdbcType=VARCHAR}, #{authType,jdbcType=TINYINT}, + #{operator,jdbcType=BIGINT}, #{createdAt,jdbcType=TIMESTAMP}, #{updatedAt,jdbcType=TIMESTAMP}, + #{recStatus,jdbcType=TINYINT}) + + + insert into t_sys_user + + + id, + + + name, + + + gender, + + + avatar_url, + + + country, + + + province, + + + city, + + + phone, + + + id_card, + + + power, + + + device_id, + + + auth_type, + + + operator, + + + created_at, + + + updated_at, + + + rec_status, + + + + + #{id,jdbcType=BIGINT}, + + + #{name,jdbcType=VARCHAR}, + + + #{gender,jdbcType=TINYINT}, + + + #{avatarUrl,jdbcType=VARCHAR}, + + + #{country,jdbcType=VARCHAR}, + + + #{province,jdbcType=VARCHAR}, + + + #{city,jdbcType=VARCHAR}, + + + #{phone,jdbcType=VARCHAR}, + + + #{idCard,jdbcType=VARCHAR}, + + + #{power,jdbcType=TINYINT}, + + + #{deviceId,jdbcType=VARCHAR}, + + + #{authType,jdbcType=TINYINT}, + + + #{operator,jdbcType=BIGINT}, + + + #{createdAt,jdbcType=TIMESTAMP}, + + + #{updatedAt,jdbcType=TIMESTAMP}, + + + #{recStatus,jdbcType=TINYINT}, + + + + + + update t_sys_user + + + id = #{record.id,jdbcType=BIGINT}, + + + name = #{record.name,jdbcType=VARCHAR}, + + + gender = #{record.gender,jdbcType=TINYINT}, + + + avatar_url = #{record.avatarUrl,jdbcType=VARCHAR}, + + + country = #{record.country,jdbcType=VARCHAR}, + + + province = #{record.province,jdbcType=VARCHAR}, + + + city = #{record.city,jdbcType=VARCHAR}, + + + phone = #{record.phone,jdbcType=VARCHAR}, + + + id_card = #{record.idCard,jdbcType=VARCHAR}, + + + power = #{record.power,jdbcType=TINYINT}, + + + device_id = #{record.deviceId,jdbcType=VARCHAR}, + + + auth_type = #{record.authType,jdbcType=TINYINT}, + + + operator = #{record.operator,jdbcType=BIGINT}, + + + created_at = #{record.createdAt,jdbcType=TIMESTAMP}, + + + updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}, + + + rec_status = #{record.recStatus,jdbcType=TINYINT}, + + + + + + + + update t_sys_user + set id = #{record.id,jdbcType=BIGINT}, + name = #{record.name,jdbcType=VARCHAR}, + gender = #{record.gender,jdbcType=TINYINT}, + avatar_url = #{record.avatarUrl,jdbcType=VARCHAR}, + country = #{record.country,jdbcType=VARCHAR}, + province = #{record.province,jdbcType=VARCHAR}, + city = #{record.city,jdbcType=VARCHAR}, + phone = #{record.phone,jdbcType=VARCHAR}, + id_card = #{record.idCard,jdbcType=VARCHAR}, + power = #{record.power,jdbcType=TINYINT}, + device_id = #{record.deviceId,jdbcType=VARCHAR}, + auth_type = #{record.authType,jdbcType=TINYINT}, + operator = #{record.operator,jdbcType=BIGINT}, + created_at = #{record.createdAt,jdbcType=TIMESTAMP}, + updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}, + rec_status = #{record.recStatus,jdbcType=TINYINT} + + + + + + update t_sys_user + + + name = #{name,jdbcType=VARCHAR}, + + + gender = #{gender,jdbcType=TINYINT}, + + + avatar_url = #{avatarUrl,jdbcType=VARCHAR}, + + + country = #{country,jdbcType=VARCHAR}, + + + province = #{province,jdbcType=VARCHAR}, + + + city = #{city,jdbcType=VARCHAR}, + + + phone = #{phone,jdbcType=VARCHAR}, + + + id_card = #{idCard,jdbcType=VARCHAR}, + + + power = #{power,jdbcType=TINYINT}, + + + device_id = #{deviceId,jdbcType=VARCHAR}, + + + auth_type = #{authType,jdbcType=TINYINT}, + + + operator = #{operator,jdbcType=BIGINT}, + + + created_at = #{createdAt,jdbcType=TIMESTAMP}, + + + updated_at = #{updatedAt,jdbcType=TIMESTAMP}, + + + rec_status = #{recStatus,jdbcType=TINYINT}, + + + where id = #{id,jdbcType=BIGINT} + + + update t_sys_user + set name = #{name,jdbcType=VARCHAR}, + gender = #{gender,jdbcType=TINYINT}, + avatar_url = #{avatarUrl,jdbcType=VARCHAR}, + country = #{country,jdbcType=VARCHAR}, + province = #{province,jdbcType=VARCHAR}, + city = #{city,jdbcType=VARCHAR}, + phone = #{phone,jdbcType=VARCHAR}, + id_card = #{idCard,jdbcType=VARCHAR}, + power = #{power,jdbcType=TINYINT}, + device_id = #{deviceId,jdbcType=VARCHAR}, + auth_type = #{authType,jdbcType=TINYINT}, + operator = #{operator,jdbcType=BIGINT}, + created_at = #{createdAt,jdbcType=TIMESTAMP}, + updated_at = #{updatedAt,jdbcType=TIMESTAMP}, + rec_status = #{recStatus,jdbcType=TINYINT} + where id = #{id,jdbcType=BIGINT} + + \ No newline at end of file diff --git a/util/src/main/java/com/ccsens/util/JsonResponse.java b/util/src/main/java/com/ccsens/util/JsonResponse.java index 3116f7e..208e771 100644 --- a/util/src/main/java/com/ccsens/util/JsonResponse.java +++ b/util/src/main/java/com/ccsens/util/JsonResponse.java @@ -48,6 +48,17 @@ public class JsonResponse { private boolean success; @ApiModelProperty(value = "md5校验状态 0:未校验 1:校验一致 2:校验不一致") private byte md5Status = 0; + @ApiModelProperty(value = "token信息") + private TokenObj tokenObj = new TokenObj(); + + @Data + @ApiModel("token信息") + public static class TokenObj{ + @ApiModelProperty(value = "token") + private String token; + @ApiModelProperty(value = "refreshToken") + private String refreshToken; + } public static class MD5Status{ public final static byte UNCHECK = 0; @@ -65,6 +76,8 @@ public class JsonResponse { // return new JsonResponse(); // } + + public JsonResponse ok(){ this.code = CodeEnum.SUCCESS.getCode(); this.msg = CodeEnum.SUCCESS.getMsg(); @@ -72,6 +85,14 @@ public class JsonResponse { return this; } + public JsonResponse ok(T data, String token, String refreshToken){ + ok(); + this.data = data; + this.tokenObj.token = token; + this.tokenObj.refreshToken = refreshToken; + return this; + } + public JsonResponse ok(T data){ ok(); this.data = data;