From 52e0ad7f25ca50e375bce10e47c9e30f3d39bdb2 Mon Sep 17 00:00:00 2001 From: tangxiaobao <303826152@qq.com> Date: 星期六, 04 九月 2021 16:27:27 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/test' into txb --- springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActReserveServiceImpl.java | 28 ++++++++++++++++------------ 1 files changed, 16 insertions(+), 12 deletions(-) diff --git a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActReserveServiceImpl.java b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActReserveServiceImpl.java index 36461f5..aed1afb 100644 --- a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActReserveServiceImpl.java +++ b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActReserveServiceImpl.java @@ -84,12 +84,13 @@ if(comActReserveDO!=null){ //查询当前用户是否已预约并判断是否能继续预约 if(comActReserveDO.getJoinAllCount()!=0){ - Integer count=comActReserveRecordMapper.selectCount(new QueryWrapper<ComActReserveRecordDO>().eq("reserve_id",comActReserveCommitVO.getId())); + Integer count=comActReserveRecordMapper.selectCount(new QueryWrapper<ComActReserveRecordDO>() + .eq("reserve_id",comActReserveCommitVO.getId()) + .eq("status",ComActReserveRecordDO.status.cg)); if(count>=comActReserveDO.getJoinAllCount()){ return R.fail("预约已上限"); } } - List<ComActReserveRecordDO> list=comActReserveRecordMapper.selectList(new QueryWrapper<ComActReserveRecordDO>().eq("reserve_id",comActReserveCommitVO.getId()).eq("user_id",comActReserveCommitVO.getUserId()).in("status",1,2,3)); if(!list.isEmpty()&&list.size()>1&&comActReserveDO.getIsRepeat()==ComActReserveDO.isRepeat.no){ @@ -156,16 +157,19 @@ answerContentList.add(answerContentDO); } }else{ - //问答题处理 - String values = questnaiteSub.getValues(); - ComActReserveAnswerContentDO answerContentDO = new ComActReserveAnswerContentDO(); - answerContentDO.setUserId(userId); - answerContentDO.setCreateAt(nowDate); - answerContentDO.setCreateBy(userId); - answerContentDO.setReserveSubId(queSubId); - answerContentDO.setType(2); - answerContentDO.setAnswerContent(values); - answerContentList.add(answerContentDO); + //文字描述不做处理 + if(!questnaiteSub.getType().equals(QuestnaiteSubVO.type.describe)){ + //问答题处理 + String values = questnaiteSub.getValues(); + ComActReserveAnswerContentDO answerContentDO = new ComActReserveAnswerContentDO(); + answerContentDO.setUserId(userId); + answerContentDO.setCreateAt(nowDate); + answerContentDO.setCreateBy(userId); + answerContentDO.setReserveSubId(queSubId); + answerContentDO.setType(2); + answerContentDO.setAnswerContent(values); + answerContentList.add(answerContentDO); + } } } if(!answerContentList.isEmpty()){ -- Gitblit v1.7.1