|
|
@@ -82,7 +82,7 @@ public class GroupRelationController {
|
|
|
|
|
|
private final UserBindRelationService userBindRelationService;
|
|
|
|
|
|
- private final ChatGptPwdViewRecordMapper chatGptPwdViewRecordMapper;
|
|
|
+ private final TicketPwdViewRecordMapper ticketPwdViewRecordMapper;
|
|
|
|
|
|
private final HttpServletRequest request;
|
|
|
|
|
|
@@ -210,13 +210,15 @@ public class GroupRelationController {
|
|
|
}
|
|
|
if (groupsRelationView.getAccountId() == null) throw BusinessRuntimeException.getInstance("该车队未配置账号");
|
|
|
if (groupRelationFrontService == null) throw BusinessRuntimeException.getInstance("车票已不存在");
|
|
|
- ChatGptPwdViewRecord viewRecord = new ChatGptPwdViewRecord();
|
|
|
+ TicketPwdViewRecord viewRecord = new TicketPwdViewRecord();
|
|
|
viewRecord.setUserId(userId);
|
|
|
viewRecord.setRelationId(relationId);
|
|
|
viewRecord.setSkuId(groupsRelationView.getSkuId());
|
|
|
viewRecord.setOperateLocation(StringUtil.getRealAddressByIP(ServletUtil.getClientIP(request)));
|
|
|
- chatGptPwdViewRecordMapper.insert(viewRecord);
|
|
|
- if (StrUtil.isEmpty(groupsRelationView.getApiSecret())) {
|
|
|
+ viewRecord.setAccount(groupsRelationView.getTripsAccount());
|
|
|
+ viewRecord.setPassword(groupsRelationView.getTripsPassword());
|
|
|
+ ticketPwdViewRecordMapper.insert(viewRecord);
|
|
|
+ if (groupsRelationView.getGoodsId() == 18 && StrUtil.isEmpty(groupsRelationView.getApiSecret())) {
|
|
|
THREAD_POOL.execute(() -> {
|
|
|
//车队所有人查看密码
|
|
|
Integer num = groupsRelationView.getGtNum();
|
|
|
@@ -263,7 +265,8 @@ public class GroupRelationController {
|
|
|
.eq(DoubleVerifyClickRecord::getAccountId, groupsRelationView.getAccountId())
|
|
|
.between(DoubleVerifyClickRecord::getCreatedTime, DateUtil.beginOfMonth(now), DateUtil.endOfMonth(now)));
|
|
|
//获取双重验证码
|
|
|
- Integer num = groupRelationFrontService.getUserCodeNumBySkuId(userId, groupsRelationView.getSkuId());
|
|
|
+ Boolean isHasVerifyCode = StrUtil.isNotBlank(groupsRelationView.getVerifyCode()) ? true : false;
|
|
|
+ Integer num = groupRelationFrontService.getUserCodeNumBySkuId(userId, groupsRelationView.getSkuId(), isHasVerifyCode);
|
|
|
if (count >= num) throw BusinessRuntimeException.getInstance("获取双重验证码次数上限");
|
|
|
//一分钟内 只能一人获取
|
|
|
boolean b = redisService.setNx(RedisService.key.DOUBLE_VERIFY_CODE_VIEW_MINUTES_KEY.getEnvName() + groupsRelationView.getTripsAccount(), relationId, RedisService.key.DOUBLE_VERIFY_CODE_VIEW_MINUTES_KEY.getTimeout());
|