Browse Source

no message

FengChaoYu 6 days ago
parent
commit
99b5166f65

+ 4 - 4
mall-miniapp-service/src/main/java/com/gree/mall/miniapp/logic/acitivy/PromotionActivityLogic.java

@@ -71,16 +71,16 @@ 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("活动未生效");
         }