Bladeren bron

no message

FengChaoYu 5 dagen geleden
bovenliggende
commit
b60f229341

+ 5 - 4
mall-server-api/src/main/java/com/gree/mall/manager/logic/activity/PromotionActivityLogic.java

@@ -96,16 +96,17 @@ public class PromotionActivityLogic {
             throw new RemoteServiceException("客户电话不能为空");
         }
 
-        if (StringUtils.isBlank(bean.getUserAddress())) {
-            throw new RemoteServiceException("客户地址不能为空");
-        }
-
         if (CollectionUtil.isEmpty(bean.getItems())) {
             throw new RemoteServiceException("报名信息不能为空");
         }
 
         final PromotionQuestionnaire questionnaire = promotionQuestionnaireService.getById(bean.getPromotionQuestionnaireId());
 
+
+        if (questionnaire.getEnablePosition() && StringUtils.isBlank(bean.getUserAddress())) {
+            throw new RemoteServiceException("客户地址不能为空");
+        }
+
         if (DateUtil.date().getTime() < questionnaire.getStartTime().getTime()) {
             throw new RemoteServiceException("活动未生效");
         }