This commit is contained in:
ran.shang
2025-06-11 09:42:13 +08:00
commit 7e38b8d971
1935 changed files with 132836 additions and 0 deletions

View File

@@ -0,0 +1,111 @@
package com.newyetai.usercenter.annex.controller;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.newyetai.common.AlitaResult;
import com.newyetai.tkmybatis.pojo.Page;
import com.newyetai.usercenter.annex.dto.UserAnnexCreateDTO;
import com.newyetai.usercenter.annex.dto.UserAnnexDTO;
import com.newyetai.usercenter.annex.dto.UserAnnexOperateDTO;
import com.newyetai.usercenter.annex.dto.UserAnnexPageQueryDTO;
import com.newyetai.usercenter.annex.entity.UserAnnex;
import com.newyetai.usercenter.annex.service.IUserAnnexService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import java.util.List;
import lombok.RequiredArgsConstructor;
import org.apache.commons.collections4.CollectionUtils;
import org.apache.ibatis.annotations.Param;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
/**
* <p>
* 用户附件表 前端控制器
* </p>
*
* @author Carlye
* @since 2021-01-12
*/
@Api(tags = "用户附件")
@RestController
@RequestMapping("/annex")
@RequiredArgsConstructor(onConstructor = @__(@Autowired))
public class UserAnnexController {
private final IUserAnnexService userAnnexService;
/**
* 创建
*
* @param userAnnexCreateDTO 用户附件创建dto
* @return {@link AlitaResult<UserAnnexDTO>}
*/
@PostMapping("/create")
@ApiOperation("创建用户附件")
public AlitaResult<UserAnnexDTO> create(@RequestBody UserAnnexCreateDTO userAnnexCreateDTO) {
return AlitaResult.success(userAnnexService.create(userAnnexCreateDTO));
}
/**
* 创建
*
* @param userAnnexCreateDTO 用户附件创建dto
* @return {@link AlitaResult<UserAnnexDTO>}
*/
@PostMapping("/modify")
@ApiOperation("更新用户附件")
public AlitaResult<Boolean> modify(@RequestBody UserAnnexOperateDTO userAnnexCreateDTO) {
return AlitaResult.success(userAnnexService.modify(userAnnexCreateDTO));
}
/**
* 分页查询
*
* @param queryDTO 查询dto
* @return {@link AlitaResult<Page<UserAnnexDTO>>}
*/
@GetMapping("/page")
@ApiOperation("分页查询")
public AlitaResult<Page<UserAnnexDTO>> page(UserAnnexPageQueryDTO queryDTO) {
userAnnexService.page(queryDTO);
return AlitaResult.success(queryDTO.getPageResult());
}
/**
* 查询单个
* @param userId 用户ID
* @param annexType 附件类别
* @return
*/
@GetMapping("/get/{userId}/{annexType}")
@ApiOperation("单个查询")
public AlitaResult<UserAnnexDTO> get(@PathVariable("userId") Long userId, @PathVariable("annexType") Integer annexType) {
UserAnnexPageQueryDTO userAnnexPageQueryDTO = new UserAnnexPageQueryDTO();
userAnnexPageQueryDTO.setUserId(userId);
userAnnexPageQueryDTO.setAnnexType(annexType);
userAnnexPageQueryDTO.setNeedPage(false);
List<UserAnnexDTO> list = userAnnexService.page(userAnnexPageQueryDTO);
return AlitaResult.success(CollectionUtils.isEmpty(list)?null:list.get(0));
}
/**
* 查询单个
* @param userId 用户ID
* @param annexType 附件类别
* @return
*/
@DeleteMapping("/remove/{userId}/{annexType}")
@ApiOperation("删除附件")
public AlitaResult<Boolean> remove(@PathVariable("userId") Long userId, @PathVariable("annexType") Integer annexType) {
return AlitaResult.success(userAnnexService.update(Wrappers.<UserAnnex>lambdaUpdate()
.eq(UserAnnex::getUserId, userId)
.eq(UserAnnex::getAnnexType, annexType)
.eq(UserAnnex::getDeleted, false)
.set(UserAnnex::getDeleted, true)));
}
}

View File

@@ -0,0 +1,29 @@
package com.newyetai.usercenter.annex.dao;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.newyetai.usercenter.annex.dto.UserAnnexDTO;
import com.newyetai.usercenter.annex.dto.UserAnnexPageQueryDTO;
import com.newyetai.usercenter.annex.entity.UserAnnex;
import java.util.List;
import org.apache.ibatis.annotations.Param;
/**
* <p>
* 用户附件表 Mapper 接口
* </p>
*
* @author Carlye
* @since 2021-01-12
*/
public interface UserAnnexDao extends BaseMapper<UserAnnex> {
/**
* 分页查询
*
* @param userAnnexPageQueryDTO 用户附件页面查询dto
* @return {@link List<UserAnnexDTO>}
*/
List<UserAnnexDTO> page(@Param("param") UserAnnexPageQueryDTO userAnnexPageQueryDTO);
}

View File

@@ -0,0 +1,48 @@
package com.newyetai.usercenter.annex.dto;
import com.newyetai.common.dto.BaseDTO;
import com.newyetai.common.validate.EnumValidator;
import com.newyetai.usercenter.annex.enums.AnnexTypeEnum;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.*;
import lombok.experimental.Accessors;
import lombok.experimental.SuperBuilder;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
/**
* <p>
* 用户附件实体
* </p>
*
* @author Carlye
* @since 2021-01-12
*/
@ApiModel("用户附件创建DTO")
@Data
@SuperBuilder
@NoArgsConstructor
@AllArgsConstructor
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
public class UserAnnexCreateDTO extends BaseDTO {
private static final long serialVersionUID = 6855183230684638997L;
@ApiModelProperty("机构ID")
private Long orgId;
@ApiModelProperty("用户ID")
private Long userId;
@NotNull(message = "附件类型不能为空")
@EnumValidator(value = AnnexTypeEnum.class,message = "附件类型错误")
@ApiModelProperty("附件类型 1:身份证正面 2:身份证反面")
private Integer annexType;
@NotEmpty(message = "fileCode不能为空")
@ApiModelProperty("附件fileCode")
private String annexFileCode;
}

View File

@@ -0,0 +1,40 @@
package com.newyetai.usercenter.annex.dto;
import com.newyetai.common.dto.BaseDTO;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.*;
import lombok.experimental.Accessors;
import lombok.experimental.SuperBuilder;
/**
* <p>
* 用户附件实体
* </p>
*
* @author Carlye
* @since 2021-01-12
*/
@ApiModel("用户附件DTO")
@Data
@SuperBuilder
@NoArgsConstructor
@AllArgsConstructor
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
public class UserAnnexDTO extends BaseDTO {
private static final long serialVersionUID = -1784620895307517063L;
@ApiModelProperty("机构ID")
private Long orgId;
@ApiModelProperty("用户ID")
private Long userId;
@ApiModelProperty("附件类型 1:身份证正面 2:身份证反面")
private Integer annexType;
@ApiModelProperty("附件fileCode")
private String annexFileCode;
}

View File

@@ -0,0 +1,50 @@
package com.newyetai.usercenter.annex.dto;
import com.newyetai.common.dto.BaseDTO;
import com.newyetai.common.validation.Update;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;
import lombok.experimental.SuperBuilder;
/**
* <p>
* 用户附件实体
* </p>
*
* @author Carlye
* @since 2021-01-12
*/
@ApiModel("用户附件操作DTO")
@Data
@SuperBuilder
@NoArgsConstructor
@AllArgsConstructor
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
public class UserAnnexOperateDTO extends BaseDTO {
private static final long serialVersionUID = 6855183230684638997L;
@ApiModelProperty("机构ID")
private Long orgId;
@NotNull(message = "用户ID不能为空", groups = {Update.class})
@ApiModelProperty("用户ID")
private Long userId;
@NotNull(message = "附件类型不能为空", groups = {Update.class})
@ApiModelProperty("附件类型 1:身份证正面 2:身份证反面")
private Integer annexType;
@NotEmpty(message = "fileCode不能为空", groups = {Update.class})
@ApiModelProperty("附件fileCode")
private String annexFileCode;
}

View File

@@ -0,0 +1,57 @@
package com.newyetai.usercenter.annex.dto;
import com.google.common.collect.Sets;
import com.newyetai.common.dto.PageQueryDTO;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.*;
import lombok.experimental.Accessors;
import java.util.Arrays;
import java.util.Optional;
import java.util.Set;
import java.util.stream.Collectors;
/**
* <p>
* 用户附件实体
* </p>
*
* @author Carlye
* @since 2021-01-12
*/
@ApiModel("用户附件查询DTO")
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
public class UserAnnexPageQueryDTO extends PageQueryDTO<UserAnnexDTO> {
private static final long serialVersionUID = -1784620895307517063L;
@ApiModelProperty("机构ID")
private Long orgId;
@ApiModelProperty("用户ID")
private Long userId;
@ApiModelProperty("附件类型 1:身份证正面 2:身份证反面")
private Integer annexType;
@ApiModelProperty("附件fileCode")
private String annexFileCode;
@ApiModelProperty("附件类型, ','分割")
private String annexTypeStr;
private Set<String> annexTypes;
public Set<String> getAnnexTypes() {
return Optional.ofNullable(getAnnexTypeStr())
.map(str -> Arrays.stream(str.split(","))
.collect(Collectors.toSet()))
.orElse(Sets.newHashSet());
}
}

View File

@@ -0,0 +1,48 @@
package com.newyetai.usercenter.annex.entity;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.newyetai.common.entity.BaseEntity;
import com.newyetai.usercenter.annex.enums.AnnexTypeEnum;
import lombok.*;
import lombok.experimental.Accessors;
/**
* <p>
* 用户附件表
* </p>
*
* @author Carlye
* @since 2021-01-12
*/
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName("xs_user_annex")
public class UserAnnex extends BaseEntity {
private static final long serialVersionUID = -967369619441044008L;
/**
* 机构ID
*/
private Long orgId;
/**
* 用户ID
*/
private Long userId;
/**
* 附件类型 1:身份证正面 2:身份证反面
*/
private AnnexTypeEnum annexType;
/**
* 附件fileCode
*/
@TableField("annex_fileCode")
private String annexFileCode;
}

View File

@@ -0,0 +1,39 @@
package com.newyetai.usercenter.annex.enums;
import com.baomidou.mybatisplus.annotation.EnumValue;
import com.newyetai.mybatis.handle.BaseEnum;
/**
* 附件类型的枚举
*
* @author Carlye
* @date 2021/01/12
*/
public enum AnnexTypeEnum implements BaseEnum<Integer> {
IDCARD_FRONT(1, "身份证正面"),
IDCARD_REVERSE(2, "身份证反面");
@EnumValue
private final Integer type;
private final String desc;
AnnexTypeEnum(Integer type, String desc) {
this.type = type;
this.desc = desc;
}
public Integer getType() {
return type;
}
public String getDesc() {
return desc;
}
@Override
public Integer getValue() {
return type;
}
}

View File

@@ -0,0 +1,31 @@
<?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.newyetai.usercenter.annex.dao.UserAnnexDao">
<select id="page" resultType="com.newyetai.usercenter.annex.dto.UserAnnexDTO">
select *
from xs_user_annex
where deleted = 0
<if test="param.userId != null">
and user_id = #{param.userId}
</if>
<if test="param.orgId != null">
and org_id = #{param.orgId}
</if>
<if test="param.annexType != null">
and annex_type = #{param.annexType}
</if>
<if test="param.annexFileCode != null">
and annex_file_code = #{param.annexFileCode}
</if>
<if test="param.annexTypes != null and param.annexTypes.size() != 0">
and annex_type in
<foreach collection="param.annexTypes" item="annexType" open="(" separator="," close=")">
#{annexType}
</foreach>
</if>
order by id desc
</select>
</mapper>

View File

@@ -0,0 +1,38 @@
package com.newyetai.usercenter.annex.mapstruct;
import com.newyetai.common.util.EnumUtil;
import com.newyetai.usercenter.annex.dto.UserAnnexCreateDTO;
import com.newyetai.usercenter.annex.dto.UserAnnexDTO;
import com.newyetai.usercenter.annex.entity.UserAnnex;
import com.newyetai.usercenter.annex.enums.AnnexTypeEnum;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.Mappings;
import org.mapstruct.factory.Mappers;
import javax.validation.Valid;
/**
* 用户映射器附件地图
*
* @author Carlye
* @date 2021/01/12
*/
@Mapper
public interface UserAnnexMapMapper {
UserAnnexMapMapper INSTANCE = Mappers.getMapper(UserAnnexMapMapper.class);
UserAnnex exchange(@Valid UserAnnexCreateDTO userAnnex);
@Mappings({
@Mapping(target = "annexType",
source = "annexType.type")
})
UserAnnexDTO exchange(UserAnnex userAnnex);
default AnnexTypeEnum cover1(Integer type) {
return EnumUtil.resolve(AnnexTypeEnum::getType, type);
}
}

View File

@@ -0,0 +1,49 @@
package com.newyetai.usercenter.annex.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.newyetai.usercenter.annex.dto.UserAnnexCreateDTO;
import com.newyetai.usercenter.annex.dto.UserAnnexDTO;
import com.newyetai.usercenter.annex.dto.UserAnnexOperateDTO;
import com.newyetai.usercenter.annex.dto.UserAnnexPageQueryDTO;
import com.newyetai.usercenter.annex.entity.UserAnnex;
import org.springframework.validation.annotation.Validated;
import javax.validation.Valid;
import javax.validation.groups.Default;
import java.util.List;
/**
* <p>
* 用户附件表 服务类
* </p>
*
* @author Carlye
* @since 2021-01-12
*/
@Validated(Default.class)
public interface IUserAnnexService extends IService<UserAnnex> {
/**
* 创建用户附件
*
* @param userAnnexCreateDTO 用户附件创建dto
* @return {@link UserAnnexDTO}
* @throws RuntimeException 运行时异常
*/
UserAnnexDTO create(@Valid UserAnnexCreateDTO userAnnexCreateDTO) throws RuntimeException;
/**
* 用户附件分页查询
*
* @param userAnnexPageQueryDTO 用户附件页面查询dto
* @return {@link List<UserAnnexDTO>}
*/
List<UserAnnexDTO> page(UserAnnexPageQueryDTO userAnnexPageQueryDTO);
/**
* 修改用户福建
* @param userAnnexCreateDTO 用户附件操作dto
* @return 是否成功
*/
Boolean modify(UserAnnexOperateDTO userAnnexCreateDTO);
}

View File

