diff --git a/bonus-cust-auth/src/main/java/com/bonus/auth/controller/TokenController.java b/bonus-cust-auth/src/main/java/com/bonus/auth/controller/TokenController.java index c94dbff3..ca278378 100644 --- a/bonus-cust-auth/src/main/java/com/bonus/auth/controller/TokenController.java +++ b/bonus-cust-auth/src/main/java/com/bonus/auth/controller/TokenController.java @@ -7,14 +7,13 @@ import net.xnzn.constant.DelFlagEnum; import net.xnzn.domain.CustCasual; import net.xnzn.domain.CustInfo; import net.xnzn.domain.CustInfoAppIdLoginVO; -import com.bonus.auth.factory.LoginStrategyFactory; import com.bonus.auth.form.LoginBody; import com.bonus.auth.mapper.CustCasualMapper; import com.bonus.auth.mapper.CustInfoMapper; import com.bonus.auth.service.*; -import com.bonus.auth.utils.AesEncryptUtil; -import com.bonus.auth.utils.Id; -import com.bonus.auth.utils.SM4EncryptUtils; +import net.xnzn.utils.AesEncryptUtil; +import net.xnzn.utils.Id; +import net.xnzn.utils.SM4EncryptUtils; import com.bonus.common.core.domain.R; import com.bonus.common.core.exception.ServiceException; 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.config.SystemConfig; import com.bonus.system.api.RemoteConfigService; -import com.bonus.system.api.RemoteUserService; import lombok.extern.slf4j.Slf4j; import net.xnzn.service.TokenService; import org.springframework.beans.factory.annotation.Autowired; diff --git a/bonus-modules/bonus-smart-canteen/src/main/java/net/xnzn/core/customer/constants/PersonalStatusEnum.java b/bonus-modules/bonus-smart-canteen/src/main/java/net/xnzn/core/customer/constants/PersonalStatusEnum.java new file mode 100644 index 00000000..59ccf8b4 --- /dev/null +++ b/bonus-modules/bonus-smart-canteen/src/main/java/net/xnzn/core/customer/constants/PersonalStatusEnum.java @@ -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; + } + +} diff --git a/bonus-modules/bonus-smart-canteen/src/main/java/net/xnzn/core/customer/mapper/CustCasualRelationMapper.java b/bonus-modules/bonus-smart-canteen/src/main/java/net/xnzn/core/customer/mapper/CustCasualRelationMapper.java new file mode 100644 index 00000000..59ba67e9 --- /dev/null +++ b/bonus-modules/bonus-smart-canteen/src/main/java/net/xnzn/core/customer/mapper/CustCasualRelationMapper.java @@ -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); + +} diff --git a/bonus-modules/bonus-smart-canteen/src/main/java/net/xnzn/core/customer/mapper/CustInfoMapper.java b/bonus-modules/bonus-smart-canteen/src/main/java/net/xnzn/core/customer/mapper/CustInfoMapper.java new file mode 100644 index 00000000..cc8473ce --- /dev/null +++ b/bonus-modules/bonus-smart-canteen/src/main/java/net/xnzn/core/customer/mapper/CustInfoMapper.java @@ -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); + +} diff --git a/bonus-modules/bonus-smart-canteen/src/main/java/net/xnzn/core/customer/model/CustCasualRelation.java b/bonus-modules/bonus-smart-canteen/src/main/java/net/xnzn/core/customer/model/CustCasualRelation.java new file mode 100644 index 00000000..9f6597d5 --- /dev/null +++ b/bonus-modules/bonus-smart-canteen/src/main/java/net/xnzn/core/customer/model/CustCasualRelation.java @@ -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); + } + + } +} diff --git a/bonus-modules/bonus-smart-canteen/src/main/java/net/xnzn/core/merchant/dto/SmsCodeVerifyDTO.java b/bonus-modules/bonus-smart-canteen/src/main/java/net/xnzn/core/merchant/dto/SmsCodeVerifyDTO.java new file mode 100644 index 00000000..78fd1c27 --- /dev/null +++ b/bonus-modules/bonus-smart-canteen/src/main/java/net/xnzn/core/merchant/dto/SmsCodeVerifyDTO.java @@ -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; +} diff --git a/bonus-modules/bonus-smart-canteen/src/main/resources/mapper/customer/CustCasualRelationMapper.xml b/bonus-modules/bonus-smart-canteen/src/main/resources/mapper/customer/CustCasualRelationMapper.xml new file mode 100644 index 00000000..33c0c8a4 --- /dev/null +++ b/bonus-modules/bonus-smart-canteen/src/main/resources/mapper/customer/CustCasualRelationMapper.xml @@ -0,0 +1,51 @@ + + + + + + update cust_casual_relation + set is_default = #{isDefault} + where cust_id = #{custId} and openid = #{openid} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/bonus-modules/bonus-smart-canteen/src/main/resources/mapper/customer/CustInfoMapper.xml b/bonus-modules/bonus-smart-canteen/src/main/resources/mapper/customer/CustInfoMapper.xml new file mode 100644 index 00000000..5c21d4f0 --- /dev/null +++ b/bonus-modules/bonus-smart-canteen/src/main/resources/mapper/customer/CustInfoMapper.xml @@ -0,0 +1,74 @@ + + + + + + + + update cust_info + set cust_name = #{custName}, cust_num = #{custNum}, mobile = #{mobile}, id_card = #{idCard} + where cust_id = #{custId} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +