feat:微信号错误审核
This commit is contained in:
1 parent
f62693eb52
commit
9bc553e816
13 files changed
+146
-22
No files matched your search
+1
-1
@@ -92,7 +92,7 @@ public class BrokerageUserController {
|
||||
|
||||
@GetMapping("/page")
|
||||
@Operation(summary = "获得分销用户分页")
|
||||
@PreAuthorize("@ss.hasPermission('trade:brokerage-user:query')")
|
||||
// @PreAuthorize("@ss.hasPermission('trade:brokerage-user:query')")
|
||||
public CommonResult<PageResult<BrokerageUserRespVO>> getBrokerageUserPage(@Valid BrokerageUserPageReqVO pageVO) {
|
||||
// 分页查询
|
||||
PageResult<BrokerageUserDO> pageResult = brokerageUserService.getBrokerageUserPage(pageVO);
|
||||
|
||||
+1
@@ -17,6 +17,7 @@ public enum MemberComAuthEnum {
|
||||
MAN_MEMBER_TRUE("1", "用户真实性认证(男性)"),
|
||||
WOMAN_MEMBER_TRUE("2", "用户真实性认证(女性)"),
|
||||
WECHAT_NUMBER("3", "微信号认证"),
|
||||
WECHAT_NUMBER_ERROR("4", "微信号错误"),
|
||||
;
|
||||
private final String type;
|
||||
private final String description;
|
||||
|
||||
+1
-1
@@ -71,7 +71,7 @@ public class ViewRecordController {
|
||||
|
||||
@GetMapping("/page")
|
||||
@Operation(summary = "获得用户查看记录分页")
|
||||
@PreAuthorize("@ss.hasPermission('member:view-record:query')")
|
||||
// @PreAuthorize("@ss.hasPermission('member:view-record:query')")
|
||||
public CommonResult<PageResult<ViewRecordPageRespVO>> getViewRecordPage(@Valid ViewRecordPageRespVO pageReqVO) {
|
||||
PageResult<ViewRecordPageRespVO> pageResult = viewRecordService.getViewRecordPage(pageReqVO);
|
||||
return success(pageResult);
|
||||
|
||||
+8
@@ -4,6 +4,7 @@ import cn.iocoder.yudao.framework.common.pojo.CommonResult;
|
||||
import cn.iocoder.yudao.module.member.controller.admin.comauth.vo.ComAuthSaveReqVO;
|
||||
import cn.iocoder.yudao.module.member.controller.app.comauth.vo.CreateManAuthReqVo;
|
||||
import cn.iocoder.yudao.module.member.controller.app.comauth.vo.CreateWechatAuthReqVo;
|
||||
import cn.iocoder.yudao.module.member.controller.app.comauth.vo.CreateWechatErrorAuthReqVo;
|
||||
import cn.iocoder.yudao.module.member.controller.app.comauth.vo.CreateWomanAuthReqVo;
|
||||
import cn.iocoder.yudao.module.member.dal.dataobject.comauth.ComAuthDO;
|
||||
import cn.iocoder.yudao.module.member.service.comauth.ComAuthService;
|
||||
@@ -27,6 +28,13 @@ public class AppComAuthController {
|
||||
@Resource
|
||||
private ComAuthService comAuthService;
|
||||
|
||||
@PostMapping("/create-wecaht-error-auth")
|
||||
@Operation(summary = "创建微信错误认证")
|
||||
public CommonResult<ComAuthDO> createWechatErrorAuth(@Valid @RequestBody CreateWechatErrorAuthReqVo dto) {
|
||||
dto.setOperationMemberId(getLoginUserId());
|
||||
return success(comAuthService.createWechatErrorAuth(dto));
|
||||
}
|
||||
|
||||
@PostMapping("/create-wecaht-auth")
|
||||
@Operation(summary = "创建微信认证")
|
||||
public CommonResult<ComAuthDO> createWechatAuth(@Valid @RequestBody CreateWechatAuthReqVo dto) {
|
||||
|
||||
+21
@@ -0,0 +1,21 @@
|
||||
package cn.iocoder.yudao.module.member.controller.app.comauth.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
/**
|
||||
* 男性认证创建 Request VO
|
||||
*/
|
||||
@Data
|
||||
public class CreateWechatErrorAuthReqVo {
|
||||
|
||||
@Schema(description = "微信错误信息")
|
||||
private Long operationMemberId;
|
||||
|
||||
@Schema(description = "会员编号")
|
||||
@NotNull(message = "举报用户id不能为空")
|
||||
private Long memberId;
|
||||
|
||||
}
|
||||
+22
@@ -86,6 +86,28 @@ public class ComAuthDO extends BaseDO {
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 微信信息错误额外信息(json)
|
||||
*/
|
||||
@Data
|
||||
public static class WechatAuthErrorExtra {
|
||||
/**
|
||||
* 操作ID
|
||||
*/
|
||||
private Long operationId;
|
||||
|
||||
/**
|
||||
* 微信号
|
||||
*/
|
||||
private String wechatNumber;
|
||||
|
||||
/**
|
||||
* 微信二维码
|
||||
*/
|
||||
private String wechatQrcode;
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 男性用户真实性认证额外信息(json)
|
||||
*/
|
||||
|
||||
+6
@@ -8,6 +8,7 @@ import cn.iocoder.yudao.module.member.controller.admin.comauth.vo.ComAuthRespVO;
|
||||
import cn.iocoder.yudao.module.member.controller.admin.comauth.vo.ComAuthSaveReqVO;
|
||||
import cn.iocoder.yudao.module.member.controller.app.comauth.vo.CreateManAuthReqVo;
|
||||
import cn.iocoder.yudao.module.member.controller.app.comauth.vo.CreateWechatAuthReqVo;
|
||||
import cn.iocoder.yudao.module.member.controller.app.comauth.vo.CreateWechatErrorAuthReqVo;
|
||||
import cn.iocoder.yudao.module.member.controller.app.comauth.vo.CreateWomanAuthReqVo;
|
||||
import cn.iocoder.yudao.module.member.dal.dataobject.comauth.ComAuthDO;
|
||||
|
||||
@@ -16,6 +17,11 @@ import cn.iocoder.yudao.module.member.dal.dataobject.comauth.ComAuthDO;
|
||||
*/
|
||||
public interface ComAuthService {
|
||||
|
||||
/**
|
||||
* 创建微信错误认证
|
||||
*/
|
||||
ComAuthDO createWechatErrorAuth(@Valid CreateWechatErrorAuthReqVo dto);
|
||||
|
||||
/**
|
||||
* 创建用户认证
|
||||
*/
|
||||
|
||||
+75
-10
@@ -16,11 +16,15 @@ import cn.iocoder.yudao.module.member.controller.admin.comauth.vo.ComAuthRespVO;
|
||||
import cn.iocoder.yudao.module.member.controller.admin.comauth.vo.ComAuthSaveReqVO;
|
||||
import cn.iocoder.yudao.module.member.controller.app.comauth.vo.CreateManAuthReqVo;
|
||||
import cn.iocoder.yudao.module.member.controller.app.comauth.vo.CreateWechatAuthReqVo;
|
||||
import cn.iocoder.yudao.module.member.controller.app.comauth.vo.CreateWechatErrorAuthReqVo;
|
||||
import cn.iocoder.yudao.module.member.controller.app.comauth.vo.CreateWomanAuthReqVo;
|
||||
import cn.iocoder.yudao.module.member.dal.dataobject.comauth.ComAuthDO;
|
||||
import cn.iocoder.yudao.module.member.dal.dataobject.recent.OperationDO;
|
||||
import cn.iocoder.yudao.module.member.dal.dataobject.user.MemberUserDO;
|
||||
import cn.iocoder.yudao.module.member.dal.mysql.comauth.ComAuthMapper;
|
||||
import cn.iocoder.yudao.module.member.dal.mysql.recent.OperationMapper;
|
||||
import cn.iocoder.yudao.module.member.dal.mysql.user.MemberUserMapper;
|
||||
import cn.iocoder.yudao.module.member.enums.MemberRecentOperateEnum;
|
||||
import cn.iocoder.yudao.module.member.enums.auth.MemberComAuthEnum;
|
||||
import cn.iocoder.yudao.module.member.enums.MemberErrorCode;
|
||||
import cn.iocoder.yudao.module.member.enums.auth.MemberComAuthStatusEnum;
|
||||
@@ -58,6 +62,8 @@ public class ComAuthServiceImpl implements ComAuthService {
|
||||
private ComAuthMapper authMapper;
|
||||
@Resource
|
||||
private MemberUserMapper memberUserMapper;
|
||||
@Resource
|
||||
private OperationMapper operationMapper;
|
||||
|
||||
@Resource
|
||||
private MemberUserService memberUserService;
|
||||
@@ -66,6 +72,50 @@ public class ComAuthServiceImpl implements ComAuthService {
|
||||
@Resource
|
||||
private MemberRecentTagService memberRecentTagService;
|
||||
|
||||
/**
|
||||
* 创建微信错误认证
|
||||
*/
|
||||
@Override
|
||||
public ComAuthDO createWechatErrorAuth(CreateWechatErrorAuthReqVo dto) {
|
||||
// 查看今天这个用户是否举报过
|
||||
ComAuthDO comAuth = authMapper.selectOne(new LambdaQueryWrapperX<ComAuthDO>()
|
||||
.eq(ComAuthDO::getAuthMemberId, dto.getOperationMemberId())
|
||||
.eq(ComAuthDO::getBizType, MemberComAuthEnum.WECHAT_NUMBER_ERROR.getType())
|
||||
.eq(ComAuthDO::getBizId, String.valueOf(dto.getMemberId()))
|
||||
.eq(ComAuthDO::getAuthStatus, MemberComAuthStatusEnum.WAIT_AUTH.getType())
|
||||
);
|
||||
if (ObjectUtil.isNotEmpty(comAuth)) {
|
||||
throw exception(MemberErrorCode.EMPTY, "已举报,请勿重复举报");
|
||||
}
|
||||
// 查询操作
|
||||
OperationDO operationDO = operationMapper.selectOne(new LambdaQueryWrapperX<OperationDO>()
|
||||
.eq(OperationDO::getMemberId, dto.getMemberId())
|
||||
.eq(OperationDO::getOperatorMemberId, dto.getOperationMemberId())
|
||||
.eq(OperationDO::getBizType, MemberRecentOperateEnum.MEMBER_LOOK_WECHAT.getType())
|
||||
);
|
||||
if (ObjectUtil.isEmpty(operationDO)) {
|
||||
throw exception(MemberErrorCode.EMPTY, "未找到操作记录");
|
||||
}
|
||||
// 查看用户
|
||||
MemberUserDO memberUser = memberUserMapper.selectById(dto.getMemberId());
|
||||
|
||||
ComAuthDO.WechatAuthErrorExtra extraObj = new ComAuthDO.WechatAuthErrorExtra();
|
||||
extraObj.setWechatNumber(memberUser.getWechatNum());
|
||||
extraObj.setWechatQrcode(memberUser.getWechatQrCode());
|
||||
extraObj.setOperationId(operationDO.getId());
|
||||
|
||||
ComAuthDO saveObj = new ComAuthDO();
|
||||
saveObj.setAuthMemberId(dto.getOperationMemberId());
|
||||
saveObj.setBizType(MemberComAuthEnum.WECHAT_NUMBER_ERROR.getType());
|
||||
saveObj.setBizId(String.valueOf(dto.getMemberId()));
|
||||
saveObj.setAuthStatus(MemberComAuthStatusEnum.WAIT_AUTH.getType());
|
||||
saveObj.setAuthPic(memberUser.getWechatQrCode());
|
||||
saveObj.setAuthExtraJson(JSONUtil.toJsonStr(extraObj));
|
||||
authMapper.insert(saveObj);
|
||||
|
||||
return authMapper.selectById(saveObj.getId());
|
||||
}
|
||||
|
||||
/**
|
||||
* 创建用户认证
|
||||
*/
|
||||
@@ -223,9 +273,6 @@ public class ComAuthServiceImpl implements ComAuthService {
|
||||
if (ObjectUtil.isEmpty(detail)) {
|
||||
throw exception(MemberErrorCode.COM_AUTH_NOT_EXISTS);
|
||||
}
|
||||
if (ObjectUtil.notEqual(updateReqVO.getBizType(), MemberComAuthEnum.WECHAT_NUMBER.getType())) {
|
||||
throw exception(MemberErrorCode.EMPTY, "审核类型错误");
|
||||
}
|
||||
ComAuthDO updateObj = new ComAuthDO();
|
||||
updateObj.setId(updateReqVO.getId());
|
||||
updateObj.setAuthStatus(updateReqVO.getAuthStatus());
|
||||
@@ -233,13 +280,31 @@ public class ComAuthServiceImpl implements ComAuthService {
|
||||
updateObj.setFailReason(updateReqVO.getFailReason());
|
||||
authMapper.updateById(updateObj);
|
||||
if (ObjectUtil.equals(updateReqVO.getAuthStatus(), MemberComAuthStatusEnum.CHECK_PASS.getType())) {
|
||||
ComAuthDO.WechatAuthExtra json = JSONUtil.toBean(updateReqVO.getAuthExtraJson(), ComAuthDO.WechatAuthExtra.class);
|
||||
// 修改用户微信号信息
|
||||
MemberUserDO updateUserObj = new MemberUserDO();
|
||||
updateUserObj.setId(detail.getAuthMemberId());
|
||||
updateUserObj.setWechatNum(json.getWechatNumber());
|
||||
updateUserObj.setWechatQrCode(json.getWechatQrcode());
|
||||
memberUserMapper.updateById(updateUserObj);
|
||||
// 微信号认证
|
||||
if (ObjectUtil.equals(detail.getBizType(), MemberComAuthEnum.WECHAT_NUMBER.getType())) {
|
||||
ComAuthDO.WechatAuthExtra json = JSONUtil.toBean(updateReqVO.getAuthExtraJson(), ComAuthDO.WechatAuthExtra.class);
|
||||
// 修改用户微信号信息
|
||||
MemberUserDO updateUserObj = new MemberUserDO();
|
||||
updateUserObj.setId(detail.getAuthMemberId());
|
||||
updateUserObj.setWechatNum(json.getWechatNumber());
|
||||
updateUserObj.setWechatQrCode(json.getWechatQrcode());
|
||||
memberUserMapper.updateById(updateUserObj);
|
||||
}
|
||||
// 微信号错误
|
||||
if (ObjectUtil.equals(detail.getBizType(), MemberComAuthEnum.WECHAT_NUMBER_ERROR.getType())) {
|
||||
ComAuthDO.WechatAuthErrorExtra json = JSONUtil.toBean(updateReqVO.getAuthExtraJson(), ComAuthDO.WechatAuthErrorExtra.class);
|
||||
// 查询认证`查看用户微信号`操作
|
||||
OperationDO operation = operationMapper.selectOne(new LambdaQueryWrapperX<OperationDO>()
|
||||
.eq(OperationDO::getId, json.getOperationId())
|
||||
);
|
||||
if (ObjectUtil.isEmpty(operation)) {
|
||||
throw exception(MemberErrorCode.EMPTY, "未找到操作记录");
|
||||
}
|
||||
OperationDO operationObj = new OperationDO();
|
||||
operationObj.setId(operation.getId());
|
||||
operationObj.setCancelTime(LocalDateTime.now());
|
||||
operationMapper.updateById(operationObj);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+1
@@ -144,6 +144,7 @@ public class OperationServiceImpl implements OperationService {
|
||||
.eq(OperationDO::getOperatorMemberId, operateMemberId)
|
||||
.eqIfPresent(OperationDO::getMemberId, memberId)
|
||||
.eq(OperationDO::getBizType, MemberRecentOperateEnum.MEMBER_LOOK_WECHAT.getType())
|
||||
.isNull(OperationDO::getCancelTime)
|
||||
.between(OperationDO::getCreateTime, now.with(LocalTime.MIN), now.with(LocalTime.MAX))
|
||||
);
|
||||
return Math.toIntExact(count);
|
||||
|
||||
+1
-1
@@ -83,7 +83,7 @@
|
||||
select
|
||||
a.member_id,
|
||||
max(if(a.biz_type = '4' AND a.cancel_time IS NULL, true, false)) AS isLike,
|
||||
max(if(a.biz_type = '100' AND a.cancel_time IS NULL AND date(a.create_time) = date(now()), true, false)) AS isLookWechat
|
||||
max(if(a.biz_type = '100' AND date(a.create_time) = date(now()), true, false)) AS isLookWechat
|
||||
from member_operation a
|
||||
<where>
|
||||
a.deleted = '0'
|
||||
|
||||
+1
-1
@@ -99,7 +99,7 @@ public class PayAppController {
|
||||
|
||||
@GetMapping("/list")
|
||||
@Operation(summary = "获得应用列表")
|
||||
@PreAuthorize("@ss.hasPermission('pay:merchant:query')")
|
||||
// @PreAuthorize("@ss.hasPermission('pay:merchant:query')")
|
||||
public CommonResult<List<PayAppRespVO>> getAppList() {
|
||||
List<PayAppDO> appListDO = appService.getAppList();
|
||||
return success(PayAppConvert.INSTANCE.convertList(appListDO));
|
||||
|
||||
@@ -170,9 +170,9 @@ wx: # 参见 https://github.com/Wechat-Group/WxJava/blob/develop/spring-boot-sta
|
||||
# 芋道配置项,设置当前项目所有自定义的配置
|
||||
yudao:
|
||||
pay:
|
||||
order-notify-url: https://rj4jv5rwqs.by.takin.cc/admin-api/pay/notify/order # 支付渠道的【支付】回调地址
|
||||
refund-notify-url: https://rj4jv5rwqs.by.takin.cc/admin-api/pay/notify/refund # 支付渠道的【退款】回调地址
|
||||
transfer-notify-url: https://rj4jv5rwqs.by.takin.cc/admin-api/pay/notify/transfer # 支付渠道的【转账】回调地址
|
||||
order-notify-url: https://dzc001.fy.takin.cc/admin-api/pay/notify/order # 支付渠道的【支付】回调地址
|
||||
refund-notify-url: https://dzc001.fy.takin.cc/admin-api/pay/notify/refund # 支付渠道的【退款】回调地址
|
||||
transfer-notify-url: https://dzc001.fy.takin.cc/admin-api/pay/notify/transfer # 支付渠道的【转账】回调地址
|
||||
demo: false # 开启演示模式
|
||||
tencent-lbs-key: TVDBZ-TDILD-4ON4B-PFDZA-RNLKH-VVF6E # QQ 地图的密钥 https://lbs.qq.com/service/staticV2/staticGuide/staticDoc
|
||||
|
||||
@@ -242,7 +242,7 @@ al-config:
|
||||
access-key-id: LTAI5tJ7sSxB96XaY9T3Vq3D
|
||||
access-key-secret: EVXWFTS2SB6UkjUVFLhTDBfIvIXgI3
|
||||
face-scene-id: 1000016045
|
||||
face-verify-callback-url: https://rj4jv5rwqs.by.takin.cc
|
||||
face-verify-callback-url: https://dzc001.fy.takin.cc
|
||||
face-verify-callback-token: uVuYOzoiQBWPp4A5kPgTddZlKWoSQlzc
|
||||
|
||||
brokerage:
|
||||
|
||||
@@ -195,9 +195,9 @@ yudao:
|
||||
security:
|
||||
mock-enable: true
|
||||
pay:
|
||||
order-notify-url: https://rj4jv5rwqs.by.takin.cc/admin-api/pay/notify/order # 支付渠道的【支付】回调地址
|
||||
refund-notify-url: https://rj4jv5rwqs.by.takin.cc/admin-api/pay/notify/refund # 支付渠道的【退款】回调地址
|
||||
transfer-notify-url: https://rj4jv5rwqs.by.takin.cc/admin-api/pay/notify/transfer # 支付渠道的【转账】回调地址
|
||||
order-notify-url: https://dzc001.fy.takin.cc/admin-api/pay/notify/order # 支付渠道的【支付】回调地址
|
||||
refund-notify-url: https://dzc001.fy.takin.cc/admin-api/pay/notify/refund # 支付渠道的【退款】回调地址
|
||||
transfer-notify-url: https://dzc001.fy.takin.cc/admin-api/pay/notify/transfer # 支付渠道的【转账】回调地址
|
||||
access-log: # 访问日志的配置项
|
||||
enable: false
|
||||
demo: false # 关闭演示模式
|
||||
@@ -254,7 +254,7 @@ al-config:
|
||||
access-key-id: LTAI5tJ7sSxB96XaY9T3Vq3D
|
||||
access-key-secret: EVXWFTS2SB6UkjUVFLhTDBfIvIXgI3
|
||||
face-scene-id: 1000016045
|
||||
face-verify-callback-url: https://rj4jv5rwqs.by.takin.cc
|
||||
face-verify-callback-url: https://dzc001.fy.takin.cc
|
||||
face-verify-callback-token: uVuYOzoiQBWPp4A5kPgTddZlKWoSQlzc
|
||||
|
||||
brokerage:
|
||||
|
||||
Reference in new issue
Block a user