@@ -0,0 +1,87 @@
package com.newyetai.usercenter.annex.service.impl;
import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.newyetai.common.exception.util.Assert;
import com.newyetai.common.exception.util.ExceptionUtils;
import com.newyetai.common.util.UserContextHolder;
import com.newyetai.frame.redis.aop.annotation.AutoUnLock;
import com.newyetai.frame.redis.dto.LockDTO;
import com.newyetai.frame.redis.redisson.RedissonUtils;
import com.newyetai.usercenter.annex.dao.UserAnnexDao;
import com.newyetai.usercenter.annex.dto.UserAnnexCreateDTO;
import com.newyetai.usercenter.annex.dto.UserAnnexDTO;
import com.newyetai.usercenter.annex.dto.UserAnnexOperateDTO;
import com.newyetai.usercenter.annex.dto.UserAnnexPageQueryDTO;
import com.newyetai.usercenter.annex.entity.UserAnnex;
import com.newyetai.usercenter.annex.mapstruct.UserAnnexMapMapper;
import com.newyetai.usercenter.annex.service.IUserAnnexService;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import javax.validation.Valid;
import java.util.List;
import java.util.Optional;
/**
* <p>
* 用户附件表 服务实现类
* </p>
*
* @author Carlye
* @since 2021-01-12
*/
@Slf4j
@Service
@RequiredArgsConstructor(onConstructor = @__(@Autowired))
public class UserAnnexServiceImpl extends ServiceImpl<UserAnnexDao, UserAnnex> implements IUserAnnexService {
@Override
@AutoUnLock
public UserAnnexDTO create(@Valid UserAnnexCreateDTO userAnnexCreateDTO) throws RuntimeException {
Long userId = Optional.ofNullable(userAnnexCreateDTO.getUserId()).orElse(UserContextHolder.getExistLoginUserId());
Assert.isTrue(RedissonUtils.tryLockAutomatically(LockDTO.builder().methodName("userAnnexCreate").tryLockWaitTime(0L).arg(userId + "").arg(userAnnexCreateDTO.getAnnexType() + "").build()),
"用户附件正在处理中,请稍后再试哦!");
userAnnexCreateDTO.setUserId(userId);
List<UserAnnex> userAnnexes = list(Wrappers.<UserAnnex>lambdaQuery().eq(UserAnnex::getUserId, userId).eq(UserAnnex::getAnnexType, userAnnexCreateDTO.getAnnexType()).eq(UserAnnex::getDeleted, false));
if (CollectionUtils.isEmpty(userAnnexes)){
UserAnnex userAnnex = UserAnnexMapMapper.INSTANCE.exchange(userAnnexCreateDTO);
Assert.isTrue(save(userAnnex), "新建用户附件异常");
return UserAnnexMapMapper.INSTANCE.exchange(userAnnex);
}else if (userAnnexes.size() == 1){
UserAnnex userAnnex = userAnnexes.get(0);
Assert.isTrue(update(Wrappers.<UserAnnex>lambdaUpdate().set(UserAnnex::getAnnexFileCode,userAnnexCreateDTO.getAnnexFileCode()).eq(UserAnnex::getId,userAnnex.getId())),"更新附件异常");
userAnnex.setAnnexFileCode(userAnnexCreateDTO.getAnnexFileCode());
return UserAnnexMapMapper.INSTANCE.exchange(userAnnex);
}
throw new RuntimeException("用户附件数据异常");
}
@Override
public List<UserAnnexDTO> page(UserAnnexPageQueryDTO userAnnexPageQueryDTO) {
Long userId = Optional.ofNullable(userAnnexPageQueryDTO.getUserId()).orElse(UserContextHolder.getExistLoginUserId());
userAnnexPageQueryDTO.setUserId(userId);
return getBaseMapper().page(userAnnexPageQueryDTO);
}
@Override
public Boolean modify(UserAnnexOperateDTO userAnnexCreateDTO) {
LambdaUpdateWrapper<UserAnnex> lambdaUpdateWrapper = Wrappers.<UserAnnex>lambdaUpdate()
.eq(UserAnnex::getUserId, userAnnexCreateDTO.getUserId())
.eq(UserAnnex::getAnnexType, userAnnexCreateDTO.getAnnexType())
.eq(UserAnnex::getDeleted, false)
.set(UserAnnex::getAnnexFileCode, userAnnexCreateDTO.getAnnexFileCode());
if(userAnnexCreateDTO.getOrgId() != null){
lambdaUpdateWrapper.eq(UserAnnex::getOrgId, userAnnexCreateDTO.getOrgId());
}
Assert.isTrue(update(lambdaUpdateWrapper), "修改用户附件失败");
return Boolean.TRUE;
}
}

View File

@@ -0,0 +1,8 @@
package com.newyetai.usercenter.auth.constant;
/**
* @author sr on 2021-05-24
*/
public interface AuthClientConstants {
}

View File

@@ -0,0 +1,8 @@
package com.newyetai.usercenter.auth.constant;
/**
* @author sr on 2021-05-24
*/
public interface AuthDetailConstants {
}

View File

@@ -0,0 +1,19 @@
package com.newyetai.usercenter.auth.constant;
/**
* @author sr on 2021-05-24
*/
public interface AuthDetailEntrypointConstants {
/**
* 招聘用户状态 1未报名 2已报名 3已邀约 4已面试 5待入职 6在职中 7已离职
*/
Integer USER_JOB_STATUS_NOT_REGISTERED = 1;
Integer USER_JOB_STATUS_ALREADY_REGISTERED = 2;
Integer USER_JOB_STATUS_INVITED = 3;
Integer USER_JOB_STATUS_INTERVIEWED = 4;
Integer USER_JOB_STATUS_TO_BE_HIRED = 5;
Integer USER_JOB_STATUS_ON_THE_JOB = 6;
Integer USER_JOB_STATUS_RESIGNED = 7;
}

View File

@@ -0,0 +1,40 @@
package com.newyetai.usercenter.auth.constant;
import java.util.Map;
import com.google.common.collect.Maps;
public enum AuthMainTypeEnum {
/** 微信 **/
WECHAT(1),
/** 支付宝 **/
ALIPAY(2),
/** 字节 **/
BYTE_DANCE(3),
/** 随申办 **/
SSB(4),
;
private Integer type;
private static Map<Integer, AuthMainTypeEnum> typeMap = Maps.newHashMap();
static {
for(AuthMainTypeEnum authTypeEnum : AuthMainTypeEnum.values()) {
typeMap.put(authTypeEnum.getType(), authTypeEnum);
}
}
AuthMainTypeEnum(Integer type) {
this.type = type;
}
public Integer getType() {
return type;
}
public static AuthMainTypeEnum getByCode(Integer type) {
return typeMap.get(type);
}
}

View File

@@ -0,0 +1,55 @@
package com.newyetai.usercenter.auth.constant;
import java.util.Map;
import com.google.common.collect.Maps;
public enum AuthTypeEnum {
/** 微信公众号 **/
WECHAT(11, AuthMainTypeEnum.WECHAT.getType()),
/** 微信小程序 **/
WECHAT_LITE(12, AuthMainTypeEnum.WECHAT.getType()),
/** 支付宝 **/
ALIPAY(21, AuthMainTypeEnum.ALIPAY.getType()),
/** 支付宝小程序 **/
ALIPAY_LITE(22, AuthMainTypeEnum.ALIPAY.getType()),
/** 字节跳动小程序 **/
BYTE_DANCE_LITE(32, AuthMainTypeEnum.BYTE_DANCE.getType()),
/** 随申办app **/
SSB_APP(41, AuthMainTypeEnum.SSB.getType()),
;
private Integer code;
private Integer mainCode;
private static Map<Integer, AuthTypeEnum> AuthTypeMap = Maps.newHashMap();
static {
for(AuthTypeEnum authTypeEnum : AuthTypeEnum.values()) {
AuthTypeMap.put(authTypeEnum.getCode(), authTypeEnum);
}
}
AuthTypeEnum(Integer code, Integer mainCode) {
this.code = code;
this.mainCode = mainCode;
}
public Integer getCode() {
return code;
}
public Integer getMainCode() {
return mainCode;
}
public static AuthTypeEnum getByCode(Integer code) {
return AuthTypeMap.get(code);
}
public static Integer getAuthMainType(Integer code) {
return AuthTypeMap.get(code).getMainCode();
}
}

View File

@@ -0,0 +1,30 @@
package com.newyetai.usercenter.auth.constant;
import com.baomidou.mybatisplus.annotation.EnumValue;
import com.newyetai.mybatis.handle.BaseEnum;
/**
* @description:
* @author: guixinman
* @create: 2023-04-07 11:47
**/
public enum LiteCodeConfigEnum {
/**首页**/
HOME(1),
/**岗位明细**/
POSITION_DETAIL(2),
/**新招聘**/
RECRUITNEW(3);
private Integer type;
LiteCodeConfigEnum(Integer type) {
this.type = type;
}
public Integer getType() {
return type;
}
}

View File

@@ -0,0 +1,15 @@
package com.newyetai.usercenter.auth.constant;
/**
* 二维码 常量
*
* @author Carlye
* @date 2022/03/29
*/
public interface LiteCodeConstant {
/**
* 来源 (PC端)
*/
Integer SOURCE_FROM_PC = 1;
}

View File

@@ -0,0 +1,83 @@
package com.newyetai.usercenter.auth.controller;
import com.newyetai.common.AlitaResult;
import com.newyetai.common.dto.CasTokenDTO;
import com.newyetai.tkmybatis.pojo.Page;
import com.newyetai.usercenter.auth.dto.AuthClientDTO;
import com.newyetai.usercenter.auth.dto.AuthClientOperateDTO;
import com.newyetai.usercenter.auth.dto.AuthClientQueryDTO;
import com.newyetai.usercenter.auth.dto.LitePhoneAuthDTO;
import com.newyetai.usercenter.auth.dto.LitePhoneLoginDTO;
import com.newyetai.usercenter.auth.service.AuthClientService;
import com.newyetai.usercenter.auth.service.impl.LitePhoneLoginProvider;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
/**
* @author sr on 2021-05-24
*/
@RestController
@Api(tags = "授权客户端")
public class AuthClientController {
@Autowired
private AuthClientService authClientService;
@Autowired
private LitePhoneLoginProvider litePhoneLoginProvider;
@PostMapping("auth_client/create")
@ApiOperation("创建")
public AlitaResult<Long> create(@RequestBody AuthClientOperateDTO authClientOperateDTO) {
return AlitaResult.success(authClientService.create(authClientOperateDTO));
}
@PutMapping("auth_client/modify")
@ApiOperation("修改")
public AlitaResult<Boolean> modify(@RequestBody AuthClientOperateDTO authClientOperateDTO) {
authClientService.modify(authClientOperateDTO);
return AlitaResult.success(true);
}
@DeleteMapping("auth_client/remove/{id}")
@ApiOperation("删除")
public AlitaResult<Boolean> remove(@PathVariable Long id) {
authClientService.remove(id);
return AlitaResult.success(true);
}
@GetMapping("auth_client/page")
@ApiOperation("分页查询")
public AlitaResult<Page<AuthClientDTO>> page(AuthClientQueryDTO authClientQueryDTO) {
authClientService.page(authClientQueryDTO);
return AlitaResult.success(authClientQueryDTO.getPageResult());
}
@ApiOperation("获取访问token")
@PostMapping("anon/auth_client/access_token")
public AlitaResult<String> getAccessToken(@RequestBody AuthClientQueryDTO authClientQueryDTO) {
return AlitaResult.success(authClientService.getAccessToken(authClientQueryDTO));
}
@ApiOperation("获取ticket")
@PostMapping("anon/auth_client/ticket")
public AlitaResult<String> getJsApiTicket(@RequestBody AuthClientQueryDTO authClientQueryDTO) {
return AlitaResult.success(authClientService.getJsApiTicket(authClientQueryDTO));
}
@ApiOperation("小程序登录(手机号)")
@PostMapping("anon/auth_client/login_lite")
public AlitaResult<CasTokenDTO> loginLite(@Validated @RequestBody LitePhoneLoginDTO loginPhoneLoginDTO) {
return AlitaResult.success(litePhoneLoginProvider.loginLite(loginPhoneLoginDTO));
}
@ApiOperation("获取小程序授权手机号")
@PostMapping("anon/auth_client/get_phone")
public AlitaResult<String> getPhone(@Validated @RequestBody LitePhoneAuthDTO litePhoneAuthDTO) {
return AlitaResult.success(authClientService.getPhone(litePhoneAuthDTO));
}
}

View File

@@ -0,0 +1,44 @@
package com.newyetai.usercenter.auth.controller;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.newyetai.common.AlitaResult;
import com.newyetai.tkmybatis.pojo.Page;
import com.newyetai.usercenter.auth.dto.AuthDetailDTO;
import com.newyetai.usercenter.auth.dto.AuthDetailQueryDTO;
import com.newyetai.usercenter.auth.service.AuthDetailService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
/**
* @author sr on 2021-05-24
*/
@RestController
@RequestMapping("auth_detail")
@Api(tags = "授权明细")
public class AuthDetailController {
@Autowired
private AuthDetailService authDetailService;
@DeleteMapping("/remove/{id}")
@ApiOperation("删除")
public AlitaResult<Boolean> remove(@PathVariable Long id){
authDetailService.remove(id);
return AlitaResult.success(true);
}
@GetMapping("/page")
@ApiOperation("分页查询")
public AlitaResult<Page<AuthDetailDTO>> page(AuthDetailQueryDTO authDetailQueryDTO){
authDetailService.list(authDetailQueryDTO);
return AlitaResult.success(authDetailQueryDTO.getPageResult());
}
}

View File

@@ -0,0 +1,95 @@
package com.newyetai.usercenter.auth.controller;
import com.newyetai.common.AlitaResult;
import com.newyetai.tkmybatis.pojo.Page;
import com.newyetai.usercenter.auth.dto.*;
import com.newyetai.usercenter.auth.service.AuthDetailEntrypointService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.apache.commons.collections4.CollectionUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import java.util.List;
/**
* @author sr on 2022-01-06
*/
@RestController
@Api(tags = "授权明细入口")
public class AuthDetailEntrypointController {
@Autowired
private AuthDetailEntrypointService authDetailEntrypointService;
@PostMapping("anon/auth_detail_entrypoint/create")
@ApiOperation("创建")
public AlitaResult<AuthDetailEntrypointCreateRes> create(
@Validated @RequestBody AuthCodeDTO authCodeDTO){
return AlitaResult.success(authDetailEntrypointService.create(authCodeDTO));
}
@DeleteMapping("auth_detail_entrypoint/remove/{id}")
@ApiOperation("删除")
public AlitaResult<Boolean> remove(@PathVariable Long id){
authDetailEntrypointService.remove(id);
return AlitaResult.success(true);
}
@GetMapping("auth_detail_entrypoint/page")
@ApiOperation("分页查询")
public AlitaResult<Page<AuthDetailEntrypointDTO>> page(AuthDetailEntrypointQueryDTO authDetailEntrypointQueryDTO){
authDetailEntrypointService.page(authDetailEntrypointQueryDTO);
return AlitaResult.success(authDetailEntrypointQueryDTO.getPageResult());
}
@GetMapping("auth_detail_entrypoint/invite_info_page")
@ApiOperation("分页查询邀请信息")
public AlitaResult<Page<InviteInfoDTO>> inviteInfoPage(InviteInfoPageQueryDTO queryDTO){
authDetailEntrypointService.inviteInfoPage(queryDTO);
return AlitaResult.success(queryDTO.getPageResult());
}
@GetMapping("auth_detail_entrypoint/invite_info_statistic")
@ApiOperation("查询邀请信息-统计")
public AlitaResult<InviteStatisticInfoDTO> inviteInfoStatistic(InviteInfoPageQueryDTO queryDTO){
return AlitaResult.success(authDetailEntrypointService.inviteInfoStatistic(queryDTO));
}
@GetMapping("auth_detail_entrypoint/invite_info_detail/{entrypointId}")
@ApiOperation("查询邀请信息详情")
public AlitaResult<InviteInfoDTO> inviteInfoDetail(@PathVariable("entrypointId") Long entrypointId){
InviteInfoPageQueryDTO queryDTO = InviteInfoPageQueryDTO.builder().entrypointId(entrypointId).build();
List<InviteInfoDTO> inviteInfoDTOS = authDetailEntrypointService.inviteInfoPage(queryDTO);
if (CollectionUtils.isNotEmpty(inviteInfoDTOS)){
return AlitaResult.success(inviteInfoDTOS.get(0));
}
return AlitaResult.success(null);
}
@GetMapping("auth_detail_entrypoint/pc_invite_info_page")
@ApiOperation("pc端分页查询邀请信息")
public AlitaResult<Page<PcInviteInfoDTO>> pcInviteInfoPage(PcInviteInfoPageQueryDTO queryDTO){
authDetailEntrypointService.pcInviteInfoPage(queryDTO);
return AlitaResult.success(queryDTO.getPageResult());
}
@GetMapping("auth_detail_entrypoint/pc_invite_info_detail/{userId}")
@ApiOperation("单个邀请信息明细")
public AlitaResult<PcInviteInfoDTO> getInviteInfoDetail(@PathVariable("userId") Long userId){
return AlitaResult.success(
authDetailEntrypointService.getInviteInfoDetail(PcInviteInfoPageQueryDTO.builder().userId(userId).build()));
}
@GetMapping("auth_detail_entrypoint/pc_invite_statistic")
@ApiOperation("邀请统计信息(pc)")
public AlitaResult<PcInviteStatisticInfoDTO> pcInviteStatisticQuery(InviteStatisticQueryDTO queryDTO){
return AlitaResult.success(authDetailEntrypointService.pcInviteStatisticQuery(queryDTO));
}
@GetMapping("auth_detail_entrypoint/invite_statistic")
@ApiOperation("邀请统计信息")
public AlitaResult<InviteStatisticInfoDTO> inviteStatisticQuery(InviteStatisticQueryDTO queryDTO){
return AlitaResult.success(authDetailEntrypointService.inviteStatisticQuery(queryDTO));
}
}

