Browse Source

运营活动开发

liweifan 3 years ago
parent
commit
7630f92e4f

+ 1 - 3
cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/service/impl/ActivityPlanServiceImpl.java

@@ -20,6 +20,7 @@ import com.yonge.cooleshow.biz.dal.dto.search.ActivityPlanSearch;
 import com.yonge.cooleshow.biz.dal.entity.*;
 import com.yonge.cooleshow.biz.dal.entity.*;
 import com.yonge.cooleshow.biz.dal.enums.*;
 import com.yonge.cooleshow.biz.dal.enums.*;
 import com.yonge.cooleshow.biz.dal.service.*;
 import com.yonge.cooleshow.biz.dal.service.*;
+import com.yonge.cooleshow.biz.dal.support.WrapperUtil;
 import com.yonge.cooleshow.biz.dal.vo.*;
 import com.yonge.cooleshow.biz.dal.vo.*;
 import com.yonge.cooleshow.biz.dal.vo.res.OrderCreateRes;
 import com.yonge.cooleshow.biz.dal.vo.res.OrderCreateRes;
 import com.yonge.cooleshow.common.entity.HttpResponseResult;
 import com.yonge.cooleshow.common.entity.HttpResponseResult;
@@ -274,9 +275,6 @@ public class ActivityPlanServiceImpl extends ServiceImpl<ActivityPlanDao, Activi
             if (StringUtil.isEmpty(activityPlan.getPlanStandard().getCondition())) {
             if (StringUtil.isEmpty(activityPlan.getPlanStandard().getCondition())) {
                 throw new BizException("达标条件不能为空");
                 throw new BizException("达标条件不能为空");
             }
             }
-            if (StringUtil.isEmpty(activityPlan.getPlanStandard().getCalculationMethod())) {
-                throw new BizException("计算方式不能为空");
-            }
         }
         }
 
 
         if (null == activityPlan.getActivityClient()) {
         if (null == activityPlan.getActivityClient()) {

+ 4 - 0
cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/service/impl/ActivityPlanStandardServiceImpl.java

@@ -49,6 +49,10 @@ public class ActivityPlanStandardServiceImpl extends ServiceImpl<ActivityPlanSta
     @Override
     @Override
     public boolean createOrUpdate(ActivityPlanDto activityPlan) {
     public boolean createOrUpdate(ActivityPlanDto activityPlan) {
         ActivityPlanStandard planExpand = activityPlan.getPlanStandard();
         ActivityPlanStandard planExpand = activityPlan.getPlanStandard();
+        if (null == planExpand.getCalculationMethod()) {
+            planExpand.setCalculationMethod(ConditionMethodEnum.AND);
+        }
+
         if (null == planExpand.getId()) {
         if (null == planExpand.getId()) {
             planExpand.setId(activityPlan.getId());
             planExpand.setId(activityPlan.getId());
             planExpand.setCreateBy(activityPlan.getUserId());
             planExpand.setCreateBy(activityPlan.getUserId());