|
|
|
@@ -7,6 +7,7 @@ import com.iformall.common.ResultData; |
|
|
|
import com.iformall.controller.base.BaseController; |
|
|
|
import com.iformall.domain.po.WxCouponSendConfig; |
|
|
|
import com.iformall.enums.EnumCouponSendSendType; |
|
|
|
import com.iformall.enums.EnumValidStatus; |
|
|
|
import com.iformall.service.WxCouponSendConfigService; |
|
|
|
import io.swagger.annotations.Api; |
|
|
|
import io.swagger.annotations.ApiOperation; |
|
|
|
@@ -38,8 +39,13 @@ public class WxCouponSendConfigController extends BaseController { |
|
|
|
PageInfo<WxCouponSendConfig> page = wxCouponSendConfigService.listAsPage(wxCouponSendConfig, 1, 1); |
|
|
|
if (page.getSize() > 0) { |
|
|
|
return new ResultData(page.getList().get(0)); |
|
|
|
} else { |
|
|
|
//配置不存在,添加默认配置(停用) |
|
|
|
wxCouponSendConfig.setRemark(EnumCouponSendSendType.getEnum(wxCouponSendConfig.getSendType()).getMessage() + "开关"); |
|
|
|
wxCouponSendConfig.setValue(1); |
|
|
|
wxCouponSendConfigService.saveOrUpdate(wxCouponSendConfig); |
|
|
|
return new ResultData(wxCouponSendConfig); |
|
|
|
} |
|
|
|
return new ResultData(); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|