| @@ -15,6 +15,7 @@ import com.iformall.domain.po.WxCouponChannel; | |||||
| import com.iformall.domain.po.base.TenantEntity; | import com.iformall.domain.po.base.TenantEntity; | ||||
| import com.iformall.domain.vo.WxCouponChannelVo; | import com.iformall.domain.vo.WxCouponChannelVo; | ||||
| import com.iformall.enums.*; | import com.iformall.enums.*; | ||||
| import com.iformall.exception.MallinkException; | |||||
| import com.iformall.service.WxCampaignService; | import com.iformall.service.WxCampaignService; | ||||
| import com.iformall.service.WxCouponChannelService; | import com.iformall.service.WxCouponChannelService; | ||||
| import com.iformall.service.WxCouponService; | import com.iformall.service.WxCouponService; | ||||
| @@ -83,7 +84,11 @@ public class WxCampaignController extends BaseController { | |||||
| if(wxCampaign.getPlat() == null){ | if(wxCampaign.getPlat() == null){ | ||||
| wxCampaign.setPlat(EnumAppPlat.WX.getCode()); | wxCampaign.setPlat(EnumAppPlat.WX.getCode()); | ||||
| } | } | ||||
| return wxCampaignService.saveOrUpdate(wxCampaign); | |||||
| try{ | |||||
| return wxCampaignService.saveOrUpdate(wxCampaign); | |||||
| }catch(MallinkException e){ | |||||
| return new ResultData(e.getErrorCode(),e.getMessage()); | |||||
| } | |||||
| } | } | ||||
| @ApiOperation(value = "新增接口-小程序路径", notes = "produceType,produceId,pagePath,pageScene必填") | @ApiOperation(value = "新增接口-小程序路径", notes = "produceType,produceId,pagePath,pageScene必填") | ||||
| @@ -127,7 +132,11 @@ public class WxCampaignController extends BaseController { | |||||
| if(wxCampaign.getPlat() == null){ | if(wxCampaign.getPlat() == null){ | ||||
| wxCampaign.setPlat(EnumAppPlat.WX.getCode()); | wxCampaign.setPlat(EnumAppPlat.WX.getCode()); | ||||
| } | } | ||||
| return wxCampaignService.saveOrUpdate(wxCampaign); | |||||
| try{ | |||||
| return wxCampaignService.saveOrUpdate(wxCampaign); | |||||
| }catch(MallinkException e){ | |||||
| return new ResultData(e.getErrorCode(),e.getMessage()); | |||||
| } | |||||
| } | } | ||||
| @ApiOperation("根据id更新接口") | @ApiOperation("根据id更新接口") | ||||
| @@ -10,6 +10,7 @@ import com.iformall.controller.base.BaseController; | |||||
| import com.iformall.domain.po.base.BaseEntity; | import com.iformall.domain.po.base.BaseEntity; | ||||
| import com.iformall.domain.po.WxGame; | import com.iformall.domain.po.WxGame; | ||||
| import com.iformall.enums.EnumGameStatus; | import com.iformall.enums.EnumGameStatus; | ||||
| import com.iformall.exception.MallinkException; | |||||
| import com.iformall.service.WxGameService; | import com.iformall.service.WxGameService; | ||||
| import io.swagger.annotations.Api; | import io.swagger.annotations.Api; | ||||
| import io.swagger.annotations.ApiImplicitParam; | import io.swagger.annotations.ApiImplicitParam; | ||||
| @@ -65,8 +66,13 @@ public class WxGameController extends BaseController { | |||||
| } | } | ||||
| wxGame.setStatus(EnumGameStatus.STATUS_THROW_IN.getCode()); | wxGame.setStatus(EnumGameStatus.STATUS_THROW_IN.getCode()); | ||||
| wxGame.updateTenantInfo(getTenantInfo()); | wxGame.updateTenantInfo(getTenantInfo()); | ||||
| wxGameService.saveOrUpdate(wxGame); | |||||
| return new ResultData(); | |||||
| try{ | |||||
| wxGameService.saveOrUpdate(wxGame); | |||||
| return new ResultData(); | |||||
| }catch(MallinkException e){ | |||||
| return new ResultData(e.getErrorCode(),e.getMessage()); | |||||
| } | |||||
| } | } | ||||
| @ApiOperation("根据id更新接口") | @ApiOperation("根据id更新接口") | ||||
| @@ -86,8 +92,12 @@ public class WxGameController extends BaseController { | |||||
| } | } | ||||
| } | } | ||||
| wxGame.updateTenantInfo(getTenantInfo()); | wxGame.updateTenantInfo(getTenantInfo()); | ||||
| wxGameService.saveOrUpdate(wxGame); | |||||
| return new ResultData(); | |||||
| try{ | |||||
| wxGameService.saveOrUpdate(wxGame); | |||||
| return new ResultData(); | |||||
| }catch(MallinkException e){ | |||||
| return new ResultData(e.getErrorCode(),e.getMessage()); | |||||
| } | |||||
| } | } | ||||
| @ApiOperation("根据id删除接口") | @ApiOperation("根据id删除接口") | ||||
| @@ -8,6 +8,7 @@ import com.iformall.controller.base.BaseController; | |||||
| import com.iformall.domain.po.*; | import com.iformall.domain.po.*; | ||||
| import com.iformall.enums.EnumWxTopicStatus; | import com.iformall.enums.EnumWxTopicStatus; | ||||
| import com.iformall.enums.EnumWxTopicType; | import com.iformall.enums.EnumWxTopicType; | ||||
| import com.iformall.exception.MallinkException; | |||||
| import com.iformall.service.*; | import com.iformall.service.*; | ||||
| import io.swagger.annotations.Api; | import io.swagger.annotations.Api; | ||||
| import io.swagger.annotations.ApiImplicitParam; | import io.swagger.annotations.ApiImplicitParam; | ||||
| @@ -72,7 +73,12 @@ public class WxTopicController extends BaseController { | |||||
| if(wxTopic.getTopicType() == null){ | if(wxTopic.getTopicType() == null){ | ||||
| wxTopic.setTopicType(EnumWxTopicType.SPECIAL_TOPIC.getCode()); | wxTopic.setTopicType(EnumWxTopicType.SPECIAL_TOPIC.getCode()); | ||||
| } | } | ||||
| return wxTopicService.saveOrUpdate(wxTopic); | |||||
| try{ | |||||
| return wxTopicService.saveOrUpdate(wxTopic); | |||||
| }catch(MallinkException e){ | |||||
| return new ResultData(e.getErrorCode(),e.getMessage()); | |||||
| } | |||||
| } | } | ||||
| @GetMapping("findByType") | @GetMapping("findByType") | ||||
| @@ -101,7 +107,11 @@ public class WxTopicController extends BaseController { | |||||
| if(StringUtils.isBlank(wxTopic.getName())){ | if(StringUtils.isBlank(wxTopic.getName())){ | ||||
| return new ResultData(ErrorCode.SYS_PARAMETER_ERROR); | return new ResultData(ErrorCode.SYS_PARAMETER_ERROR); | ||||
| } | } | ||||
| return wxTopicService.saveOrUpdate(wxTopic); | |||||
| try{ | |||||
| return wxTopicService.saveOrUpdate(wxTopic); | |||||
| }catch(MallinkException e){ | |||||
| return new ResultData(e.getErrorCode(),e.getMessage()); | |||||
| } | |||||
| } | } | ||||
| } | } | ||||