| | |
| | | import com.dsh.guns.core.common.constant.factory.PageFactory; |
| | | import com.dsh.guns.core.exception.GunsException; |
| | | import com.dsh.guns.core.util.ToolUtil; |
| | | import com.dsh.guns.modular.system.model.User; |
| | | import com.dsh.guns.modular.system.service.IUserService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Controller; |
| | | import org.springframework.ui.Model; |
| | | import org.springframework.web.bind.annotation.PathVariable; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.ResponseBody; |
| | | |
| | |
| | | |
| | | @Resource |
| | | private CouponClient client; |
| | | @Autowired |
| | | private IUserService userService; |
| | | |
| | | /** |
| | | * 优惠券审核列表页 |
| | |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * 获取根据门店id 获取店长信息 |
| | | */ |
| | | @RequestMapping(value = "/getStoreInfo") |
| | | @ResponseBody |
| | | public String getStoreInfo(@RequestBody Integer id) { |
| | | User byId = userService.getById(id); |
| | | return byId.getName() + "-" + byId.getAccount(); |
| | | } |
| | | /** |
| | | * 获取 优惠券审核列表 |
| | | */ |
| | |
| | | * 获取 优惠券审核详情 |
| | | */ |
| | | @RequestMapping(value = "/couponOfDetail/{id}") |
| | | @ResponseBody |
| | | public String detailOfCoupon(@PathVariable Integer id, Model model){ |
| | | Map<String, Object> stringObjectMap = client.queryCouponExamineDetail(id); |
| | | model.addAttribute(stringObjectMap); |
| | |
| | | * 获取 优惠券审核详情 |
| | | */ |
| | | @RequestMapping(value = "/couponExaminePage/{id}") |
| | | @ResponseBody |
| | | public String couponExaminePage(@PathVariable Integer id, Model model){ |
| | | model.addAttribute("id",id); |
| | | return PREFIX + "TCouponExamine.html"; |
| | |
| | | |
| | | @RequestMapping(value = "/examine") |
| | | @ResponseBody |
| | | public Object examine(Integer couponOfId, Integer state, String remark) { |
| | | Coupon coupon = client.queryCouponById(couponOfId); |
| | | public Object examine(Integer id, Integer state, String remark) { |
| | | Coupon coupon = client.queryCouponById(id); |
| | | try { |
| | | if (state == 1) { |
| | | if (state == 2) { |
| | | coupon.setAuditStatus(2); |
| | | } |
| | | if (state == 2) { |
| | | if (state == 3) { |
| | | coupon.setAuditStatus(3); |
| | | coupon.setAuditRemark(remark); |
| | | } |