add 国际研讨会校验邀请码
This commit is contained in:
+1
@@ -117,6 +117,7 @@ public class ShiroConfig {
|
||||
filterChainDefinitionMap.put("/meeting/payMeeting/createBase64","anon");//生成二维码
|
||||
//不需要权限的接口
|
||||
filterChainDefinitionMap.put("/meeting/payMeetingSituation/signUp","anon");//报名
|
||||
filterChainDefinitionMap.put("/meeting/payMeetingSituation/validInvitationCode","anon");//报名
|
||||
filterChainDefinitionMap.put("/meeting/payMeeting/queryById","anon");//会议详情
|
||||
filterChainDefinitionMap.put("/sys/common/upload","anon");//上传文件
|
||||
filterChainDefinitionMap.put("/sys/dict/getDictItems/**","anon");//数据字典
|
||||
|
||||
+18
-1
@@ -22,7 +22,9 @@ import com.jero.company.entity.PayContactsManagement;
|
||||
import com.jero.company.service.IPayCompanyManagementService;
|
||||
import com.jero.company.service.IPayContactsManagementService;
|
||||
import com.jero.meeting.common.MeetingCommon;
|
||||
import com.jero.meeting.entity.PayMeeting;
|
||||
import com.jero.meeting.entity.PayMeetingSituation;
|
||||
import com.jero.meeting.service.IPayMeetingService;
|
||||
import com.jero.meeting.service.IPayMeetingSituationService;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
@@ -41,6 +43,8 @@ import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import com.jero.common.aspect.annotation.AutoLog;
|
||||
|
||||
import static org.jeecg.modules.jmreport.desreport.b.b.i;
|
||||
|
||||
|
||||
/**
|
||||
* @description: 参会人员信息
|
||||
@@ -61,7 +65,8 @@ public class PayMeetingSituationController extends JeroController<PayMeetingSitu
|
||||
private IPayContactsManagementService contactsManagementService;
|
||||
@Resource
|
||||
private IPayCompanyManagementService companyManagementService;
|
||||
|
||||
@Resource
|
||||
private IPayMeetingService payMeetingService;
|
||||
private final Integer MEETING_TYPE = null;
|
||||
|
||||
/**
|
||||
@@ -359,4 +364,16 @@ public class PayMeetingSituationController extends JeroController<PayMeetingSitu
|
||||
payMeetingSituationService.editGuestInfo(payMeetingSituation);
|
||||
return Result.OK("修改成功");
|
||||
}
|
||||
|
||||
/**
|
||||
* 校验国际研讨会邀请码
|
||||
*/
|
||||
@ApiOperation(value = "校验国际研讨会邀请码")
|
||||
@GetMapping(value = "/validInvitationCode")
|
||||
public Result<?> validInvitationCode(@RequestParam(name = "meetingId") String meetingId,
|
||||
@RequestParam(name = "randomCode") String randomCode){
|
||||
PayMeeting payMeeting = payMeetingService.getById(meetingId);
|
||||
Integer integer = payMeetingSituationService.validInvitationCode(payMeeting, randomCode, false);
|
||||
return Result.OK("校验成功");
|
||||
}
|
||||
}
|
||||
|
||||
+4
-1
@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.jero.common.api.vo.Result;
|
||||
import com.jero.meeting.entity.PayMeeting;
|
||||
import com.jero.meeting.entity.PayMeetingSituation;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.jero.meeting.vo.*;
|
||||
@@ -56,7 +57,9 @@ public interface IPayMeetingSituationService extends IService<PayMeetingSituatio
|
||||
|
||||
boolean signUp(PayMeetingSituation payMeetingSituation);
|
||||
|
||||
void check(CheckVO checkVO);
|
||||
Integer validInvitationCode(PayMeeting payMeeting, String invitationCode, Boolean useFlag);
|
||||
|
||||
void check(CheckVO checkVO);
|
||||
|
||||
void checkRegister(CheckVO checkVO);
|
||||
|
||||
|
||||
+14
-5
@@ -118,22 +118,31 @@ public class PayRandomCodeService extends ServiceImpl<PayRandomCodeMapper, PayRa
|
||||
return randomCodeLinkList;
|
||||
}
|
||||
}
|
||||
public Integer validCode(String meetingId, Integer guestType, String randomCode){
|
||||
|
||||
/**
|
||||
* 校验随机码
|
||||
*/
|
||||
public Integer validCode(String meetingId, Integer guestType, String randomCode, Boolean useFlag){
|
||||
LambdaQueryWrapper<PayRandomCode> wrapper = new LambdaQueryWrapper<>();
|
||||
wrapper.eq(PayRandomCode::getMeetingId,meetingId);
|
||||
wrapper.eq(PayRandomCode::getGuestType,guestType);
|
||||
PayRandomCode payRandomCode = randomCodeMapper.selectOne(wrapper);
|
||||
|
||||
if (payRandomCode == null){
|
||||
throw new JeroBootException("邀请码无效");
|
||||
}
|
||||
LambdaQueryWrapper<PayRandomCodeLink> wrapper1 = new LambdaQueryWrapper<>();
|
||||
wrapper1.eq(PayRandomCodeLink::getRandomCodeId,payRandomCode.getRandomCodeId());
|
||||
wrapper1.eq(PayRandomCodeLink::getUseFlag, CommonConstant.DEL_FLAG_0);
|
||||
wrapper1.eq(PayRandomCodeLink::getRandomCode,randomCode);
|
||||
Integer integer = randomCodeLinkMapper.selectCount(wrapper1);
|
||||
if (integer == 0){
|
||||
PayRandomCodeLink randomCodeLink = randomCodeLinkMapper.selectOne(wrapper1);
|
||||
if (randomCodeLink == null){
|
||||
throw new JeroBootException("邀请码无效");
|
||||
}else {
|
||||
if (useFlag){
|
||||
randomCodeLink.setUseFlag(CommonConstant.DEL_FLAG_1);
|
||||
randomCodeLinkMapper.updateById(randomCodeLink);
|
||||
}
|
||||
return guestType;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
+7
-6
@@ -318,7 +318,7 @@ public class PayMeetingSituationServiceImpl extends ServiceImpl<PayMeetingSituat
|
||||
String invitationCode = payMeetingSituation.getInvitationCode();
|
||||
if (meetingType.equals(Integer.parseInt(MeetingCommon.INTERNATIONAL_MEETING)) &&
|
||||
StrUtil.isNotBlank(invitationCode)) {
|
||||
Integer guestType = validInvitationCode(payMeeting, invitationCode);
|
||||
Integer guestType = validInvitationCode(payMeeting, invitationCode, true);
|
||||
payMeetingSituation.setGuestType(guestType);
|
||||
payMeetingSituation.setIdentity(MeetingSubitemCommon.JIA_BIN);
|
||||
}
|
||||
@@ -339,7 +339,8 @@ public class PayMeetingSituationServiceImpl extends ServiceImpl<PayMeetingSituat
|
||||
/**
|
||||
* 校验国际研讨会邀请码
|
||||
*/
|
||||
private Integer validInvitationCode(PayMeeting payMeeting, String invitationCode) {
|
||||
@Override
|
||||
public Integer validInvitationCode(PayMeeting payMeeting, String invitationCode, Boolean useFlag) {
|
||||
String meetingId = payMeeting.getId();
|
||||
String vipInvitationCode = payMeeting.getVipInvitationCode();
|
||||
String speakerInvitationCode = payMeeting.getSpeakerInvitationCode();
|
||||
@@ -349,13 +350,13 @@ public class PayMeetingSituationServiceImpl extends ServiceImpl<PayMeetingSituat
|
||||
String code = split[0];
|
||||
String randomCode = split[1];
|
||||
if (code.equals(vipInvitationCode)) {
|
||||
return randomCodeService.validCode(meetingId, MeetingSubitemCommon.VIP, randomCode);
|
||||
return randomCodeService.validCode(meetingId, MeetingSubitemCommon.VIP, randomCode, useFlag);
|
||||
} else if (code.equals(speakerInvitationCode)) {
|
||||
return randomCodeService.validCode(meetingId, MeetingSubitemCommon.SPEAKER, randomCode);
|
||||
return randomCodeService.validCode(meetingId, MeetingSubitemCommon.SPEAKER, randomCode, useFlag);
|
||||
} else if (code.equals(guestInvitationCode)) {
|
||||
return randomCodeService.validCode(meetingId, MeetingSubitemCommon.GUEST, randomCode);
|
||||
return randomCodeService.validCode(meetingId, MeetingSubitemCommon.GUEST, randomCode, useFlag);
|
||||
} else if (code.equals(cooperativeInvitationCode)) {
|
||||
return randomCodeService.validCode(meetingId, MeetingSubitemCommon.COOPERATIVE, randomCode);
|
||||
return randomCodeService.validCode(meetingId, MeetingSubitemCommon.COOPERATIVE, randomCode, useFlag);
|
||||
} else {
|
||||
throw new JeroBootException("邀请码无效");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user