55 changed files with 9283 additions and 129 deletions
@ -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; |
|||
} |
|||
} |
@ -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<String> 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; |
|||
} |
|||
} |
|||
|
|||
} |
@ -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<BusinessInfo> 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<ProjectInfo> 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<ProjectInfo> 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; |
|||
} |
|||
} |
|||
|
|||
} |
@ -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; |
|||
} |
|||
} |
@ -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<UserVo.TokenBean> 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<UserVo.BusinessUserInfo> 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<UserVo.SmsCode> 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<UserVo.VerificationCode> vertifyCode() throws Exception { |
|||
UserVo.VerificationCode vertifyCode = userService.getVertifyCode(); |
|||
return JsonResponse.newInstance().ok(vertifyCode); |
|||
} |
|||
} |
|||
|
@ -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; |
|||
} |
|||
|
|||
} |
@ -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; |
|||
} |
|||
|
|||
} |
@ -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(); |
|||
} |
|||
} |
File diff suppressed because it is too large
@ -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(); |
|||
} |
|||
} |
@ -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<Criteria> oredCriteria; |
|||
|
|||
public SysAuthExample() { |
|||
oredCriteria = new ArrayList<Criteria>(); |
|||
} |
|||
|
|||
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<Criteria> 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<Criterion> criteria; |
|||
|
|||
protected GeneratedCriteria() { |
|||
super(); |
|||
criteria = new ArrayList<Criterion>(); |
|||
} |
|||
|
|||
public boolean isValid() { |
|||
return criteria.size() > 0; |
|||
} |
|||
|
|||
public List<Criterion> getAllCriteria() { |
|||
return criteria; |
|||
} |
|||
|
|||
public List<Criterion> 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<Long> values) { |
|||
addCriterion("id in", values, "id"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andIdNotIn(List<Long> 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<Long> values) { |
|||
addCriterion("user_id in", values, "userId"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andUserIdNotIn(List<Long> 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<Byte> values) { |
|||
addCriterion("identify_type in", values, "identifyType"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andIdentifyTypeNotIn(List<Byte> 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<String> values) { |
|||
addCriterion("identifier in", values, "identifier"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andIdentifierNotIn(List<String> 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<String> values) { |
|||
addCriterion("credential in", values, "credential"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andCredentialNotIn(List<String> 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<String> values) { |
|||
addCriterion("salt in", values, "salt"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andSaltNotIn(List<String> 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<Long> values) { |
|||
addCriterion("operator in", values, "operator"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andOperatorNotIn(List<Long> 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<Date> values) { |
|||
addCriterion("created_at in", values, "createdAt"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andCreatedAtNotIn(List<Date> 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<Date> values) { |
|||
addCriterion("updated_at in", values, "updatedAt"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andUpdatedAtNotIn(List<Date> 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<Byte> values) { |
|||
addCriterion("rec_status in", values, "recStatus"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andRecStatusNotIn(List<Byte> 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); |
|||
} |
|||
} |
|||
} |
@ -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(); |
|||
} |
|||
} |
@ -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<Criteria> oredCriteria; |
|||
|
|||
public SysSigninLogExample() { |
|||
oredCriteria = new ArrayList<Criteria>(); |
|||
} |
|||
|
|||
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<Criteria> 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<Criterion> criteria; |
|||
|
|||
protected GeneratedCriteria() { |
|||
super(); |
|||
criteria = new ArrayList<Criterion>(); |
|||
} |
|||
|
|||
public boolean isValid() { |
|||
return criteria.size() > 0; |
|||
} |
|||
|
|||
public List<Criterion> getAllCriteria() { |
|||
return criteria; |
|||
} |
|||
|
|||
public List<Criterion> 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<Long> values) { |
|||
addCriterion("id in", values, "id"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andIdNotIn(List<Long> 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<Long> values) { |
|||
addCriterion("user_id in", values, "userId"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andUserIdNotIn(List<Long> 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<Long> values) { |
|||
addCriterion("auth_id in", values, "authId"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andAuthIdNotIn(List<Long> 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<Long> values) { |
|||
addCriterion("time in", values, "time"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andTimeNotIn(List<Long> 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<String> values) { |
|||
addCriterion("device_id in", values, "deviceId"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andDeviceIdNotIn(List<String> 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<Byte> values) { |
|||
addCriterion("client_type in", values, "clientType"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andClientTypeNotIn(List<Byte> 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<String> values) { |
|||
addCriterion("ip_address in", values, "ipAddress"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andIpAddressNotIn(List<String> 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<Long> values) { |
|||
addCriterion("operator in", values, "operator"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andOperatorNotIn(List<Long> 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<Date> values) { |
|||
addCriterion("created_at in", values, "createdAt"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andCreatedAtNotIn(List<Date> 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<Date> values) { |
|||
addCriterion("updated_at in", values, "updatedAt"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andUpdatedAtNotIn(List<Date> 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<Byte> values) { |
|||
addCriterion("rec_status in", values, "recStatus"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andRecStatusNotIn(List<Byte> 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); |
|||
} |
|||
} |
|||
} |
@ -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(); |
|||
} |
|||
} |
@ -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(); |
|||
} |
|||
} |
@ -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<Criteria> oredCriteria; |
|||
|
|||
public SysUserDeviceExample() { |
|||
oredCriteria = new ArrayList<Criteria>(); |
|||
} |
|||
|
|||
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<Criteria> 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<Criterion> criteria; |
|||
|
|||
protected GeneratedCriteria() { |
|||
super(); |
|||
criteria = new ArrayList<Criterion>(); |
|||
} |
|||
|
|||
public boolean isValid() { |
|||
return criteria.size() > 0; |
|||
} |
|||
|
|||
public List<Criterion> getAllCriteria() { |
|||
return criteria; |
|||
} |
|||
|
|||
public List<Criterion> 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<Long> values) { |
|||
addCriterion("id in", values, "id"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andIdNotIn(List<Long> 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<Long> values) { |
|||
addCriterion("user_id in", values, "userId"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andUserIdNotIn(List<Long> 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<String> values) { |
|||
addCriterion("device_id in", values, "deviceId"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andDeviceIdNotIn(List<String> 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<Byte> values) { |
|||
addCriterion("client_type in", values, "clientType"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andClientTypeNotIn(List<Byte> 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<String> values) { |
|||
addCriterion("refresh_token in", values, "refreshToken"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andRefreshTokenNotIn(List<String> 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<Long> values) { |
|||
addCriterion("operator in", values, "operator"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andOperatorNotIn(List<Long> 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<Date> values) { |
|||
addCriterion("created_at in", values, "createdAt"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andCreatedAtNotIn(List<Date> 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<Date> values) { |
|||
addCriterion("updated_at in", values, "updatedAt"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andUpdatedAtNotIn(List<Date> 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<Byte> values) { |
|||
addCriterion("rec_status in", values, "recStatus"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andRecStatusNotIn(List<Byte> 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); |
|||
} |
|||
} |
|||
} |
File diff suppressed because it is too large
@ -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; |
|||
} |
|||
} |
@ -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(); |
|||
|
|||
|
|||
|
|||
} |
@ -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); |
|||
} |
@ -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 { |
|||
} |
@ -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<IdcDomain> 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); |
|||
} |
@ -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<SysAuth> 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); |
|||
} |
@ -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<SysSigninLog> 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); |
|||
} |
@ -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<SysUserDevice> 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); |
|||
} |
@ -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<SysUser> 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); |
|||
} |
@ -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(); |
|||
} |
@ -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<String, Object> 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<String, Object> 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<SysUserDevice> 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<SysAuth> 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<SysAuth> 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<SysAuth> 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<String, Object> 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; |
|||
} |
|||
} |
@ -1,4 +1,4 @@ |
|||
spring: |
|||
profiles: |
|||
active: prod |
|||
include: common, util-prod |
|||
active: dev |
|||
include: common, util-dev |
|||
|
@ -0,0 +1,13 @@ |
|||
<?xml version="1.0" encoding="UTF-8"?> |
|||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
|||
<mapper namespace="com.ccsens.ptos_tall.persist.dao.IdcDomainDao"> |
|||
|
|||
|
|||
<select id="getByCode" resultType="com.ccsens.ptos_tall.bean.po.IdcDomain"> |
|||
SELECT * FROM `t_idc_domain` WHERE `code` = #{code} and rec_status = 0 limit 1 |
|||
</select> |
|||
<select id="getOneself" resultType="com.ccsens.ptos_tall.bean.po.IdcDomain"> |
|||
SELECT * FROM `t_idc_domain` WHERE self = 1 and rec_status = 0 limit 1 |
|||
</select> |
|||
|
|||
</mapper> |
@ -0,0 +1,27 @@ |
|||
<?xml version="1.0" encoding="UTF-8"?> |
|||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
|||
<mapper namespace="com.ccsens.ptos_tall.persist.dao.SysAuthDao"> |
|||
|
|||
<select id="getByPhone" resultType="com.ccsens.ptos_tall.bean.po.SysAuth"> |
|||
SELECT |
|||
* |
|||
FROM |
|||
t_sys_auth |
|||
WHERE |
|||
identify_type = 1 |
|||
and identifier = #{phone} |
|||
and rec_status = 0 |
|||
limit 1 |
|||
</select> |
|||
<select id="getPhoneByUserId" resultType="java.lang.String"> |
|||
SELECT |
|||
identifier |
|||
FROM |
|||
t_sys_auth |
|||
WHERE |
|||
identify_type = 1 |
|||
and user_id = #{userId} |
|||
and rec_status = 0 |
|||
limit 1 |
|||
</select> |
|||
</mapper> |
@ -0,0 +1,5 @@ |
|||
<?xml version="1.0" encoding="UTF-8"?> |
|||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
|||
<mapper namespace="com.ccsens.ptos_tall.persist.dao.SysUserDao"> |
|||
|
|||
</mapper> |
@ -0,0 +1,432 @@ |
|||
<?xml version="1.0" encoding="UTF-8"?> |
|||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
|||
<mapper namespace="com.ccsens.ptos_tall.persist.mapper.IdcDomainMapper"> |
|||
<resultMap id="BaseResultMap" type="com.ccsens.ptos_tall.bean.po.IdcDomain"> |
|||
<id column="id" jdbcType="BIGINT" property="id" /> |
|||
<result column="name" jdbcType="VARCHAR" property="name" /> |
|||
<result column="code" jdbcType="VARCHAR" property="code" /> |
|||
<result column="intro" jdbcType="VARCHAR" property="intro" /> |
|||
<result column="url" jdbcType="VARCHAR" property="url" /> |
|||
<result column="host" jdbcType="VARCHAR" property="host" /> |
|||
<result column="self" jdbcType="TINYINT" property="self" /> |
|||
<result column="pub" jdbcType="TINYINT" property="pub" /> |
|||
<result column="polling" jdbcType="TINYINT" property="polling" /> |
|||
<result column="answer" jdbcType="TINYINT" property="answer" /> |
|||
<result column="last_update_time" jdbcType="BIGINT" property="lastUpdateTime" /> |
|||
<result column="last_ask_time" jdbcType="BIGINT" property="lastAskTime" /> |
|||
<result column="last_answer_time" jdbcType="BIGINT" property="lastAnswerTime" /> |
|||
<result column="public_key" jdbcType="VARCHAR" property="publicKey" /> |
|||
<result column="private_key" jdbcType="VARCHAR" property="privateKey" /> |
|||
<result column="operator" jdbcType="BIGINT" property="operator" /> |
|||
<result column="created_at" jdbcType="TIMESTAMP" property="createdAt" /> |
|||
<result column="updated_at" jdbcType="TIMESTAMP" property="updatedAt" /> |
|||
<result column="rec_status" jdbcType="TINYINT" property="recStatus" /> |
|||
</resultMap> |
|||
<sql id="Example_Where_Clause"> |
|||
<where> |
|||
<foreach collection="oredCriteria" item="criteria" separator="or"> |
|||
<if test="criteria.valid"> |
|||
<trim prefix="(" prefixOverrides="and" suffix=")"> |
|||
<foreach collection="criteria.criteria" item="criterion"> |
|||
<choose> |
|||
<when test="criterion.noValue"> |
|||
and ${criterion.condition} |
|||
</when> |
|||
<when test="criterion.singleValue"> |
|||
and ${criterion.condition} #{criterion.value} |
|||
</when> |
|||
<when test="criterion.betweenValue"> |
|||
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} |
|||
</when> |
|||
<when test="criterion.listValue"> |
|||
and ${criterion.condition} |
|||
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=","> |
|||
#{listItem} |
|||
</foreach> |
|||
</when> |
|||
</choose> |
|||
</foreach> |
|||
</trim> |
|||
</if> |
|||
</foreach> |
|||
</where> |
|||
</sql> |
|||
<sql id="Update_By_Example_Where_Clause"> |
|||
<where> |
|||
<foreach collection="example.oredCriteria" item="criteria" separator="or"> |
|||
<if test="criteria.valid"> |
|||
<trim prefix="(" prefixOverrides="and" suffix=")"> |
|||
<foreach collection="criteria.criteria" item="criterion"> |
|||
<choose> |
|||
<when test="criterion.noValue"> |
|||
and ${criterion.condition} |
|||
</when> |
|||
<when test="criterion.singleValue"> |
|||
and ${criterion.condition} #{criterion.value} |
|||
</when> |
|||
<when test="criterion.betweenValue"> |
|||
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} |
|||
</when> |
|||
<when test="criterion.listValue"> |
|||
and ${criterion.condition} |
|||
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=","> |
|||
#{listItem} |
|||
</foreach> |
|||
</when> |
|||
</choose> |
|||
</foreach> |
|||
</trim> |
|||
</if> |
|||
</foreach> |
|||
</where> |
|||
</sql> |
|||
<sql id="Base_Column_List"> |
|||
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 |
|||
</sql> |
|||
<select id="selectByExample" parameterType="com.ccsens.ptos_tall.bean.po.IdcDomainExample" resultMap="BaseResultMap"> |
|||
select |
|||
<if test="distinct"> |
|||
distinct |
|||
</if> |
|||
<include refid="Base_Column_List" /> |
|||
from t_idc_domain |
|||
<if test="_parameter != null"> |
|||
<include refid="Example_Where_Clause" /> |
|||
</if> |
|||
<if test="orderByClause != null"> |
|||
order by ${orderByClause} |
|||
</if> |
|||
</select> |
|||
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap"> |
|||
select |
|||
<include refid="Base_Column_List" /> |
|||
from t_idc_domain |
|||
where id = #{id,jdbcType=BIGINT} |
|||
</select> |
|||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long"> |
|||
delete from t_idc_domain |
|||
where id = #{id,jdbcType=BIGINT} |
|||
</delete> |
|||
<delete id="deleteByExample" parameterType="com.ccsens.ptos_tall.bean.po.IdcDomainExample"> |
|||
delete from t_idc_domain |
|||
<if test="_parameter != null"> |
|||
<include refid="Example_Where_Clause" /> |
|||
</if> |
|||
</delete> |
|||
<insert id="insert" parameterType="com.ccsens.ptos_tall.bean.po.IdcDomain"> |
|||
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> |
|||
<insert id="insertSelective" parameterType="com.ccsens.ptos_tall.bean.po.IdcDomain"> |
|||
insert into t_idc_domain |
|||
<trim prefix="(" suffix=")" suffixOverrides=","> |
|||
<if test="id != null"> |
|||
id, |
|||
</if> |
|||
<if test="name != null"> |
|||
name, |
|||
</if> |
|||
<if test="code != null"> |
|||
code, |
|||
</if> |
|||
<if test="intro != null"> |
|||
intro, |
|||
</if> |
|||
<if test="url != null"> |
|||
url, |
|||
</if> |
|||
<if test="host != null"> |
|||
host, |
|||
</if> |
|||
<if test="self != null"> |
|||
self, |
|||
</if> |
|||
<if test="pub != null"> |
|||
pub, |
|||
</if> |
|||
<if test="polling != null"> |
|||
polling, |
|||
</if> |
|||
<if test="answer != null"> |
|||
answer, |
|||
</if> |
|||
<if test="lastUpdateTime != null"> |
|||
last_update_time, |
|||
</if> |
|||
<if test="lastAskTime != null"> |
|||
last_ask_time, |
|||
</if> |
|||
<if test="lastAnswerTime != null"> |
|||
last_answer_time, |
|||
</if> |
|||
<if test="publicKey != null"> |
|||
public_key, |
|||
</if> |
|||
<if test="privateKey != null"> |
|||
private_key, |
|||
</if> |
|||
<if test="operator != null"> |
|||
operator, |
|||
</if> |
|||
<if test="createdAt != null"> |
|||
created_at, |
|||
</if> |
|||
<if test="updatedAt != null"> |
|||
updated_at, |
|||
</if> |
|||
<if test="recStatus != null"> |
|||
rec_status, |
|||
</if> |
|||
</trim> |
|||
<trim prefix="values (" suffix=")" suffixOverrides=","> |
|||
<if test="id != null"> |
|||
#{id,jdbcType=BIGINT}, |
|||
</if> |
|||
<if test="name != null"> |
|||
#{name,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="code != null"> |
|||
#{code,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="intro != null"> |
|||
#{intro,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="url != null"> |
|||
#{url,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="host != null"> |
|||
#{host,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="self != null"> |
|||
#{self,jdbcType=TINYINT}, |
|||
</if> |
|||
<if test="pub != null"> |
|||
#{pub,jdbcType=TINYINT}, |
|||
</if> |
|||
<if test="polling != null"> |
|||
#{polling,jdbcType=TINYINT}, |
|||
</if> |
|||
<if test="answer != null"> |
|||
#{answer,jdbcType=TINYINT}, |
|||
</if> |
|||
<if test="lastUpdateTime != null"> |
|||
#{lastUpdateTime,jdbcType=BIGINT}, |
|||
</if> |
|||
<if test="lastAskTime != null"> |
|||
#{lastAskTime,jdbcType=BIGINT}, |
|||
</if> |
|||
<if test="lastAnswerTime != null"> |
|||
#{lastAnswerTime,jdbcType=BIGINT}, |
|||
</if> |
|||
<if test="publicKey != null"> |
|||
#{publicKey,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="privateKey != null"> |
|||
#{privateKey,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="operator != null"> |
|||
#{operator,jdbcType=BIGINT}, |
|||
</if> |
|||
<if test="createdAt != null"> |
|||
#{createdAt,jdbcType=TIMESTAMP}, |
|||
</if> |
|||
<if test="updatedAt != null"> |
|||
#{updatedAt,jdbcType=TIMESTAMP}, |
|||
</if> |
|||
<if test="recStatus != null"> |
|||
#{recStatus,jdbcType=TINYINT}, |
|||
</if> |
|||
</trim> |
|||
</insert> |
|||
<select id="countByExample" parameterType="com.ccsens.ptos_tall.bean.po.IdcDomainExample" resultType="java.lang.Long"> |
|||
select count(*) from t_idc_domain |
|||
<if test="_parameter != null"> |
|||
<include refid="Example_Where_Clause" /> |
|||
</if> |
|||
</select> |
|||
<update id="updateByExampleSelective" parameterType="map"> |
|||
update t_idc_domain |
|||
<set> |
|||
<if test="record.id != null"> |
|||
id = #{record.id,jdbcType=BIGINT}, |
|||
</if> |
|||
<if test="record.name != null"> |
|||
name = #{record.name,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="record.code != null"> |
|||
code = #{record.code,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="record.intro != null"> |
|||
intro = #{record.intro,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="record.url != null"> |
|||
url = #{record.url,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="record.host != null"> |
|||
host = #{record.host,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="record.self != null"> |
|||
self = #{record.self,jdbcType=TINYINT}, |
|||
</if> |
|||
<if test="record.pub != null"> |
|||
pub = #{record.pub,jdbcType=TINYINT}, |
|||
</if> |
|||
<if test="record.polling != null"> |
|||
polling = #{record.polling,jdbcType=TINYINT}, |
|||
</if> |
|||
<if test="record.answer != null"> |
|||
answer = #{record.answer,jdbcType=TINYINT}, |
|||
</if> |
|||
<if test="record.lastUpdateTime != null"> |
|||
last_update_time = #{record.lastUpdateTime,jdbcType=BIGINT}, |
|||
</if> |
|||
<if test="record.lastAskTime != null"> |
|||
last_ask_time = #{record.lastAskTime,jdbcType=BIGINT}, |
|||
</if> |
|||
<if test="record.lastAnswerTime != null"> |
|||
last_answer_time = #{record.lastAnswerTime,jdbcType=BIGINT}, |
|||
</if> |
|||
<if test="record.publicKey != null"> |
|||
public_key = #{record.publicKey,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="record.privateKey != null"> |
|||
private_key = #{record.privateKey,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="record.operator != null"> |
|||
operator = #{record.operator,jdbcType=BIGINT}, |
|||
</if> |
|||
<if test="record.createdAt != null"> |
|||
created_at = #{record.createdAt,jdbcType=TIMESTAMP}, |
|||
</if> |
|||
<if test="record.updatedAt != null"> |
|||
updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}, |
|||
</if> |
|||
<if test="record.recStatus != null"> |
|||
rec_status = #{record.recStatus,jdbcType=TINYINT}, |
|||
</if> |
|||
</set> |
|||
<if test="_parameter != null"> |
|||
<include refid="Update_By_Example_Where_Clause" /> |
|||
</if> |
|||
</update> |
|||
<update id="updateByExample" parameterType="map"> |
|||
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} |
|||
<if test="_parameter != null"> |
|||
<include refid="Update_By_Example_Where_Clause" /> |
|||
</if> |
|||
</update> |
|||
<update id="updateByPrimaryKeySelective" parameterType="com.ccsens.ptos_tall.bean.po.IdcDomain"> |
|||
update t_idc_domain |
|||
<set> |
|||
<if test="name != null"> |
|||
name = #{name,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="code != null"> |
|||
code = #{code,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="intro != null"> |
|||
intro = #{intro,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="url != null"> |
|||
url = #{url,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="host != null"> |
|||
host = #{host,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="self != null"> |
|||
self = #{self,jdbcType=TINYINT}, |
|||
</if> |
|||
<if test="pub != null"> |
|||
pub = #{pub,jdbcType=TINYINT}, |
|||
</if> |
|||
<if test="polling != null"> |
|||
polling = #{polling,jdbcType=TINYINT}, |
|||
</if> |
|||
<if test="answer != null"> |
|||
answer = #{answer,jdbcType=TINYINT}, |
|||
</if> |
|||
<if test="lastUpdateTime != null"> |
|||
last_update_time = #{lastUpdateTime,jdbcType=BIGINT}, |
|||
</if> |
|||
<if test="lastAskTime != null"> |
|||
last_ask_time = #{lastAskTime,jdbcType=BIGINT}, |
|||
</if> |
|||
<if test="lastAnswerTime != null"> |
|||
last_answer_time = #{lastAnswerTime,jdbcType=BIGINT}, |
|||
</if> |
|||
<if test="publicKey != null"> |
|||
public_key = #{publicKey,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="privateKey != null"> |
|||
private_key = #{privateKey,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="operator != null"> |
|||
operator = #{operator,jdbcType=BIGINT}, |
|||
</if> |
|||
<if test="createdAt != null"> |
|||
created_at = #{createdAt,jdbcType=TIMESTAMP}, |
|||
</if> |
|||
<if test="updatedAt != null"> |
|||
updated_at = #{updatedAt,jdbcType=TIMESTAMP}, |
|||
</if> |
|||
<if test="recStatus != null"> |
|||
rec_status = #{recStatus,jdbcType=TINYINT}, |
|||
</if> |
|||
</set> |
|||
where id = #{id,jdbcType=BIGINT} |
|||
</update> |
|||
<update id="updateByPrimaryKey" parameterType="com.ccsens.ptos_tall.bean.po.IdcDomain"> |
|||
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} |
|||
</update> |
|||
</mapper> |
@ -0,0 +1,291 @@ |
|||
<?xml version="1.0" encoding="UTF-8"?> |
|||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
|||
<mapper namespace="com.ccsens.ptos_tall.persist.mapper.SysAuthMapper"> |
|||
<resultMap id="BaseResultMap" type="com.ccsens.ptos_tall.bean.po.SysAuth"> |
|||
<id column="id" jdbcType="BIGINT" property="id" /> |
|||
<result column="user_id" jdbcType="BIGINT" property="userId" /> |
|||
<result column="identify_type" jdbcType="TINYINT" property="identifyType" /> |
|||
<result column="identifier" jdbcType="VARCHAR" property="identifier" /> |
|||
<result column="credential" jdbcType="VARCHAR" property="credential" /> |
|||
<result column="salt" jdbcType="VARCHAR" property="salt" /> |
|||
<result column="operator" jdbcType="BIGINT" property="operator" /> |
|||
<result column="created_at" jdbcType="TIMESTAMP" property="createdAt" /> |
|||
<result column="updated_at" jdbcType="TIMESTAMP" property="updatedAt" /> |
|||
<result column="rec_status" jdbcType="TINYINT" property="recStatus" /> |
|||
</resultMap> |
|||
<sql id="Example_Where_Clause"> |
|||
<where> |
|||
<foreach collection="oredCriteria" item="criteria" separator="or"> |
|||
<if test="criteria.valid"> |
|||
<trim prefix="(" prefixOverrides="and" suffix=")"> |
|||
<foreach collection="criteria.criteria" item="criterion"> |
|||
<choose> |
|||
<when test="criterion.noValue"> |
|||
and ${criterion.condition} |
|||
</when> |
|||
<when test="criterion.singleValue"> |
|||
and ${criterion.condition} #{criterion.value} |
|||
</when> |
|||
<when test="criterion.betweenValue"> |
|||
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} |
|||
</when> |
|||
<when test="criterion.listValue"> |
|||
and ${criterion.condition} |
|||
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=","> |
|||
#{listItem} |
|||
</foreach> |
|||
</when> |
|||
</choose> |
|||
</foreach> |
|||
</trim> |
|||
</if> |
|||
</foreach> |
|||
</where> |
|||
</sql> |
|||
<sql id="Update_By_Example_Where_Clause"> |
|||
<where> |
|||
<foreach collection="example.oredCriteria" item="criteria" separator="or"> |
|||
<if test="criteria.valid"> |
|||
<trim prefix="(" prefixOverrides="and" suffix=")"> |
|||
<foreach collection="criteria.criteria" item="criterion"> |
|||
<choose> |
|||
<when test="criterion.noValue"> |
|||
and ${criterion.condition} |
|||
</when> |
|||
<when test="criterion.singleValue"> |
|||
and ${criterion.condition} #{criterion.value} |
|||
</when> |
|||
<when test="criterion.betweenValue"> |
|||
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} |
|||
</when> |
|||
<when test="criterion.listValue"> |
|||
and ${criterion.condition} |
|||
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=","> |
|||
#{listItem} |
|||
</foreach> |
|||
</when> |
|||
</choose> |
|||
</foreach> |
|||
</trim> |
|||
</if> |
|||
</foreach> |
|||
</where> |
|||
</sql> |
|||
<sql id="Base_Column_List"> |
|||
id, user_id, identify_type, identifier, credential, salt, operator, created_at, updated_at, |
|||
rec_status |
|||
</sql> |
|||
<select id="selectByExample" parameterType="com.ccsens.ptos_tall.bean.po.SysAuthExample" resultMap="BaseResultMap"> |
|||
select |
|||
<if test="distinct"> |
|||
distinct |
|||
</if> |
|||
<include refid="Base_Column_List" /> |
|||
from t_sys_auth |
|||
<if test="_parameter != null"> |
|||
<include refid="Example_Where_Clause" /> |
|||
</if> |
|||
<if test="orderByClause != null"> |
|||
order by ${orderByClause} |
|||
</if> |
|||
</select> |
|||
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap"> |
|||
select |
|||
<include refid="Base_Column_List" /> |
|||
from t_sys_auth |
|||
where id = #{id,jdbcType=BIGINT} |
|||
</select> |
|||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long"> |
|||
delete from t_sys_auth |
|||
where id = #{id,jdbcType=BIGINT} |
|||
</delete> |
|||
<delete id="deleteByExample" parameterType="com.ccsens.ptos_tall.bean.po.SysAuthExample"> |
|||
delete from t_sys_auth |
|||
<if test="_parameter != null"> |
|||
<include refid="Example_Where_Clause" /> |
|||
</if> |
|||
</delete> |
|||
<insert id="insert" parameterType="com.ccsens.ptos_tall.bean.po.SysAuth"> |
|||
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> |
|||
<insert id="insertSelective" parameterType="com.ccsens.ptos_tall.bean.po.SysAuth"> |
|||
insert into t_sys_auth |
|||
<trim prefix="(" suffix=")" suffixOverrides=","> |
|||
<if test="id != null"> |
|||
id, |
|||
</if> |
|||
<if test="userId != null"> |
|||
user_id, |
|||
</if> |
|||
<if test="identifyType != null"> |
|||
identify_type, |
|||
</if> |
|||
<if test="identifier != null"> |
|||
identifier, |
|||
</if> |
|||
<if test="credential != null"> |
|||
credential, |
|||
</if> |
|||
<if test="salt != null"> |
|||
salt, |
|||
</if> |
|||
<if test="operator != null"> |
|||
operator, |
|||
</if> |
|||
<if test="createdAt != null"> |
|||
created_at, |
|||
</if> |
|||
<if test="updatedAt != null"> |
|||
updated_at, |
|||
</if> |
|||
<if test="recStatus != null"> |
|||
rec_status, |
|||
</if> |
|||
</trim> |
|||
<trim prefix="values (" suffix=")" suffixOverrides=","> |
|||
<if test="id != null"> |
|||
#{id,jdbcType=BIGINT}, |
|||
</if> |
|||
<if test="userId != null"> |
|||
#{userId,jdbcType=BIGINT}, |
|||
</if> |
|||
<if test="identifyType != null"> |
|||
#{identifyType,jdbcType=TINYINT}, |
|||
</if> |
|||
<if test="identifier != null"> |
|||
#{identifier,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="credential != null"> |
|||
#{credential,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="salt != null"> |
|||
#{salt,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="operator != null"> |
|||
#{operator,jdbcType=BIGINT}, |
|||
</if> |
|||
<if test="createdAt != null"> |
|||
#{createdAt,jdbcType=TIMESTAMP}, |
|||
</if> |
|||
<if test="updatedAt != null"> |
|||
#{updatedAt,jdbcType=TIMESTAMP}, |
|||
</if> |
|||
<if test="recStatus != null"> |
|||
#{recStatus,jdbcType=TINYINT}, |
|||
</if> |
|||
</trim> |
|||
</insert> |
|||
<select id="countByExample" parameterType="com.ccsens.ptos_tall.bean.po.SysAuthExample" resultType="java.lang.Long"> |
|||
select count(*) from t_sys_auth |
|||
<if test="_parameter != null"> |
|||
<include refid="Example_Where_Clause" /> |
|||
</if> |
|||
</select> |
|||
<update id="updateByExampleSelective" parameterType="map"> |
|||
update t_sys_auth |
|||
<set> |
|||
<if test="record.id != null"> |
|||
id = #{record.id,jdbcType=BIGINT}, |
|||
</if> |
|||
<if test="record.userId != null"> |
|||
user_id = #{record.userId,jdbcType=BIGINT}, |
|||
</if> |
|||
<if test="record.identifyType != null"> |
|||
identify_type = #{record.identifyType,jdbcType=TINYINT}, |
|||
</if> |
|||
<if test="record.identifier != null"> |
|||
identifier = #{record.identifier,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="record.credential != null"> |
|||
credential = #{record.credential,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="record.salt != null"> |
|||
salt = #{record.salt,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="record.operator != null"> |
|||
operator = #{record.operator,jdbcType=BIGINT}, |
|||
</if> |
|||
<if test="record.createdAt != null"> |
|||
created_at = #{record.createdAt,jdbcType=TIMESTAMP}, |
|||
</if> |
|||
<if test="record.updatedAt != null"> |
|||
updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}, |
|||
</if> |
|||
<if test="record.recStatus != null"> |
|||
rec_status = #{record.recStatus,jdbcType=TINYINT}, |
|||
</if> |
|||
</set> |
|||
<if test="_parameter != null"> |
|||
<include refid="Update_By_Example_Where_Clause" /> |
|||
</if> |
|||
</update> |
|||
<update id="updateByExample" parameterType="map"> |
|||
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} |
|||
<if test="_parameter != null"> |
|||
<include refid="Update_By_Example_Where_Clause" /> |
|||
</if> |
|||
</update> |
|||
<update id="updateByPrimaryKeySelective" parameterType="com.ccsens.ptos_tall.bean.po.SysAuth"> |
|||
update t_sys_auth |
|||
<set> |
|||
<if test="userId != null"> |
|||
user_id = #{userId,jdbcType=BIGINT}, |
|||
</if> |
|||
<if test="identifyType != null"> |
|||
identify_type = #{identifyType,jdbcType=TINYINT}, |
|||
</if> |
|||
<if test="identifier != null"> |
|||
identifier = #{identifier,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="credential != null"> |
|||
credential = #{credential,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="salt != null"> |
|||
salt = #{salt,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="operator != null"> |
|||
operator = #{operator,jdbcType=BIGINT}, |
|||
</if> |
|||
<if test="createdAt != null"> |
|||
created_at = #{createdAt,jdbcType=TIMESTAMP}, |
|||
</if> |
|||
<if test="updatedAt != null"> |
|||
updated_at = #{updatedAt,jdbcType=TIMESTAMP}, |
|||
</if> |
|||
<if test="recStatus != null"> |
|||
rec_status = #{recStatus,jdbcType=TINYINT}, |
|||
</if> |
|||
</set> |
|||
where id = #{id,jdbcType=BIGINT} |
|||
</update> |
|||
<update id="updateByPrimaryKey" parameterType="com.ccsens.ptos_tall.bean.po.SysAuth"> |
|||
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} |
|||
</update> |
|||
</mapper> |
@ -0,0 +1,306 @@ |
|||
<?xml version="1.0" encoding="UTF-8"?> |
|||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
|||
<mapper namespace="com.ccsens.ptos_tall.persist.mapper.SysSigninLogMapper"> |
|||
<resultMap id="BaseResultMap" type="com.ccsens.ptos_tall.bean.po.SysSigninLog"> |
|||
<id column="id" jdbcType="BIGINT" property="id" /> |
|||
<result column="user_id" jdbcType="BIGINT" property="userId" /> |
|||
<result column="auth_id" jdbcType="BIGINT" property="authId" /> |
|||
<result column="time" jdbcType="BIGINT" property="time" /> |
|||
<result column="device_id" jdbcType="VARCHAR" property="deviceId" /> |
|||
<result column="client_type" jdbcType="TINYINT" property="clientType" /> |
|||
<result column="ip_address" jdbcType="VARCHAR" property="ipAddress" /> |
|||
<result column="operator" jdbcType="BIGINT" property="operator" /> |
|||
<result column="created_at" jdbcType="TIMESTAMP" property="createdAt" /> |
|||
<result column="updated_at" jdbcType="TIMESTAMP" property="updatedAt" /> |
|||
<result column="rec_status" jdbcType="TINYINT" property="recStatus" /> |
|||
</resultMap> |
|||
<sql id="Example_Where_Clause"> |
|||
<where> |
|||
<foreach collection="oredCriteria" item="criteria" separator="or"> |
|||
<if test="criteria.valid"> |
|||
<trim prefix="(" prefixOverrides="and" suffix=")"> |
|||
<foreach collection="criteria.criteria" item="criterion"> |
|||
<choose> |
|||
<when test="criterion.noValue"> |
|||
and ${criterion.condition} |
|||
</when> |
|||
<when test="criterion.singleValue"> |
|||
and ${criterion.condition} #{criterion.value} |
|||
</when> |
|||
<when test="criterion.betweenValue"> |
|||
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} |
|||
</when> |
|||
<when test="criterion.listValue"> |
|||
and ${criterion.condition} |
|||
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=","> |
|||
#{listItem} |
|||
</foreach> |
|||
</when> |
|||
</choose> |
|||
</foreach> |
|||
</trim> |
|||
</if> |
|||
</foreach> |
|||
</where> |
|||
</sql> |
|||
<sql id="Update_By_Example_Where_Clause"> |
|||
<where> |
|||
<foreach collection="example.oredCriteria" item="criteria" separator="or"> |
|||
<if test="criteria.valid"> |
|||
<trim prefix="(" prefixOverrides="and" suffix=")"> |
|||
<foreach collection="criteria.criteria" item="criterion"> |
|||
<choose> |
|||
<when test="criterion.noValue"> |
|||
and ${criterion.condition} |
|||
</when> |
|||
<when test="criterion.singleValue"> |
|||
and ${criterion.condition} #{criterion.value} |
|||
</when> |
|||
<when test="criterion.betweenValue"> |
|||
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} |
|||
</when> |
|||
<when test="criterion.listValue"> |
|||
and ${criterion.condition} |
|||
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=","> |
|||
#{listItem} |
|||
</foreach> |
|||
</when> |
|||
</choose> |
|||
</foreach> |
|||
</trim> |
|||
</if> |
|||
</foreach> |
|||
</where> |
|||
</sql> |
|||
<sql id="Base_Column_List"> |
|||
id, user_id, auth_id, time, device_id, client_type, ip_address, operator, created_at, |
|||
updated_at, rec_status |
|||
</sql> |
|||
<select id="selectByExample" parameterType="com.ccsens.ptos_tall.bean.po.SysSigninLogExample" resultMap="BaseResultMap"> |
|||
select |
|||
<if test="distinct"> |
|||
distinct |
|||
</if> |
|||
<include refid="Base_Column_List" /> |
|||
from t_sys_signin_log |
|||
<if test="_parameter != null"> |
|||
<include refid="Example_Where_Clause" /> |
|||
</if> |
|||
<if test="orderByClause != null"> |
|||
order by ${orderByClause} |
|||
</if> |
|||
</select> |
|||
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap"> |
|||
select |
|||
<include refid="Base_Column_List" /> |
|||
from t_sys_signin_log |
|||
where id = #{id,jdbcType=BIGINT} |
|||
</select> |
|||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long"> |
|||
delete from t_sys_signin_log |
|||
where id = #{id,jdbcType=BIGINT} |
|||
</delete> |
|||
<delete id="deleteByExample" parameterType="com.ccsens.ptos_tall.bean.po.SysSigninLogExample"> |
|||
delete from t_sys_signin_log |
|||
<if test="_parameter != null"> |
|||
<include refid="Example_Where_Clause" /> |
|||
</if> |
|||
</delete> |
|||
<insert id="insert" parameterType="com.ccsens.ptos_tall.bean.po.SysSigninLog"> |
|||
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> |
|||
<insert id="insertSelective" parameterType="com.ccsens.ptos_tall.bean.po.SysSigninLog"> |
|||
insert into t_sys_signin_log |
|||
<trim prefix="(" suffix=")" suffixOverrides=","> |
|||
<if test="id != null"> |
|||
id, |
|||
</if> |
|||
<if test="userId != null"> |
|||
user_id, |
|||
</if> |
|||
<if test="authId != null"> |
|||
auth_id, |
|||
</if> |
|||
<if test="time != null"> |
|||
time, |
|||
</if> |
|||
<if test="deviceId != null"> |
|||
device_id, |
|||
</if> |
|||
<if test="clientType != null"> |
|||
client_type, |
|||
</if> |
|||
<if test="ipAddress != null"> |
|||
ip_address, |
|||
</if> |
|||
<if test="operator != null"> |
|||
operator, |
|||
</if> |
|||
<if test="createdAt != null"> |
|||
created_at, |
|||
</if> |
|||
<if test="updatedAt != null"> |
|||
updated_at, |
|||
</if> |
|||
<if test="recStatus != null"> |
|||
rec_status, |
|||
</if> |
|||
</trim> |
|||
<trim prefix="values (" suffix=")" suffixOverrides=","> |
|||
<if test="id != null"> |
|||
#{id,jdbcType=BIGINT}, |
|||
</if> |
|||
<if test="userId != null"> |
|||
#{userId,jdbcType=BIGINT}, |
|||
</if> |
|||
<if test="authId != null"> |
|||
#{authId,jdbcType=BIGINT}, |
|||
</if> |
|||
<if test="time != null"> |
|||
#{time,jdbcType=BIGINT}, |
|||
</if> |
|||
<if test="deviceId != null"> |
|||
#{deviceId,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="clientType != null"> |
|||
#{clientType,jdbcType=TINYINT}, |
|||
</if> |
|||
<if test="ipAddress != null"> |
|||
#{ipAddress,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="operator != null"> |
|||
#{operator,jdbcType=BIGINT}, |
|||
</if> |
|||
<if test="createdAt != null"> |
|||
#{createdAt,jdbcType=TIMESTAMP}, |
|||
</if> |
|||
<if test="updatedAt != null"> |
|||
#{updatedAt,jdbcType=TIMESTAMP}, |
|||
</if> |
|||
<if test="recStatus != null"> |
|||
#{recStatus,jdbcType=TINYINT}, |
|||
</if> |
|||
</trim> |
|||
</insert> |
|||
<select id="countByExample" parameterType="com.ccsens.ptos_tall.bean.po.SysSigninLogExample" resultType="java.lang.Long"> |
|||
select count(*) from t_sys_signin_log |
|||
<if test="_parameter != null"> |
|||
<include refid="Example_Where_Clause" /> |
|||
</if> |
|||
</select> |
|||
<update id="updateByExampleSelective" parameterType="map"> |
|||
update t_sys_signin_log |
|||
<set> |
|||
<if test="record.id != null"> |
|||
id = #{record.id,jdbcType=BIGINT}, |
|||
</if> |
|||
<if test="record.userId != null"> |
|||
user_id = #{record.userId,jdbcType=BIGINT}, |
|||
</if> |
|||
<if test="record.authId != null"> |
|||
auth_id = #{record.authId,jdbcType=BIGINT}, |
|||
</if> |
|||
<if test="record.time != null"> |
|||
time = #{record.time,jdbcType=BIGINT}, |
|||
</if> |
|||
<if test="record.deviceId != null"> |
|||
device_id = #{record.deviceId,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="record.clientType != null"> |
|||
client_type = #{record.clientType,jdbcType=TINYINT}, |
|||
</if> |
|||
<if test="record.ipAddress != null"> |
|||
ip_address = #{record.ipAddress,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="record.operator != null"> |
|||
operator = #{record.operator,jdbcType=BIGINT}, |
|||
</if> |
|||
<if test="record.createdAt != null"> |
|||
created_at = #{record.createdAt,jdbcType=TIMESTAMP}, |
|||
</if> |
|||
<if test="record.updatedAt != null"> |
|||
updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}, |
|||
</if> |
|||
<if test="record.recStatus != null"> |
|||
rec_status = #{record.recStatus,jdbcType=TINYINT}, |
|||
</if> |
|||
</set> |
|||
<if test="_parameter != null"> |
|||
<include refid="Update_By_Example_Where_Clause" /> |
|||
</if> |
|||
</update> |
|||
<update id="updateByExample" parameterType="map"> |
|||
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} |
|||
<if test="_parameter != null"> |
|||
<include refid="Update_By_Example_Where_Clause" /> |
|||
</if> |
|||
</update> |
|||
<update id="updateByPrimaryKeySelective" parameterType="com.ccsens.ptos_tall.bean.po.SysSigninLog"> |
|||
update t_sys_signin_log |
|||
<set> |
|||
<if test="userId != null"> |
|||
user_id = #{userId,jdbcType=BIGINT}, |
|||
</if> |
|||
<if test="authId != null"> |
|||
auth_id = #{authId,jdbcType=BIGINT}, |
|||
</if> |
|||
<if test="time != null"> |
|||
time = #{time,jdbcType=BIGINT}, |
|||
</if> |
|||
<if test="deviceId != null"> |
|||
device_id = #{deviceId,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="clientType != null"> |
|||
client_type = #{clientType,jdbcType=TINYINT}, |
|||
</if> |
|||
<if test="ipAddress != null"> |
|||
ip_address = #{ipAddress,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="operator != null"> |
|||
operator = #{operator,jdbcType=BIGINT}, |
|||
</if> |
|||
<if test="createdAt != null"> |
|||
created_at = #{createdAt,jdbcType=TIMESTAMP}, |
|||
</if> |
|||
<if test="updatedAt != null"> |
|||
updated_at = #{updatedAt,jdbcType=TIMESTAMP}, |
|||
</if> |
|||
<if test="recStatus != null"> |
|||
rec_status = #{recStatus,jdbcType=TINYINT}, |
|||
</if> |
|||
</set> |
|||
where id = #{id,jdbcType=BIGINT} |
|||
</update> |
|||
<update id="updateByPrimaryKey" parameterType="com.ccsens.ptos_tall.bean.po.SysSigninLog"> |
|||
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} |
|||
</update> |
|||
</mapper> |
@ -0,0 +1,276 @@ |
|||
<?xml version="1.0" encoding="UTF-8"?> |
|||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
|||
<mapper namespace="com.ccsens.ptos_tall.persist.mapper.SysUserDeviceMapper"> |
|||
<resultMap id="BaseResultMap" type="com.ccsens.ptos_tall.bean.po.SysUserDevice"> |
|||
<id column="id" jdbcType="BIGINT" property="id" /> |
|||
<result column="user_id" jdbcType="BIGINT" property="userId" /> |
|||
<result column="device_id" jdbcType="VARCHAR" property="deviceId" /> |
|||
<result column="client_type" jdbcType="TINYINT" property="clientType" /> |
|||
<result column="refresh_token" jdbcType="VARCHAR" property="refreshToken" /> |
|||
<result column="operator" jdbcType="BIGINT" property="operator" /> |
|||
<result column="created_at" jdbcType="TIMESTAMP" property="createdAt" /> |
|||
<result column="updated_at" jdbcType="TIMESTAMP" property="updatedAt" /> |
|||
<result column="rec_status" jdbcType="TINYINT" property="recStatus" /> |
|||
</resultMap> |
|||
<sql id="Example_Where_Clause"> |
|||
<where> |
|||
<foreach collection="oredCriteria" item="criteria" separator="or"> |
|||
<if test="criteria.valid"> |
|||
<trim prefix="(" prefixOverrides="and" suffix=")"> |
|||
<foreach collection="criteria.criteria" item="criterion"> |
|||
<choose> |
|||
<when test="criterion.noValue"> |
|||
and ${criterion.condition} |
|||
</when> |
|||
<when test="criterion.singleValue"> |
|||
and ${criterion.condition} #{criterion.value} |
|||
</when> |
|||
<when test="criterion.betweenValue"> |
|||
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} |
|||
</when> |
|||
<when test="criterion.listValue"> |
|||
and ${criterion.condition} |
|||
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=","> |
|||
#{listItem} |
|||
</foreach> |
|||
</when> |
|||
</choose> |
|||
</foreach> |
|||
</trim> |
|||
</if> |
|||
</foreach> |
|||
</where> |
|||
</sql> |
|||
<sql id="Update_By_Example_Where_Clause"> |
|||
<where> |
|||
<foreach collection="example.oredCriteria" item="criteria" separator="or"> |
|||
<if test="criteria.valid"> |
|||
<trim prefix="(" prefixOverrides="and" suffix=")"> |
|||
<foreach collection="criteria.criteria" item="criterion"> |
|||
<choose> |
|||
<when test="criterion.noValue"> |
|||
and ${criterion.condition} |
|||
</when> |
|||
<when test="criterion.singleValue"> |
|||
and ${criterion.condition} #{criterion.value} |
|||
</when> |
|||
<when test="criterion.betweenValue"> |
|||
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} |
|||
</when> |
|||
<when test="criterion.listValue"> |
|||
and ${criterion.condition} |
|||
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=","> |
|||
#{listItem} |
|||
</foreach> |
|||
</when> |
|||
</choose> |
|||
</foreach> |
|||
</trim> |
|||
</if> |
|||
</foreach> |
|||
</where> |
|||
</sql> |
|||
<sql id="Base_Column_List"> |
|||
id, user_id, device_id, client_type, refresh_token, operator, created_at, updated_at, |
|||
rec_status |
|||
</sql> |
|||
<select id="selectByExample" parameterType="com.ccsens.ptos_tall.bean.po.SysUserDeviceExample" resultMap="BaseResultMap"> |
|||
select |
|||
<if test="distinct"> |
|||
distinct |
|||
</if> |
|||
<include refid="Base_Column_List" /> |
|||
from t_sys_user_device |
|||
<if test="_parameter != null"> |
|||
<include refid="Example_Where_Clause" /> |
|||
</if> |
|||
<if test="orderByClause != null"> |
|||
order by ${orderByClause} |
|||
</if> |
|||
</select> |
|||
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap"> |
|||
select |
|||
<include refid="Base_Column_List" /> |
|||
from t_sys_user_device |
|||
where id = #{id,jdbcType=BIGINT} |
|||
</select> |
|||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long"> |
|||
delete from t_sys_user_device |
|||
where id = #{id,jdbcType=BIGINT} |
|||
</delete> |
|||
<delete id="deleteByExample" parameterType="com.ccsens.ptos_tall.bean.po.SysUserDeviceExample"> |
|||
delete from t_sys_user_device |
|||
<if test="_parameter != null"> |
|||
<include refid="Example_Where_Clause" /> |
|||
</if> |
|||
</delete> |
|||
<insert id="insert" parameterType="com.ccsens.ptos_tall.bean.po.SysUserDevice"> |
|||
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> |
|||
<insert id="insertSelective" parameterType="com.ccsens.ptos_tall.bean.po.SysUserDevice"> |
|||
insert into t_sys_user_device |
|||
<trim prefix="(" suffix=")" suffixOverrides=","> |
|||
<if test="id != null"> |
|||
id, |
|||
</if> |
|||
<if test="userId != null"> |
|||
user_id, |
|||
</if> |
|||
<if test="deviceId != null"> |
|||
device_id, |
|||
</if> |
|||
<if test="clientType != null"> |
|||
client_type, |
|||
</if> |
|||
<if test="refreshToken != null"> |
|||
refresh_token, |
|||
</if> |
|||
<if test="operator != null"> |
|||
operator, |
|||
</if> |
|||
<if test="createdAt != null"> |
|||
created_at, |
|||
</if> |
|||
<if test="updatedAt != null"> |
|||
updated_at, |
|||
</if> |
|||
<if test="recStatus != null"> |
|||
rec_status, |
|||
</if> |
|||
</trim> |
|||
<trim prefix="values (" suffix=")" suffixOverrides=","> |
|||
<if test="id != null"> |
|||
#{id,jdbcType=BIGINT}, |
|||
</if> |
|||
<if test="userId != null"> |
|||
#{userId,jdbcType=BIGINT}, |
|||
</if> |
|||
<if test="deviceId != null"> |
|||
#{deviceId,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="clientType != null"> |
|||
#{clientType,jdbcType=TINYINT}, |
|||
</if> |
|||
<if test="refreshToken != null"> |
|||
#{refreshToken,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="operator != null"> |
|||
#{operator,jdbcType=BIGINT}, |
|||
</if> |
|||
<if test="createdAt != null"> |
|||
#{createdAt,jdbcType=TIMESTAMP}, |
|||
</if> |
|||
<if test="updatedAt != null"> |
|||
#{updatedAt,jdbcType=TIMESTAMP}, |
|||
</if> |
|||
<if test="recStatus != null"> |
|||
#{recStatus,jdbcType=TINYINT}, |
|||
</if> |
|||
</trim> |
|||
</insert> |
|||
<select id="countByExample" parameterType="com.ccsens.ptos_tall.bean.po.SysUserDeviceExample" resultType="java.lang.Long"> |
|||
select count(*) from t_sys_user_device |
|||
<if test="_parameter != null"> |
|||
<include refid="Example_Where_Clause" /> |
|||
</if> |
|||
</select> |
|||
<update id="updateByExampleSelective" parameterType="map"> |
|||
update t_sys_user_device |
|||
<set> |
|||
<if test="record.id != null"> |
|||
id = #{record.id,jdbcType=BIGINT}, |
|||
</if> |
|||
<if test="record.userId != null"> |
|||
user_id = #{record.userId,jdbcType=BIGINT}, |
|||
</if> |
|||
<if test="record.deviceId != null"> |
|||
device_id = #{record.deviceId,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="record.clientType != null"> |
|||
client_type = #{record.clientType,jdbcType=TINYINT}, |
|||
</if> |
|||
<if test="record.refreshToken != null"> |
|||
refresh_token = #{record.refreshToken,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="record.operator != null"> |
|||
operator = #{record.operator,jdbcType=BIGINT}, |
|||
</if> |
|||
<if test="record.createdAt != null"> |
|||
created_at = #{record.createdAt,jdbcType=TIMESTAMP}, |
|||
</if> |
|||
<if test="record.updatedAt != null"> |
|||
updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}, |
|||
</if> |
|||
<if test="record.recStatus != null"> |
|||
rec_status = #{record.recStatus,jdbcType=TINYINT}, |
|||
</if> |
|||
</set> |
|||
<if test="_parameter != null"> |
|||
<include refid="Update_By_Example_Where_Clause" /> |
|||
</if> |
|||
</update> |
|||
<update id="updateByExample" parameterType="map"> |
|||
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} |
|||
<if test="_parameter != null"> |
|||
<include refid="Update_By_Example_Where_Clause" /> |
|||
</if> |
|||
</update> |
|||
<update id="updateByPrimaryKeySelective" parameterType="com.ccsens.ptos_tall.bean.po.SysUserDevice"> |
|||
update t_sys_user_device |
|||
<set> |
|||
<if test="userId != null"> |
|||
user_id = #{userId,jdbcType=BIGINT}, |
|||
</if> |
|||
<if test="deviceId != null"> |
|||
device_id = #{deviceId,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="clientType != null"> |
|||
client_type = #{clientType,jdbcType=TINYINT}, |
|||
</if> |
|||
<if test="refreshToken != null"> |
|||
refresh_token = #{refreshToken,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="operator != null"> |
|||
operator = #{operator,jdbcType=BIGINT}, |
|||
</if> |
|||
<if test="createdAt != null"> |
|||
created_at = #{createdAt,jdbcType=TIMESTAMP}, |
|||
</if> |
|||
<if test="updatedAt != null"> |
|||
updated_at = #{updatedAt,jdbcType=TIMESTAMP}, |
|||
</if> |
|||
<if test="recStatus != null"> |
|||
rec_status = #{recStatus,jdbcType=TINYINT}, |
|||
</if> |
|||
</set> |
|||
where id = #{id,jdbcType=BIGINT} |
|||
</update> |
|||
<update id="updateByPrimaryKey" parameterType="com.ccsens.ptos_tall.bean.po.SysUserDevice"> |
|||
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} |
|||
</update> |
|||
</mapper> |
@ -0,0 +1,385 @@ |
|||
<?xml version="1.0" encoding="UTF-8"?> |
|||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
|||
<mapper namespace="com.ccsens.ptos_tall.persist.mapper.SysUserMapper"> |
|||
<resultMap id="BaseResultMap" type="com.ccsens.ptos_tall.bean.po.SysUser"> |
|||
<id column="id" jdbcType="BIGINT" property="id" /> |
|||
<result column="name" jdbcType="VARCHAR" property="name" /> |
|||
<result column="gender" jdbcType="TINYINT" property="gender" /> |
|||
<result column="avatar_url" jdbcType="VARCHAR" property="avatarUrl" /> |
|||
<result column="country" jdbcType="VARCHAR" property="country" /> |
|||
<result column="province" jdbcType="VARCHAR" property="province" /> |
|||
<result column="city" jdbcType="VARCHAR" property="city" /> |
|||
<result column="phone" jdbcType="VARCHAR" property="phone" /> |
|||
<result column="id_card" jdbcType="VARCHAR" property="idCard" /> |
|||
<result column="power" jdbcType="TINYINT" property="power" /> |
|||
<result column="device_id" jdbcType="VARCHAR" property="deviceId" /> |
|||
<result column="auth_type" jdbcType="TINYINT" property="authType" /> |
|||
<result column="operator" jdbcType="BIGINT" property="operator" /> |
|||
<result column="created_at" jdbcType="TIMESTAMP" property="createdAt" /> |
|||
<result column="updated_at" jdbcType="TIMESTAMP" property="updatedAt" /> |
|||
<result column="rec_status" jdbcType="TINYINT" property="recStatus" /> |
|||
</resultMap> |
|||
<sql id="Example_Where_Clause"> |
|||
<where> |
|||
<foreach collection="oredCriteria" item="criteria" separator="or"> |
|||
<if test="criteria.valid"> |
|||
<trim prefix="(" prefixOverrides="and" suffix=")"> |
|||
<foreach collection="criteria.criteria" item="criterion"> |
|||
<choose> |
|||
<when test="criterion.noValue"> |
|||
and ${criterion.condition} |
|||
</when> |
|||
<when test="criterion.singleValue"> |
|||
and ${criterion.condition} #{criterion.value} |
|||
</when> |
|||
<when test="criterion.betweenValue"> |
|||
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} |
|||
</when> |
|||
<when test="criterion.listValue"> |
|||
and ${criterion.condition} |
|||
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=","> |
|||
#{listItem} |
|||
</foreach> |
|||
</when> |
|||
</choose> |
|||
</foreach> |
|||
</trim> |
|||
</if> |
|||
</foreach> |
|||
</where> |
|||
</sql> |
|||
<sql id="Update_By_Example_Where_Clause"> |
|||
<where> |
|||
<foreach collection="example.oredCriteria" item="criteria" separator="or"> |
|||
<if test="criteria.valid"> |
|||
<trim prefix="(" prefixOverrides="and" suffix=")"> |
|||
<foreach collection="criteria.criteria" item="criterion"> |
|||
<choose> |
|||
<when test="criterion.noValue"> |
|||
and ${criterion.condition} |
|||
</when> |
|||
<when test="criterion.singleValue"> |
|||
and ${criterion.condition} #{criterion.value} |
|||
</when> |
|||
<when test="criterion.betweenValue"> |
|||
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} |
|||
</when> |
|||
<when test="criterion.listValue"> |
|||
and ${criterion.condition} |
|||
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=","> |
|||
#{listItem} |
|||
</foreach> |
|||
</when> |
|||
</choose> |
|||
</foreach> |
|||
</trim> |
|||
</if> |
|||
</foreach> |
|||
</where> |
|||
</sql> |
|||
<sql id="Base_Column_List"> |
|||
id, name, gender, avatar_url, country, province, city, phone, id_card, power, device_id, |
|||
auth_type, operator, created_at, updated_at, rec_status |
|||
</sql> |
|||
<select id="selectByExample" parameterType="com.ccsens.ptos_tall.bean.po.SysUserExample" resultMap="BaseResultMap"> |
|||
select |
|||
<if test="distinct"> |
|||
distinct |
|||
</if> |
|||
<include refid="Base_Column_List" /> |
|||
from t_sys_user |
|||
<if test="_parameter != null"> |
|||
<include refid="Example_Where_Clause" /> |
|||
</if> |
|||
<if test="orderByClause != null"> |
|||
order by ${orderByClause} |
|||
</if> |
|||
</select> |
|||
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap"> |
|||
select |
|||
<include refid="Base_Column_List" /> |
|||
from t_sys_user |
|||
where id = #{id,jdbcType=BIGINT} |
|||
</select> |
|||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long"> |
|||
delete from t_sys_user |
|||
where id = #{id,jdbcType=BIGINT} |
|||
</delete> |
|||
<delete id="deleteByExample" parameterType="com.ccsens.ptos_tall.bean.po.SysUserExample"> |
|||
delete from t_sys_user |
|||
<if test="_parameter != null"> |
|||
<include refid="Example_Where_Clause" /> |
|||
</if> |
|||
</delete> |
|||
<insert id="insert" parameterType="com.ccsens.ptos_tall.bean.po.SysUser"> |
|||
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> |
|||
<insert id="insertSelective" parameterType="com.ccsens.ptos_tall.bean.po.SysUser"> |
|||
insert into t_sys_user |
|||
<trim prefix="(" suffix=")" suffixOverrides=","> |
|||
<if test="id != null"> |
|||
id, |
|||
</if> |
|||
<if test="name != null"> |
|||
name, |
|||
</if> |
|||
<if test="gender != null"> |
|||
gender, |
|||
</if> |
|||
<if test="avatarUrl != null"> |
|||
avatar_url, |
|||
</if> |
|||
<if test="country != null"> |
|||
country, |
|||
</if> |
|||
<if test="province != null"> |
|||
province, |
|||
</if> |
|||
<if test="city != null"> |
|||
city, |
|||
</if> |
|||
<if test="phone != null"> |
|||
phone, |
|||
</if> |
|||
<if test="idCard != null"> |
|||
id_card, |
|||
</if> |
|||
<if test="power != null"> |
|||
power, |
|||
</if> |
|||
<if test="deviceId != null"> |
|||
device_id, |
|||
</if> |
|||
<if test="authType != null"> |
|||
auth_type, |
|||
</if> |
|||
<if test="operator != null"> |
|||
operator, |
|||
</if> |
|||
<if test="createdAt != null"> |
|||
created_at, |
|||
</if> |
|||
<if test="updatedAt != null"> |
|||
updated_at, |
|||
</if> |
|||
<if test="recStatus != null"> |
|||
rec_status, |
|||
</if> |
|||
</trim> |
|||
<trim prefix="values (" suffix=")" suffixOverrides=","> |
|||
<if test="id != null"> |
|||
#{id,jdbcType=BIGINT}, |
|||
</if> |
|||
<if test="name != null"> |
|||
#{name,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="gender != null"> |
|||
#{gender,jdbcType=TINYINT}, |
|||
</if> |
|||
<if test="avatarUrl != null"> |
|||
#{avatarUrl,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="country != null"> |
|||
#{country,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="province != null"> |
|||
#{province,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="city != null"> |
|||
#{city,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="phone != null"> |
|||
#{phone,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="idCard != null"> |
|||
#{idCard,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="power != null"> |
|||
#{power,jdbcType=TINYINT}, |
|||
</if> |
|||
<if test="deviceId != null"> |
|||
#{deviceId,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="authType != null"> |
|||
#{authType,jdbcType=TINYINT}, |
|||
</if> |
|||
<if test="operator != null"> |
|||
#{operator,jdbcType=BIGINT}, |
|||
</if> |
|||
<if test="createdAt != null"> |
|||
#{createdAt,jdbcType=TIMESTAMP}, |
|||
</if> |
|||
<if test="updatedAt != null"> |
|||
#{updatedAt,jdbcType=TIMESTAMP}, |
|||
</if> |
|||
<if test="recStatus != null"> |
|||
#{recStatus,jdbcType=TINYINT}, |
|||
</if> |
|||
</trim> |
|||
</insert> |
|||
<select id="countByExample" parameterType="com.ccsens.ptos_tall.bean.po.SysUserExample" resultType="java.lang.Long"> |
|||
select count(*) from t_sys_user |
|||
<if test="_parameter != null"> |
|||
<include refid="Example_Where_Clause" /> |
|||
</if> |
|||
</select> |
|||
<update id="updateByExampleSelective" parameterType="map"> |
|||
update t_sys_user |
|||
<set> |
|||
<if test="record.id != null"> |
|||
id = #{record.id,jdbcType=BIGINT}, |
|||
</if> |
|||
<if test="record.name != null"> |
|||
name = #{record.name,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="record.gender != null"> |
|||
gender = #{record.gender,jdbcType=TINYINT}, |
|||
</if> |
|||
<if test="record.avatarUrl != null"> |
|||
avatar_url = #{record.avatarUrl,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="record.country != null"> |
|||
country = #{record.country,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="record.province != null"> |
|||
province = #{record.province,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="record.city != null"> |
|||
city = #{record.city,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="record.phone != null"> |
|||
phone = #{record.phone,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="record.idCard != null"> |
|||
id_card = #{record.idCard,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="record.power != null"> |
|||
power = #{record.power,jdbcType=TINYINT}, |
|||
</if> |
|||
<if test="record.deviceId != null"> |
|||
device_id = #{record.deviceId,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="record.authType != null"> |
|||
auth_type = #{record.authType,jdbcType=TINYINT}, |
|||
</if> |
|||
<if test="record.operator != null"> |
|||
operator = #{record.operator,jdbcType=BIGINT}, |
|||
</if> |
|||
<if test="record.createdAt != null"> |
|||
created_at = #{record.createdAt,jdbcType=TIMESTAMP}, |
|||
</if> |
|||
<if test="record.updatedAt != null"> |
|||
updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}, |
|||
</if> |
|||
<if test="record.recStatus != null"> |
|||
rec_status = #{record.recStatus,jdbcType=TINYINT}, |
|||
</if> |
|||
</set> |
|||
<if test="_parameter != null"> |
|||
<include refid="Update_By_Example_Where_Clause" /> |
|||
</if> |
|||
</update> |
|||
<update id="updateByExample" parameterType="map"> |
|||
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} |
|||
<if test="_parameter != null"> |
|||
<include refid="Update_By_Example_Where_Clause" /> |
|||
</if> |
|||
</update> |
|||
<update id="updateByPrimaryKeySelective" parameterType="com.ccsens.ptos_tall.bean.po.SysUser"> |
|||
update t_sys_user |
|||
<set> |
|||
<if test="name != null"> |
|||
name = #{name,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="gender != null"> |
|||
gender = #{gender,jdbcType=TINYINT}, |
|||
</if> |
|||
<if test="avatarUrl != null"> |
|||
avatar_url = #{avatarUrl,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="country != null"> |
|||
country = #{country,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="province != null"> |
|||
province = #{province,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="city != null"> |
|||
city = #{city,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="phone != null"> |
|||
phone = #{phone,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="idCard != null"> |
|||
id_card = #{idCard,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="power != null"> |
|||
power = #{power,jdbcType=TINYINT}, |
|||
</if> |
|||
<if test="deviceId != null"> |
|||
device_id = #{deviceId,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="authType != null"> |
|||
auth_type = #{authType,jdbcType=TINYINT}, |
|||
</if> |
|||
<if test="operator != null"> |
|||
operator = #{operator,jdbcType=BIGINT}, |
|||
</if> |
|||
<if test="createdAt != null"> |
|||
created_at = #{createdAt,jdbcType=TIMESTAMP}, |
|||
</if> |
|||
<if test="updatedAt != null"> |
|||
updated_at = #{updatedAt,jdbcType=TIMESTAMP}, |
|||
</if> |
|||
<if test="recStatus != null"> |
|||
rec_status = #{recStatus,jdbcType=TINYINT}, |
|||
</if> |
|||
</set> |
|||
where id = #{id,jdbcType=BIGINT} |
|||
</update> |
|||
<update id="updateByPrimaryKey" parameterType="com.ccsens.ptos_tall.bean.po.SysUser"> |
|||
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} |
|||
</update> |
|||
</mapper> |
Loading…
Reference in new issue