|
@@ -35,25 +35,72 @@ public class AdminAgentToothHandler {
|
|
|
@Autowired
|
|
|
private ProductColorService productColorService;
|
|
|
|
|
|
+ /**
|
|
|
+ * 分页查询代理商优惠价配置信息
|
|
|
+ * @param request
|
|
|
+ * @param pageSize
|
|
|
+ * @param pageNO
|
|
|
+ * @return
|
|
|
+ * @throws Exception
|
|
|
+ */
|
|
|
@RequestMapping("/select_agent_config_list")
|
|
|
public ModelAndView selectAgentConfigList(HttpServletRequest request,
|
|
|
@RequestParam(value = "pageSize", defaultValue = "10", required = false) Integer pageSize,
|
|
|
@RequestParam(value = "pageNO", defaultValue = "1", required = false) Integer pageNO) throws Exception {
|
|
|
- ModelAndView mv = new ModelAndView("admin/agentInfo/agentConfigList");
|
|
|
- StringBuilder url = new StringBuilder("/admin/agentTooth/select_agent_config_list");
|
|
|
AgentConfig config = new AgentConfig();
|
|
|
+ ModelAndView mv = new ModelAndView("admin/agentInfo/agentConfigList");
|
|
|
+ StringBuilder url = new StringBuilder("/admin/agentTooth/select_agent_config_list?pageSize=");
|
|
|
+ url.append(pageSize);
|
|
|
+ String agentName = request.getParameter("agentName");
|
|
|
+ String agentTel = request.getParameter("agentTel");
|
|
|
+ String productName = request.getParameter("productName");
|
|
|
+ String colorName = request.getParameter("colorName");
|
|
|
+ if (StringUtils.isNotEmpty(agentName)) {
|
|
|
+ config.setAgentName(agentName);
|
|
|
+ url.append("&agentName=");
|
|
|
+ url.append(agentName);
|
|
|
+ mv.addObject("agentName",agentName);
|
|
|
+ }
|
|
|
+ if (StringUtils.isNotEmpty(agentTel)) {
|
|
|
+ config.setAgentTel(agentTel);
|
|
|
+ url.append("&agentTel=");
|
|
|
+ url.append(agentTel);
|
|
|
+ mv.addObject("agentTel",agentTel);
|
|
|
+ }
|
|
|
+ if (StringUtils.isNotEmpty(productName)) {
|
|
|
+ config.setProductName(productName);
|
|
|
+ url.append("&productName=");
|
|
|
+ url.append(productName);
|
|
|
+ mv.addObject("productName",productName);
|
|
|
+ }
|
|
|
+ if (StringUtils.isNotEmpty(colorName)) {
|
|
|
+ config.setColorName(colorName);
|
|
|
+ url.append("&colorName=");
|
|
|
+ url.append(colorName);
|
|
|
+ mv.addObject("colorName",colorName);
|
|
|
+ }
|
|
|
+
|
|
|
PageBean page = new PageBean();
|
|
|
page.setPageSize(pageSize);
|
|
|
page.setPageNumber(pageNO);
|
|
|
page.initRecordBegin();
|
|
|
config.setPage(page);
|
|
|
+ url.append("&pageNO=");
|
|
|
//查询代理商配置金额集合
|
|
|
List<AgentConfig> configList = agentInfoService.listAgentConfig(config);
|
|
|
mv.addObject("configList", configList);
|
|
|
mv.addObject("pageNO", pageNO);
|
|
|
+ mv.addObject("pageSize", agentInfoService.listAgentConfigCount(config));
|
|
|
+ mv.addObject("url",url.toString());
|
|
|
return mv;
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * 进入添加代理商优惠价配置页面
|
|
|
+ * @param request
|
|
|
+ * @return
|
|
|
+ * @throws Exception
|
|
|
+ */
|
|
|
@RequestMapping("/_add_agent_config")
|
|
|
public ModelAndView addAgentConfigUI(HttpServletRequest request) throws Exception {
|
|
|
ModelAndView mv = new ModelAndView("admin/agentInfo/addAgentConfig");
|
|
@@ -87,6 +134,12 @@ public class AdminAgentToothHandler {
|
|
|
return msg;
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * 添加代理商优惠价配置信息
|
|
|
+ * @param request
|
|
|
+ * @return
|
|
|
+ * @throws Exception
|
|
|
+ */
|
|
|
@ResponseBody
|
|
|
@RequestMapping("/add_agent_config")
|
|
|
public ResultMsg addAgentConfig(HttpServletRequest request) throws Exception {
|
|
@@ -128,6 +181,12 @@ public class AdminAgentToothHandler {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * 进入修改代理商优惠价页面
|
|
|
+ * @param request
|
|
|
+ * @return
|
|
|
+ * @throws Exception
|
|
|
+ */
|
|
|
@RequestMapping("/_update_agent_config")
|
|
|
public ModelAndView updateAgentConfig(HttpServletRequest request) throws Exception {
|
|
|
String configId = request.getParameter("configId");
|
|
@@ -136,6 +195,12 @@ public class AdminAgentToothHandler {
|
|
|
return mv;
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * 获取代理商优惠价和产品信息
|
|
|
+ * @param request
|
|
|
+ * @return
|
|
|
+ * @throws Exception
|
|
|
+ */
|
|
|
@ResponseBody
|
|
|
@RequestMapping("/get_agent_config_By_Id")
|
|
|
public ResultMsg getAgentConfigById(HttpServletRequest request) throws Exception{
|
|
@@ -170,6 +235,13 @@ public class AdminAgentToothHandler {
|
|
|
return msg;
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * 修改代理商优惠价信息
|
|
|
+ * @param request
|
|
|
+ * @param config
|
|
|
+ * @return
|
|
|
+ * @throws Exception
|
|
|
+ */
|
|
|
@ResponseBody
|
|
|
@RequestMapping("/update_agent_config")
|
|
|
public ResultMsg updateAgentConfig(HttpServletRequest request,AgentConfig config) throws Exception{
|
|
@@ -191,6 +263,12 @@ public class AdminAgentToothHandler {
|
|
|
return msg;
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * 修改代理商优惠价配置的状态
|
|
|
+ * @param request
|
|
|
+ * @return
|
|
|
+ * @throws Exception
|
|
|
+ */
|
|
|
@ResponseBody
|
|
|
@RequestMapping("/update_agent_config_status")
|
|
|
public ResultMsg updateAgentConfigStatus(HttpServletRequest request) throws Exception {
|