View File

@@ -0,0 +1,44 @@
package com.newyetai.usercenter.auth.controller;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.newyetai.common.AlitaResult;
import com.newyetai.tkmybatis.pojo.Page;
import com.newyetai.usercenter.auth.dto.AuthSubscribeDetailDTO;
import com.newyetai.usercenter.auth.dto.AuthSubscribeDetailQueryDTO;
import com.newyetai.usercenter.auth.service.AuthSubscribeDetailService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
/**
* @author sr on 2022-04-05
*/
@RestController
@RequestMapping("auth_subscribe_detail")
@Api(tags = "授权订阅明细")
public class AuthSubscribeDetailController {
@Autowired
private AuthSubscribeDetailService authSubscribeDetailService;
@DeleteMapping("/remove/{id}")
@ApiOperation("删除")
public AlitaResult<Boolean> remove(@PathVariable Long id){
authSubscribeDetailService.remove(id);
return AlitaResult.success(true);
}
@GetMapping("/page")
@ApiOperation("分页查询")
public AlitaResult<Page<AuthSubscribeDetailDTO>> page(AuthSubscribeDetailQueryDTO authSubscribeDetailQueryDTO){
authSubscribeDetailService.page(authSubscribeDetailQueryDTO);
return AlitaResult.success(authSubscribeDetailQueryDTO.getPageResult());
}
}

View File

@@ -0,0 +1,38 @@
package com.newyetai.usercenter.auth.controller;
import com.newyetai.common.AlitaResult;
import com.newyetai.tkmybatis.pojo.Page;
import com.newyetai.usercenter.auth.dto.AuthTypeDTO;
import com.newyetai.usercenter.auth.dto.AuthTypeOperateDTO;
import com.newyetai.usercenter.auth.dto.AuthTypeQueryDTO;
import com.newyetai.usercenter.auth.service.AuthTypeService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
/**
* @author sr on 2021-05-24
*/
@RestController
@RequestMapping("auth_type")
@Api(tags = "授权客户端类型")
public class AuthTypeController {
@Autowired
private AuthTypeService authTypeService;
@PostMapping("/create")
@ApiOperation("创建")
public AlitaResult<Long> create(@RequestBody AuthTypeOperateDTO typeOperateDTO) {
return AlitaResult.success(authTypeService.create(typeOperateDTO));
}
@GetMapping("/page")
@ApiOperation("分页查询")
public AlitaResult<Page<AuthTypeDTO>> page(AuthTypeQueryDTO queryDTO) {
authTypeService.list(queryDTO);
return AlitaResult.success(queryDTO.getPageResult());
}
}

View File

@@ -0,0 +1,66 @@
package com.newyetai.usercenter.auth.controller;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
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.RequestBody;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.validation.annotation.Validated;
import com.newyetai.common.validation.Update;
import com.newyetai.common.AlitaResult;
import com.newyetai.tkmybatis.pojo.Page;
import com.newyetai.usercenter.auth.dto.LiteCodeConfigQueryDTO;
import com.newyetai.usercenter.auth.service.LiteCodeConfigService;
import com.newyetai.usercenter.auth.dto.LiteCodeConfigDTO;
import com.newyetai.usercenter.auth.dto.LiteCodeConfigOperateDTO;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
/**
* @author sr on 2021-12-21
*/
@RestController
@RequestMapping("lite_code_config")
@Api(tags = "小程序码配置")
public class LiteCodeConfigController {
@Autowired
private LiteCodeConfigService liteCodeConfigService;
@PostMapping("/create")
@ApiOperation("创建")
public AlitaResult<Long> create(
@Validated @RequestBody LiteCodeConfigOperateDTO liteCodeConfigOperateDTO){
return AlitaResult.success(liteCodeConfigService.create(liteCodeConfigOperateDTO));
}
@PutMapping("/modify")
@ApiOperation("修改")
public AlitaResult<Boolean> modify(
@Validated(Update.class) @RequestBody LiteCodeConfigOperateDTO liteCodeConfigOperateDTO){
liteCodeConfigService.modify(liteCodeConfigOperateDTO);
return AlitaResult.success(true);
}
@DeleteMapping("/remove/{id}")
@ApiOperation("删除")
public AlitaResult<Boolean> remove(@PathVariable Long id){
liteCodeConfigService.remove(id);
return AlitaResult.success(true);
}
@GetMapping("/page")
@ApiOperation("分页查询")
public AlitaResult<Page<LiteCodeConfigDTO>> page(LiteCodeConfigQueryDTO liteCodeConfigQueryDTO){
liteCodeConfigService.list(liteCodeConfigQueryDTO);
return AlitaResult.success(liteCodeConfigQueryDTO.getPageResult());
}
}

View File

@@ -0,0 +1,51 @@
package com.newyetai.usercenter.auth.controller;
import com.newyetai.usercenter.auth.dto.LiteCodeModifyDTO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import com.newyetai.common.AlitaResult;
import com.newyetai.tkmybatis.pojo.Page;
import com.newyetai.usercenter.auth.dto.LiteCodeCreateDTO;
import com.newyetai.usercenter.auth.dto.LiteCodeDTO;
import com.newyetai.usercenter.auth.dto.LiteCodeQueryDTO;
import com.newyetai.usercenter.auth.service.LiteCodeService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
/**
* @author sr on 2021-12-21
*/
@RestController
@RequestMapping("lite_code")
@Api(tags = "小程序码")
public class LiteCodeController {
@Autowired
private LiteCodeService liteCodeService;
@PostMapping("/create")
@ApiOperation("创建")
public AlitaResult<LiteCodeDTO> create(
@Validated @RequestBody LiteCodeCreateDTO liteCodeCreateDTO){
return AlitaResult.success(liteCodeService.create(liteCodeCreateDTO));
}
@PutMapping("/modify")
@ApiOperation("修改")
public AlitaResult<LiteCodeDTO> modify(
@Validated @RequestBody LiteCodeModifyDTO liteCodeModifyDTO){
return AlitaResult.success(liteCodeService.modify(liteCodeModifyDTO));
}
@GetMapping("/page")
@ApiOperation("分页查询")
public AlitaResult<Page<LiteCodeDTO>> page(LiteCodeQueryDTO liteCodeQueryDTO){
liteCodeService.page(liteCodeQueryDTO);
return AlitaResult.success(liteCodeQueryDTO.getPageResult());
}
}

View File

@@ -0,0 +1,29 @@
package com.newyetai.usercenter.auth.dao;
import java.util.List;
import org.apache.ibatis.annotations.Param;
import com.newyetai.tkmybatis.mybatis.MyMapper;
import com.newyetai.usercenter.auth.dto.AuthClientDTO;
import com.newyetai.usercenter.auth.dto.AuthClientQueryDTO;
import com.newyetai.usercenter.auth.entity.AuthClient;
/**
* 授权客户端
*
* @author sr on 2021-05-24
*/
public interface AuthClientMapper extends MyMapper<AuthClient> {
/**
* 查询
*
* @param authClientQueryDTO
* @return
* @author sr on 2021-05-24
*/
List<AuthClientDTO> listAuthClientDTO(@Param("param") AuthClientQueryDTO authClientQueryDTO);
List<AuthClientDTO> list(@Param("param") AuthClientQueryDTO authClientQueryDTO);
}

View File

@@ -0,0 +1,58 @@
package com.newyetai.usercenter.auth.dao;
import com.newyetai.tkmybatis.mybatis.MyMapper;
import com.newyetai.usercenter.auth.dto.*;
import com.newyetai.usercenter.auth.entity.AuthDetailEntrypoint;
import org.apache.ibatis.annotations.Param;
import java.util.List;
import java.util.Set;
/**
* 授权明细入口
*
* @author sr on 2022-01-06
*/
public interface AuthDetailEntrypointMapper extends MyMapper<AuthDetailEntrypoint> {
/**
* 查询
*
* @param authDetailEntrypointQueryDTO
* @return
* @author sr on 2022-01-06
*/
List<AuthDetailEntrypointDTO> listAuthDetailEntrypointDTO(@Param("param") AuthDetailEntrypointQueryDTO authDetailEntrypointQueryDTO);
/**
* 邀请信息
*
* @param queryDTO 查询dto
* @param existLoginUserId 存在登录用户id
* @param existLoginOrgId 存在登录org id
* @return {@link List}<{@link InviteInfoDTO}>
*/
List<InviteInfoDTO> inviteInfoPage(@Param("param") InviteInfoPageQueryDTO queryDTO, @Param("userId") Long existLoginUserId,@Param("orgId") Long existLoginOrgId);
/**
* PC端机构下所有的 邀请信息
*
* @param queryDTO 查询dto
*/
List<PcInviteInfoDTO> pcInviteInfoPage(@Param("param") PcInviteInfoPageQueryDTO queryDTO,@Param("orgId") Long existLoginOrgId);
List<InviteStatisticDTO> inviteStatisticQuery(@Param("param") InviteStatisticQueryDTO queryDTO, @Param("orgId") Long existLoginOrgId);
/**
* 邀请数统计查询
*
* @param queryDTO 查询dto
* @param existLoginOrgId 存在登录org id
* @return int
*/
int countInviteStatisticQuery(@Param("param") InviteStatisticQueryDTO queryDTO, @Param("orgId") Long existLoginOrgId);
int inviteRegisterCount(@Param("param") InviteStatisticQueryDTO queryDTO, @Param("orgId") Long existLoginOrgId);
List<RegistrationInfoDTO> registrationList(@Param("userIds") Set<Long> userIds);
}

View File

@@ -0,0 +1,28 @@
package com.newyetai.usercenter.auth.dao;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.newyetai.tkmybatis.mybatis.MyMapper;
import com.newyetai.usercenter.auth.dto.AuthDetailDTO;
import com.newyetai.usercenter.auth.dto.AuthDetailQueryDTO;
import com.newyetai.usercenter.auth.entity.AuthDetail;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* 授权明细
*
* @author sr on 2021-05-24
*/
public interface AuthDetailMapper extends MyMapper<AuthDetail> {
/**
* 查询
*
* @param authDetailQueryDTO
* @return
* @author sr on 2021-05-24
*/
List<AuthDetailDTO> listAuthDetailDTO(@Param("param") AuthDetailQueryDTO authDetailQueryDTO);
}

View File

@@ -0,0 +1,28 @@
package com.newyetai.usercenter.auth.dao;
import java.util.List;
import org.apache.ibatis.annotations.Param;
import com.newyetai.usercenter.auth.dto.AuthSubscribeDetailDTO;
import com.newyetai.usercenter.auth.dto.AuthSubscribeDetailQueryDTO;
import com.newyetai.usercenter.auth.entity.AuthSubscribeDetail;
import com.newyetai.tkmybatis.mybatis.MyMapper;
/**
* 授权订阅明细
*
* @author sr on 2022-04-05
*/
public interface AuthSubscribeDetailMapper extends MyMapper<AuthSubscribeDetail> {
/**
* 查询
*
* @param authSubscribeDetailQueryDTO
* @return
* @author sr on 2022-04-05
*/
List<AuthSubscribeDetailDTO> listAuthSubscribeDetailDTO(@Param("param") AuthSubscribeDetailQueryDTO authSubscribeDetailQueryDTO);
}

View File

@@ -0,0 +1,19 @@
package com.newyetai.usercenter.auth.dao;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.newyetai.usercenter.auth.dto.AuthTypeDTO;
import com.newyetai.usercenter.auth.dto.AuthTypeQueryDTO;
import com.newyetai.usercenter.auth.entity.AuthType;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* 授权客户端
*
* @author sr on 2021-05-24
*/
public interface AuthTypeMapper extends BaseMapper<AuthType> {
List<AuthTypeDTO> list(@Param("param") AuthTypeQueryDTO queryDTO);
}

View File

@@ -0,0 +1,28 @@
package com.newyetai.usercenter.auth.dao;
import java.util.List;
import org.apache.ibatis.annotations.Param;
import com.newyetai.usercenter.auth.dto.LiteCodeConfigDTO;
import com.newyetai.usercenter.auth.dto.LiteCodeConfigQueryDTO;
import com.newyetai.usercenter.auth.entity.LiteCodeConfig;
import com.newyetai.tkmybatis.mybatis.MyMapper;
/**
* 小程序码配置
*
* @author sr on 2021-12-21
*/
public interface LiteCodeConfigMapper extends MyMapper<LiteCodeConfig> {
/**
* 查询
*
* @param liteCodeConfigQueryDTO
* @return
* @author sr on 2021-12-21
*/
List<LiteCodeConfigDTO> listLiteCodeConfigDTO(@Param("param") LiteCodeConfigQueryDTO liteCodeConfigQueryDTO);
}

View File

@@ -0,0 +1,28 @@
package com.newyetai.usercenter.auth.dao;
import java.util.List;
import org.apache.ibatis.annotations.Param;
import com.newyetai.usercenter.auth.dto.LiteCodeDTO;
import com.newyetai.usercenter.auth.dto.LiteCodeQueryDTO;
import com.newyetai.usercenter.auth.entity.LiteCode;
import com.newyetai.tkmybatis.mybatis.MyMapper;
/**
* 小程序码
*
* @author sr on 2021-12-21
*/
public interface LiteCodeMapper extends MyMapper<LiteCode> {
/**
* 查询
*
* @param liteCodeQueryDTO
* @return
* @author sr on 2021-12-21
*/
List<LiteCodeDTO> listLiteCodeDTO(@Param("param") LiteCodeQueryDTO liteCodeQueryDTO);
}

View File

@@ -0,0 +1,39 @@
package com.newyetai.usercenter.auth.dto;
import com.newyetai.common.dto.BaseDTO;
import io.swagger.annotations.ApiModel;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.experimental.SuperBuilder;
/**
* @author sr on 2021-05-24
*/
@NoArgsConstructor
@AllArgsConstructor
@EqualsAndHashCode(callSuper = true)
@SuperBuilder
@Data
@ApiModel(description = "授权客户端")
public class AuthClientDTO extends BaseDTO {
/** **/
private static final long serialVersionUID = 1L;
/**
* 授权类型名称
*/
private String authTypeName;
/**
* 客户端名称
*/
private String clientName;
/** 授权类型标识 */
private Integer authTypeCode ;
/** 配置数据 */
private String paramData ;
}

View File

@@ -0,0 +1,32 @@
package com.newyetai.usercenter.auth.dto;
import java.io.Serializable;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
@Data
@NoArgsConstructor
@AllArgsConstructor
@ApiModel(description = "授权客户端配置数据信息")
public class AuthClientDataDTO implements Serializable{
/** **/
private static final long serialVersionUID = 285993673369713207L;
@ApiModelProperty("授权客户端id")
private Long authClientId;
@ApiModelProperty("授权类型标识")
private Integer authTypeCode ;
@ApiModelProperty("第三方id")
private String clientId;
@ApiModelProperty("第三方密钥")
private String clientSecret;
}

View File

@@ -0,0 +1,40 @@
package com.newyetai.usercenter.auth.dto;
import com.newyetai.common.dto.BaseDTO;
import com.newyetai.common.validation.Create;
import com.newyetai.common.validation.Update;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.*;
import lombok.experimental.SuperBuilder;
import javax.validation.constraints.NotNull;
/**
* @author sr on 2021-05-24
*/
@EqualsAndHashCode(callSuper = true)
@Data
@NoArgsConstructor
@AllArgsConstructor
@SuperBuilder
@ApiModel(description = "授权客户端操作")
public class AuthClientOperateDTO extends BaseDTO {
/**
*
**/
private static final long serialVersionUID = 1L;
@ApiModelProperty("授权类型标识")
@NotNull(message = "授权类型标识不能为空", groups = {Create.class, Update.class})
private Integer authTypeCode;
@ApiModelProperty("授权应用名称")
@NotNull(message = "授权应用名称不能为空", groups = {Create.class, Update.class})
private String clientName;
@ApiModelProperty("授权应用配置")
@NotNull(message = "授权应用配置不能为空", groups = {Create.class, Update.class})
private String paramData;
}

View File

@@ -0,0 +1,34 @@
package com.newyetai.usercenter.auth.dto;
import java.io.Serializable;
import com.newyetai.common.dto.PageQueryDTO;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
/**
* @author sr on 2021-05-24
*/
@Data
@NoArgsConstructor
@AllArgsConstructor
@Builder
@ApiModel(description = "授权客户端查询条件")
public class AuthClientQueryDTO extends PageQueryDTO<AuthClientDTO> implements Serializable{
/** **/
private static final long serialVersionUID = 1L;
@ApiModelProperty("id")
private Long id;
@ApiModelProperty("域名或ip")
private String domainOrIp;
@ApiModelProperty("授权类型标识")
private Integer authTypeCode ;
}

View File

@@ -0,0 +1,38 @@
package com.newyetai.usercenter.auth.dto;
import java.io.Serializable;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
/**
* @author sr on 2022-01-06
*/
@Data
@NoArgsConstructor
@AllArgsConstructor
@ApiModel(description = "授权码信息")
public class AuthCodeDTO implements Serializable{
/** **/
private static final long serialVersionUID = 5013108110519909949L;
@ApiModelProperty("授权类型标识")
@NotNull(message = "授权类型标识不能为空")
private Integer authTypeCode;
@ApiModelProperty("小程序授权码")
@NotBlank(message = "小程序授权码不能为空")
private String code;
@ApiModelProperty("请求域名或ip")
private String domainOrIp;
@ApiModelProperty("注册邀请码")
private String registerCode;
}

View File

@@ -0,0 +1,35 @@
package com.newyetai.usercenter.auth.dto;
import java.io.Serializable;
import javax.validation.constraints.NotNull;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.SuperBuilder;
/**
* @author sr on 2021-05-24
*/
@NoArgsConstructor
@AllArgsConstructor
@SuperBuilder
@Data
@ApiModel(description = "授权明细(绑定)")
public class AuthDetailBindDTO extends AuthDetailCreateDTO implements Serializable{
/** **/
private static final long serialVersionUID = 1L;
@ApiModelProperty("用户类型")
@NotNull(message = "用户类型不能为空")
private Integer userType;
@ApiModelProperty("用户id")
@NotNull(message = "用户id不能为空")
private Long userId;
}

View File

@@ -0,0 +1,54 @@
package com.newyetai.usercenter.auth.dto;
import java.io.Serializable;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.experimental.SuperBuilder;
/**
* @author sr on 2021-05-24
*/
@NoArgsConstructor
@AllArgsConstructor
@SuperBuilder
@Data
@ApiModel(description = "授权明细创建")
public class AuthDetailCreateDTO implements Serializable{
/** **/
private static final long serialVersionUID = 1L;
@NotNull(message = "授权客户端id不能为空")
@ApiModelProperty("授权客户端id")
private Long authClientId ;
@NotNull(message = "授权类型不能为空")
@ApiModelProperty("授权类型标识")
private Integer authTypeCode ;
@ApiModelProperty("昵称")
private String nickname ;
@ApiModelProperty("头像")
private String avatar ;
@ApiModelProperty("性别")
private String gender ;
@ApiModelProperty("国家")
private String country ;
@ApiModelProperty("省份")
private String province ;
@ApiModelProperty("城市")
private String city ;
@ApiModelProperty("open_id")
private String openId ;
@NotBlank(message = "授权唯一id不能为空")
@ApiModelProperty("授权唯一id")
private String uniqueId ;
}

View File

@@ -0,0 +1,50 @@
package com.newyetai.usercenter.auth.dto;
import com.newyetai.common.dto.BaseDTO;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.*;
import lombok.experimental.SuperBuilder;
import java.util.Date;
/**
* @author sr on 2021-05-24
*/
@NoArgsConstructor
@AllArgsConstructor
@EqualsAndHashCode(callSuper = true)
@SuperBuilder
@Data
@ApiModel(description = "授权明细")
public class AuthDetailDTO extends BaseDTO {
private static final long serialVersionUID = -6031622340021565040L;
@ApiModelProperty("授权客户端id")
private Long authClientId;
@ApiModelProperty("授权应用名称")
private String authClientName;
@ApiModelProperty("授权类型标识")
private Integer authTypeCode;
@ApiModelProperty("授权类型名称")
private String authTypeName;
@ApiModelProperty("昵称")
private String nickname;
@ApiModelProperty("头像")
private String avatar;
@ApiModelProperty("性别")
private String gender;
@ApiModelProperty("国家")
private String country;
@ApiModelProperty("省份")
private String province;
@ApiModelProperty("城市")
private String city;
@ApiModelProperty("open_id")
private String openId;
@ApiModelProperty("授权唯一id")
private String uniqueId;
@ApiModelProperty("创建时间")
private Date createTime;
}

View File

@@ -0,0 +1,39 @@
package com.newyetai.usercenter.auth.dto;
import java.io.Serializable;
import javax.validation.constraints.NotBlank;
import com.newyetai.common.dto.BaseOperateDTO;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
/**
* @author sr on 2022-01-06
*/
@Data
@NoArgsConstructor
@AllArgsConstructor
@Builder
@ApiModel(description = "授权明细入口操作")
public class AuthDetailEntrypointCreateDTO extends BaseOperateDTO implements Serializable{
/** **/
private static final long serialVersionUID = 1L;
@ApiModelProperty("授权类型标识")
private Integer authTypeCode;
@ApiModelProperty("授权码")
@NotBlank(message = "授权码不能为空")
private String code;
@ApiModelProperty("请求域名或ip")
private String domainOrIp;
@ApiModelProperty("注册邀请码")
private String registerCode;
}

View File

@@ -0,0 +1,26 @@
package com.newyetai.usercenter.auth.dto;
import java.io.Serializable;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
@Data
@NoArgsConstructor
@AllArgsConstructor
@Builder
@ApiModel(description = "授权明细入口操作结果")
public class AuthDetailEntrypointCreateRes implements Serializable{
/** **/
private static final long serialVersionUID = 8730408984340728312L;
@ApiModelProperty("是否订阅")
private Boolean subscribe;
}

View File

@@ -0,0 +1,35 @@
package com.newyetai.usercenter.auth.dto;
import com.newyetai.common.dto.BaseDTO;
import com.newyetai.usercenter.annex.dto.UserAnnexCreateDTO;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.experimental.SuperBuilder;
/**
* @author sr on 2022-01-06
*/
@NoArgsConstructor
@AllArgsConstructor
@EqualsAndHashCode(callSuper = true)
@SuperBuilder
@Data
@ApiModel(description = "授权明细入口")
public class AuthDetailEntrypointDTO extends BaseDTO {
/** **/
private static final long serialVersionUID = 1L;
@ApiModelProperty("授权客户端id")
private Long authDetailId;
@ApiModelProperty("关联id(小程序码id)")
private Long unionId;
}

View File

@@ -0,0 +1,34 @@
package com.newyetai.usercenter.auth.dto;
import java.io.Serializable;
import com.newyetai.common.dto.PageQueryDTO;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
/**
* @author sr on 2022-01-06
*/
@Data
@NoArgsConstructor
@AllArgsConstructor
@Builder
@ApiModel(description = "授权明细入口查询条件")
public class AuthDetailEntrypointQueryDTO extends PageQueryDTO<AuthDetailEntrypointDTO> implements Serializable{
/** **/
private static final long serialVersionUID = 1L;
@ApiModelProperty("id")
private Long id;
@ApiModelProperty("授权客户端id")
private Long authDetailId;
@ApiModelProperty("关联id(小程序码id)")
private Long unionId;
}

View File

@@ -0,0 +1,35 @@
package com.newyetai.usercenter.auth.dto;
import javax.validation.constraints.NotNull;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.experimental.SuperBuilder;
/**
* @author sr on 2021-05-24
*/
@NoArgsConstructor
@AllArgsConstructor
@EqualsAndHashCode(callSuper = true)
@Data
@SuperBuilder
@ApiModel(description = "授权明细(登录)")
public class AuthDetailLoginDTO extends AuthDetailCreateDTO {
/** **/
private static final long serialVersionUID = 1L;
@ApiModelProperty("用户类型")
@NotNull(message = "用户类型不能为空")
private Integer userType;
@ApiModelProperty("注册邀请码")
private String registerCode;
@ApiModelProperty("入口点")
private String entrypoint;
}

View File

@@ -0,0 +1,40 @@
package com.newyetai.usercenter.auth.dto;
import com.newyetai.common.dto.PageQueryDTO;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.Serializable;
/**
* @author sr on 2021-05-24
*/
@Data
@NoArgsConstructor
@AllArgsConstructor
@Builder
@ApiModel(description = "授权明细查询条件")
public class AuthDetailQueryDTO extends PageQueryDTO<AuthDetailDTO> implements Serializable{
/** **/
private static final long serialVersionUID = 1L;
@ApiModelProperty("id")
private Long id;
@ApiModelProperty("授权客户端id")
private Long authClientId;
@ApiModelProperty("授权类型标识")
private Integer authTypeCode ;
@ApiModelProperty("open_id")
private String openId ;
@ApiModelProperty("用户id")
private Long userId;
@ApiModelProperty("授权唯一id")
private String uniqueId;
@ApiModelProperty("昵称")
private String nickname ;
}

View File

@@ -0,0 +1,41 @@
package com.newyetai.usercenter.auth.dto;
import java.io.Serializable;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import io.swagger.annotations.ApiModel;
import javax.validation.constraints.NotNull;
import com.newyetai.common.validation.Update;
import com.newyetai.common.dto.BaseOperateDTO;
/**
* @author sr on 2022-04-05
*/
@Data
@NoArgsConstructor
@AllArgsConstructor
@Builder
@ApiModel(description = "授权订阅明细操作")
public class AuthSubscribeDetailCreateDTO extends BaseOperateDTO implements Serializable{
/** **/
private static final long serialVersionUID = 1L;
@ApiModelProperty("id")
@NotNull(message = "id不能为空", groups = {Update.class})
private Long id;
@ApiModelProperty("授权客户端id")
@NotNull(message = "授权客户端id不能为空")
private Long authClientId ;
@NotNull(message = "openId不能为空")
private String openId ;
@NotNull(message = "uniqueId不能为空")
private String uniqueId ;
}

View File

@@ -0,0 +1,37 @@
package com.newyetai.usercenter.auth.dto;
import com.newyetai.common.dto.BaseDTO;
import com.newyetai.usercenter.annex.dto.UserAnnexCreateDTO;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.experimental.SuperBuilder;
/**
* @author sr on 2022-04-05
*/
@NoArgsConstructor
@AllArgsConstructor
@EqualsAndHashCode(callSuper = true)
@SuperBuilder
@Data
@ApiModel(description = "授权订阅明细")
public class AuthSubscribeDetailDTO extends BaseDTO {
/** **/
private static final long serialVersionUID = 1L;
/** 授权客户端id */
@ApiModelProperty("授权客户端id")
private Long authClientId ;
@ApiModelProperty("open_id")
private String openId ;
@ApiModelProperty("授权唯一id")
private String uniqueId ;
}

View File

@@ -0,0 +1,35 @@
package com.newyetai.usercenter.auth.dto;
import java.io.Serializable;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import io.swagger.annotations.ApiModel;
import com.newyetai.common.dto.PageQueryDTO;
/**
* @author sr on 2022-04-05
*/
@Data
@NoArgsConstructor
@AllArgsConstructor
@Builder
@ApiModel(description = "授权订阅明细查询条件")
public class AuthSubscribeDetailQueryDTO extends PageQueryDTO<AuthSubscribeDetailDTO> implements Serializable{
/** **/
private static final long serialVersionUID = 1L;
@ApiModelProperty("id")
private Long id;
/** 授权客户端id */
@ApiModelProperty("授权客户端id")
private Long authClientId ;
@ApiModelProperty("授权唯一id")
private String uniqueId ;
}

View File

@@ -0,0 +1,32 @@
package com.newyetai.usercenter.auth.dto;
import com.newyetai.common.dto.BaseDTO;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.*;
import lombok.experimental.SuperBuilder;
/**
* @author sr on 2021-05-24
*/
@NoArgsConstructor
@AllArgsConstructor
@EqualsAndHashCode(callSuper = true)
@SuperBuilder
@Data
@ApiModel(description = "授权客户端类型")
public class AuthTypeDTO extends BaseDTO {
/**
*
**/
private static final long serialVersionUID = 1L;
@ApiModelProperty("授权大类:1微信,2支付宝")
private Integer authMainType;
@ApiModelProperty("授权类型标识")
private Integer authTypeCode;
@ApiModelProperty("名称")
private String name;
}

View File

@@ -0,0 +1,36 @@
package com.newyetai.usercenter.auth.dto;
import com.newyetai.common.dto.BaseDTO;
import com.newyetai.common.validation.Create;
import com.newyetai.common.validation.Update;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.*;
import lombok.experimental.SuperBuilder;
import javax.validation.constraints.NotNull;
/**
* @author sr on 2021-05-24
*/
@EqualsAndHashCode(callSuper = true)
@Data
@NoArgsConstructor
@AllArgsConstructor
@SuperBuilder
@ApiModel(description = "授权客户端类型操作")
public class AuthTypeOperateDTO extends BaseDTO {
private static final long serialVersionUID = 1L;
@ApiModelProperty("授权大类:1微信,2支付宝")
@NotNull(message = "授权大类不能为空", groups = {Create.class, Update.class})
private Integer authMainType;
@ApiModelProperty("授权类型标识")
@NotNull(message = "授权类型标识不能为空", groups = {Create.class, Update.class})
private Integer authTypeCode;
@ApiModelProperty("名称")
@NotNull(message = "授权名称不能为空", groups = {Create.class, Update.class})
private String name;
}

View File

@@ -0,0 +1,24 @@
package com.newyetai.usercenter.auth.dto;
import com.newyetai.common.dto.PageQueryDTO;
import io.swagger.annotations.ApiModel;
import lombok.*;
import java.io.Serializable;
/**
* @author sr on 2021-05-24
*/
@EqualsAndHashCode(callSuper = true)
@Data
@NoArgsConstructor
@Builder
@ApiModel(description = "授权客户端查询条件")
public class AuthTypeQueryDTO extends PageQueryDTO<AuthTypeDTO> implements Serializable {
/**
*
**/
private static final long serialVersionUID = 1L;
}

View File

@@ -0,0 +1,32 @@
package com.newyetai.usercenter.auth.dto;
import java.io.Serializable;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
/**
* @author sr on 2022-01-06
*/
@NoArgsConstructor
@AllArgsConstructor
@Builder
@Data
@ApiModel(description = "通用code换session对象")
public class CodeToSessionDTO implements Serializable{
/** **/
private static final long serialVersionUID = 6510677813408678455L;
@ApiModelProperty("用户在当前小程序的 ID")
private String openId;
@ApiModelProperty("会话密钥")
private String unionId;
@ApiModelProperty("唯一标识符")
private String sessionKey;
}

View File

@@ -0,0 +1,78 @@
package com.newyetai.usercenter.auth.dto;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.*;
import org.springframework.format.annotation.DateTimeFormat;
import java.io.Serializable;
import java.util.Date;
@NoArgsConstructor
@AllArgsConstructor
@Builder
@Data
@ApiModel(description = "邀请人信息")
public class InviteInfoDTO implements Serializable {
private static final long serialVersionUID = -5127886750745608146L;
@ApiModelProperty("邀请记录ID")
private Long entrypointId;
@ApiModelProperty("用户昵称")
private String userNickName;
@ApiModelProperty("用户姓名")
private String userRealName;
@ApiModelProperty("头像地址")
private String userAvatar;
@ApiModelProperty("手机号")
private String userPhone;
@ApiModelProperty("注册时间")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date userRegisterTime;
@ApiModelProperty("用户ID")
private Long userId;
@ApiModelProperty("简历-姓名")
private String resumePersonName;
@ApiModelProperty("简历-身份证号")
private String resumeCardNo;
@ApiModelProperty("简历 - 性别:0女 1男")
private Integer resumeSex;
@ApiModelProperty("简历 - 年龄")
private Integer resumeAge;
@ApiModelProperty("简历 - 文化程度:0学历不限、1初中、2高中、3专科、4本科、5硕士、6博士")
private Integer resumeEducation;
@ApiModelProperty("简历 - 求职意向")
private String resumeJobIntention;
@ApiModelProperty("简历 - 求职意向名称")
private String resumeJobIntentionName;
@ApiModelProperty("简历 - 数据来源:1BOSS直聘、2猎聘...")
private Integer resumeSource;
@ApiModelProperty("简历 - 简历附件")
private String resumeFileCode;
@ApiModelProperty("简历 - 备注")
private String resumeRemark;
@ApiModelProperty("简历 - 招聘负责人")
private Long resumePersonInCharge;
@ApiModelProperty("当前用户的状态")
private Integer status;
}

View File

@@ -0,0 +1,35 @@
package com.newyetai.usercenter.auth.dto;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.newyetai.common.dto.PageQueryDTO;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.*;
import org.springframework.format.annotation.DateTimeFormat;
import java.util.Date;
@EqualsAndHashCode(callSuper = true)
@NoArgsConstructor
@AllArgsConstructor
@Builder
@Data
@ApiModel(description = "邀请人信息 - 分页查询DTO")
public class InviteInfoPageQueryDTO extends PageQueryDTO<InviteInfoDTO> {
private static final long serialVersionUID = -7603359054944420315L;
@ApiModelProperty("二维码ID")
private Long lifeCodeId;
@ApiModelProperty("邀请记录ID")
private Long entrypointId;
/**
* 查询类型 1: 需要查询在职人数 2:查今日邀请
*/
private Integer queryType;
@ApiModelProperty("开始时间")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date startTime;
}

View File

@@ -0,0 +1,19 @@
package com.newyetai.usercenter.auth.dto;
import io.swagger.annotations.ApiModel;
import lombok.*;
import java.io.Serializable;
@NoArgsConstructor
@AllArgsConstructor
@Builder
@Data
@ApiModel(description = "统计数据")
public class InviteStatisticDTO implements Serializable {
private static final long serialVersionUID = 366340705953671571L;
private Long authDetailId;
private Long userAuthId;
}

View File

@@ -0,0 +1,51 @@
package com.newyetai.usercenter.auth.dto;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.Serializable;
import java.util.Objects;
@ApiModel("合伙人统计-查询DTO")
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class InviteStatisticInfoDTO implements Serializable {
private static final long serialVersionUID = -5588108740516901862L;
@ApiModelProperty("总邀请数量")
private Integer totalInviteNumber;
@ApiModelProperty("今日邀请数量")
private Integer todayInviteNumber;
@ApiModelProperty("在职数量")
private Integer onTheJobNumber;
public Integer getTotalInviteNumber() {
if (Objects.isNull(totalInviteNumber)){
totalInviteNumber = 0;
}
return totalInviteNumber;
}
public Integer getTodayInviteNumber() {
if (Objects.isNull(todayInviteNumber)){
todayInviteNumber = 0;
}
return todayInviteNumber;
}
public Integer getOnTheJobNumber() {
if (Objects.isNull(onTheJobNumber)){
onTheJobNumber = 0;
}
return onTheJobNumber;
}
}

View File

@@ -0,0 +1,44 @@
package com.newyetai.usercenter.auth.dto;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;
import java.io.Serializable;
import java.util.Date;
@ApiModel("合伙人统计-查询DTO")
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class InviteStatisticQueryDTO implements Serializable {
private static final long serialVersionUID = -5588108740516901862L;
@ApiModelProperty("开始时间")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date startTime;
@ApiModelProperty("结束时间")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date endTime;
@ApiModelProperty("用户ID")
private Long userId;
@ApiModelProperty("PC端调用默认pc")
private String clientType;
/**
* 查询类型 1: 需要查询在职人数
*/
private Integer queryType;
}

View File

@@ -0,0 +1,42 @@
package com.newyetai.usercenter.auth.dto;
import com.newyetai.common.dto.BaseDTO;
import com.newyetai.usercenter.annex.dto.UserAnnexCreateDTO;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.experimental.SuperBuilder;
/**
* @author sr on 2021-12-21
*/
@NoArgsConstructor
@AllArgsConstructor
@EqualsAndHashCode(callSuper = true)
@SuperBuilder
@Data
@ApiModel(description = "小程序码配置")
public class LiteCodeConfigDTO extends BaseDTO {
/** **/
private static final long serialVersionUID = 1L;
@ApiModelProperty("授权客户端id")
private Long authClientId;
@ApiModelProperty("小程序码业务类型")
private Integer bizType;
@ApiModelProperty("路径")
private String path;
@ApiModelProperty("参数键-逗号分隔")
private String paramKey;
@ApiModelProperty("内置环境参数键-逗号分隔")
private String envParamKey;
@ApiModelProperty("平台编码")
private Integer platformCode;
}

View File

@@ -0,0 +1,33 @@
package com.newyetai.usercenter.auth.dto;
import java.io.Serializable;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import io.swagger.annotations.ApiModel;
import javax.validation.constraints.NotNull;
import com.newyetai.common.validation.Update;
import com.newyetai.common.dto.BaseOperateDTO;
/**
* @author sr on 2021-12-21
*/
@Data
@NoArgsConstructor
@AllArgsConstructor
@Builder
@ApiModel(description = "小程序码配置操作")
public class LiteCodeConfigOperateDTO extends BaseOperateDTO implements Serializable{
/** **/
private static final long serialVersionUID = 1L;
@ApiModelProperty("id")
@NotNull(message = "id不能为空", groups = {Update.class})
private Long id;
}

View File

@@ -0,0 +1,34 @@
package com.newyetai.usercenter.auth.dto;
import java.io.Serializable;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import io.swagger.annotations.ApiModel;
import com.newyetai.common.dto.PageQueryDTO;
/**
* @author sr on 2021-12-21
*/
@Data
@NoArgsConstructor
@AllArgsConstructor
@Builder
@ApiModel(description = "小程序码配置查询条件")
public class LiteCodeConfigQueryDTO extends PageQueryDTO<LiteCodeConfigDTO> implements Serializable{
/** **/
private static final long serialVersionUID = 1L;
@ApiModelProperty("id")
private Long id;
@ApiModelProperty("授权客户端id")
private Long authClientId;
@ApiModelProperty("小程序码业务类型")
private Integer bizType;
}

View File

@@ -0,0 +1,50 @@
package com.newyetai.usercenter.auth.dto;
import com.google.common.collect.Maps;
import com.newyetai.common.dto.BaseOperateDTO;
import com.newyetai.usercenter.auth.constant.AuthTypeEnum;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.*;
import lombok.Builder.Default;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.util.Map;
/**
* @author sr on 2021-12-21
*/
@EqualsAndHashCode(callSuper = true)
@Data
@NoArgsConstructor
@AllArgsConstructor
@Builder
@ApiModel(description = "小程序码操作")
public class LiteCodeCreateDTO extends BaseOperateDTO implements Serializable{
/** **/
private static final long serialVersionUID = 1L;
@ApiModelProperty("小程序码业务类型")
@NotNull(message = "小程序码业务类型不能为空")
private Integer bizType;
@ApiModelProperty("名称")
@NotBlank(message = "名称不能为空")
private String name;
@ApiModelProperty("请求域名或ip")
// @NotBlank(message = "请求域名或ip不能为空")
private String domainOrIp;
@ApiModelProperty("授权类型:默认微信小程序")
@Default
private Integer authTypeCode = AuthTypeEnum.WECHAT_LITE.getCode();
@ApiModelProperty("参数值")
@Default
private Map<String, Object> paramData = Maps.newHashMap();
/**
* 来源
*/
private Integer sourceFrom;
}

View File

@@ -0,0 +1,49 @@
package com.newyetai.usercenter.auth.dto;
import com.newyetai.common.dto.BaseDTO;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.experimental.SuperBuilder;
/**
* @author sr on 2021-12-21
*/
@NoArgsConstructor
@AllArgsConstructor
@EqualsAndHashCode(callSuper = true)
@SuperBuilder
@Data
@ApiModel(description = "小程序码")
public class LiteCodeDTO extends BaseDTO {
/** **/
private static final long serialVersionUID = 1L;
@ApiModelProperty("小程序码配置id")
private Long liteCodeConfigId;
@ApiModelProperty("唯一码-uuid")
private String uniqueCode;
@ApiModelProperty("参数值(按参数键升序排列)(格式:**&**)")
private String paramValue;
@ApiModelProperty("query参数值(格式:**=**&**=**)")
private String queryValue;
@ApiModelProperty("小程序码文件编码")
private String fileCode;
@ApiModelProperty("小程序scheme码")
private String urlScheme;
@ApiModelProperty("名称")
private String name;
@ApiModelProperty("用户id")
private Long userId;
@ApiModelProperty("机构id")
private Long orgId;
@ApiModelProperty("平台编码")
private Integer platformCode;
}

View File

@@ -0,0 +1,36 @@
package com.newyetai.usercenter.auth.dto;
import com.newyetai.common.dto.BaseOperateDTO;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.*;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
/**
* @description: 小程序码修改操作
* @author: guixinman
* @create: 2023-02-20 16:08
**/
@EqualsAndHashCode(callSuper = true)
@Data
@NoArgsConstructor
@AllArgsConstructor
@Builder
@ApiModel(description = "小程序码操作")
public class LiteCodeModifyDTO extends BaseOperateDTO implements Serializable {
@ApiModelProperty("小程序码业务类型")
//@NotNull(message = "小程序码业务类型不能为空")
private Integer bizType;
@NotNull(message = "id不能为空")
private Long id;
@NotBlank(message = "名称不能为空")
private String name;
}

View File

@@ -0,0 +1,43 @@
package com.newyetai.usercenter.auth.dto;
import com.newyetai.common.dto.PageQueryDTO;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.Serializable;
/**
* @author sr on 2021-12-21
*/
@Data
@NoArgsConstructor
@AllArgsConstructor
@Builder
@ApiModel(description = "小程序码查询条件")
public class LiteCodeQueryDTO extends PageQueryDTO<LiteCodeDTO> implements Serializable{
/** **/
private static final long serialVersionUID = 1L;
@ApiModelProperty("id")
private Long id;
@ApiModelProperty("小程序码配置id")
private Long liteCodeConfigId;
@ApiModelProperty("参数值(按参数键升序排列)(格式:**&**)")
private String paramValue;
@ApiModelProperty("小程序码名称")
private String name;
@ApiModelProperty("小程序码名称(模糊匹配)")
private String nameLike;
@ApiModelProperty("用户id")
private Long userId;
@ApiModelProperty("机构id")
private Long orgId;
@ApiModelProperty("业务类型")
private Integer bizType;
}

View File

@@ -0,0 +1,37 @@
package com.newyetai.usercenter.auth.dto;
import java.io.Serializable;
import javax.validation.constraints.NotBlank;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
/**
* @author sr on 2020-05-12
*/
@Data
@NoArgsConstructor
@AllArgsConstructor
@ApiModel(description = "小程序手机号授权信息")
public class LitePhoneAuthDTO extends AuthCodeDTO implements Serializable{
/** **/
private static final long serialVersionUID = 2022092915168090246L;
@ApiModelProperty("包括敏感数据在内的完整用户信息的加密数据")
@NotBlank(message = "加密数据不能为空")
private String encryptedData;
@ApiModelProperty("加密算法的初始向量")
@NotBlank(message = "加密向量不能为空")
private String iv;
@ApiModelProperty("获取手机号的code(微信小程序)")
private String phoneCode;
@ApiModelProperty("手机号(加密信息换取的)")
private String phone;
}

View File

@@ -0,0 +1,32 @@
package com.newyetai.usercenter.auth.dto;
import java.io.Serializable;
import javax.validation.constraints.NotNull;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
/**
* @author sr on 2020-05-12
*/
@Data
@NoArgsConstructor
@AllArgsConstructor
@ApiModel(description = "小程序登录")
public class LitePhoneLoginDTO extends LitePhoneAuthDTO implements Serializable{
/** **/
private static final long serialVersionUID = 2022092915168090246L;
@ApiModelProperty("用户类型")
@NotNull(message = "用户类型不能为空")
private Integer userType;
@ApiModelProperty("入口点")
private String entrypoint;
}

View File

@@ -0,0 +1,66 @@
package com.newyetai.usercenter.auth.dto;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.Serializable;
import java.util.Date;
@NoArgsConstructor
@AllArgsConstructor
@Builder
@Data
@ApiModel(description = "邀请人信息")
public class PcInviteInfoDTO implements Serializable {
private static final long serialVersionUID = -5127886750745608146L;
@ApiModelProperty("用户id")
private Long userId;
@ApiModelProperty("姓名")
private String personName;
@ApiModelProperty("昵称")
private String nickname;
@ApiModelProperty("身份证号")
private String cardNo;
@ApiModelProperty("性别:2女 1男 3 其它")
private String gender;
@ApiModelProperty("年龄")
private Integer age;
@ApiModelProperty("手机号")
private String phone;
@ApiModelProperty("文化程度:0学历不限、1初中、2高中、3专科、4本科、5硕士、6博士")
private String education;
@ApiModelProperty("求职意向")
private String jobIntention;
@ApiModelProperty("邀请人id")
private String inviterId;
@ApiModelProperty("邀请人名称")
private String inviterName;
@ApiModelProperty("邀请时间")
private String inviterTime;
@ApiModelProperty("注册时间")
private String registerTime;
@ApiModelProperty("二维码名称")
private String liteName;
@ApiModelProperty("备注")
private String remark;
}

View File

@@ -0,0 +1,60 @@
package com.newyetai.usercenter.auth.dto;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.newyetai.common.dto.PageQueryDTO;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.*;
import org.springframework.format.annotation.DateTimeFormat;
import java.util.Date;
@EqualsAndHashCode(callSuper = true)
@NoArgsConstructor
@AllArgsConstructor
@Builder
@Data
@ApiModel(description = "PC端邀请人信息 - 分页查询DTO")
public class PcInviteInfoPageQueryDTO extends PageQueryDTO<PcInviteInfoDTO> {
private static final long serialVersionUID = -7603359054944420315L;
@ApiModelProperty("用户id")
private Long userId;
@ApiModelProperty("姓名")
private String personNameLike;
@ApiModelProperty("昵称")
private String nicknameLike;
@ApiModelProperty("性别:2女 1男 3 其它")
private Integer gender;
@ApiModelProperty("年龄")
private Integer age;
@ApiModelProperty("手机号")
private String phone;
@ApiModelProperty("邀请人id")
private String inviterId;
@ApiModelProperty("邀请时间开始")
private String inviterTimeStart;
@ApiModelProperty("邀请时间结束")
private String inviterTimeEnd;
@ApiModelProperty("注册时间开始")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date registerTimeStart;
@ApiModelProperty("注册时间结束")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date registerTimeEnd;
@ApiModelProperty("二维码名称")
private String liteNameLike;
}

View File

@@ -0,0 +1,51 @@
package com.newyetai.usercenter.auth.dto;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.Serializable;
import java.util.Objects;
@ApiModel("合伙人统计 - pc 查询DTO")
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class PcInviteStatisticInfoDTO implements Serializable {
private static final long serialVersionUID = -5588108740516901862L;
@ApiModelProperty("邀请数量")
private Integer inviteNumber;
@ApiModelProperty("未注册数量")
private Integer unRegisterNumber;
@ApiModelProperty("注册数量")
private Integer registerNumber;
public Integer getInviteNumber() {
if (Objects.isNull(inviteNumber)) {
inviteNumber = 0;
}
return inviteNumber;
}
public Integer getUnRegisterNumber() {
if (Objects.isNull(unRegisterNumber)) {
unRegisterNumber = 0;
}
return unRegisterNumber;
}
public Integer getRegisterNumber() {
if (Objects.isNull(registerNumber)) {
registerNumber = 0;
}
return registerNumber;
}
}

View File

@@ -0,0 +1,35 @@
package com.newyetai.usercenter.auth.dto;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.Serializable;
@Data
@NoArgsConstructor
@AllArgsConstructor
@Builder
public class RegistrationInfoDTO implements Serializable {
private static final long serialVersionUID = -3240224698154801738L;
/**
* 用户id
*/
private Long userId;
/**
* 岗位ID
*/
private Long positionId;
/**
* 状态
*/
private Integer status;
/**
* 终止
*/
private Boolean termination;
}

View File

@@ -0,0 +1,36 @@
package com.newyetai.usercenter.auth.entity;
import com.baomidou.mybatisplus.annotation.TableName;
import com.newyetai.common.entity.BaseEntity;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.experimental.SuperBuilder;
/**
* 授权客户端
*
* @author sr on 2021-05-24
*/
@TableName("uc_auth_client")
@NoArgsConstructor
@AllArgsConstructor
@EqualsAndHashCode(callSuper = true)
@SuperBuilder
@Data
public class AuthClient extends BaseEntity {
/** **/
private static final long serialVersionUID = 1L;
/**
* 授权应用名称
*/
private String clientName;
/** 授权类型标识 */
private Integer authTypeCode ;
/** 配置数据 */
private String paramData ;
}

View File

@@ -0,0 +1,49 @@
package com.newyetai.usercenter.auth.entity;
import com.baomidou.mybatisplus.annotation.TableName;
import com.newyetai.common.entity.BaseEntity;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.experimental.SuperBuilder;
/**
* 授权明细
*
* @author sr on 2021-05-24
*/
@TableName("uc_auth_detail")
@NoArgsConstructor
@AllArgsConstructor
@EqualsAndHashCode(callSuper = true)
@SuperBuilder
@Data
public class AuthDetail extends BaseEntity {
/** **/
private static final long serialVersionUID = 1L;
/** 授权客户端id */
private Long authClientId ;
/** 授权类型标识 */
private Integer authTypeCode ;
/** 昵称 */
private String nickname ;
/** 头像 */
private String avatar ;
/** 性别 */
private String gender ;
/** 国家 */
private String country ;
/** 省份 */
private String province ;
/** 城市 */
private String city ;
/** open_id */
private String openId ;
/** 授权唯一id */
private String uniqueId ;
}

View File

@@ -0,0 +1,33 @@
package com.newyetai.usercenter.auth.entity;
import com.baomidou.mybatisplus.annotation.TableName;
import com.newyetai.common.entity.BaseEntity;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.experimental.SuperBuilder;
/**
* 授权明细入口
*
* @author sr on 2022-01-06
*/
@TableName("uc_auth_detail_entrypoint")
@NoArgsConstructor
@AllArgsConstructor
@EqualsAndHashCode(callSuper = true)
@SuperBuilder
@Data
public class AuthDetailEntrypoint extends BaseEntity {
/** **/
private static final long serialVersionUID = 1L;
/** 授权客户端id **/
private Long authDetailId;
/** 关联id(小程序码id) **/
private Long unionId;
}

View File

@@ -0,0 +1,35 @@
package com.newyetai.usercenter.auth.entity;
import com.baomidou.mybatisplus.annotation.TableName;
import com.newyetai.common.entity.BaseEntity;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.experimental.SuperBuilder;
/**
* 授权订阅明细
*
* @author sr on 2022-04-05
*/
@TableName("uc_auth_subscribe_detail")
@NoArgsConstructor
@AllArgsConstructor
@EqualsAndHashCode(callSuper = true)
@SuperBuilder
@Data
public class AuthSubscribeDetail extends BaseEntity {
/** **/
private static final long serialVersionUID = 1L;
/** 授权客户端id */
private Long authClientId ;
/** open_id */
private String openId ;
/** 授权唯一id */
private String uniqueId ;
}

View File

@@ -0,0 +1,34 @@
package com.newyetai.usercenter.auth.entity;
import com.baomidou.mybatisplus.annotation.TableName;
import com.newyetai.common.entity.BaseEntity;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.experimental.SuperBuilder;
/**
* 授权类型
*
* @author sr on 2021-05-24
*/
@TableName("uc_auth_type")
@NoArgsConstructor
@AllArgsConstructor
@EqualsAndHashCode(callSuper = true)
@SuperBuilder
@Data
public class AuthType extends BaseEntity {
/**
* 授权大类:1微信,2支付宝
*/
private Integer authMainType;
/** 授权类型标识 */
private Integer authTypeCode ;
/** 名称 */
private String name ;
}

View File

@@ -0,0 +1,49 @@
package com.newyetai.usercenter.auth.entity;
import com.baomidou.mybatisplus.annotation.TableName;
import com.newyetai.common.entity.BaseEntity;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.experimental.SuperBuilder;
/**
* 小程序码
*
* @author sr on 2021-12-21
*/
@TableName("uc_lite_code")
@NoArgsConstructor
@AllArgsConstructor
@EqualsAndHashCode(callSuper = true)
@SuperBuilder
@Data
public class LiteCode extends BaseEntity {
/** **/
private static final long serialVersionUID = 1L;
/** 小程序码配置id **/
private Long liteCodeConfigId;
/** 唯一码-uuid **/
private String uniqueCode;
/** 参数值(按参数键升序排列)(格式:**&**) **/
private String paramValue;
/** query参数值(格式:**=**&**=**) **/
private String queryValue;
/** 小程序码文件编码 **/
private String fileCode;
/** 小程序scheme码 **/
private String urlScheme;
/** 名称 **/
private String name;
/** 用户id **/
private Long userId;
/** 机构id **/
private Long orgId;
/** 平台编码 **/
private Integer platformCode;
}

View File

@@ -0,0 +1,41 @@
package com.newyetai.usercenter.auth.entity;
import com.baomidou.mybatisplus.annotation.TableName;
import com.newyetai.common.entity.BaseEntity;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.experimental.SuperBuilder;
/**
* 小程序码配置
*
* @author sr on 2021-12-21
*/
@TableName("uc_lite_code_config")
@NoArgsConstructor
@AllArgsConstructor
@EqualsAndHashCode(callSuper = true)
@SuperBuilder
@Data
public class LiteCodeConfig extends BaseEntity {
/** **/
private static final long serialVersionUID = 1L;
/** 授权客户端id **/
private Long authClientId;
/** 小程序码业务类型 **/
private Integer bizType;
/** 路径 **/
private String path;
/** 参数键-逗号分隔 **/
private String paramKey;
/** 内置环境参数键-逗号分隔 **/
private String envParamKey;
/** 平台编码 **/
private Integer platformCode;
}

View File

@@ -0,0 +1,36 @@
//package com.newyetai.usercenter.auth.job;
//
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.stereotype.Component;
//
//import com.newyetai.common.annotation.AlitaStopWatch;
//import com.newyetai.job.util.ReturnTUtils;
//import com.newyetai.security.util.MockUtils;
//import com.newyetai.usercenter.auth.service.AuthSubscribeDetailService;
//import com.newyetai.usercenter.common.constant.XxlJobHandlerConstants;
//import com.xxl.job.core.biz.model.ReturnT;
//import com.xxl.job.core.handler.annotation.XxlJob;
//
//import lombok.extern.slf4j.Slf4j;
//
//@Component
//@Slf4j
//public class AuthJob {
//
// @Autowired
// private AuthSubscribeDetailService authSubscribeDetailService;
//
// @XxlJob(XxlJobHandlerConstants.AUTH_SUBSCRIBE_USER_LIST)
// @AlitaStopWatch
// public ReturnT<String> execute(String param) {
// try {
// MockUtils.mockPlatUser();
// authSubscribeDetailService.loadAllClient();
// return ReturnT.SUCCESS;
// }catch (Exception e) {
// return ReturnTUtils.error(e.getMessage());
// }
// }
//
//}
//

View File

@@ -0,0 +1,42 @@
<?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.newyetai.usercenter.auth.dao.AuthClientMapper">
<select id="listAuthClientDTO" resultType="com.newyetai.usercenter.auth.dto.AuthClientDTO">
select
ac.*
from uc_auth_client ac
left join uc_domain_auth da on ac.id = da.auth_client_id and da.deleted = 0
left join uc_domain d on da.domain_id = d.id and d.deleted = 0
where
ac.deleted = 0
<if test="param.id != null">
and ac.id = #{param.id}
</if>
<if test="param.authTypeCode != null">
and ac.auth_type_code = #{param.authTypeCode}
</if>
<if test="param.domainOrIp != null and param.domainOrIp != ''">
and (d.domain_name = #{param.domainOrIp} or d.ip_port = #{param.domainOrIp})
</if>
</select>
<select id="list" resultType="com.newyetai.usercenter.auth.dto.AuthClientDTO">
SELECT
ac.*,
atp.name authTypeName
FROM
uc_auth_client ac
LEFT JOIN uc_auth_type atp ON atp.auth_type_code = ac.auth_type_code
AND atp.deleted = 0
WHERE
ac.deleted = 0
<if test="param.id != null">
and ac.id = #{param.id}
</if>
<if test="param.authTypeCode != null">
and ac.auth_type_code = #{param.authTypeCode}
</if>
</select>
</mapper>

View File

@@ -0,0 +1,245 @@
<?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.newyetai.usercenter.auth.dao.AuthDetailEntrypointMapper">
<select id="listAuthDetailEntrypointDTO" resultType="com.newyetai.usercenter.auth.dto.AuthDetailEntrypointDTO">
select
*
from uc_auth_detail_entrypoint
where
deleted = 0
<if test="param.id != null">
and id = #{param.id}
</if>
<if test="param.authDetailId != null">
and auth_detail_id = #{param.authDetailId}
</if>
<if test="param.unionId != null">
and union_id = #{param.unionId}
</if>
</select>
<select id="inviteInfoPage" resultType="com.newyetai.usercenter.auth.dto.InviteInfoDTO">
SELECT
ade.id entrypointId,
u.nickname userNickName,
u.real_name userRealName,
u.avatar userAvatar,
u.phone userPhone,
ur.create_time userRegisterTime,
ur.user_id ,
r.person_name resumePersonName,
r.card_no resumeCardNo,
r.gender resumeSex,
r.age resumeAge,
r.phone resumePhone,
r.education resumeEducation,
r.job_intention resumeJobIntention,
pt.name resumeJobIntentionName,
r.source resumeSource,
r.file_code resumeFileCode,
r.remark resumeRemark,
r.person_in_charge resumePersonInCharge
FROM
uc_auth_detail_entrypoint ade
INNER JOIN uc_lite_code lc on ade.union_id = lc.id AND lc.deleted = 0
INNER JOIN uc_auth_detail ad on ade.auth_detail_id = ad.id AND ad.deleted = 0
INNER JOIN uc_user_auth ua on ua.unique_id = ad.unique_id AND ua.deleted = 0
INNER JOIN uc_user u on u.id = ua.user_id AND u.deleted = 0
INNER JOIN uc_user_register ur on ur.user_id = ua.user_id AND ur.union_id = lc.id AND ur.deleted = 0 AND ur.inviter_id = #{userId}
LEFT JOIN hr_resume r on r.user_id = u.id and r.org_id = lc.org_id AND r.deleted = 0
LEFT JOIN hr_position_type pt on pt.code = r.job_intention AND pt.deleted = 0
<if test="param.queryType != null and param.queryType == 1">
LEFT JOIN hr_position_registration pr on pr.user_id = ur.user_id AND pr.deleted = 0
</if>
WHERE
ade.deleted = 0
AND lc.user_id = #{userId}
AND lc.org_id = #{orgId}
<if test="param.lifeCodeId != null">
and lc.id = #{param.lifeCodeId}
</if>
<if test="param.entrypointId != null">
and ade.id = #{param.entrypointId}
</if>
<if test="param.startTime != null">
and ade.create_time &gt;= #{param.startTime}
</if>
<if test="param.queryType != null and param.queryType == 1">
AND pr.status = 6 AND (pr.termination is null or pr.termination = 0)
</if>
order by ade.id desc
</select>
<select id="pcInviteInfoPage" resultType="com.newyetai.usercenter.auth.dto.PcInviteInfoDTO">
SELECT
u.id as user_id,
u.nickname,
u.real_name as person_name,
u.card_no,u.phone,u.education,(
select pt.name
from hr_job_expect je left join hr_position_type pt on je.type_code = pt.code
where
je.deleted = 0
and je.user_id = u.id order by je.create_time desc limit 1
) as job_intention,
ur.inviter_id, -- 邀请人id
(select uu.nickname from uc_user uu where ur.inviter_id = uu.id) as inviter_name, -- 邀请人
ade.create_time as inviter_time, -- 邀请时间
ur.create_time as register_time, -- 注册时间
lc.name as liteName
FROM
uc_auth_detail_entrypoint ade
INNER JOIN uc_lite_code lc on ade.union_id = lc.id AND lc.deleted = 0
INNER JOIN uc_auth_detail ad on ade.auth_detail_id = ad.id AND ad.deleted = 0
INNER JOIN uc_user_auth ua on ua.unique_id = ad.unique_id AND ua.deleted = 0
INNER JOIN uc_user u on u.id = ua.user_id AND u.deleted = 0
INNER JOIN uc_user_register ur on ur.user_id = ua.user_id AND ur.union_id = lc.id AND ur.deleted = 0
WHERE
ade.deleted = 0
AND lc.org_id = #{orgId}
<if test="param.userId != null">
AND u.id = #{param.userId}
</if>
<if test='param.personNameLike != null and param.personNameLike.trim() != ""'>
<bind name="personNameLike" value="'%' + param.personNameLike.trim() + '%'" />
AND u.real_name like #{personNameLike}
</if>
<if test='param.nicknameLike != null and param.nicknameLike.trim() != ""'>
<bind name="nicknameLike" value="'%' + param.nicknameLike.trim() + '%'" />
AND u.nickname like #{nicknameLike}
</if>
<if test='param.age != null'>
AND (substring(now(),1,4)-substring(u.card_no,7,4))-(substring(u.card_no,11,4)-date_format(now(),'%m%d')>0)= #{param.age}
</if>
<if test='param.gender != null'>
AND SUBSTR(u.card_no, LENGTH(u.card_no) - 1,1) % 2 = #{param.gender}
</if>
<if test="param.phone != null">
AND u.phone = #{param.phone}
</if>
<if test="param.inviterId != null">
AND ur.inviter_id = #{param.inviterId}
</if>
<if test='param.liteNameLike != null and param.liteNameLike.trim() != ""'>
<bind name="likename" value="'%' + param.liteNameLike.trim() + '%'" />
AND lc.name like #{likename}
</if>
<!-- 邀请时间 -->
<if test="param.inviterTimeStart != null">
and date_format(ade.create_time,'%Y-%m-%d') &gt;= #{param.inviterTimeStart}
</if>
<if test="param.inviterTimeEnd != null">
and date_format(ade.create_time,'%Y-%m-%d') &lt;= #{param.inviterTimeEnd}
</if>
<!-- 注册时间 -->
<if test="param.registerTimeStart != null">
and ur.create_time &gt;= #{param.registerTimeStart}
</if>
<if test="param.registerTimeEnd != null">
and ur.create_time &lt;= #{param.registerTimeEnd}
</if>
order by ade.id desc
</select>
<select id="inviteStatisticQuery" resultType="com.newyetai.usercenter.auth.dto.InviteStatisticDTO">
SELECT
ad.id authDetailId,ur.id userAuthId
FROM
uc_auth_detail_entrypoint ade
LEFT JOIN uc_lite_code lc on ade.union_id = lc.id
LEFT JOIN uc_auth_detail ad on ade.auth_detail_id = ad.id AND ad.deleted = 0
LEFT JOIN uc_user_auth ua on ua.unique_id = ad.unique_id AND ua.deleted = 0
LEFT JOIN uc_user_register ur on ur.user_id = ua.user_id AND ur.deleted = 0
WHERE
ade.deleted = 0 AND lc.deleted = 0
AND lc.org_id = #{orgId}
<if test="param.userId != null">
AND ur.inviter_id = #{param.userId}
AND lc.user_id = #{param.userId}
</if>
<if test="param.startTime != null">
and ade.create_time &gt;= #{param.startTime}
</if>
<if test="param.endTime != null">
and ade.create_time &lt;= #{param.endTime}
</if>
</select>
<select id="inviteRegisterCount" resultType="java.lang.Integer">
SELECT
count(DISTINCT ur.user_id)
FROM
uc_auth_detail_entrypoint ade
INNER JOIN uc_lite_code lc on ade.union_id = lc.id AND lc.deleted = 0
INNER JOIN uc_auth_detail ad on ade.auth_detail_id = ad.id AND ad.deleted = 0
INNER JOIN uc_user_auth ua on ua.unique_id = ad.unique_id AND ua.deleted = 0
INNER JOIN uc_user_register ur on ur.user_id = ua.user_id AND ur.deleted = 0 AND ur.union_id = lc.id
WHERE
ade.deleted = 0
AND lc.org_id = #{orgId}
<if test="param.userId != null">
AND ur.inviter_id = #{param.userId}
AND lc.user_id = #{param.userId}
</if>
<if test="param.startTime != null">
and ur.create_time &gt;= #{param.startTime}
</if>
<if test="param.endTime != null">
and ur.create_time &lt;= #{param.endTime}
</if>
</select>
<select id="countInviteStatisticQuery" resultType="java.lang.Integer">
SELECT
<if test="param.queryType != null and param.queryType == 1">
count(distinct ur.user_id)
</if>
<if test="param.queryType == null ">
count(distinct ade.id)
</if>
FROM
uc_auth_detail_entrypoint ade
INNER JOIN uc_lite_code lc on ade.union_id = lc.id
<if test="param.queryType != null and param.queryType == 1">
INNER JOIN uc_auth_detail ad on ade.auth_detail_id = ad.id AND ad.deleted = 0
INNER JOIN uc_user_auth ua on ua.unique_id = ad.unique_id AND ua.deleted = 0
INNER JOIN uc_user u on u.id = ua.user_id AND u.deleted = 0
INNER JOIN uc_user_register ur on ur.user_id = ua.user_id AND ur.union_id = lc.id AND ur.deleted = 0
LEFT JOIN hr_position p on p.org_id = lc.org_id
LEFT JOIN hr_position_registration pr on pr.position_id = p.id AND pr.user_id = ua.user_id
</if>
WHERE
ade.deleted = 0 AND lc.deleted = 0
AND lc.org_id = #{orgId}
<if test="param.queryType != null and param.queryType == 1">
AND p.deleted = 0 AND pr.deleted = 0 AND pr.status = 6 AND (pr.termination is null or pr.termination = 0)
AND ur.inviter_id = #{param.userId}
</if>
<if test="param.userId != null">
AND lc.user_id = #{param.userId}
</if>
<if test="param.startTime != null">
and ade.create_time &gt;= #{param.startTime}
</if>
<if test="param.endTime != null">
and ade.create_time &lt;= #{param.endTime}
</if>
</select>
<select id="registrationList" resultType="com.newyetai.usercenter.auth.dto.RegistrationInfoDTO">
SELECT
pr.user_id,
pr.position_id,
pr.status,
pr.termination
FROM
hr_position_registration pr
WHERE
pr.deleted = 0
AND pr.user_id IN
<foreach collection="userIds" open="(" separator="," close=")" item="userId">
#{userId}
</foreach>
</select>
</mapper>

View File

@@ -0,0 +1,48 @@
<?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.newyetai.usercenter.auth.dao.AuthDetailMapper">
<select id="listAuthDetailDTO" resultType="com.newyetai.usercenter.auth.dto.AuthDetailDTO">
SELECT
ad.*,
ac.client_name authClientName,
atp.name authTypeName
FROM
uc_auth_detail ad
LEFT JOIN uc_auth_client ac ON ac.id = ad.auth_client_id
AND ac.deleted =
0 LEFT JOIN uc_auth_type atp ON atp.auth_type_code = ac.auth_type_code
AND atp.deleted = 0
WHERE
ad.deleted = 0
<if test="param.id != null">
and ad.id = #{param.id}
</if>
<if test="param.authClientId != null">
and ad.auth_client_id = #{param.authClientId}
</if>
<if test="param.authTypeCode != null">
and ad.auth_type_code = #{param.authTypeCode}
</if>
<if test="param.uniqueId != null and param.uniqueId.trim() != ''">
and ad.unique_id = #{param.uniqueId}
</if>
<if test='param.nickname != null and param.nickname.trim() != ""'>
<bind name="nicknameLike" value="'%' + param.nickname + '%'"/>
AND ad.nickname like #{nicknameLike}
</if>
<if test="param.openId != null">
and ad.open_id = #{param.openId}
</if>
<if test="param.userId != null">
and ad.unique_id in
(select ua.unique_id
from uc_user u
inner join uc_user_auth ua on u.id = ua.user_id
where u.id = #{param.userId}
and ua.deleted = 0 and u.deleted = 0
)
</if>
</select>
</mapper>

View File

@@ -0,0 +1,22 @@
<?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.newyetai.usercenter.auth.dao.AuthSubscribeDetailMapper">
<select id="listAuthSubscribeDetailDTO" resultType="com.newyetai.usercenter.auth.dto.AuthSubscribeDetailDTO">
select
*
from uc_auth_subscribe_detail
where
deleted = 0
<if test="param.id != null">
and id = #{param.id}
</if>
<if test="param.authDetailId != null">
and auth_detail_id = #{param.authDetailId}
</if>
<if test="param.uniqueId != null and param.uniqueId.trim() != ''">
and unique_id = #{param.uniqueId}
</if>
</select>
</mapper>

View File

@@ -0,0 +1,14 @@
<?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.newyetai.usercenter.auth.dao.AuthTypeMapper">
<select id="list" resultType="com.newyetai.usercenter.auth.dto.AuthTypeDTO">
SELECT
atp.*
FROM
uc_auth_type atp
WHERE
atp.deleted = 0
</select>
</mapper>

View File

@@ -0,0 +1,23 @@
<?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.newyetai.usercenter.auth.dao.LiteCodeConfigMapper">
<select id="listLiteCodeConfigDTO" resultType="com.newyetai.usercenter.auth.dto.LiteCodeConfigDTO">
select
*
from uc_lite_code_config
where
deleted = 0
<if test="param.id != null">
and id = #{param.id}
</if>
<if test="param.authClientId != null">
and auth_client_id = #{param.authClientId}
</if>
<if test="param.bizType != null">
and biz_type = #{param.bizType}
</if>
</select>
</mapper>

View File

@@ -0,0 +1,39 @@
<?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.newyetai.usercenter.auth.dao.LiteCodeMapper">
<select id="listLiteCodeDTO" resultType="com.newyetai.usercenter.auth.dto.LiteCodeDTO">
select
lc.*
from uc_lite_code lc
LEFT JOIN uc_lite_code_config lcc on lcc.id = lc.lite_code_config_id AND lcc.deleted = 0
where
lc.deleted = 0
<if test="param.id != null">
and lc.id = #{param.id}
</if>
<if test="param.liteCodeConfigId != null">
and lc.lite_code_config_id = #{param.liteCodeConfigId}
</if>
<if test="param.paramValue != null and param.paramValue != ''">
and lc.param_value = #{param.paramValue}
</if>
<if test='param.name != null and param.name.trim() != ""'>
AND lc.name = #{param.name}
</if>
<if test='param.nameLike != null and param.nameLike.trim() != ""'>
<bind name="nameLike" value="'%' + param.nameLike + '%'"/>
AND lc.name like #{nameLike}
</if>
<if test="param.userId != null">
and lc.user_id = #{param.userId}
</if>
<if test="param.orgId != null">
and lc.org_id = #{param.orgId}
</if>
<if test="param.bizType != null">
AND lcc.biz_type = #{param.bizType}
</if>
</select>
</mapper>

View File

@@ -0,0 +1,48 @@
package com.newyetai.usercenter.auth.mapstruct;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;
import com.newyetai.sdk.bytedance.model.Code2SessionDataDTO;
import com.newyetai.sdk.wechat.model.Code2SessionDTO;
import com.newyetai.usercenter.auth.dto.AuthClientDTO;
import com.newyetai.usercenter.auth.dto.AuthClientOperateDTO;
import com.newyetai.usercenter.auth.dto.AuthTypeOperateDTO;
import com.newyetai.usercenter.auth.dto.CodeToSessionDTO;
import com.newyetai.usercenter.auth.entity.AuthClient;
import com.newyetai.usercenter.auth.entity.AuthType;
/**
* @author sr on 2021-05-24
*/
@Mapper
public interface AuthClientMapMapper {
AuthClientMapMapper INSTANCE =
Mappers.getMapper(AuthClientMapMapper.class);
/**
* dto to entity
*
* @param authClientDto
* @return
* @author sr on 2021-05-24
*/
AuthClient toEntity(
AuthClientDTO authClientDto);
/**
* @param authClientOperateDTO
* @return
* @author sr on 2021-05-24
*/
AuthClient toEntity(AuthClientOperateDTO authClientOperateDTO);
AuthType exchange(AuthTypeOperateDTO operateDTO);
CodeToSessionDTO to(Code2SessionDTO dto);
CodeToSessionDTO to(Code2SessionDataDTO dto);
}

View File

@@ -0,0 +1,29 @@
package com.newyetai.usercenter.auth.mapstruct;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;
import com.newyetai.usercenter.auth.dto.AuthDetailEntrypointDTO;
import com.newyetai.usercenter.auth.entity.AuthDetailEntrypoint;
/**
* @author sr on 2022-01-06
*/
@Mapper
public interface AuthDetailEntrypointMapMapper {
AuthDetailEntrypointMapMapper INSTANCE =
Mappers.getMapper(AuthDetailEntrypointMapMapper.class);
/**
* dto to entity
*
* @param authDetailEntrypointDto
* @return
* @author sr on 2022-01-06
*/
AuthDetailEntrypoint toEntity(
AuthDetailEntrypointDTO authDetailEntrypointDto);
}

View File

@@ -0,0 +1,36 @@
package com.newyetai.usercenter.auth.mapstruct;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.factory.Mappers;
import com.newyetai.usercenter.auth.dto.AuthDetailCreateDTO;
import com.newyetai.usercenter.auth.dto.AuthDetailLoginDTO;
import com.newyetai.usercenter.auth.dto.LitePhoneLoginDTO;
import com.newyetai.usercenter.auth.entity.AuthDetail;
import com.newyetai.usercenter.user.login.dto.LoginPhoneDTO;
/**
* @author sr on 2021-05-24
*/
@Mapper
public interface AuthDetailMapMapper {
AuthDetailMapMapper INSTANCE =
Mappers.getMapper(AuthDetailMapMapper.class);
/**
* dto to entity
*
* @param authDetailDto
* @return
* @author sr on 2021-05-24
*/
AuthDetail toEntity(AuthDetailCreateDTO authDetailCreateDTO);
@Mapping(target = "withoutCode", constant = "true")
LoginPhoneDTO to(LitePhoneLoginDTO litePhoneLoginDTO);
AuthDetailLoginDTO toDto(LitePhoneLoginDTO loginPhoneLoginDTO);
}

View File

@@ -0,0 +1,37 @@
package com.newyetai.usercenter.auth.mapstruct;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;
import com.newyetai.usercenter.auth.dto.AuthSubscribeDetailDTO;
import com.newyetai.usercenter.auth.entity.AuthSubscribeDetail;
import com.newyetai.usercenter.auth.dto.AuthSubscribeDetailCreateDTO;
/**
* @author sr on 2022-04-05
*/
@Mapper
public interface AuthSubscribeDetailMapMapper {
AuthSubscribeDetailMapMapper INSTANCE =
Mappers.getMapper(AuthSubscribeDetailMapMapper.class);
/**
* dto to entity
*
* @param authSubscribeDetailDto
* @return
* @author sr on 2022-04-05
*/
AuthSubscribeDetail toEntity(
AuthSubscribeDetailDTO authSubscribeDetailDto);
/**
* @param authSubscribeDetailCreateDTO
* @return
* @author sr on 2022-04-05
*/
AuthSubscribeDetail toEntity(AuthSubscribeDetailCreateDTO authSubscribeDetailCreateDTO);
}

View File

@@ -0,0 +1,37 @@
package com.newyetai.usercenter.auth.mapstruct;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;
import com.newyetai.usercenter.auth.dto.LiteCodeConfigDTO;
import com.newyetai.usercenter.auth.entity.LiteCodeConfig;
import com.newyetai.usercenter.auth.dto.LiteCodeConfigOperateDTO;
/**
* @author sr on 2021-12-21
*/
@Mapper
public interface LiteCodeConfigMapMapper {
LiteCodeConfigMapMapper INSTANCE =
Mappers.getMapper(LiteCodeConfigMapMapper.class);
/**
* dto to entity
*
* @param liteCodeConfigDto
* @return
* @author sr on 2021-12-21
*/
LiteCodeConfig toEntity(
LiteCodeConfigDTO liteCodeConfigDto);
/**
* @param liteCodeConfigOperateDTO
* @return
* @author sr on 2021-12-21
*/
LiteCodeConfig toEntity(LiteCodeConfigOperateDTO liteCodeConfigOperateDTO);
}

View File

@@ -0,0 +1,39 @@
package com.newyetai.usercenter.auth.mapstruct;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;
import com.newyetai.usercenter.auth.dto.LiteCodeDTO;
import com.newyetai.usercenter.auth.entity.LiteCode;
import com.newyetai.usercenter.auth.dto.LiteCodeCreateDTO;
/**
* @author sr on 2021-12-21
*/
@Mapper
public interface LiteCodeMapMapper {
LiteCodeMapMapper INSTANCE =
Mappers.getMapper(LiteCodeMapMapper.class);
/**
* dto to entity
*
* @param liteCodeDto
* @return
* @author sr on 2021-12-21
*/
LiteCode toEntity(
LiteCodeDTO liteCodeDto);
/**
* @param liteCodeOperateDTO
* @return
* @author sr on 2021-12-21
*/
LiteCode toEntity(LiteCodeCreateDTO liteCodeOperateDTO);
LiteCodeDTO toDto(LiteCode liteCode);
}

View File

@@ -0,0 +1,191 @@
package com.newyetai.usercenter.auth.service;
import java.util.List;
import javax.validation.Valid;
import org.springframework.validation.annotation.Validated;
import com.newyetai.common.validation.Create;
import com.newyetai.common.validation.Update;
import com.newyetai.sdk.wechat.model.SubscibeMessageReq;
import com.newyetai.sdk.wechat.model.UnionDTO;
import com.newyetai.sdk.wechat.model.UrlSchemeReq;
import com.newyetai.sdk.wechat.model.WxacodeReq;
import com.newyetai.usercenter.auth.dto.AuthClientDTO;
import com.newyetai.usercenter.auth.dto.AuthClientDataDTO;
import com.newyetai.usercenter.auth.dto.AuthClientOperateDTO;
import com.newyetai.usercenter.auth.dto.AuthClientQueryDTO;
import com.newyetai.usercenter.auth.dto.CodeToSessionDTO;
import com.newyetai.usercenter.auth.dto.LitePhoneAuthDTO;
import com.newyetai.usercenter.auth.wechat.dto.WechatSignatureReqDTO;
import com.newyetai.usercenter.auth.wechat.dto.WechatSignatureResDTO;
/**
* 授权客户端
*
* @author sr on 2021-05-24
*/
@Validated
public interface AuthClientService {
/**
* 新增
*
* @param authClientOperateDTO
* @return
* @author sr on 2021-05-24
*/
@Validated(Create.class)
Long create(@Valid AuthClientOperateDTO authClientOperateDTO);
/**
* 修改
*
* @param authClientOperateDTO
* @author sr on 2021-05-24
*/
@Validated(Update.class)
void modify(@Valid AuthClientOperateDTO authClientOperateDTO);
/**
* 删除
*
* @param id
* @author sr on 2021-05-24
*/
void remove(Long id);
/**
* 查询
*
* @param authClientQueryDTO
* @return
* @author sr on 2021-05-24
*/
List<AuthClientDTO> list(AuthClientQueryDTO authClientQueryDTO);
/**
* 分页查询
* @param authClientQueryDTO
* @author sr on 2022-01-04
*/
void page(AuthClientQueryDTO authClientQueryDTO);
/**
* 查询单个授权配置
* @param authClientQueryDTO
* @return
* @author sr on 2021-06-24
*/
AuthClientDTO findAuthClientDTO(AuthClientQueryDTO authClientQueryDTO);
/**
* 查询单个授权配置数据对象
* @param authClientQueryDTO
* @return
* @author sr on 2021-07-07
*/
AuthClientDataDTO findClientData(AuthClientQueryDTO authClientQueryDTO);
/**
* 获取授权配置数据对象
* @param authClientDTO
* @return
* @author sr on 2022-04-06
*/
AuthClientDataDTO toClientData(AuthClientDTO authClientDTO);
/**
* 获取accessToken
*
* @param clientRegistrationId
* @return
* @author sr on 2021-01-15
*/
String getAccessToken(AuthClientQueryDTO authClientQueryDTO);
/**
* 获取ticket
*
* @param clientRegistrationId
* @return
* @author sr on 2021-01-15
*/
String getJsApiTicket(AuthClientQueryDTO authClientQueryDTO);
/**
* 签名
*
* @param wechatSignatureDTO
* @return
* @author sr on 2021-01-15
*/
WechatSignatureResDTO signature(WechatSignatureReqDTO wechatSignatureDTO);
/**
* 根据授权配置获取accessToken
* @param authClientDataDTO
* @return
* @author sr on 2021-12-24
*/
String getAccessToken(AuthClientDataDTO authClientDataDTO);
/**
* 获取小程序码
* @param authClientDataDTO
* @param wxacodeRequestParam
* @return
* @author sr on 2021-12-24
*/
byte[] getWxacode(AuthClientDataDTO authClientDataDTO, WxacodeReq wxacodeRequestParam);
/**
* 获取小程序scheme码
* @param authClientDataDTO
* @param urlSchemeRequestParam
* @return
* @author sr on 2021-12-24
*/
String getUrlscheme(AuthClientDataDTO authClientDataDTO,
UrlSchemeReq urlSchemeRequestParam);
/**
* 发送小程序订阅消息
* @param authClientDataDTO
* @param subscibeMessageReq
* @author sr on 2022-01-04
*/
void subscibeMessage(AuthClientDataDTO authClientDataDTO, SubscibeMessageReq subscibeMessageReq);
/**
* code换session
* @param authClientDataDTO
* @param code
* @return
* @author sr on 2022-01-06
*/
CodeToSessionDTO getCodeToSessionDTO(AuthClientDataDTO authClientDataDTO, String code);
String getPhone(LitePhoneAuthDTO litePhoneAuthDTO);
/**
* 订阅用户列表
* @return openIds
* @author sr on 2022-04-05
*/
List<String> subscribeUser(AuthClientDataDTO authClientDataDTO);
/**
* 批量openid换unionid
* @param authClientDataDTO
* @param openIds
* @return
* @author sr on 2022-04-05
*/
List<UnionDTO> batchUnion(AuthClientDataDTO authClientDataDTO, List<String> openIds);
String getPhone(AuthClientDataDTO authClientDataDTO, String phoneCode);
}

View File

@@ -0,0 +1,97 @@
package com.newyetai.usercenter.auth.service;
import com.newyetai.usercenter.auth.dto.*;
import com.newyetai.usercenter.auth.dto.AuthCodeDTO;
import com.newyetai.usercenter.auth.dto.AuthDetailEntrypointDTO;
import com.newyetai.usercenter.auth.dto.AuthDetailEntrypointQueryDTO;
import java.util.List;
/**
* 授权明细入口
*
* @author sr on 2022-01-06
*/
public interface AuthDetailEntrypointService {
/**
* 新增
*
* @param authCodeDTO
* @return
* @author sr on 2022-01-06
*/
AuthDetailEntrypointCreateRes create(AuthCodeDTO authCodeDTO);
/**
* 删除
*
* @param id
* @author sr on 2022-01-06
*/
void remove(Long id);
/**
* 查询
*
* @param authDetailEntrypointQueryDTO
* @return
* @author sr on 2022-01-06
*/
List<AuthDetailEntrypointDTO> list(AuthDetailEntrypointQueryDTO authDetailEntrypointQueryDTO);
/**
* 分页查询
*
* @param authDetailEntrypointQueryDTO
* @return
* @author sr on 2022-01-06
*/
void page(AuthDetailEntrypointQueryDTO authDetailEntrypointQueryDTO);
/**
* 单个查询
*
* @param authDetailEntrypointQueryDTO
* @return
* @author sr on 2022-01-06
*/
AuthDetailEntrypointDTO find(AuthDetailEntrypointQueryDTO authDetailEntrypointQueryDTO);
/**
* 分页查询邀请人列表
* 默认查询当前登录人
* 只查询已注册的邀请人列表
*
* @param queryDTO 查询dto
* @return {@link List}<{@link InviteInfoDTO}>
*/
List<InviteInfoDTO> inviteInfoPage(InviteInfoPageQueryDTO queryDTO);
InviteStatisticInfoDTO inviteInfoStatistic(InviteInfoPageQueryDTO queryDTO);
/**
* pc端查询邀请列表
* @param queryDTO
* @return
*/
List<PcInviteInfoDTO> pcInviteInfoPage(PcInviteInfoPageQueryDTO queryDTO);
/**
* 请统计查询(pc)
*
* @param queryDTO 查询dto
* @return {@link InviteStatisticInfoDTO}
*/
PcInviteStatisticInfoDTO pcInviteStatisticQuery(InviteStatisticQueryDTO queryDTO);
/**
* 请统计查询
*
* @param queryDTO 查询dto
* @return {@link InviteStatisticInfoDTO}
*/
InviteStatisticInfoDTO inviteStatisticQuery(InviteStatisticQueryDTO queryDTO);
PcInviteInfoDTO getInviteInfoDetail(PcInviteInfoPageQueryDTO queryDTO);
}

View File

@@ -0,0 +1,48 @@
package com.newyetai.usercenter.auth.service;
import java.util.List;
import com.newyetai.usercenter.auth.dto.AuthDetailCreateDTO;
import com.newyetai.usercenter.auth.dto.AuthDetailDTO;
import com.newyetai.usercenter.auth.dto.AuthDetailQueryDTO;
/**
* 授权明细
*
* @author sr on 2021-05-24
*/
public interface AuthDetailService {
/**
* 创建(幂等)
* @param authDetailCreateDTO
* @return
* @author sr on 2022-01-06
*/
Long create(AuthDetailCreateDTO authDetailCreateDTO);
/**
* 删除
*
* @param id
* @author sr on 2021-05-24
*/
void remove(Long id);
/**
* 查询
*
* @param authDetailQueryDTO
* @return
* @author sr on 2021-05-24
*/
List<AuthDetailDTO> list(AuthDetailQueryDTO authDetailQueryDTO);
/**
* 分页查询
* @param authDetailQueryDTO
* @author sr on 2022-01-04
*/
void page(AuthDetailQueryDTO authDetailQueryDTO);
}

View File

@@ -0,0 +1,62 @@
package com.newyetai.usercenter.auth.service;
import java.util.List;
import com.newyetai.usercenter.auth.dto.AuthSubscribeDetailQueryDTO;
import com.newyetai.usercenter.auth.dto.AuthSubscribeDetailCreateDTO;
import com.newyetai.usercenter.auth.dto.AuthSubscribeDetailDTO;
/**
* 授权订阅明细
*
* @author sr on 2022-04-05
*/
public interface AuthSubscribeDetailService {
/**
* 新增
*
* @param authSubscribeDetailCreateDTO
* @return
* @author sr on 2022-04-05
*/
void create(AuthSubscribeDetailCreateDTO authSubscribeDetailCreateDTO);
/**
* 删除
*
* @param id
* @author sr on 2022-04-05
*/
void remove(Long id);
/**
* 查询
*
* @param authSubscribeDetailQueryDTO
* @return
* @author sr on 2022-04-05
*/
List<AuthSubscribeDetailDTO> list(AuthSubscribeDetailQueryDTO authSubscribeDetailQueryDTO);
/**
* 分页查询
*
* @param authSubscribeDetailQueryDTO
* @return
* @author sr on 2022-04-05
*/
void page(AuthSubscribeDetailQueryDTO authSubscribeDetailQueryDTO);
/**
* 单个查询
*
* @param authSubscribeDetailQueryDTO
* @return
* @author sr on 2022-04-05
*/
AuthSubscribeDetailDTO find(AuthSubscribeDetailQueryDTO authSubscribeDetailQueryDTO);
void loadAllClient();
}

View File

@@ -0,0 +1,41 @@
package com.newyetai.usercenter.auth.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.newyetai.common.validation.Create;
import com.newyetai.usercenter.auth.dto.AuthTypeDTO;
import com.newyetai.usercenter.auth.dto.AuthTypeOperateDTO;
import com.newyetai.usercenter.auth.dto.AuthTypeQueryDTO;
import com.newyetai.usercenter.auth.entity.AuthType;
import org.springframework.validation.annotation.Validated;
import javax.validation.Valid;
import java.util.List;
/**
* 授权客户端
*
* @author sr on 2021-05-24
*/
@Validated
public interface AuthTypeService extends IService<AuthType> {
/**
* 新增
*
* @param operateDTO
* @return
* @author sr on 2021-05-24
*/
@Validated(Create.class)
Long create(@Valid AuthTypeOperateDTO operateDTO);
/**
* 查询
*
* @param queryDTO
* @return
* @author sr on 2021-05-24
*/
List<AuthTypeDTO> list(AuthTypeQueryDTO queryDTO);
}

View File

@@ -0,0 +1,68 @@
package com.newyetai.usercenter.auth.service;
import java.util.List;
import com.newyetai.usercenter.auth.dto.LiteCodeConfigQueryDTO;
import com.newyetai.usercenter.auth.dto.LiteCodeConfigOperateDTO;
import com.newyetai.usercenter.auth.dto.LiteCodeConfigDTO;
/**
* 小程序码配置
*
* @author sr on 2021-12-21
*/
public interface LiteCodeConfigService {
/**
* 新增
*
* @param liteCodeConfigOperateDTO
* @return
* @author sr on 2021-12-21
*/
Long create(LiteCodeConfigOperateDTO liteCodeConfigOperateDTO);
/**
* 修改
*
* @param liteCodeConfigOperateDTO
* @author sr on 2021-12-21
*/
void modify(LiteCodeConfigOperateDTO liteCodeConfigOperateDTO);
/**
* 删除
*
* @param id
* @author sr on 2021-12-21
*/
void remove(Long id);
/**
* 查询
*
* @param liteCodeConfigQueryDTO
* @return
* @author sr on 2021-12-21
*/
List<LiteCodeConfigDTO> list(LiteCodeConfigQueryDTO liteCodeConfigQueryDTO);
/**
* 分页查询
*
* @param liteCodeConfigQueryDTO
* @return
* @author sr on 2021-12-21
*/
void page(LiteCodeConfigQueryDTO liteCodeConfigQueryDTO);
/**
* 单个查询
*
* @param liteCodeConfigQueryDTO
* @return
* @author sr on 2021-12-21
*/
LiteCodeConfigDTO findOne(LiteCodeConfigQueryDTO liteCodeConfigQueryDTO);
}

View File

@@ -0,0 +1,54 @@
package com.newyetai.usercenter.auth.service;
import java.util.List;
import com.newyetai.usercenter.auth.dto.LiteCodeModifyDTO;
import com.newyetai.usercenter.auth.dto.LiteCodeQueryDTO;
import com.newyetai.usercenter.auth.dto.LiteCodeCreateDTO;
import com.newyetai.usercenter.auth.dto.LiteCodeDTO;
/**
* 小程序码
*
* @author sr on 2021-12-21
*/
public interface LiteCodeService {
/**
* 新增
*
* @param liteCodeCreateDTO
* @return
* @author sr on 2021-12-21
*/
LiteCodeDTO create(LiteCodeCreateDTO liteCodeCreateDTO);
/**
* 查询
*
* @param liteCodeQueryDTO
* @return
* @author sr on 2021-12-21
*/
List<LiteCodeDTO> list(LiteCodeQueryDTO liteCodeQueryDTO);
/**
* 分页查询
*
* @param liteCodeQueryDTO
* @return
* @author sr on 2021-12-21
*/
void page(LiteCodeQueryDTO liteCodeQueryDTO);
/**
* 单个查询
*
* @param liteCodeQueryDTO
* @return
* @author sr on 2021-12-21
*/
LiteCodeDTO find(LiteCodeQueryDTO liteCodeQueryDTO);
LiteCodeDTO modify(LiteCodeModifyDTO liteCodeModifyDTO);
}

Some files were not shown because too many files have changed in this diff Show More