| | |
| | | import com.dsh.course.feignClient.account.model.TAppUser; |
| | | import com.dsh.course.feignClient.activity.CouponClient; |
| | | import com.dsh.course.feignClient.activity.model.*; |
| | | import com.dsh.course.feignClient.other.model.Site; |
| | | import com.dsh.guns.config.UserExt; |
| | | import com.dsh.guns.core.base.tips.SuccessTip; |
| | | import com.dsh.guns.core.common.constant.factory.PageFactory; |
| | |
| | | private TOperatorService operatorService; |
| | | @Autowired |
| | | private TOperatorCityService operatorCityService; |
| | | @Autowired |
| | | private ITSiteService siteService; |
| | | |
| | | /** |
| | | * 跳转到优惠券管理首页 |
| | |
| | | @RequestMapping("/updateType") |
| | | @ResponseBody |
| | | public Object updateType(Long id) { |
| | | client.updateType(id); |
| | | if (UserExt.getUser().getObjectType()==1){ |
| | | client.updateType(id); |
| | | } |
| | | if (UserExt.getUser().getObjectType()!=1){ |
| | | if (UserExt.getUser().getObjectType()==2){ |
| | | TStore tStore = storeService.getById(UserExt.getUser().getObjectId()); |
| | | client.updateTypeOther(id,tStore.getOperatorId()==null?0:tStore.getOperatorId(), |
| | | tStore.getId(),0); |
| | | } |
| | | if (UserExt.getUser().getObjectType()==3){ |
| | | TSite site = siteService.getById(UserExt.getUser().getObjectId()); |
| | | TStore tStore = storeService.getById(site.getStoreId()); |
| | | client.updateTypeOther(id,tStore.getOperatorId()==null?0:tStore.getOperatorId(), |
| | | tStore.getId(),site.getId()); |
| | | } |
| | | } |
| | | |
| | | return new SuccessTip<>(); |
| | | } |
| | | |