| | |
| | | package com.dsh.guns.modular.system.controller.code; |
| | | |
| | | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.dsh.course.feignClient.activity.CouponClient; |
| | | import com.dsh.course.feignClient.activity.model.CouponExamineListSearch; |
| | | import com.dsh.course.feignClient.activity.model.CouponListOfSearch; |
| | | import com.dsh.guns.core.common.constant.factory.PageFactory; |
| | | import org.springframework.stereotype.Controller; |
| | | import org.springframework.ui.Model; |
| | | import org.springframework.web.bind.annotation.PathVariable; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.ResponseBody; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * 优惠券审核 控制器 |
| | |
| | | |
| | | private String PREFIX = "/system/tCouponExamine/"; |
| | | |
| | | @Resource |
| | | private CouponClient client; |
| | | |
| | | /** |
| | | * 优惠券审核列表页 |
| | | */ |
| | | @RequestMapping("") |
| | | public String index(Model model) { |
| | | return PREFIX + "TCouponExamine.html"; |
| | | return PREFIX + "TCouponExamineList.html"; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * 获取 优惠券审核列表 |
| | | */ |
| | | @RequestMapping(value = "/list") |
| | | @ResponseBody |
| | | public Object listOfDatas(String name, Integer type, Integer distributionMethod , Integer userPopulation, Integer auditStatus) { |
| | | Page<Map<String, Object>> page = new PageFactory<Map<String, Object>>().defaultPage(); |
| | | CouponExamineListSearch ofSearch = new CouponExamineListSearch(); |
| | | ofSearch.setPage(page); |
| | | ofSearch.setName(name); |
| | | ofSearch.setType(type); |
| | | ofSearch.setDistributionMethod(distributionMethod); |
| | | ofSearch.setUserPopulation(userPopulation); |
| | | ofSearch.setAuditStatus(auditStatus); |
| | | return client.getCouponExamineListOfSearch(ofSearch); |
| | | } |
| | | |
| | | /** |
| | | * 获取 优惠券审核详情 |
| | | */ |
| | | @RequestMapping(value = "/couponOfDetail/{id}") |
| | | @ResponseBody |
| | | public String detailOfCoupon(@PathVariable Integer id, Model model){ |
| | | Map<String, Object> stringObjectMap = client.queryCouponExamineDetail(id); |
| | | model.addAllAttributes(stringObjectMap); |
| | | return PREFIX + "TCouponExamineInfo.html"; |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | } |