fix
This commit is contained in:
@@ -1,16 +1,21 @@
|
||||
package com.senmesh.security.dto;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||
import com.senmesh.common.util.UserContextHolder;
|
||||
import com.senmesh.security.util.PasswordUtils;
|
||||
import com.senmesh.usercenter.user.util.UserUtils;
|
||||
import java.io.Serializable;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Builder.Default;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
/**
|
||||
* @author sr on 2019-10-22
|
||||
* @author sr on 2019-10-22
|
||||
*/
|
||||
@ApiModel("用户信息")
|
||||
@Data
|
||||
@@ -18,37 +23,37 @@ import lombok.NoArgsConstructor;
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class UserInfoDTO implements Serializable{
|
||||
|
||||
|
||||
/** **/
|
||||
private static final long serialVersionUID = -684945131805466713L;
|
||||
|
||||
@ApiModelProperty("账号")
|
||||
@ApiModelProperty("账号")
|
||||
private String username;
|
||||
|
||||
@ApiModelProperty("用户类型")
|
||||
|
||||
@ApiModelProperty("用户类型")
|
||||
private Integer userType;
|
||||
|
||||
|
||||
@ApiModelProperty("昵称")
|
||||
private String nickname;
|
||||
|
||||
|
||||
@ApiModelProperty("机构id")
|
||||
private Long orgId;
|
||||
|
||||
|
||||
@ApiModelProperty("机构名称")
|
||||
private String orgName;
|
||||
|
||||
|
||||
@ApiModelProperty("机构类型")
|
||||
private String orgType;
|
||||
|
||||
|
||||
@ApiModelProperty("电话")
|
||||
private String phone;
|
||||
|
||||
@ApiModelProperty("邮箱")
|
||||
private String email;
|
||||
|
||||
|
||||
@ApiModelProperty("是否已初始密码")
|
||||
private Boolean initialedPassword;
|
||||
|
||||
|
||||
@ApiModelProperty("是否忽略初始密码")
|
||||
private Boolean ignoreInitPwd;
|
||||
|
||||
@@ -57,5 +62,25 @@ public class UserInfoDTO implements Serializable{
|
||||
|
||||
private String avatar;
|
||||
|
||||
@ApiModelProperty("密码")
|
||||
@JsonIgnore
|
||||
private String password;
|
||||
|
||||
@ApiModelProperty("是否初始密码")
|
||||
@Default
|
||||
private Boolean originPassword = Boolean.TRUE;
|
||||
|
||||
@ApiModelProperty("是否机构管理员")
|
||||
private Boolean administrator;
|
||||
|
||||
public void setPassword(String password){
|
||||
this.password = password;
|
||||
if (!PasswordUtils.match(UserUtils.DEFAULT_ORG_USER_PASSWORD, password)) {
|
||||
this.originPassword = Boolean.FALSE;
|
||||
}
|
||||
}
|
||||
public Boolean getAdministrator(){
|
||||
return UserContextHolder.isAdministrator();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -52,6 +52,14 @@ public class UserFileController {
|
||||
return AlitaResult.success(true);
|
||||
}
|
||||
|
||||
@DeleteMapping("/remove_by_ids")
|
||||
@ApiOperation("批量删除")
|
||||
public AlitaResult<Boolean> removeByIds(@RequestBody List<Long> ids) {
|
||||
Long userId = UserContextHolder.getExistLoginUserId();
|
||||
userFileService.removeByIds(ids, userId);
|
||||
return AlitaResult.success(true);
|
||||
}
|
||||
|
||||
@PutMapping("/invalid/{id}")
|
||||
@ApiOperation("失效")
|
||||
public AlitaResult<Boolean> invalid(@PathVariable Long id) {
|
||||
|
||||
@@ -30,8 +30,9 @@ public interface UserFileMapper extends MyMapper<UserFile> {
|
||||
*
|
||||
* @param fileId 文件ID
|
||||
* @param newParentId 新父节点ID
|
||||
* @param operateUserId 操作用户ID
|
||||
*/
|
||||
void updatePathByParentIdChange(@Param("fileId") Long fileId, @Param("newParentId") Long newParentId);
|
||||
void updatePathByParentIdChange(@Param("fileId") Long fileId, @Param("newParentId") Long newParentId, @Param("operateUserId") Long operateUserId);
|
||||
|
||||
/**
|
||||
* 删除文件及其所有子文件(逻辑删除)
|
||||
|
||||
@@ -60,5 +60,8 @@ public class UserFileQueryDTO extends PageQueryDTO<UserFileDTO> {
|
||||
|
||||
@ApiModelProperty("文件种类")
|
||||
private String fileCategory;
|
||||
|
||||
@ApiModelProperty("关联查询上级不为INVALID")
|
||||
private Boolean parentNotInvalid;
|
||||
}
|
||||
|
||||
|
||||
@@ -34,6 +34,9 @@
|
||||
LEFT JOIN xs_file_record fr ON t.file_code = fr.file_code AND fr.deleted = FALSE
|
||||
LEFT JOIN x_file_category fc ON fr.file_suffix = fc.file_suffix AND fc.deleted = FALSE
|
||||
LEFT JOIN x_file_risk fk ON t.file_code = fk.file_code AND fk.deleted = FALSE
|
||||
<if test='param.parentNotInvalid != null and param.parentNotInvalid == true'>
|
||||
LEFT JOIN x_user_file parent ON t.parent_id = parent.id AND parent.deleted = FALSE
|
||||
</if>
|
||||
WHERE t.deleted = FALSE
|
||||
<if test='param.id != null'>
|
||||
AND t.id = #{param.id}
|
||||
@@ -76,6 +79,9 @@
|
||||
<if test='param.fileCategory != null and param.fileCategory.trim() != ""'>
|
||||
AND fc.file_category = #{param.fileCategory}
|
||||
</if>
|
||||
<if test='param.parentNotInvalid != null and param.parentNotInvalid == true'>
|
||||
AND (t.parent_id = 0 OR parent.file_status != '2')
|
||||
</if>
|
||||
</sql>
|
||||
|
||||
<update id="updatePathByParentIdChange">
|
||||
|
||||
@@ -82,6 +82,14 @@ public interface UserFileService {
|
||||
*/
|
||||
void remove(Long id, Long userId);
|
||||
|
||||
/**
|
||||
* 批量删除用户文件(校验用户权限)
|
||||
*
|
||||
* @param ids 主键ID列表
|
||||
* @param userId 用户ID
|
||||
*/
|
||||
void removeByIds(List<Long> ids, Long userId);
|
||||
|
||||
/**
|
||||
* 列表查询
|
||||
*
|
||||
|
||||
@@ -245,7 +245,7 @@ public class UserFileServiceImpl implements UserFileService {
|
||||
}
|
||||
|
||||
// 2.2 在SQL中一次性更新当前节点和所有子孙节点的path(SQL内部会限制相同userId和rootType)
|
||||
userFileMapper.updatePathByParentIdChange(id, newParentId);
|
||||
userFileMapper.updatePathByParentIdChange(id, newParentId, modifyDTO.getOperateUserId());
|
||||
}
|
||||
|
||||
// 3. 更新文件信息
|
||||
@@ -305,6 +305,18 @@ public class UserFileServiceImpl implements UserFileService {
|
||||
remove(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional
|
||||
public void removeByIds(List<Long> ids, Long userId) {
|
||||
Assert.notEmpty(ids, "文件ID列表不能为空");
|
||||
Assert.notNull(userId, "用户ID不能为空");
|
||||
|
||||
// 循环删除每个文件
|
||||
for (Long id : ids) {
|
||||
remove(id, userId);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<UserFileDTO> list(UserFileQueryDTO queryDTO) {
|
||||
queryDTO.disablePage();
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.senmesh.usercenter.dto;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
import com.senmesh.common.dto.BaseDTO;
|
||||
@@ -23,10 +24,12 @@ public class OrgUserEditDTO extends BaseDTO{
|
||||
private static final long serialVersionUID = -9143944005872387841L;
|
||||
|
||||
|
||||
/**
|
||||
* 昵称
|
||||
*/
|
||||
private String chineseName;
|
||||
@ApiModelProperty("昵称")
|
||||
private String nickname;
|
||||
|
||||
@ApiModelProperty("姓名")
|
||||
private String realName;
|
||||
|
||||
/**
|
||||
* 帐号
|
||||
*/
|
||||
@@ -36,8 +39,8 @@ public class OrgUserEditDTO extends BaseDTO{
|
||||
/**
|
||||
* 手机号码
|
||||
*/
|
||||
@NotNull(groups = {Update.class,Create.class}, message = "手机号码不能为空")
|
||||
private String phone;
|
||||
// @NotNull(groups = {Update.class,Create.class}, message = "手机号码不能为空")
|
||||
// private String phone;
|
||||
|
||||
/**
|
||||
* 手机号验证码
|
||||
|
||||
@@ -1,68 +0,0 @@
|
||||
package com.senmesh.usercenter.user.controller;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.PutMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import com.senmesh.common.AlitaResult;
|
||||
import com.senmesh.common.util.UserContextHolder;
|
||||
import com.senmesh.usercenter.user.dto.UserBankAccountDTO;
|
||||
import com.senmesh.usercenter.user.dto.UserBankAccountModifyDTO;
|
||||
import com.senmesh.usercenter.user.dto.UserBankAccountQueryDTO;
|
||||
import com.senmesh.usercenter.user.service.UserBankAccountService;
|
||||
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 用户银行卡表 前端控制器
|
||||
* </p>
|
||||
*
|
||||
* @author Carlye
|
||||
* @since 2021-06-25
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/user/bank_account")
|
||||
@Api(tags = "用户银行卡")
|
||||
public class UserBankAccountController {
|
||||
|
||||
@Autowired
|
||||
private UserBankAccountService userBankAccountService;
|
||||
|
||||
@ApiOperation("获取指定证件号与账户号的映射")
|
||||
@GetMapping("/card_no/map")
|
||||
public AlitaResult<Map<String,String>> queryBankAccountMap(@RequestParam("cardNos") List<String> cardNos){
|
||||
return AlitaResult.success(userBankAccountService.queryBankAccountMap(cardNos));
|
||||
}
|
||||
|
||||
@ApiOperation("列表查询")
|
||||
@GetMapping("/list")
|
||||
public AlitaResult<List<UserBankAccountDTO>> list(UserBankAccountQueryDTO userBankAccountQueryDTO){
|
||||
userBankAccountQueryDTO.setUserId(UserContextHolder.getExistLoginUserId());
|
||||
return AlitaResult.success(userBankAccountService.list(userBankAccountQueryDTO));
|
||||
}
|
||||
|
||||
@ApiOperation("修改")
|
||||
@PutMapping
|
||||
public AlitaResult<Void> modify(@Validated @RequestBody UserBankAccountModifyDTO userBankAccountModifyDTO) {
|
||||
userBankAccountService.modify(userBankAccountModifyDTO);
|
||||
return AlitaResult.success();
|
||||
}
|
||||
|
||||
@GetMapping("/{id}")
|
||||
@ApiOperation("查询单个")
|
||||
public AlitaResult<UserBankAccountDTO> get(@PathVariable Long id){
|
||||
return AlitaResult.success(userBankAccountService.get(id));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,91 +0,0 @@
|
||||
package com.senmesh.usercenter.user.controller;
|
||||
|
||||
import com.senmesh.common.validation.Create;
|
||||
import java.util.List;
|
||||
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 com.senmesh.common.validation.Update;
|
||||
import com.senmesh.common.AlitaResult;
|
||||
import com.senmesh.common.util.UserContextHolder;
|
||||
import com.senmesh.tkmybatis.pojo.Page;
|
||||
import com.senmesh.usercenter.user.dto.UserIdentityPhotoQueryDTO;
|
||||
import com.senmesh.usercenter.user.service.UserIdentityPhotoService;
|
||||
import com.senmesh.usercenter.user.dto.UserIdentityPhotoInfoDTO;
|
||||
import com.senmesh.usercenter.user.dto.UserIdentityPhotoDTO;
|
||||
import com.senmesh.usercenter.user.dto.UserIdentityPhotoOperateDTO;
|
||||
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
|
||||
/**
|
||||
* @author sr on 2021-05-24
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("user_identity_photo")
|
||||
@Api(tags = "用户证件正反面")
|
||||
public class UserIdentityPhotoController {
|
||||
|
||||
@Autowired
|
||||
private UserIdentityPhotoService userIdentityPhotoService;
|
||||
|
||||
@PostMapping("/create")
|
||||
@ApiOperation("创建")
|
||||
public AlitaResult<Long> create(
|
||||
@Validated(Create.class) @RequestBody UserIdentityPhotoOperateDTO userIdentityPhotoOperateDTO) {
|
||||
return AlitaResult.success(userIdentityPhotoService.create(userIdentityPhotoOperateDTO));
|
||||
}
|
||||
|
||||
@PutMapping("/modify")
|
||||
@ApiOperation("修改")
|
||||
public AlitaResult<Boolean> modify(
|
||||
@Validated(Update.class) @RequestBody UserIdentityPhotoOperateDTO userIdentityPhotoOperateDTO) {
|
||||
userIdentityPhotoService.modify(userIdentityPhotoOperateDTO);
|
||||
return AlitaResult.success(true);
|
||||
}
|
||||
|
||||
@DeleteMapping("/remove/{id}")
|
||||
@ApiOperation("删除")
|
||||
public AlitaResult<Boolean> remove(@PathVariable Long id) {
|
||||
userIdentityPhotoService.remove(id);
|
||||
return AlitaResult.success(true);
|
||||
}
|
||||
|
||||
@GetMapping("/get/{userId}")
|
||||
@ApiOperation("根据用户Id查询")
|
||||
public AlitaResult<UserIdentityPhotoDTO> getByUserId(@PathVariable Long userId) {
|
||||
return AlitaResult.success(userIdentityPhotoService.getByUserId(userId));
|
||||
}
|
||||
|
||||
@GetMapping("/page")
|
||||
@ApiOperation("分页查询")
|
||||
public AlitaResult<Page<UserIdentityPhotoDTO>> page(
|
||||
UserIdentityPhotoQueryDTO userIdentityPhotoQueryDTO) {
|
||||
userIdentityPhotoService.list(userIdentityPhotoQueryDTO);
|
||||
return AlitaResult.success(userIdentityPhotoQueryDTO.getPageResult());
|
||||
}
|
||||
|
||||
@GetMapping("/list")
|
||||
@ApiOperation("列表查询")
|
||||
public AlitaResult<List<UserIdentityPhotoDTO>> list(
|
||||
UserIdentityPhotoQueryDTO userIdentityPhotoQueryDTO) {
|
||||
userIdentityPhotoQueryDTO.setNeedPage(false);
|
||||
return AlitaResult.success(userIdentityPhotoService.list(userIdentityPhotoQueryDTO));
|
||||
}
|
||||
|
||||
@GetMapping("/info")
|
||||
@ApiOperation("查询详细信息")
|
||||
public AlitaResult<UserIdentityPhotoInfoDTO> findInfo() {
|
||||
return AlitaResult
|
||||
.success(userIdentityPhotoService.findInfo(UserContextHolder.getExistLoginUserId()));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,26 +0,0 @@
|
||||
package com.senmesh.usercenter.user.dao;
|
||||
|
||||
import com.senmesh.tkmybatis.mybatis.MyMapper;
|
||||
import com.senmesh.usercenter.user.dto.UserBankAccountDTO;
|
||||
import com.senmesh.usercenter.user.dto.UserBankAccountModifyDTO;
|
||||
import com.senmesh.usercenter.user.dto.UserBankAccountQueryDTO;
|
||||
import com.senmesh.usercenter.user.entity.UcUserBankAccount;
|
||||
import java.util.List;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 用户银行卡表 Mapper 接口
|
||||
* </p>
|
||||
*
|
||||
* @author Carlye
|
||||
* @since 2021-06-25
|
||||
*/
|
||||
public interface UserBankAccountMapper extends MyMapper<UcUserBankAccount> {
|
||||
|
||||
List<UserBankAccountDTO> queryByCardNos(List<String> cardNos);
|
||||
|
||||
List<UserBankAccountDTO> listUserBankAccountDTO(@Param("param") UserBankAccountQueryDTO userBankAccountQueryDTO);
|
||||
|
||||
int modify(@Param("param") UserBankAccountModifyDTO userBankAccountModifyDTO);
|
||||
}
|
||||
@@ -1,27 +0,0 @@
|
||||
package com.senmesh.usercenter.user.dao;
|
||||
|
||||
import com.senmesh.tkmybatis.mybatis.MyMapper;
|
||||
import com.senmesh.usercenter.user.dto.UserBankCardFourVerificationDTO;
|
||||
import com.senmesh.usercenter.user.dto.UserBankCardFourVerificationQueryDTO;
|
||||
import com.senmesh.usercenter.user.entity.UserBankCardFourVerification;
|
||||
import java.util.List;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
/**
|
||||
* @author czy
|
||||
* @date 2021-06-23
|
||||
*/
|
||||
public interface UserBankCardFourVerificationMapper extends MyMapper<UserBankCardFourVerification> {
|
||||
|
||||
|
||||
/**
|
||||
* 查询
|
||||
*
|
||||
* @param userBankCardFourVerificationQueryDTO
|
||||
* @return
|
||||
* @author sr on 2021-08-04
|
||||
*/
|
||||
List<UserBankCardFourVerificationDTO> listUserBankCardFourVerificationDTO(
|
||||
@Param("param") UserBankCardFourVerificationQueryDTO userBankCardFourVerificationQueryDTO);
|
||||
|
||||
}
|
||||
@@ -1,30 +0,0 @@
|
||||
package com.senmesh.usercenter.user.dao;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import com.senmesh.tkmybatis.mybatis.MyMapper;
|
||||
import com.senmesh.usercenter.user.dto.UserBankCardThreeVerificationDTO;
|
||||
import com.senmesh.usercenter.user.dto.UserBankCardThreeVerificationQueryDTO;
|
||||
import com.senmesh.usercenter.user.entity.UserBankCardThreeVerification;
|
||||
|
||||
/**
|
||||
* @author czy
|
||||
* @date 2021-06-23
|
||||
*/
|
||||
public interface UserBankCardThreeVerificationMapper
|
||||
extends MyMapper<UserBankCardThreeVerification> {
|
||||
|
||||
|
||||
/**
|
||||
* 查询
|
||||
*
|
||||
* @param userBankCardThreeVerificationQueryDTO
|
||||
* @return
|
||||
* @author sr on 2021-08-04
|
||||
*/
|
||||
List<UserBankCardThreeVerificationDTO> listUserBankCardThreeVerificationDTO(
|
||||
@Param("param") UserBankCardThreeVerificationQueryDTO userBankCardThreeVerificationQueryDTO);
|
||||
|
||||
}
|
||||
@@ -1,31 +0,0 @@
|
||||
package com.senmesh.usercenter.user.dao;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import com.senmesh.usercenter.user.dto.UserIdentityPhotoDTO;
|
||||
import com.senmesh.usercenter.user.dto.UserIdentityPhotoQueryDTO;
|
||||
import com.senmesh.usercenter.user.entity.UserIdentityPhoto;
|
||||
import com.senmesh.tkmybatis.mybatis.MyMapper;
|
||||
import org.apache.ibatis.annotations.Select;
|
||||
|
||||
/**
|
||||
* 用户证件正反面
|
||||
*
|
||||
* @author sr on 2021-05-24
|
||||
*/
|
||||
public interface UserIdentityPhotoMapper extends MyMapper<UserIdentityPhoto> {
|
||||
|
||||
/**
|
||||
* 查询
|
||||
*
|
||||
* @param userIdentityPhotoQueryDTO
|
||||
* @return
|
||||
* @author sr on 2021-05-24
|
||||
*/
|
||||
List<UserIdentityPhotoDTO> listUserIdentityPhotoDTO(@Param("param") UserIdentityPhotoQueryDTO userIdentityPhotoQueryDTO);
|
||||
|
||||
@Select("select * from uc_user_identity_photo where deleted=false and user_id=#{userId} limit 1")
|
||||
UserIdentityPhotoDTO getByUserId(@Param("userId") Long userId);
|
||||
}
|
||||
@@ -1,29 +0,0 @@
|
||||
package com.senmesh.usercenter.user.dao;
|
||||
|
||||
import com.senmesh.tkmybatis.mybatis.MyMapper;
|
||||
import com.senmesh.usercenter.user.dto.UserPhoneThreeVerificationDTO;
|
||||
import com.senmesh.usercenter.user.dto.UserPhoneThreeVerificationQueryDTO;
|
||||
import com.senmesh.usercenter.user.entity.UserPhoneThreeVerification;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author czy
|
||||
* @date 2021-06-23
|
||||
*/
|
||||
public interface UserPhoneThreeVerificationMapper
|
||||
extends MyMapper<UserPhoneThreeVerification> {
|
||||
|
||||
|
||||
/**
|
||||
* 查询
|
||||
*
|
||||
* @param userPhoneThreeVerificationQueryDTO
|
||||
* @return
|
||||
* @author sr on 2021-08-04
|
||||
*/
|
||||
List<UserPhoneThreeVerificationDTO> listUserPhoneThreeVerificationDTO(
|
||||
@Param("param") UserPhoneThreeVerificationQueryDTO userPhoneThreeVerificationQueryDTO);
|
||||
|
||||
}
|
||||
@@ -1,12 +0,0 @@
|
||||
package com.senmesh.usercenter.user.dao;
|
||||
|
||||
import com.senmesh.tkmybatis.mybatis.MyMapper;
|
||||
import com.senmesh.usercenter.user.entity.UserRealNameTwoVerification;
|
||||
|
||||
/**
|
||||
* @author fzp
|
||||
* @date 2021年7月14日10:24:46
|
||||
*/
|
||||
public interface UserRealNameTwoVerificationMapper extends MyMapper<UserRealNameTwoVerification> {
|
||||
|
||||
}
|
||||
@@ -1,44 +0,0 @@
|
||||
package com.senmesh.usercenter.user.dto;
|
||||
|
||||
import com.senmesh.common.dto.BaseOperateDTO;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.*;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ApiModel(description = "用户银行卡修改")
|
||||
@Data
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class UserBankAccountChangeReqDTO extends BaseOperateDTO{
|
||||
private static final long serialVersionUID = 6138358763847523428L;
|
||||
|
||||
@ApiModelProperty(value = "用户ID",required = true)
|
||||
@NotNull(message = "用户ID不能为空")
|
||||
private Long userId;
|
||||
|
||||
@ApiModelProperty(value = "历史银行卡号",required = true)
|
||||
@NotNull(message = "历史银行卡号不能为空")
|
||||
private String oldAccountNo;
|
||||
|
||||
@ApiModelProperty(value = "新绑银行卡号",required = true)
|
||||
@NotNull(message = "新绑银行卡号不能为空")
|
||||
private String newAccountNo;
|
||||
|
||||
@ApiModelProperty(value = "户名")
|
||||
private String accountName;
|
||||
|
||||
@ApiModelProperty(value = "银行名")
|
||||
private String bankName;
|
||||
|
||||
@ApiModelProperty(value = "开户行名")
|
||||
private String bankBranchName;
|
||||
|
||||
@ApiModelProperty(value = "是否默认账户")
|
||||
private Boolean defaultAccount;
|
||||
|
||||
}
|
||||
@@ -1,48 +0,0 @@
|
||||
package com.senmesh.usercenter.user.dto;
|
||||
|
||||
import com.senmesh.common.dto.BaseOperateDTO;
|
||||
import com.senmesh.common.validation.annotation.Expression;
|
||||
import com.senmesh.common.validation.constants.ValidProviderEnum;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.*;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ApiModel(description = "用户银行卡创建")
|
||||
@Data
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class UserBankAccountCreateReqDTO extends BaseOperateDTO{
|
||||
private static final long serialVersionUID = 6138358763847523428L;
|
||||
|
||||
@ApiModelProperty(value = "用户ID",required = true)
|
||||
private Long userId;
|
||||
|
||||
@ApiModelProperty(value = "用户身份证",required = true)
|
||||
@Expression(type = ValidProviderEnum.CARD_NO, message = "身份证号不正确")
|
||||
private String cardNo;
|
||||
|
||||
@ApiModelProperty(value = "银行卡号",required = true)
|
||||
@NotNull(message = "用户银行卡号不能为空")
|
||||
private String accountNo;
|
||||
|
||||
@ApiModelProperty(value = "户名")
|
||||
@NotBlank(message = "户名不能为空")
|
||||
private String accountName;
|
||||
|
||||
@ApiModelProperty(value = "银行名")
|
||||
private String bankName;
|
||||
|
||||
@ApiModelProperty(value = "开户行名")
|
||||
private String bankBranchName;
|
||||
|
||||
@ApiModelProperty(value = "是否默认账户")
|
||||
private Boolean defaultAccount;
|
||||
|
||||
}
|
||||
@@ -1,42 +0,0 @@
|
||||
package com.senmesh.usercenter.user.dto;
|
||||
|
||||
import com.senmesh.common.dto.BaseDTO;
|
||||
|
||||
import lombok.*;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
|
||||
/**
|
||||
* @author czy
|
||||
* @date 2021-06-29
|
||||
*/
|
||||
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@SuperBuilder
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class UserBankAccountDTO extends BaseDTO {
|
||||
|
||||
private static final long serialVersionUID = 3818282613956368311L;
|
||||
/** 用户id **/
|
||||
private Long userId;
|
||||
|
||||
/** 证件号 **/
|
||||
private String cardNo;
|
||||
|
||||
/** 卡号 **/
|
||||
private String accountNo;
|
||||
|
||||
/** 户名 **/
|
||||
private String accountName;
|
||||
|
||||
/** 银行名 **/
|
||||
private String bankName;
|
||||
|
||||
/** 开户行名 **/
|
||||
private String bankBranchName;
|
||||
|
||||
/** 是否默认账户 **/
|
||||
private Boolean defaultAccount;
|
||||
|
||||
}
|
||||
@@ -1,45 +0,0 @@
|
||||
package com.senmesh.usercenter.user.dto;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.io.Serializable;
|
||||
|
||||
|
||||
@ApiModel(description = "用户银行卡创建")
|
||||
@Data
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class UserBankAccountInfoDTO implements Serializable {
|
||||
private static final long serialVersionUID = 6138358763847523428L;
|
||||
|
||||
@ApiModelProperty(value = "ID")
|
||||
private Long id;
|
||||
|
||||
@ApiModelProperty(value = "用户ID",required = true)
|
||||
@NotNull(message = "用户ID不能为空")
|
||||
private Long userId;
|
||||
|
||||
@ApiModelProperty(value = "银行卡号",required = true)
|
||||
@NotNull(message = "用户银行卡号不能为空")
|
||||
private String accountNo;
|
||||
|
||||
@ApiModelProperty(value = "户名")
|
||||
private String accountName;
|
||||
|
||||
@ApiModelProperty(value = "银行名")
|
||||
private String bankName;
|
||||
|
||||
@ApiModelProperty(value = "开户行名")
|
||||
private String bankBranchName;
|
||||
|
||||
@ApiModelProperty(value = "是否默认账户")
|
||||
private Boolean defaultAccount;
|
||||
|
||||
}
|
||||
@@ -1,35 +0,0 @@
|
||||
package com.senmesh.usercenter.user.dto;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
import com.senmesh.common.dto.BaseOperateDTO;
|
||||
|
||||
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;
|
||||
|
||||
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ApiModel(description = "用户银行卡修改")
|
||||
@Data
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class UserBankAccountModifyDTO extends BaseOperateDTO{
|
||||
private static final long serialVersionUID = 6138358763847523428L;
|
||||
|
||||
@ApiModelProperty(value = "id",required = true)
|
||||
@NotNull(message = "id不能为空")
|
||||
private Long id;
|
||||
|
||||
@ApiModelProperty(value = "开户行名")
|
||||
private String bankBranchName;
|
||||
|
||||
@ApiModelProperty(value = "是否默认账户")
|
||||
private Boolean defaultAccount;
|
||||
|
||||
}
|
||||
@@ -1,44 +0,0 @@
|
||||
package com.senmesh.usercenter.user.dto;
|
||||
|
||||
import com.senmesh.common.dto.PageQueryDTO;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import lombok.*;
|
||||
|
||||
/**
|
||||
* @author czy
|
||||
* @date 2021-07-19
|
||||
*/
|
||||
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@Builder
|
||||
@ApiModel(description = "用户银行账户信息查询DTO")
|
||||
public class UserBankAccountQueryDTO extends PageQueryDTO<UserAuthDTO> {
|
||||
|
||||
private static final long serialVersionUID = -4199087483393678322L;
|
||||
private Long id;
|
||||
|
||||
/** 用户id **/
|
||||
private Long userId;
|
||||
|
||||
/** 卡号 **/
|
||||
private String accountNo;
|
||||
|
||||
/** 户名 **/
|
||||
private String accountName;
|
||||
|
||||
/** 银行名 **/
|
||||
private String bankName;
|
||||
|
||||
/** 开户行名 **/
|
||||
private String bankBranchName;
|
||||
|
||||
/** 是否默认账户 **/
|
||||
private Boolean defaultAccount;
|
||||
|
||||
/** 未注销用户 **/
|
||||
private Boolean unCanceledUser;
|
||||
|
||||
}
|
||||
@@ -1,42 +0,0 @@
|
||||
package com.senmesh.usercenter.user.dto;
|
||||
|
||||
import com.senmesh.common.annotation.trimAndUpper.TrimAndUpper;
|
||||
import com.senmesh.common.dto.BaseDTO;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
|
||||
/**
|
||||
* @author czy
|
||||
* @date 2021-06-23
|
||||
*/
|
||||
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@SuperBuilder
|
||||
public class UserBankCardFourVerificationDTO extends BaseDTO {
|
||||
|
||||
/** 用户Id **/
|
||||
private Long userId;
|
||||
/** 姓名 **/
|
||||
private String realName;
|
||||
/** 证件号 **/
|
||||
@TrimAndUpper
|
||||
private String cardNo;
|
||||
/** 银行卡号 **/
|
||||
@TrimAndUpper
|
||||
private String bankAccountNo;
|
||||
/** 手机号 **/
|
||||
@TrimAndUpper
|
||||
private String phone;
|
||||
/** 认证源id **/
|
||||
private Long sourceVerifyId;
|
||||
/** 状态 **/
|
||||
private Integer status;
|
||||
/** 失败原因 **/
|
||||
private String failReason;
|
||||
|
||||
}
|
||||
@@ -1,39 +0,0 @@
|
||||
package com.senmesh.usercenter.user.dto;
|
||||
|
||||
import com.senmesh.common.dto.BaseOperateDTO;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
/**
|
||||
* @author czy
|
||||
* @date 2021-07-19
|
||||
*/
|
||||
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@Builder
|
||||
@ApiModel(description = "用户四要素操作")
|
||||
public class UserBankCardFourVerificationOperateDTO extends BaseOperateDTO {
|
||||
|
||||
/** 用户Id **/
|
||||
private Long userId;
|
||||
/** 姓名 **/
|
||||
private String realName;
|
||||
/** 证件号 **/
|
||||
private String cardNo;
|
||||
/** 银行卡号 **/
|
||||
private String bankAccountNo;
|
||||
/** 手机号 **/
|
||||
private String phone;
|
||||
/** 认证源id **/
|
||||
private Long sourceVerifyId;
|
||||
/** 状态 **/
|
||||
private Integer status;
|
||||
/** 失败原因 **/
|
||||
private String failReason;
|
||||
|
||||
}
|
||||
@@ -1,41 +0,0 @@
|
||||
package com.senmesh.usercenter.user.dto;
|
||||
|
||||
import com.senmesh.common.dto.PageQueryDTO;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import java.io.Serializable;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
/**
|
||||
* @author sr on 2021-08-04
|
||||
*/
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@Builder
|
||||
@ApiModel(description = "用户四要素查询条件")
|
||||
public class UserBankCardFourVerificationQueryDTO extends PageQueryDTO<UserBankCardThreeVerificationDTO> implements Serializable{
|
||||
|
||||
/** **/
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty("id")
|
||||
private Long id;
|
||||
@ApiModelProperty("用户Id")
|
||||
private Long userId;
|
||||
@ApiModelProperty("姓名")
|
||||
private String realName;
|
||||
@ApiModelProperty("证件号")
|
||||
private String cardNo;
|
||||
@ApiModelProperty("银行卡号")
|
||||
private String bankAccountNo;
|
||||
@ApiModelProperty("手机号")
|
||||
private String phone;
|
||||
@ApiModelProperty("状态")
|
||||
private Integer status;
|
||||
|
||||
|
||||
}
|
||||
@@ -1,47 +0,0 @@
|
||||
package com.senmesh.usercenter.user.dto;
|
||||
|
||||
import com.senmesh.common.annotation.trimAndUpper.TrimAndUpper;
|
||||
import com.senmesh.common.dto.BaseOperateDTO;
|
||||
import com.senmesh.common.validation.annotation.Expression;
|
||||
import com.senmesh.common.validation.constants.ValidProviderEnum;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.*;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
|
||||
/**
|
||||
* @author czy
|
||||
* @date 2021-06-23
|
||||
*/
|
||||
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@Builder
|
||||
public class UserBankCardThreeVerificationCreateDTO extends BaseOperateDTO {
|
||||
|
||||
private static final long serialVersionUID = 2760612675601900048L;
|
||||
/** 姓名 **/
|
||||
@NotBlank(message = "姓名不能为空")
|
||||
@TrimAndUpper
|
||||
private String realName;
|
||||
/** 证件号 **/
|
||||
@TrimAndUpper
|
||||
@Expression(type = ValidProviderEnum.CARD_NO, message = "身份证号不正确")
|
||||
private String cardNo;
|
||||
/** 银行卡号 **/
|
||||
@TrimAndUpper
|
||||
@NotBlank(message = "银行卡号不能为空")
|
||||
private String bankAccountNo;
|
||||
|
||||
/** 添加卡时可以附带以下信息保存 **/
|
||||
@ApiModelProperty(value = "银行名")
|
||||
private String bankName;
|
||||
@ApiModelProperty(value = "开户行名")
|
||||
private String bankBranchName;
|
||||
@ApiModelProperty(value = "是否默认账户")
|
||||
private Boolean defaultAccount;
|
||||
|
||||
}
|
||||
@@ -1,39 +0,0 @@
|
||||
package com.senmesh.usercenter.user.dto;
|
||||
|
||||
import com.senmesh.common.annotation.trimAndUpper.TrimAndUpper;
|
||||
import com.senmesh.common.dto.BaseDTO;
|
||||
|
||||
import lombok.*;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
|
||||
/**
|
||||
* @author czy
|
||||
* @date 2021-06-23
|
||||
*/
|
||||
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@SuperBuilder
|
||||
public class UserBankCardThreeVerificationDTO extends BaseDTO {
|
||||
|
||||
private static final long serialVersionUID = 2760612675601900048L;
|
||||
/** 用户Id **/
|
||||
private Long userId;
|
||||
/** 姓名 **/
|
||||
private String realName;
|
||||
/** 证件号 **/
|
||||
@TrimAndUpper
|
||||
private String cardNo;
|
||||
/** 银行卡号 **/
|
||||
@TrimAndUpper
|
||||
private String bankAccountNo;
|
||||
/** 认证源id **/
|
||||
private Long sourceVerifyId;
|
||||
/** 状态 **/
|
||||
private Integer status;
|
||||
/** 失败原因 **/
|
||||
private String failReason;
|
||||
|
||||
}
|
||||
@@ -1,37 +0,0 @@
|
||||
package com.senmesh.usercenter.user.dto;
|
||||
|
||||
import com.senmesh.common.dto.BaseOperateDTO;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
/**
|
||||
* @author czy
|
||||
* @date 2021-07-19
|
||||
*/
|
||||
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@Builder
|
||||
@ApiModel(description = "用户三要素操作")
|
||||
public class UserBankCardThreeVerificationOperateDTO extends BaseOperateDTO {
|
||||
|
||||
/** 用户Id **/
|
||||
private Long userId;
|
||||
/** 姓名 **/
|
||||
private String realName;
|
||||
/** 证件号 **/
|
||||
private String cardNo;
|
||||
/** 银行卡号 **/
|
||||
private String bankAccountNo;
|
||||
/** 认证源id **/
|
||||
private Long sourceVerifyId;
|
||||
/** 状态 **/
|
||||
private Integer status;
|
||||
/** 失败原因 **/
|
||||
private String failReason;
|
||||
|
||||
}
|
||||
@@ -1,40 +0,0 @@
|
||||
package com.senmesh.usercenter.user.dto;
|
||||
|
||||
import com.senmesh.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-08-04
|
||||
*/
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@Builder
|
||||
@ApiModel(description = "用户三要素查询条件")
|
||||
public class UserBankCardThreeVerificationQueryDTO extends PageQueryDTO<UserBankCardThreeVerificationDTO> implements Serializable{
|
||||
|
||||
/** **/
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty("id")
|
||||
private Long id;
|
||||
@ApiModelProperty("用户Id")
|
||||
private Long userId;
|
||||
@ApiModelProperty("姓名")
|
||||
private String realName;
|
||||
@ApiModelProperty("证件号")
|
||||
private String cardNo;
|
||||
@ApiModelProperty("银行卡号")
|
||||
private String bankAccountNo;
|
||||
@ApiModelProperty("状态")
|
||||
private Integer status;
|
||||
|
||||
|
||||
}
|
||||
@@ -1,36 +0,0 @@
|
||||
package com.senmesh.usercenter.user.dto;
|
||||
|
||||
import com.senmesh.common.dto.BaseDTO;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
|
||||
/**
|
||||
* @author czy
|
||||
* @date 2021-06-22
|
||||
*/
|
||||
@ApiModel("用户信息要素认证")
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@SuperBuilder
|
||||
public class UserFactorVerifyDTO extends BaseDTO {
|
||||
|
||||
@ApiModelProperty("姓名")
|
||||
private String realName;
|
||||
@ApiModelProperty("证件号")
|
||||
private String cardNo;
|
||||
@ApiModelProperty("")
|
||||
private String bankAccountNo;
|
||||
@ApiModelProperty("")
|
||||
private String phone;
|
||||
@ApiModelProperty("")
|
||||
private Integer status;
|
||||
@ApiModelProperty("")
|
||||
private Integer authenticationSource;
|
||||
|
||||
}
|
||||
@@ -1,39 +0,0 @@
|
||||
package com.senmesh.usercenter.user.dto;
|
||||
|
||||
import com.senmesh.common.dto.BaseDTO;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
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)
|
||||
@SuperBuilder
|
||||
@Data
|
||||
@ApiModel(description = "用户证件正反面")
|
||||
public class UserIdentityPhotoDTO extends BaseDTO {
|
||||
|
||||
/** **/
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 用户id */
|
||||
private Long userId;
|
||||
/** 正面照 */
|
||||
private String frontFileCode;
|
||||
/** 反面照 */
|
||||
private String backFileCode;
|
||||
/** 状态 */
|
||||
private Integer status;
|
||||
|
||||
/** 备注(失败状态时,此处为失败原因) */
|
||||
private String remark;
|
||||
|
||||
|
||||
}
|
||||
@@ -1,58 +0,0 @@
|
||||
package com.senmesh.usercenter.user.dto;
|
||||
|
||||
import com.senmesh.common.dto.BaseDTO;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import java.util.Date;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
|
||||
/**
|
||||
* @author czy
|
||||
* @date 2021-06-11
|
||||
*/
|
||||
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@SuperBuilder
|
||||
@ApiModel("用户证件信息")
|
||||
public class UserIdentityPhotoInfoDTO extends BaseDTO {
|
||||
|
||||
@ApiModelProperty("证件照片id")
|
||||
private Long id;
|
||||
|
||||
@ApiModelProperty("用户id")
|
||||
private Long userId;
|
||||
|
||||
@ApiModelProperty("正面照片文件编码")
|
||||
private String frontFileCode;
|
||||
|
||||
@ApiModelProperty("背面照片文件编码")
|
||||
private String backFileCode;
|
||||
|
||||
@ApiModelProperty("姓名")
|
||||
private String realName;
|
||||
|
||||
@ApiModelProperty("性别(0-女 1-男)")
|
||||
private Integer gender;
|
||||
|
||||
@ApiModelProperty("年龄")
|
||||
private Integer age;
|
||||
|
||||
@ApiModelProperty("身份证号")
|
||||
private String cardNo;
|
||||
|
||||
@ApiModelProperty("身份证有效期起始日期")
|
||||
private Date idCardValidPeriodStart;
|
||||
|
||||
@ApiModelProperty("身份证有效期结束日期")
|
||||
private Date idCardValidPeriodEnd;
|
||||
|
||||
@ApiModelProperty("状态")
|
||||
private Integer status;
|
||||
|
||||
}
|
||||
@@ -1,42 +0,0 @@
|
||||
package com.senmesh.usercenter.user.dto;
|
||||
|
||||
import com.senmesh.common.dto.BaseOperateDTO;
|
||||
import com.senmesh.common.validation.Create;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import java.io.Serializable;
|
||||
import javax.validation.constraints.NotNull;
|
||||
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 UserIdentityPhotoOperateDTO extends BaseOperateDTO implements Serializable{
|
||||
|
||||
/** **/
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty("用户Id")
|
||||
private Long userId;
|
||||
|
||||
@ApiModelProperty("正面照片文件编码")
|
||||
@NotNull(message = "正面照片文件编码不能为空", groups = {Create.class})
|
||||
private String frontFileCode;
|
||||
|
||||
@ApiModelProperty("背面照片文件编码")
|
||||
@NotNull(message = "背面照片文件编码不能为空", groups = {Create.class})
|
||||
private String backFileCode;
|
||||
|
||||
@ApiModelProperty("失败原因")
|
||||
private String failReason;
|
||||
|
||||
|
||||
}
|
||||
@@ -1,37 +0,0 @@
|
||||
package com.senmesh.usercenter.user.dto;
|
||||
|
||||
import com.senmesh.common.dto.PageQueryDTO;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.*;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Set;
|
||||
|
||||
/**
|
||||
* @author sr on 2021-05-24
|
||||
*/
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@Builder
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ApiModel(description = "用户证件正反面查询条件")
|
||||
public class UserIdentityPhotoQueryDTO extends PageQueryDTO<UserIdentityPhotoDTO> implements Serializable{
|
||||
|
||||
/** **/
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty("id")
|
||||
private Long id;
|
||||
|
||||
@ApiModelProperty("用户Id")
|
||||
private Long userId;
|
||||
|
||||
@ApiModelProperty("状态")
|
||||
private Integer status;
|
||||
|
||||
@ApiModelProperty("用户Ids")
|
||||
private Set<Long> userIds;
|
||||
|
||||
}
|
||||
@@ -1,46 +0,0 @@
|
||||
package com.senmesh.usercenter.user.dto;
|
||||
|
||||
import com.senmesh.common.annotation.trimAndUpper.TrimAndUpper;
|
||||
import com.senmesh.common.dto.BaseDTO;
|
||||
import com.senmesh.common.validation.annotation.Expression;
|
||||
import com.senmesh.common.validation.constants.ValidProviderEnum;
|
||||
|
||||
import lombok.*;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
|
||||
/**
|
||||
* @author czy
|
||||
* @date 2021-06-23
|
||||
*/
|
||||
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@SuperBuilder
|
||||
public class UserPhoneThreeVerificationDTO extends BaseDTO {
|
||||
|
||||
private static final long serialVersionUID = 2760612675601900048L;
|
||||
/** 用户Id **/
|
||||
private Long userId;
|
||||
/** 姓名 **/
|
||||
@NotBlank(message = "姓名不能为空")
|
||||
private String realName;
|
||||
/** 证件号 **/
|
||||
@TrimAndUpper
|
||||
@Expression(type = ValidProviderEnum.CARD_NO, message = "身份证号不正确")
|
||||
private String cardNo;
|
||||
/** 银行卡号 **/
|
||||
@TrimAndUpper
|
||||
@NotBlank(message = "手机号不能为空")
|
||||
private String phone;
|
||||
/** 认证源id **/
|
||||
private Long sourceVerifyId;
|
||||
/** 状态 **/
|
||||
private Integer status;
|
||||
/** 失败原因 **/
|
||||
private String failReason;
|
||||
|
||||
}
|
||||
@@ -1,38 +0,0 @@
|
||||
package com.senmesh.usercenter.user.dto;
|
||||
|
||||
import com.senmesh.common.dto.BaseOperateDTO;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
/**
|
||||
* @author czy
|
||||
* @date 2021-07-19
|
||||
*/
|
||||
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@Builder
|
||||
@ApiModel(description = "用户三要素操作")
|
||||
public class UserPhoneThreeVerificationOperateDTO extends BaseOperateDTO {
|
||||
|
||||
private static final long serialVersionUID = -2410402053001109346L;
|
||||
/** 用户Id **/
|
||||
private Long userId;
|
||||
/** 姓名 **/
|
||||
private String realName;
|
||||
/** 证件号 **/
|
||||
private String cardNo;
|
||||
/** 银行卡号 **/
|
||||
private String phone;
|
||||
/** 认证源id **/
|
||||
private Long sourceVerifyId;
|
||||
/** 状态 **/
|
||||
private Integer status;
|
||||
/** 失败原因 **/
|
||||
private String failReason;
|
||||
|
||||
}
|
||||
@@ -1,38 +0,0 @@
|
||||
package com.senmesh.usercenter.user.dto;
|
||||
|
||||
import com.senmesh.common.dto.PageQueryDTO;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.*;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* @author sr on 2021-08-04
|
||||
*/
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@Builder
|
||||
@ApiModel(description = "用户三要素查询条件")
|
||||
public class UserPhoneThreeVerificationQueryDTO extends PageQueryDTO<UserBankCardThreeVerificationDTO> implements Serializable{
|
||||
|
||||
/** **/
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty("id")
|
||||
private Long id;
|
||||
@ApiModelProperty("用户Id")
|
||||
private Long userId;
|
||||
@ApiModelProperty("姓名")
|
||||
private String realName;
|
||||
@ApiModelProperty("证件号")
|
||||
private String cardNo;
|
||||
@ApiModelProperty("手机号")
|
||||
private String phone;
|
||||
@ApiModelProperty("状态")
|
||||
private Integer status;
|
||||
|
||||
|
||||
}
|
||||
@@ -1,35 +0,0 @@
|
||||
package com.senmesh.usercenter.user.dto;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
|
||||
import com.senmesh.common.annotation.trimAndUpper.TrimAndUpper;
|
||||
import com.senmesh.common.dto.BaseOperateDTO;
|
||||
import com.senmesh.common.validation.annotation.Expression;
|
||||
import com.senmesh.common.validation.constants.ValidProviderEnum;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@Builder
|
||||
public class UserRealNameTwoAuthCreateDTO extends BaseOperateDTO {
|
||||
|
||||
/** **/
|
||||
private static final long serialVersionUID = -5584391504640898412L;
|
||||
|
||||
/** 姓名 **/
|
||||
@NotBlank(message = "姓名不能为空")
|
||||
@TrimAndUpper
|
||||
private String realName;
|
||||
/** 证件号 **/
|
||||
@TrimAndUpper
|
||||
@Expression(type = ValidProviderEnum.CARD_NO, message = "身份证号不正确")
|
||||
private String cardNo;
|
||||
|
||||
}
|
||||
@@ -1,43 +0,0 @@
|
||||
package com.senmesh.usercenter.user.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.senmesh.common.entity.BaseEntity;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
|
||||
/**
|
||||
* @author czy
|
||||
* @date 2021-06-29
|
||||
*/
|
||||
|
||||
@TableName("uc_user_bank_account")
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@SuperBuilder
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class UcUserBankAccount extends BaseEntity {
|
||||
|
||||
/** 用户id **/
|
||||
private Long userId;
|
||||
|
||||
/** 卡号 **/
|
||||
private String accountNo;
|
||||
|
||||
/** 户名 **/
|
||||
private String accountName;
|
||||
|
||||
/** 银行名 **/
|
||||
private String bankName;
|
||||
|
||||
/** 开户行名 **/
|
||||
private String bankBranchName;
|
||||
|
||||
/** 是否默认账户 **/
|
||||
private Boolean defaultAccount;
|
||||
|
||||
}
|
||||
@@ -1,42 +0,0 @@
|
||||
package com.senmesh.usercenter.user.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.senmesh.common.entity.BaseEntity;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
|
||||
/**
|
||||
* @author czy
|
||||
* @date 2021-06-23
|
||||
*/
|
||||
|
||||
@TableName("uc_user_bank_card_four_verification")
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@SuperBuilder
|
||||
@Data
|
||||
public class UserBankCardFourVerification extends BaseEntity {
|
||||
|
||||
/** 用户Id **/
|
||||
private Long userId;
|
||||
/** 姓名 **/
|
||||
private String realName;
|
||||
/** 证件号 **/
|
||||
private String cardNo;
|
||||
/** 银行卡号 **/
|
||||
private String bankAccountNo;
|
||||
/** 手机号 **/
|
||||
private String phone;
|
||||
/** 认证源id **/
|
||||
private Long sourceVerifyId;
|
||||
/** 状态 **/
|
||||
private Integer status;
|
||||
/** 失败原因 **/
|
||||
private String failReason;
|
||||
|
||||
}
|
||||
@@ -1,55 +0,0 @@
|
||||
package com.senmesh.usercenter.user.entity;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.senmesh.common.entity.BaseEntity;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
/**
|
||||
* @author czy
|
||||
* @date 2021-06-23
|
||||
*/
|
||||
|
||||
@TableName("uc_user_bank_card_three_verification")
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Data
|
||||
public class UserBankCardThreeVerification extends BaseEntity {
|
||||
|
||||
/** 用户Id **/
|
||||
private Long userId;
|
||||
/** 姓名 **/
|
||||
private String realName;
|
||||
/** 证件号 **/
|
||||
private String cardNo;
|
||||
/** 银行卡号 **/
|
||||
private String bankAccountNo;
|
||||
/** 认证源id **/
|
||||
private Long sourceVerifyId;
|
||||
/** 状态 **/
|
||||
private Integer status;
|
||||
/** 失败原因 **/
|
||||
private String failReason;
|
||||
|
||||
@Builder
|
||||
public UserBankCardThreeVerification(Long id, Boolean deleted, Long createBy,
|
||||
Date createTime, Long updateBy, Date updateTime, Long proxyBy,
|
||||
Long userId, String realName, String cardNo, String bankAccountNo,
|
||||
Long sourceVerifyId, Integer status, String failReason) {
|
||||
super(id, deleted, createBy, createTime, updateBy, updateTime, proxyBy);
|
||||
this.userId = userId;
|
||||
this.realName = realName;
|
||||
this.cardNo = cardNo;
|
||||
this.bankAccountNo = bankAccountNo;
|
||||
this.sourceVerifyId = sourceVerifyId;
|
||||
this.status = status;
|
||||
this.failReason = failReason;
|
||||
}
|
||||
}
|
||||
@@ -1,39 +0,0 @@
|
||||
package com.senmesh.usercenter.user.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.senmesh.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_user_identity_photo")
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@SuperBuilder
|
||||
@Data
|
||||
public class UserIdentityPhoto extends BaseEntity {
|
||||
|
||||
/** **/
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 用户id */
|
||||
private Long userId ;
|
||||
/** 正面照 */
|
||||
private String frontFileCode ;
|
||||
/** 反面照 */
|
||||
private String backFileCode ;
|
||||
/** 状态(1-未认证 2-认证中 3-认证成功 4-认证失败) */
|
||||
private Integer status ;
|
||||
/** 失败原因 */
|
||||
private String failReason;
|
||||
|
||||
}
|
||||
@@ -1,53 +0,0 @@
|
||||
package com.senmesh.usercenter.user.entity;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.senmesh.common.entity.BaseEntity;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
/**
|
||||
* @author czy
|
||||
* @date 2021-06-23
|
||||
*/
|
||||
|
||||
@TableName("uc_user_phone_three_verification")
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Data
|
||||
public class UserPhoneThreeVerification extends BaseEntity {
|
||||
|
||||
private static final long serialVersionUID = -7530290681100657538L;
|
||||
/** 用户Id **/
|
||||
private Long userId;
|
||||
/** 姓名 **/
|
||||
private String realName;
|
||||
/** 证件号 **/
|
||||
private String cardNo;
|
||||
/** 手机号 **/
|
||||
private String phone;
|
||||
/** 认证源id **/
|
||||
private Long sourceVerifyId;
|
||||
/** 状态 **/
|
||||
private Integer status;
|
||||
/** 失败原因 **/
|
||||
private String failReason;
|
||||
|
||||
@Builder
|
||||
public UserPhoneThreeVerification(Long id, Boolean deleted, Long createBy, Date createTime, Long updateBy, Date updateTime, Long proxyBy, Long userId, String realName, String cardNo, String phone, Long sourceVerifyId, Integer status, String failReason) {
|
||||
super(id, deleted, createBy, createTime, updateBy, updateTime, proxyBy);
|
||||
this.userId = userId;
|
||||
this.realName = realName;
|
||||
this.cardNo = cardNo;
|
||||
this.phone = phone;
|
||||
this.sourceVerifyId = sourceVerifyId;
|
||||
this.status = status;
|
||||
this.failReason = failReason;
|
||||
}
|
||||
}
|
||||
@@ -1,38 +0,0 @@
|
||||
package com.senmesh.usercenter.user.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.senmesh.common.entity.BaseEntity;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
|
||||
/**
|
||||
* @author fzp
|
||||
* @date 2021年7月14日10:24:54
|
||||
*/
|
||||
|
||||
@TableName("uc_user_real_name_two_verification")
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@SuperBuilder
|
||||
@Data
|
||||
public class UserRealNameTwoVerification extends BaseEntity {
|
||||
|
||||
/** 用户Id **/
|
||||
private Long userId;
|
||||
/** 姓名 **/
|
||||
private String realName;
|
||||
/** 证件号 **/
|
||||
private String cardNo;
|
||||
/** 认证源id **/
|
||||
private Integer sourceVerifyId;
|
||||
/** 认证状态 1未认证2认证中3认证成功4认证失败 **/
|
||||
private Integer status;
|
||||
/** 失败原因 **/
|
||||
private String failReason;
|
||||
|
||||
}
|
||||
@@ -1,11 +1,14 @@
|
||||
package com.senmesh.usercenter.user.login.dto;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||
import com.senmesh.security.util.PasswordUtils;
|
||||
import com.senmesh.usercenter.user.util.UserUtils;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.*;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
import lombok.Builder.Default;
|
||||
|
||||
/**
|
||||
* 用户
|
||||
@@ -93,4 +96,15 @@ public class UserDetailDTO implements Serializable{
|
||||
@JsonIgnore
|
||||
private List<UserDetailSelectDTO> users;
|
||||
|
||||
@ApiModelProperty("是否初始密码")
|
||||
@Default
|
||||
private Boolean originPassword = Boolean.TRUE;
|
||||
|
||||
public void setPassword(String password){
|
||||
this.password = password;
|
||||
if (!PasswordUtils.match(password, UserUtils.DEFAULT_ORG_USER_PASSWORD)) {
|
||||
originPassword = Boolean.FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,82 +0,0 @@
|
||||
<?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.senmesh.usercenter.user.dao.UserBankAccountMapper">
|
||||
|
||||
<select id="queryByCardNos" resultType="com.senmesh.usercenter.user.dto.UserBankAccountDTO">
|
||||
SELECT
|
||||
uu.card_no,
|
||||
uuba.*
|
||||
FROM
|
||||
uc_user uu
|
||||
LEFT JOIN uc_user_bank_account uuba ON uuba.user_id = uu.id
|
||||
WHERE
|
||||
uu.deleted = FALSE
|
||||
AND uuba.deleted = FALSE
|
||||
AND uuba.default_account = 1
|
||||
AND uu.card_no IN
|
||||
<foreach collection="cardNos" item="cardNo" open="(" close=")" separator=",">
|
||||
#{cardNo}
|
||||
</foreach>
|
||||
</select>
|
||||
|
||||
<select id="listUserBankAccountDTO" resultType="com.senmesh.usercenter.user.dto.UserBankAccountDTO">
|
||||
SELECT
|
||||
*
|
||||
FROM
|
||||
uc_user_bank_account
|
||||
WHERE
|
||||
deleted = FALSE
|
||||
<if test="param.id != null">
|
||||
and id = #{param.id}
|
||||
</if>
|
||||
<if test="param.userId != null">
|
||||
and user_id = #{param.userId}
|
||||
</if>
|
||||
<if test="param.accountNo != null">
|
||||
and account_no = #{param.accountNo}
|
||||
</if>
|
||||
<if test="param.accountName != null">
|
||||
and account_name = #{param.accountName}
|
||||
</if>
|
||||
<if test="param.bankName != null">
|
||||
and bank_name = #{param.bankName}
|
||||
</if>
|
||||
<if test="param.bankBranchName != null">
|
||||
and bank_branch_name = #{param.bankBranchName}
|
||||
</if>
|
||||
<if test="param.defaultAccount != null">
|
||||
and default_account = #{param.defaultAccount}
|
||||
</if>
|
||||
<if test="param.unCanceledUser != null">
|
||||
and exists (
|
||||
select 1 from uc_user u
|
||||
where u.id = user_id
|
||||
and u.deleted = FALSE and u.status != 3
|
||||
)
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<update id="modify">
|
||||
update uc_user_bank_account
|
||||
<set>
|
||||
update_time = now(),
|
||||
update_by = #{param.operateUserId},
|
||||
<if test="param.defaultAccount == true">
|
||||
default_account = if(id = #{param.id}, 1, 0),
|
||||
</if>
|
||||
<if test="param.bankBranchName != null and param.bankBranchName != ''">
|
||||
bank_branch_name = #{param.bankBranchName},
|
||||
</if>
|
||||
</set>
|
||||
where user_id = #{param.operateUserId}
|
||||
and deleted = FALSE
|
||||
and (id = #{param.id}
|
||||
<if test="param.defaultAccount == true">
|
||||
or default_account = 1
|
||||
</if>
|
||||
)
|
||||
</update>
|
||||
|
||||
</mapper>
|
||||
@@ -1,38 +0,0 @@
|
||||
<?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.senmesh.usercenter.user.dao.UserBankCardFourVerificationMapper">
|
||||
|
||||
<select id="listUserBankCardFourVerificationDTO" resultType="com.senmesh.usercenter.user.dto.UserBankCardFourVerificationDTO">
|
||||
select
|
||||
*
|
||||
from uc_user_bank_card_four_verification
|
||||
where
|
||||
deleted = FALSE
|
||||
<if test="param.id != null">
|
||||
and id = #{param.id}
|
||||
</if>
|
||||
<if test="param.userId != null">
|
||||
and user_id = #{param.userId}
|
||||
</if>
|
||||
<if test="param.realName != null and param.realName != ''">
|
||||
and real_name = #{param.realName}
|
||||
</if>
|
||||
<if test="param.cardNo != null and param.cardNo != ''">
|
||||
and card_no = #{param.cardNo}
|
||||
</if>
|
||||
<if test="param.bankAccountNo != null and param.bankAccountNo != ''">
|
||||
and bank_account_no = #{param.bankAccountNo}
|
||||
</if>
|
||||
<if test="param.bankAccountNo != null and param.bankAccountNo != ''">
|
||||
and phone = #{param.phone}
|
||||
</if>
|
||||
<if test="param.status != null and param.status != ''">
|
||||
and status = #{param.status}
|
||||
</if>
|
||||
order by id desc
|
||||
</select>
|
||||
|
||||
|
||||
</mapper>
|
||||
@@ -1,35 +0,0 @@
|
||||
<?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.senmesh.usercenter.user.dao.UserBankCardThreeVerificationMapper">
|
||||
<select id="listUserBankCardThreeVerificationDTO" resultType="com.senmesh.usercenter.user.dto.UserBankCardThreeVerificationDTO">
|
||||
select
|
||||
*
|
||||
from uc_user_bank_card_three_verification
|
||||
where
|
||||
deleted = FALSE
|
||||
<if test="param.id != null">
|
||||
and id = #{param.id}
|
||||
</if>
|
||||
<if test="param.userId != null">
|
||||
and user_id = #{param.userId}
|
||||
</if>
|
||||
<if test="param.realName != null and param.realName != ''">
|
||||
and real_name = #{param.realName}
|
||||
</if>
|
||||
<if test="param.cardNo != null and param.cardNo != ''">
|
||||
and card_no = #{param.cardNo}
|
||||
</if>
|
||||
<if test="param.bankAccountNo != null and param.bankAccountNo != ''">
|
||||
and bank_account_no = #{param.bankAccountNo}
|
||||
</if>
|
||||
<if test="param.status != null and param.status != ''">
|
||||
and status = #{param.status}
|
||||
</if>
|
||||
order by id desc
|
||||
</select>
|
||||
|
||||
|
||||
|
||||
</mapper>
|
||||
@@ -1,25 +0,0 @@
|
||||
<?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.senmesh.usercenter.user.dao.UserIdentityPhotoMapper">
|
||||
<select id="listUserIdentityPhotoDTO" resultType="com.senmesh.usercenter.user.dto.UserIdentityPhotoDTO">
|
||||
select
|
||||
uip.*
|
||||
from uc_user_identity_photo uip
|
||||
where
|
||||
uip.deleted = FALSE
|
||||
<if test="param.id != null">
|
||||
and uip.id = #{param.id}
|
||||
</if>
|
||||
<if test="param.status != null">
|
||||
and uip.status = #{param.status}
|
||||
</if>
|
||||
<if test="param.userIds != null and param.userIds.size() > 0 ">
|
||||
AND uip.user_id in
|
||||
<foreach close=")" collection="param.userIds" index="index" item="userId" open="("
|
||||
separator=",">#{userId}
|
||||
</foreach>
|
||||
</if>
|
||||
</select>
|
||||
</mapper>
|
||||
@@ -102,7 +102,6 @@
|
||||
where
|
||||
id = #{operateUserId}
|
||||
and deleted = FALSE and status != 3
|
||||
and (password is null or password = '')
|
||||
</update>
|
||||
|
||||
<select id="listUserDetailDTO" resultType="com.senmesh.usercenter.user.login.dto.UserDetailDTO">
|
||||
@@ -372,6 +371,7 @@
|
||||
o.id as org_id,
|
||||
o.org_name,
|
||||
o.type as orgType,
|
||||
u.password,
|
||||
case when u.password is null or password = '' then 0 else 1 end initialedPassword,
|
||||
o.recruit_position_type
|
||||
FROM uc_user u
|
||||
|
||||
@@ -1,33 +0,0 @@
|
||||
<?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.senmesh.usercenter.user.dao.UserPhoneThreeVerificationMapper">
|
||||
<select id="listUserPhoneThreeVerificationDTO" resultType="com.senmesh.usercenter.user.dto.UserPhoneThreeVerificationDTO">
|
||||
select
|
||||
*
|
||||
from uc_user_phone_three_verification
|
||||
where
|
||||
deleted = FALSE
|
||||
<if test="param.id != null">
|
||||
and id = #{param.id}
|
||||
</if>
|
||||
<if test="param.userId != null">
|
||||
and user_id = #{param.userId}
|
||||
</if>
|
||||
<if test="param.realName != null and param.realName != ''">
|
||||
and real_name = #{param.realName}
|
||||
</if>
|
||||
<if test="param.cardNo != null and param.cardNo != ''">
|
||||
and card_no = #{param.cardNo}
|
||||
</if>
|
||||
<if test="param.phone != null and param.phone != ''">
|
||||
and phone = #{param.phone}
|
||||
</if>
|
||||
<if test="param.status != null and param.status != ''">
|
||||
and status = #{param.status}
|
||||
</if>
|
||||
order by id desc
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
@@ -1,59 +0,0 @@
|
||||
package com.senmesh.usercenter.user.mapstruct;
|
||||
|
||||
import com.senmesh.usercenter.user.dto.UserBankAccountChangeReqDTO;
|
||||
import com.senmesh.usercenter.user.dto.UserBankAccountCreateReqDTO;
|
||||
import com.senmesh.usercenter.user.dto.UserBankAccountDTO;
|
||||
import com.senmesh.usercenter.user.dto.UserBankAccountInfoDTO;
|
||||
import com.senmesh.usercenter.user.dto.UserBankCardThreeVerificationCreateDTO;
|
||||
import com.senmesh.usercenter.user.entity.UcUserBankAccount;
|
||||
import org.mapstruct.Mapper;
|
||||
import org.mapstruct.Mapping;
|
||||
import org.mapstruct.Mappings;
|
||||
import org.mapstruct.factory.Mappers;
|
||||
|
||||
|
||||
/**
|
||||
* 用户的银行账户映射映射器
|
||||
*
|
||||
* @author Carlye
|
||||
* @date 2021/06/25
|
||||
*/
|
||||
@Mapper
|
||||
public interface UserBankAccountMapMapper {
|
||||
|
||||
UserBankAccountMapMapper INSTANCE =
|
||||
Mappers.getMapper(UserBankAccountMapMapper.class);
|
||||
|
||||
|
||||
/**
|
||||
* dto转换
|
||||
* @param reqDTO 点播dto
|
||||
* @return {@link UcUserBankAccount}
|
||||
*/
|
||||
UcUserBankAccount exchange(UserBankAccountCreateReqDTO reqDTO);
|
||||
|
||||
/**
|
||||
* dto转换
|
||||
* @param reqDTO 点播dto
|
||||
* @return {@link UcUserBankAccount}
|
||||
*/
|
||||
UserBankAccountInfoDTO exchange(UserBankAccountDTO reqDTO);
|
||||
|
||||
@Mapping(source = "newAccountNo",target = "accountNo")
|
||||
UserBankAccountCreateReqDTO exchange(UserBankAccountChangeReqDTO reqDTO);
|
||||
|
||||
|
||||
/**
|
||||
* dto转换
|
||||
* @param userBankAccount 点播dto
|
||||
* @return {@link UserBankAccountCreateReqDTO}
|
||||
*/
|
||||
UserBankAccountInfoDTO exchange(UcUserBankAccount userBankAccount);
|
||||
|
||||
|
||||
@Mappings(value = {
|
||||
@Mapping(target = "accountName", source = "realName"),
|
||||
@Mapping(target = "accountNo", source = "bankAccountNo"),
|
||||
})
|
||||
UserBankAccountCreateReqDTO toDto(UserBankCardThreeVerificationCreateDTO userBankCardThreeVerificationCreateDTO);
|
||||
}
|
||||
@@ -1,41 +0,0 @@
|
||||
package com.senmesh.usercenter.user.mapstruct;
|
||||
|
||||
import org.mapstruct.Mapper;
|
||||
import org.mapstruct.factory.Mappers;
|
||||
|
||||
import com.senmesh.usercenter.user.dto.UserIdentityPhotoInfoDTO;
|
||||
import com.senmesh.usercenter.user.dto.UserIdentityPhotoDTO;
|
||||
import com.senmesh.usercenter.user.entity.UserIdentityPhoto;
|
||||
import com.senmesh.usercenter.user.dto.UserIdentityPhotoOperateDTO;
|
||||
|
||||
/**
|
||||
* @author sr on 2021-05-24
|
||||
*/
|
||||
@Mapper
|
||||
public interface UserIdentityPhotoMapMapper {
|
||||
|
||||
UserIdentityPhotoMapMapper INSTANCE =
|
||||
Mappers.getMapper(UserIdentityPhotoMapMapper.class);
|
||||
|
||||
/**
|
||||
* dto to entity
|
||||
*
|
||||
* @param userIdentityPhotoDto
|
||||
* @return
|
||||
* @author sr on 2021-05-24
|
||||
*/
|
||||
UserIdentityPhoto toEntity(
|
||||
UserIdentityPhotoDTO userIdentityPhotoDto);
|
||||
|
||||
|
||||
/**
|
||||
* @param userIdentityPhotoOperateDTO
|
||||
* @return
|
||||
* @author sr on 2021-05-24
|
||||
*/
|
||||
UserIdentityPhoto toEntity(UserIdentityPhotoOperateDTO userIdentityPhotoOperateDTO);
|
||||
|
||||
UserIdentityPhotoInfoDTO toInfo(
|
||||
UserIdentityPhotoDTO userIdentityPhotoDto);
|
||||
|
||||
}
|
||||
@@ -1,49 +0,0 @@
|
||||
package com.senmesh.usercenter.user.service;
|
||||
|
||||
import com.senmesh.usercenter.user.dto.*;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
|
||||
import javax.validation.Valid;
|
||||
import javax.validation.groups.Default;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 用户银行卡 业务逻辑
|
||||
*
|
||||
* @author Carlye
|
||||
* @date 2021/06/25
|
||||
*/
|
||||
@Validated(Default.class)
|
||||
public interface UserBankAccountService {
|
||||
|
||||
/**
|
||||
* 添加银行账户
|
||||
*
|
||||
* @param reqDTO 点播dto
|
||||
* @return {@link UserBankAccountInfoDTO}
|
||||
*/
|
||||
UserBankAccountInfoDTO addBankAccount(@Valid UserBankAccountCreateReqDTO reqDTO);
|
||||
|
||||
|
||||
/**
|
||||
* 获取身份证列表对应的银行卡号
|
||||
* @param cardNos
|
||||
* @return
|
||||
*/
|
||||
Map<String, String> queryBankAccountMap(List<String> cardNos);
|
||||
|
||||
/**
|
||||
* 获取身份证列表对应的银行卡号
|
||||
* @param userBankAccountQueryDTO
|
||||
* @return
|
||||
*/
|
||||
List<UserBankAccountDTO> list(UserBankAccountQueryDTO userBankAccountQueryDTO);
|
||||
|
||||
void page(UserBankAccountQueryDTO userBankAccountQueryDTO);
|
||||
|
||||
void modify(UserBankAccountModifyDTO userBankAccountModifyDTO);
|
||||
|
||||
UserBankAccountDTO get(Long id);
|
||||
|
||||
}
|
||||
@@ -1,60 +0,0 @@
|
||||
package com.senmesh.usercenter.user.service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.senmesh.usercenter.user.dto.UserIdentityPhotoQueryDTO;
|
||||
import com.senmesh.usercenter.user.dto.UserIdentityPhotoOperateDTO;
|
||||
import com.senmesh.usercenter.user.dto.UserIdentityPhotoDTO;
|
||||
import com.senmesh.usercenter.user.dto.UserIdentityPhotoInfoDTO;
|
||||
|
||||
/**
|
||||
* 用户证件正反面
|
||||
*
|
||||
* @author sr on 2021-05-24
|
||||
*/
|
||||
public interface UserIdentityPhotoService {
|
||||
|
||||
/**
|
||||
* 新增
|
||||
*
|
||||
* @param userIdentityPhotoOperateDTO
|
||||
* @return
|
||||
* @author sr on 2021-05-24
|
||||
*/
|
||||
Long create(UserIdentityPhotoOperateDTO userIdentityPhotoOperateDTO);
|
||||
|
||||
/**
|
||||
* 修改
|
||||
*
|
||||
* @param userIdentityPhotoOperateDTO
|
||||
* @author sr on 2021-05-24
|
||||
*/
|
||||
void modify(UserIdentityPhotoOperateDTO userIdentityPhotoOperateDTO);
|
||||
|
||||
/**
|
||||
* 删除
|
||||
*
|
||||
* @param id
|
||||
* @author sr on 2021-05-24
|
||||
*/
|
||||
void remove(Long id);
|
||||
|
||||
/**
|
||||
* 根据userId查
|
||||
* @param userId
|
||||
* @return
|
||||
*/
|
||||
UserIdentityPhotoDTO getByUserId(Long userId);
|
||||
|
||||
/**
|
||||
* 查询
|
||||
*
|
||||
* @param userIdentityPhotoQueryDTO
|
||||
* @return
|
||||
* @author sr on 2021-05-24
|
||||
*/
|
||||
List<UserIdentityPhotoDTO> list(UserIdentityPhotoQueryDTO userIdentityPhotoQueryDTO);
|
||||
|
||||
UserIdentityPhotoInfoDTO findInfo(Long userId);
|
||||
|
||||
}
|
||||
@@ -1,160 +0,0 @@
|
||||
package com.senmesh.usercenter.user.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Objects;
|
||||
import java.util.Optional;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import com.google.common.collect.Maps;
|
||||
import com.senmesh.common.exception.util.Assert;
|
||||
import com.senmesh.common.util.ListUtil;
|
||||
import com.senmesh.frame.redis.aop.annotation.AutoUnLock;
|
||||
import com.senmesh.frame.redis.dto.LockDTO;
|
||||
import com.senmesh.frame.redis.redisson.RedissonUtils;
|
||||
import com.senmesh.usercenter.user.dao.UserBankAccountMapper;
|
||||
import com.senmesh.usercenter.user.dao.UserBankCardThreeVerificationMapper;
|
||||
import com.senmesh.usercenter.user.dto.UserBankAccountCreateReqDTO;
|
||||
import com.senmesh.usercenter.user.dto.UserBankAccountDTO;
|
||||
import com.senmesh.usercenter.user.dto.UserBankAccountInfoDTO;
|
||||
import com.senmesh.usercenter.user.dto.UserBankAccountModifyDTO;
|
||||
import com.senmesh.usercenter.user.dto.UserBankAccountQueryDTO;
|
||||
import com.senmesh.usercenter.user.dto.UserDTO;
|
||||
import com.senmesh.usercenter.user.dto.UserQueryDTO;
|
||||
import com.senmesh.usercenter.user.entity.UcUserBankAccount;
|
||||
import com.senmesh.usercenter.user.mapstruct.UserBankAccountMapMapper;
|
||||
import com.senmesh.usercenter.user.service.UserBankAccountService;
|
||||
import com.senmesh.usercenter.user.service.UserService;
|
||||
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 用户银行卡表 服务实现类
|
||||
* </p>
|
||||
*
|
||||
* @author Carlye
|
||||
* @since 2021-06-25
|
||||
*/
|
||||
@Slf4j
|
||||
@Service
|
||||
@RequiredArgsConstructor(onConstructor = @__(@Autowired))
|
||||
public class UserBankAccountServiceImpl implements UserBankAccountService {
|
||||
|
||||
public static final String BIND_BANK_ACCOUNT = "bindBankAccount";
|
||||
|
||||
@Resource
|
||||
private UserBankAccountMapper userBankAccountMapper;
|
||||
|
||||
@Resource
|
||||
private UserBankCardThreeVerificationMapper userBankCardThreeVerificationMapper;
|
||||
|
||||
@Autowired
|
||||
private UserService userService;
|
||||
|
||||
@Override
|
||||
@AutoUnLock
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public UserBankAccountInfoDTO addBankAccount(UserBankAccountCreateReqDTO reqDTO) {
|
||||
List<UserDTO> list = userService.list(UserQueryDTO.builder().id(reqDTO.getUserId())
|
||||
.cardNo(reqDTO.getCardNo()).build());
|
||||
Assert.isTrue(CollectionUtils.size(list) == 1, "用户信息模糊,绑定失败");
|
||||
Long userId = list.get(0).getId();
|
||||
String accountNo = reqDTO.getAccountNo();
|
||||
Assert.isTrue(
|
||||
RedissonUtils.tryLockAutomatically(
|
||||
LockDTO.builder()
|
||||
.tryLockWaitTime(0L)
|
||||
.lockTimeout(60 * 5L)
|
||||
.methodName(BIND_BANK_ACCOUNT)
|
||||
.arg(String.valueOf(reqDTO.getUserId()))
|
||||
.arg(reqDTO.getAccountNo())
|
||||
.build()
|
||||
),
|
||||
"该用户银行卡绑定正在处理, 请稍后再试");
|
||||
List<UserBankAccountDTO> userBankAccountDTOS = list(UserBankAccountQueryDTO.builder()
|
||||
.accountNo(accountNo)
|
||||
.unCanceledUser(Boolean.TRUE)
|
||||
.build());
|
||||
UserBankAccountDTO userBankAccount = userBankAccountDTOS.isEmpty() ? null : userBankAccountDTOS.stream().findFirst().get();
|
||||
String errorMsg = null;
|
||||
if (Objects.nonNull(userBankAccount)) {
|
||||
if (userId.compareTo(userBankAccount.getUserId()) == 0) {
|
||||
// errorMsg = String.format("该[%s]银行卡已经被其他人绑定了",accountNo);
|
||||
return UserBankAccountMapMapper.INSTANCE.exchange(userBankAccount);
|
||||
} else {
|
||||
errorMsg = String.format("该银行卡[%s]已经被其他用户绑定了", accountNo);
|
||||
}
|
||||
}
|
||||
Assert.isTrue(StringUtils.isEmpty(errorMsg), errorMsg);
|
||||
|
||||
UcUserBankAccount userBankAccountEntity = UserBankAccountMapMapper.INSTANCE.exchange(reqDTO);
|
||||
userBankAccountDTOS = list(UserBankAccountQueryDTO.builder()
|
||||
.userId(userId)
|
||||
.build());
|
||||
//如不存在默认卡
|
||||
if (CollectionUtils.isEmpty(userBankAccountDTOS)) {
|
||||
userBankAccountEntity.setDefaultAccount(Boolean.TRUE);
|
||||
} else {
|
||||
// 找到默认卡
|
||||
UserBankAccountDTO userBankAccountExist = userBankAccountDTOS.stream()
|
||||
.filter(UserBankAccountDTO::getDefaultAccount)
|
||||
.findFirst().orElse(null);
|
||||
if (Objects.isNull(userBankAccountExist)) {
|
||||
userBankAccountEntity.setDefaultAccount(Boolean.TRUE);
|
||||
} else if (Boolean.TRUE.equals(userBankAccountEntity.getDefaultAccount())) { //如果需要设置默认卡
|
||||
userBankAccountMapper.updateEntitySelective(UcUserBankAccount.builder()
|
||||
.id(userBankAccountExist.getId()).defaultAccount(Boolean.FALSE).build());
|
||||
}
|
||||
}
|
||||
userBankAccountMapper.saveEntity(userBankAccountEntity);
|
||||
|
||||
return UserBankAccountMapMapper.INSTANCE.exchange(userBankAccountEntity);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, String> queryBankAccountMap(List<String> cardNos) {
|
||||
return Optional.ofNullable(userBankAccountMapper.queryByCardNos(cardNos))
|
||||
.map(list -> list.stream().collect(Collectors.toMap(UserBankAccountDTO::getCardNo, UserBankAccountDTO::getAccountNo)))
|
||||
.orElse(Maps.newHashMap());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void page(UserBankAccountQueryDTO userBankAccountQueryDTO) {
|
||||
userBankAccountMapper
|
||||
.listUserBankAccountDTO(userBankAccountQueryDTO);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<UserBankAccountDTO> list(UserBankAccountQueryDTO userBankAccountQueryDTO) {
|
||||
userBankAccountQueryDTO.disablePage();
|
||||
return userBankAccountMapper
|
||||
.listUserBankAccountDTO(userBankAccountQueryDTO);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional
|
||||
public void modify(UserBankAccountModifyDTO userBankAccountModifyDTO) {
|
||||
Long id = userBankAccountModifyDTO.getId();
|
||||
Long userId = userBankAccountModifyDTO.getOperateUserId();
|
||||
Assert.isTrue(!list(UserBankAccountQueryDTO.builder().id(id).userId(userId).build()).isEmpty(),
|
||||
"未找到对应卡记录");
|
||||
userBankAccountMapper.modify(userBankAccountModifyDTO);
|
||||
}
|
||||
|
||||
@Override
|
||||
public UserBankAccountDTO get(Long id) {
|
||||
List<UserBankAccountDTO> userBankAccountDTOs = list(UserBankAccountQueryDTO.builder().id(id).build());
|
||||
return ListUtil.first(userBankAccountDTOs);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,95 +0,0 @@
|
||||
package com.senmesh.usercenter.user.service.impl;
|
||||
|
||||
import com.senmesh.common.util.UserContextHolder;
|
||||
import com.senmesh.usercenter.user.constant.UserIdentityPhotoConstants;
|
||||
import com.senmesh.usercenter.user.dao.UserIdentityPhotoMapper;
|
||||
import com.senmesh.usercenter.user.dto.*;
|
||||
import com.senmesh.usercenter.user.entity.UserIdentityPhoto;
|
||||
import com.senmesh.usercenter.user.mapstruct.UserIdentityPhotoMapMapper;
|
||||
import com.senmesh.usercenter.user.service.UserIdentityPhotoService;
|
||||
import com.senmesh.usercenter.user.service.UserService;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author sr on 2021-05-24
|
||||
*/
|
||||
@Service
|
||||
public class UserIdentityPhotoServiceImpl implements UserIdentityPhotoService {
|
||||
|
||||
@Autowired
|
||||
private UserIdentityPhotoMapper userIdentityPhotoMapper;
|
||||
|
||||
@Autowired
|
||||
private UserService userService;
|
||||
|
||||
@Override
|
||||
public Long create(UserIdentityPhotoOperateDTO userIdentityPhotoOperateDTO) {
|
||||
Long userId = userIdentityPhotoOperateDTO.getUserId();
|
||||
if(userId == null){
|
||||
userId = UserContextHolder.getLoginUserId();
|
||||
}
|
||||
// 删除此人历史数据
|
||||
this.removeByUserId(userId);
|
||||
|
||||
UserIdentityPhoto userIdentityPhoto = UserIdentityPhotoMapMapper.INSTANCE
|
||||
.toEntity(userIdentityPhotoOperateDTO);
|
||||
userIdentityPhoto.setUserId(userId);
|
||||
//默认为未认证状态
|
||||
userIdentityPhoto.setStatus(UserIdentityPhotoConstants.PHOTO_STATUS_NOT_AUTH);
|
||||
userIdentityPhotoMapper.saveEntity(userIdentityPhoto);
|
||||
return userIdentityPhoto.getId();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void modify(UserIdentityPhotoOperateDTO userIdentityPhotoOperateDTO) {
|
||||
UserIdentityPhoto userIdentityPhoto = UserIdentityPhotoMapMapper.INSTANCE
|
||||
.toEntity(userIdentityPhotoOperateDTO);
|
||||
userIdentityPhotoMapper.updateEntitySelective(userIdentityPhoto,UserContextHolder.getLoginUserId());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void remove(Long id) {
|
||||
userIdentityPhotoMapper.deleteEntity(UserIdentityPhoto.builder().id(id).build(),
|
||||
UserContextHolder.getLoginUserId());
|
||||
}
|
||||
|
||||
private void removeByUserId(Long userId){
|
||||
UserIdentityPhotoQueryDTO userIdentityPhotoQueryDTO =
|
||||
(UserIdentityPhotoQueryDTO) UserIdentityPhotoQueryDTO.builder().userId(userId).build()
|
||||
.disablePage();
|
||||
List<UserIdentityPhotoDTO> list = this.list(userIdentityPhotoQueryDTO);
|
||||
if(CollectionUtils.isNotEmpty(list)){
|
||||
list.forEach(userIdentityPhoto -> {
|
||||
this.remove(userIdentityPhoto.getId());
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public UserIdentityPhotoDTO getByUserId(Long userId) {
|
||||
return userIdentityPhotoMapper.getByUserId(userId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<UserIdentityPhotoDTO> list(UserIdentityPhotoQueryDTO userIdentityPhotoQueryDTO) {
|
||||
return userIdentityPhotoMapper.listUserIdentityPhotoDTO(userIdentityPhotoQueryDTO);
|
||||
}
|
||||
|
||||
@Override
|
||||
public UserIdentityPhotoInfoDTO findInfo(Long userId) {
|
||||
UserIdentityPhotoDTO identityPhotoDTO = this.getByUserId(userId);
|
||||
if(identityPhotoDTO == null){
|
||||
return null;
|
||||
}
|
||||
UserIdentityPhotoInfoDTO infoDto = UserIdentityPhotoMapMapper.INSTANCE.toInfo(identityPhotoDTO);
|
||||
UserDTO userDTO = userService.get(userId);
|
||||
infoDto.setRealName(userDTO.getRealName());
|
||||
infoDto.setCardNo(userDTO.getCardNo());
|
||||
return infoDto;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -897,6 +897,7 @@ public class UserServiceImpl implements UserService {
|
||||
//是否已经有重名
|
||||
Assert.isTrue(!userMapper.existUsername(username, orgUserEditDTO.getId()),
|
||||
"账号已存在!");
|
||||
user.setUsername(username);
|
||||
|
||||
if (StringUtils.isNotBlank(orgUserEditDTO.getEmail())) {
|
||||
boolean emailFlag = ValidateUtils.checkEmail(orgUserEditDTO.getEmail());
|
||||
@@ -904,22 +905,25 @@ public class UserServiceImpl implements UserService {
|
||||
}
|
||||
user.setEmail(orgUserEditDTO.getEmail());
|
||||
|
||||
boolean nicknameFlag = ValidateUtils.checkNickName(orgUserEditDTO.getChineseName());
|
||||
if (StringUtils.isNotBlank(orgUserEditDTO.getNickname())) {
|
||||
boolean nicknameFlag = ValidateUtils.checkNickName(orgUserEditDTO.getNickname());
|
||||
Assert.isTrue(nicknameFlag, "中文名格式错误!(长度小于32位,不支持特殊字符)");
|
||||
user.setNickname(orgUserEditDTO.getChineseName());
|
||||
user.setNickname(orgUserEditDTO.getNickname());
|
||||
}
|
||||
user.setRealName(orgUserEditDTO.getRealName());
|
||||
|
||||
// 用户名上锁
|
||||
LockDTO lockDTO = UserServiceImpl.getUsernameLockDTO(username);
|
||||
Assert.isTrue(RedissonUtils.tryLockAutomatically(lockDTO), "当前用户名正在操作");
|
||||
|
||||
//手机号码有变化则更新
|
||||
String phone = orgUserEditDTO.getPhone();
|
||||
/* String phone = orgUserEditDTO.getPhone();
|
||||
if (!Objects.equals(phone, userDto.getPhone())) {
|
||||
lockAndCheck(userDto.getType(), phone);
|
||||
user.setPhone(orgUserEditDTO.getPhone());
|
||||
//代管操作,更新手机号码后,恢复到未绑定状态
|
||||
user.setPhoneBinding(Boolean.FALSE);
|
||||
}
|
||||
}*/
|
||||
user.setEnabled(orgUserEditDTO.getEnabled());
|
||||
return userMapper.updateEntitySelective(user) == 1;
|
||||
}
|
||||
|
||||
@@ -21,6 +21,7 @@ public class UserUtils {
|
||||
public static final int NICKNAME_LENGTH = 12;
|
||||
|
||||
public static final String DEFAULT_AVATAR_KEY = "user.default.avatars";
|
||||
public static final String DEFAULT_ORG_USER_PASSWORD = "Qaz123567!@#";
|
||||
|
||||
/**
|
||||
* 设置创建用户初始状态数据 (账号随机生成/非超管/非实名/待激活/已启用-登录相关)
|
||||
@@ -51,8 +52,8 @@ public class UserUtils {
|
||||
public static void setInitUserNameAndPasswordToCreateUser(User user, Boolean administrator) {
|
||||
//创建用户的时候就给手机号绑定状态改为已绑定
|
||||
user.setPhoneBinding(true);
|
||||
user.setUsername("ou"+user.getPhone());
|
||||
user.setPassword(PasswordUtils.encode("ou123567"));
|
||||
user.setUsername(user.getPhone());
|
||||
user.setPassword(PasswordUtils.encode(DEFAULT_ORG_USER_PASSWORD));
|
||||
}
|
||||
|
||||
public static String dealNickname(String nickname, String phone) {
|
||||
|
||||
Reference in New Issue
Block a user