From b1fb83530b7105e4aa73e4101727dea945eb01c2 Mon Sep 17 00:00:00 2001 From: 无关风月 <443237572@qq.com> Date: 星期五, 29 八月 2025 21:48:15 +0800 Subject: [PATCH] bug修改 --- cloud-server-management/src/main/java/com/dsh/guns/modular/system/controller/code/TCouponController.java | 37 +++++++++++++++++++++++++++++++------ 1 files changed, 31 insertions(+), 6 deletions(-) diff --git a/cloud-server-management/src/main/java/com/dsh/guns/modular/system/controller/code/TCouponController.java b/cloud-server-management/src/main/java/com/dsh/guns/modular/system/controller/code/TCouponController.java index 42e6f5c..4370fa7 100644 --- a/cloud-server-management/src/main/java/com/dsh/guns/modular/system/controller/code/TCouponController.java +++ b/cloud-server-management/src/main/java/com/dsh/guns/modular/system/controller/code/TCouponController.java @@ -11,10 +11,8 @@ import com.dsh.course.feignClient.account.model.QueryByNamePhone; import com.dsh.course.feignClient.account.model.TAppUser; import com.dsh.course.feignClient.activity.CouponClient; -import com.dsh.course.feignClient.activity.model.Coupon; -import com.dsh.course.feignClient.activity.model.CouponCity; -import com.dsh.course.feignClient.activity.model.CouponListOfSearch; -import com.dsh.course.feignClient.activity.model.CouponRecordQuery; +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; @@ -68,6 +66,8 @@ private TOperatorService operatorService; @Autowired private TOperatorCityService operatorCityService; + @Autowired + private ITSiteService siteService; /** * 跳转到优惠券管理首页 @@ -85,7 +85,9 @@ public String memberCouponAdd(Model model) { Integer objectType = UserExt.getUser().getObjectType(); System.out.println(objectType); + List<PointsMerchandise> pointsMerchandises = client.goodsList(); model.addAttribute("userType",objectType); + model.addAttribute("goods",pointsMerchandises); return PREFIX + "TCouponAdd.html"; } @@ -165,10 +167,17 @@ System.out.println(objectType); model.addAttribute("item",coupon); model.addAttribute("objectType",objectType); + List<PointsMerchandise> pointsMerchandises = client.goodsList(); + model.addAttribute("goods",pointsMerchandises); return PREFIX + "TCouponInfo.html"; } - + // 积分商品活动状态 未开始和已开始状态 上架 + @RequestMapping("/goodsList") + @ResponseBody + public Object goodsList() { + return client.goodsList(); + } /** * 跳转到门店管理列表页 @@ -180,7 +189,23 @@ @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<>(); } -- Gitblit v1.7.1