fix bug 如果会议费用为0则不可上传收款二维码
This commit is contained in:
+7
-5
@@ -47,6 +47,7 @@ import org.jetbrains.annotations.NotNull;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
@@ -209,7 +210,6 @@ public class PayMeetingServiceImpl extends ServiceImpl<PayMeetingMapper, PayMeet
|
||||
|
||||
@NotNull
|
||||
private PayMeeting getPayMeeting(PayMeetingVO payMeetingVO, List<PayMeetingHotelContacts> hotelContactsList) {
|
||||
List<String> errorMsgList = new ArrayList<>();
|
||||
PayMeeting payMeeting = new PayMeeting();
|
||||
//判断会议名称
|
||||
String meetingName = payMeetingVO.getMeetingName();
|
||||
@@ -239,6 +239,12 @@ public class PayMeetingServiceImpl extends ServiceImpl<PayMeetingMapper, PayMeet
|
||||
payMeetingVO.setDirectorName(loginUser.getUsername());
|
||||
payMeetingVO.setDirectorPhone(loginUser.getPhone());
|
||||
}
|
||||
//如果会议费用为0则不可上传收款二维码
|
||||
if (payMeetingVO.getMeetingCosts().compareTo(BigDecimal.ZERO) < 1){
|
||||
if (StringUtils.isNotBlank(payMeetingVO.getPaymentQrCode())){
|
||||
throw new JeroBootException("会议费用为0时,不可上传收款二维码");
|
||||
}
|
||||
}
|
||||
|
||||
//根据会议类型进行校验
|
||||
switch (meetingType) {
|
||||
@@ -301,10 +307,6 @@ public class PayMeetingServiceImpl extends ServiceImpl<PayMeetingMapper, PayMeet
|
||||
default:
|
||||
}
|
||||
|
||||
|
||||
if (!errorMsgList.isEmpty()){
|
||||
throw new JeroBootException(errorMsgList.toString());
|
||||
}
|
||||
BeanUtils.copyProperties(payMeetingVO,payMeeting);
|
||||
return payMeeting;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user