pwd
This commit is contained in:
parent
47f2a74ca7
commit
b7179616e5
|
|
@ -7,14 +7,13 @@ import net.xnzn.constant.DelFlagEnum;
|
||||||
import net.xnzn.domain.CustCasual;
|
import net.xnzn.domain.CustCasual;
|
||||||
import net.xnzn.domain.CustInfo;
|
import net.xnzn.domain.CustInfo;
|
||||||
import net.xnzn.domain.CustInfoAppIdLoginVO;
|
import net.xnzn.domain.CustInfoAppIdLoginVO;
|
||||||
import com.bonus.auth.factory.LoginStrategyFactory;
|
|
||||||
import com.bonus.auth.form.LoginBody;
|
import com.bonus.auth.form.LoginBody;
|
||||||
import com.bonus.auth.mapper.CustCasualMapper;
|
import com.bonus.auth.mapper.CustCasualMapper;
|
||||||
import com.bonus.auth.mapper.CustInfoMapper;
|
import com.bonus.auth.mapper.CustInfoMapper;
|
||||||
import com.bonus.auth.service.*;
|
import com.bonus.auth.service.*;
|
||||||
import com.bonus.auth.utils.AesEncryptUtil;
|
import net.xnzn.utils.AesEncryptUtil;
|
||||||
import com.bonus.auth.utils.Id;
|
import net.xnzn.utils.Id;
|
||||||
import com.bonus.auth.utils.SM4EncryptUtils;
|
import net.xnzn.utils.SM4EncryptUtils;
|
||||||
import com.bonus.common.core.domain.R;
|
import com.bonus.common.core.domain.R;
|
||||||
import com.bonus.common.core.exception.ServiceException;
|
import com.bonus.common.core.exception.ServiceException;
|
||||||
import com.bonus.common.core.utils.JwtUtils;
|
import com.bonus.common.core.utils.JwtUtils;
|
||||||
|
|
@ -25,7 +24,6 @@ import com.bonus.common.security.auth.AuthUtil;
|
||||||
import com.bonus.common.security.utils.SecurityUtils;
|
import com.bonus.common.security.utils.SecurityUtils;
|
||||||
import com.bonus.config.SystemConfig;
|
import com.bonus.config.SystemConfig;
|
||||||
import com.bonus.system.api.RemoteConfigService;
|
import com.bonus.system.api.RemoteConfigService;
|
||||||
import com.bonus.system.api.RemoteUserService;
|
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import net.xnzn.service.TokenService;
|
import net.xnzn.service.TokenService;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,23 @@
|
||||||
|
package net.xnzn.core.customer.constants;
|
||||||
|
|
||||||
|
public enum PersonalStatusEnum {
|
||||||
|
NORMAL(1, "正常"),
|
||||||
|
CLOSE(2, "注销");
|
||||||
|
|
||||||
|
private final Integer key;
|
||||||
|
private final String desc;
|
||||||
|
|
||||||
|
private PersonalStatusEnum(Integer key, String desc) {
|
||||||
|
this.key = key;
|
||||||
|
this.desc = desc;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getKey() {
|
||||||
|
return this.key;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDesc() {
|
||||||
|
return this.desc;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,11 @@
|
||||||
|
package net.xnzn.core.customer.mapper;
|
||||||
|
|
||||||
|
import net.xnzn.core.customer.model.CustCasualRelation;
|
||||||
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
|
||||||
|
@Mapper
|
||||||
|
public interface CustCasualRelationMapper {
|
||||||
|
|
||||||
|
int updateByCustIdAndOpenId(CustCasualRelation custCasualRelation);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,13 @@
|
||||||
|
package net.xnzn.core.customer.mapper;
|
||||||
|
|
||||||
|
import net.xnzn.domain.CustInfo;
|
||||||
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
|
@Mapper
|
||||||
|
public interface CustInfoMapper {
|
||||||
|
|
||||||
|
CustInfo selectOne(CustInfo custInfo);
|
||||||
|
int updateById(@Param("custId") Long custId);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,174 @@
|
||||||
|
package net.xnzn.core.customer.model;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
|
||||||
|
//@TableName("cust_casual_relation")
|
||||||
|
@ApiModel("临时人员表绑定正式人员关系表")
|
||||||
|
public class CustCasualRelation implements Serializable {
|
||||||
|
@ApiModelProperty("主键")
|
||||||
|
private Long id;
|
||||||
|
@ApiModelProperty("人员id")
|
||||||
|
private Long custId;
|
||||||
|
@ApiModelProperty("openid")
|
||||||
|
private String openid;
|
||||||
|
@ApiModelProperty("来源类型 1-钉钉 2-微信 3-小程序")
|
||||||
|
private Integer sourceType;
|
||||||
|
@ApiModelProperty("是否默认 1默认 2非默认")
|
||||||
|
private Integer isDefault;
|
||||||
|
@ApiModelProperty("是否默认 1游客 2非游客 默认2")
|
||||||
|
private Integer isTourist;
|
||||||
|
private LocalDateTime crtime;
|
||||||
|
private LocalDateTime uptime;
|
||||||
|
|
||||||
|
public static CustCasualRelationBuilder builder() {
|
||||||
|
return new CustCasualRelationBuilder();
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getId() {
|
||||||
|
return this.id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getCustId() {
|
||||||
|
return this.custId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getOpenid() {
|
||||||
|
return this.openid;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getSourceType() {
|
||||||
|
return this.sourceType;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getIsDefault() {
|
||||||
|
return this.isDefault;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getIsTourist() {
|
||||||
|
return this.isTourist;
|
||||||
|
}
|
||||||
|
|
||||||
|
public LocalDateTime getCrtime() {
|
||||||
|
return this.crtime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public LocalDateTime getUptime() {
|
||||||
|
return this.uptime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public CustCasualRelation setId(final Long id) {
|
||||||
|
this.id = id;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public CustCasualRelation setCustId(final Long custId) {
|
||||||
|
this.custId = custId;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public CustCasualRelation setOpenid(final String openid) {
|
||||||
|
this.openid = openid;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public CustCasualRelation setSourceType(final Integer sourceType) {
|
||||||
|
this.sourceType = sourceType;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public CustCasualRelation setIsDefault(final Integer isDefault) {
|
||||||
|
this.isDefault = isDefault;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public CustCasualRelation setIsTourist(final Integer isTourist) {
|
||||||
|
this.isTourist = isTourist;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public CustCasualRelation setCrtime(final LocalDateTime crtime) {
|
||||||
|
this.crtime = crtime;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public CustCasualRelation setUptime(final LocalDateTime uptime) {
|
||||||
|
this.uptime = uptime;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public CustCasualRelation(final Long id, final Long custId, final String openid, final Integer sourceType, final Integer isDefault, final Integer isTourist, final LocalDateTime crtime, final LocalDateTime uptime) {
|
||||||
|
this.id = id;
|
||||||
|
this.custId = custId;
|
||||||
|
this.openid = openid;
|
||||||
|
this.sourceType = sourceType;
|
||||||
|
this.isDefault = isDefault;
|
||||||
|
this.isTourist = isTourist;
|
||||||
|
this.crtime = crtime;
|
||||||
|
this.uptime = uptime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public CustCasualRelation() {
|
||||||
|
}
|
||||||
|
|
||||||
|
public static class CustCasualRelationBuilder {
|
||||||
|
private Long id;
|
||||||
|
private Long custId;
|
||||||
|
private String openid;
|
||||||
|
private Integer sourceType;
|
||||||
|
private Integer isDefault;
|
||||||
|
private Integer isTourist;
|
||||||
|
private LocalDateTime crtime;
|
||||||
|
private LocalDateTime uptime;
|
||||||
|
|
||||||
|
CustCasualRelationBuilder() {
|
||||||
|
}
|
||||||
|
|
||||||
|
public CustCasualRelationBuilder id(final Long id) {
|
||||||
|
this.id = id;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public CustCasualRelationBuilder custId(final Long custId) {
|
||||||
|
this.custId = custId;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public CustCasualRelationBuilder openid(final String openid) {
|
||||||
|
this.openid = openid;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public CustCasualRelationBuilder sourceType(final Integer sourceType) {
|
||||||
|
this.sourceType = sourceType;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public CustCasualRelationBuilder isDefault(final Integer isDefault) {
|
||||||
|
this.isDefault = isDefault;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public CustCasualRelationBuilder isTourist(final Integer isTourist) {
|
||||||
|
this.isTourist = isTourist;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public CustCasualRelationBuilder crtime(final LocalDateTime crtime) {
|
||||||
|
this.crtime = crtime;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public CustCasualRelationBuilder uptime(final LocalDateTime uptime) {
|
||||||
|
this.uptime = uptime;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public CustCasualRelation build() {
|
||||||
|
return new CustCasualRelation(this.id, this.custId, this.openid, this.sourceType, this.isDefault, this.isTourist, this.crtime, this.uptime);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,13 @@
|
||||||
|
package net.xnzn.core.merchant.dto;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class SmsCodeVerifyDTO implements Serializable {
|
||||||
|
@ApiModelProperty("手机号")
|
||||||
|
private String telephoneNumber;
|
||||||
|
@ApiModelProperty("验证码")
|
||||||
|
private String code;
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,51 @@
|
||||||
|
<?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="net.xnzn.core.customer.mapper.CustCasualRelationMapper">
|
||||||
|
|
||||||
|
<update id="updateByCustIdAndOpenId">
|
||||||
|
update cust_casual_relation
|
||||||
|
set is_default = #{isDefault}
|
||||||
|
where cust_id = #{custId} and openid = #{openid}
|
||||||
|
</update>
|
||||||
|
|
||||||
|
</mapper>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -0,0 +1,74 @@
|
||||||
|
<?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="net.xnzn.core.customer.mapper.CustInfoMapper">
|
||||||
|
<!--根据人员id集合获取人员信息-->
|
||||||
|
<select id="selectOne" resultType="net.xnzn.domain.CustInfo">
|
||||||
|
select cust_id, cust_name, cust_num, cust_photo_url, mobile, pwd
|
||||||
|
from cust_info
|
||||||
|
<where>
|
||||||
|
cust_status = 1
|
||||||
|
<if test="custId != null">
|
||||||
|
and cust_id = #{custId}
|
||||||
|
</if>
|
||||||
|
<if test="custName != null and custName != ''">
|
||||||
|
and cust_name = #{custName}
|
||||||
|
</if>
|
||||||
|
<if test="custNum != null and custNum != ''">
|
||||||
|
and cust_num = #{custNum}
|
||||||
|
</if>
|
||||||
|
<if test="mobile != null and mobile != ''">
|
||||||
|
and mobile = #{mobile}
|
||||||
|
</if>
|
||||||
|
<if test="idCard != null and idCard != ''">
|
||||||
|
and id_card = #{idCard}
|
||||||
|
</if>
|
||||||
|
</where>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<update id="updateById">
|
||||||
|
update cust_info
|
||||||
|
set cust_name = #{custName}, cust_num = #{custNum}, mobile = #{mobile}, id_card = #{idCard}
|
||||||
|
where cust_id = #{custId}
|
||||||
|
</update>
|
||||||
|
|
||||||
|
</mapper>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Reference in New Issue