|
@@ -3761,10 +3761,31 @@ public class FxController extends BaseController {
|
|
|
}
|
|
|
map.put("remarks",remarks);
|
|
|
map.put("type",type);
|
|
|
+
|
|
|
+ switch (map.get("merchant_type").toString()) {
|
|
|
+ case "1":
|
|
|
+ map.put("merchant_type","直接签约(塾币模式)");
|
|
|
+ break;
|
|
|
+ case "2":
|
|
|
+ map.put("merchant_type","内部消耗");
|
|
|
+ break;
|
|
|
+ case "3":
|
|
|
+ map.put("merchant_type","外部签约");
|
|
|
+ break;
|
|
|
+ case "4":
|
|
|
+ map.put("merchant_type","内部不结算(财务)");
|
|
|
+ break;
|
|
|
+ case "5":
|
|
|
+ map.put("merchant_type","直接签约(端口模式)");
|
|
|
+ break;
|
|
|
+ default:
|
|
|
+ break;
|
|
|
+ }
|
|
|
}
|
|
|
List<ExcelColumn> myColumns3 = new ArrayList<ExcelColumn>();
|
|
|
myColumns3.add(new ExcelColumn("商户账号", "pos_code", 20));
|
|
|
- myColumns3.add(new ExcelColumn("单位名称", "unit_name", 20));
|
|
|
+ myColumns3.add(new ExcelColumn("商户名称", "unit_name", 20));
|
|
|
+ myColumns3.add(new ExcelColumn("商户类型", "merchant_type", 20));
|
|
|
myColumns3.add(new ExcelColumn("端口数量", "lib_service", 20));
|
|
|
myColumns3.add(new ExcelColumn("端口单价", "pr_1", 20));
|
|
|
myColumns3.add(new ExcelColumn("充值金额", "pr_2", 20));
|
|
@@ -3792,6 +3813,217 @@ public class FxController extends BaseController {
|
|
|
|
|
|
|
|
|
|
|
|
+ //塾币资金流水表
|
|
|
+ @RequestMapping(value = "/exportMerchantCapOldList", method = RequestMethod.POST)
|
|
|
+ @ResponseBody
|
|
|
+ public void exportMerchantCapOldList( HttpServletRequest request, HttpServletResponse response) {
|
|
|
+ ServletOutputStream os = null;
|
|
|
+ try {
|
|
|
+ String libName="塾币资金流水列表";
|
|
|
+ os = response.getOutputStream(); //获得输出流
|
|
|
+ response.reset(); //清空输出流
|
|
|
+ String fileName = new String(libName.getBytes("gb2312"), "ISO8859-1") +".xlsx";
|
|
|
+ response.setHeader("Content-disposition", "attachment; filename="+ fileName); //设定输出文件头
|
|
|
+ response.setContentType("application/vnd.ms-excel;charset=UTF-8");
|
|
|
+ response.setCharacterEncoding("utf-8");
|
|
|
+
|
|
|
+ Map<String, Object> params = new HashMap<String, Object>();
|
|
|
+ params.put("merchantId", request.getParameter("merchantId")==null?"":request.getParameter("merchantId"));
|
|
|
+ params.put("type", request.getParameter("type")==null?"":request.getParameter("type"));
|
|
|
+ params.put("merchantType", request.getParameter("merchantType")==null?"":request.getParameter("merchantType"));
|
|
|
+ params.put("createTime", request.getParameter("createTime")==null?"":request.getParameter("createTime"));
|
|
|
+ params.put("endCreateTime", request.getParameter("endCreateTime")==null?"":request.getParameter("endCreateTime"));
|
|
|
+
|
|
|
+ Page<Map<String, Object>> page = merchantMealService.findMerchantCapOldByPage(params, initPage(1, 10000, Direction.DESC, new String[]{"createTime"}));
|
|
|
+ List<Map<String, Object>> mapList=page.getContent();
|
|
|
+ for (Map<String, Object> map : mapList) {
|
|
|
+ if(Integer.parseInt(map.get("cap_type").toString())==1) {
|
|
|
+ map.put("pr_1",new BigDecimal(new BigDecimal(map.get("price").toString()).doubleValue()*(Integer.parseInt(map.get("lib_service").toString()))).setScale(2, RoundingMode.UP).doubleValue());
|
|
|
+ map.put("pr_2","");
|
|
|
+ }else if(Integer.parseInt(map.get("cap_type").toString())==2) {
|
|
|
+ map.put("pr_1","");
|
|
|
+ map.put("pr_2",new BigDecimal(new BigDecimal(map.get("price").toString()).doubleValue()*(Integer.parseInt(map.get("lib_service").toString()))).setScale(2, RoundingMode.UP).doubleValue());
|
|
|
+ }else if(Integer.parseInt(map.get("cap_type").toString())==3) {
|
|
|
+ map.put("pr_1","");
|
|
|
+ map.put("pr_2",new BigDecimal(new BigDecimal(map.get("price").toString()).doubleValue()*(Integer.parseInt(map.get("lib_service").toString()))).setScale(2, RoundingMode.UP).doubleValue());
|
|
|
+ }else if(Integer.parseInt(map.get("cap_type").toString())==4) {
|
|
|
+ map.put("pr_1","");
|
|
|
+ map.put("pr_2",new BigDecimal(new BigDecimal(map.get("price").toString()).doubleValue()*(Integer.parseInt(map.get("lib_service").toString()))).setScale(2, RoundingMode.UP).doubleValue());
|
|
|
+ }else if(Integer.parseInt(map.get("cap_type").toString())==5) {
|
|
|
+ map.put("pr_1","");
|
|
|
+ map.put("pr_2",new BigDecimal(new BigDecimal(map.get("price").toString()).doubleValue()*(Integer.parseInt(map.get("lib_service").toString()))).setScale(2, RoundingMode.UP).doubleValue());
|
|
|
+ }
|
|
|
+ String remarks="";
|
|
|
+ String type="";
|
|
|
+ switch (map.get("cap_type").toString()) {
|
|
|
+ case "1":
|
|
|
+ remarks="充值塾币";
|
|
|
+ type="充值";
|
|
|
+ break;
|
|
|
+ case "2":
|
|
|
+ remarks="消耗塾币";
|
|
|
+ type="消耗";
|
|
|
+ break;
|
|
|
+ case "3":
|
|
|
+ remarks="下级消耗塾币";
|
|
|
+ type="消耗";
|
|
|
+ break;
|
|
|
+ case "4":
|
|
|
+ remarks="低消塾币";
|
|
|
+ type="消耗";
|
|
|
+ break;
|
|
|
+ case "5":
|
|
|
+ remarks="下级低消塾币";
|
|
|
+ type="消耗";
|
|
|
+ break;
|
|
|
+ default:
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ map.put("remarks",remarks);
|
|
|
+ map.put("type",type);
|
|
|
+
|
|
|
+ switch (map.get("merchant_type").toString()) {
|
|
|
+ case "1":
|
|
|
+ map.put("merchant_type","直接签约(塾币模式)");
|
|
|
+ break;
|
|
|
+ case "2":
|
|
|
+ map.put("merchant_type","内部消耗");
|
|
|
+ break;
|
|
|
+ case "3":
|
|
|
+ map.put("merchant_type","外部签约");
|
|
|
+ break;
|
|
|
+ case "4":
|
|
|
+ map.put("merchant_type","内部不结算(财务)");
|
|
|
+ break;
|
|
|
+ case "5":
|
|
|
+ map.put("merchant_type","直接签约(端口模式)");
|
|
|
+ break;
|
|
|
+ default:
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ List<ExcelColumn> myColumns3 = new ArrayList<ExcelColumn>();
|
|
|
+ myColumns3.add(new ExcelColumn("商户账号", "pos_code", 20));
|
|
|
+ myColumns3.add(new ExcelColumn("商户名称", "unit_name", 20));
|
|
|
+ myColumns3.add(new ExcelColumn("商户类型", "merchant_type", 20));
|
|
|
+ myColumns3.add(new ExcelColumn("塾币数量", "lib_service", 20));
|
|
|
+ myColumns3.add(new ExcelColumn("塾币单价", "price", 20));
|
|
|
+ myColumns3.add(new ExcelColumn("充值金额", "pr_1", 20));
|
|
|
+ myColumns3.add(new ExcelColumn("消耗金额", "pr_2", 20));
|
|
|
+ myColumns3.add(new ExcelColumn("流水时间", "create_time", 20));
|
|
|
+ myColumns3.add(new ExcelColumn("流水备注", "remarks", 20));
|
|
|
+ myColumns3.add(new ExcelColumn("流水类型", "type", 20));
|
|
|
+
|
|
|
+ CustomizeToExcel.downFile(myColumns3, mapList, os);
|
|
|
+ }catch (IOException e) {
|
|
|
+ e.printStackTrace();
|
|
|
+ }catch (Exception e1){
|
|
|
+ e1.printStackTrace();
|
|
|
+ }finally{
|
|
|
+ if(os != null){
|
|
|
+ try {
|
|
|
+ os.flush();
|
|
|
+ os.close();
|
|
|
+ } catch (IOException e) {
|
|
|
+ e.printStackTrace();
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ @RequestMapping(value = "/exportMerchantActiveCapList", method = RequestMethod.POST)
|
|
|
+ @ResponseBody
|
|
|
+ public void exportMerchantActiveCapList( HttpServletRequest request, HttpServletResponse response) {
|
|
|
+ ServletOutputStream os = null;
|
|
|
+ try {
|
|
|
+ String libName="端口激活流水列表";
|
|
|
+ os = response.getOutputStream(); //获得输出流
|
|
|
+ response.reset(); //清空输出流
|
|
|
+ String fileName = new String(libName.getBytes("gb2312"), "ISO8859-1") +".xlsx";
|
|
|
+ response.setHeader("Content-disposition", "attachment; filename="+ fileName); //设定输出文件头
|
|
|
+ response.setContentType("application/vnd.ms-excel;charset=UTF-8");
|
|
|
+ response.setCharacterEncoding("utf-8");
|
|
|
+
|
|
|
+ Map<String, Object> params = new HashMap<String, Object>();
|
|
|
+ params.put("merchantId", request.getParameter("merchantId")==null?"":request.getParameter("merchantId"));
|
|
|
+ params.put("type", request.getParameter("type")==null?"":request.getParameter("type"));
|
|
|
+ params.put("merchantType", request.getParameter("merchantType")==null?"":request.getParameter("merchantType"));
|
|
|
+ params.put("signTime", request.getParameter("signTime")==null?"":request.getParameter("signTime"));
|
|
|
+ params.put("endSignTime", request.getParameter("endSignTime")==null?"":request.getParameter("endSignTime"));
|
|
|
+
|
|
|
+
|
|
|
+ Page<Map<String, Object>> page = merchantMealService.findMerchantActiveCapByPage(params, initPage(1, 10000, Direction.DESC, new String[]{"createTime"}));
|
|
|
+
|
|
|
+ List<Map<String, Object>> mapList=page.getContent();
|
|
|
+ for (Map<String, Object> map : mapList) {
|
|
|
+ String remarks="";
|
|
|
+ String type="";
|
|
|
+ switch (map.get("cap_type").toString()) {
|
|
|
+ case "1":
|
|
|
+ remarks="激活期扣费";
|
|
|
+ type="扣费";
|
|
|
+ break;
|
|
|
+ case "2":
|
|
|
+ remarks="激活期失效";
|
|
|
+ type="失效";
|
|
|
+ break;
|
|
|
+ default:
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ map.put("remarks",remarks);
|
|
|
+ map.put("type",type);
|
|
|
+
|
|
|
+ switch (map.get("merchant_type").toString()) {
|
|
|
+ case "1":
|
|
|
+ map.put("merchant_type","直接签约(塾币模式)");
|
|
|
+ break;
|
|
|
+ case "2":
|
|
|
+ map.put("merchant_type","内部消耗");
|
|
|
+ break;
|
|
|
+ case "3":
|
|
|
+ map.put("merchant_type","外部签约");
|
|
|
+ break;
|
|
|
+ case "4":
|
|
|
+ map.put("merchant_type","内部不结算(财务)");
|
|
|
+ break;
|
|
|
+ case "5":
|
|
|
+ map.put("merchant_type","直接签约(端口模式)");
|
|
|
+ break;
|
|
|
+ default:
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ List<ExcelColumn> myColumns3 = new ArrayList<ExcelColumn>();
|
|
|
+ myColumns3.add(new ExcelColumn("商户账号", "pos_code", 20));
|
|
|
+ myColumns3.add(new ExcelColumn("商户名称", "unit_name", 20));
|
|
|
+ myColumns3.add(new ExcelColumn("商户类型", "merchant_type", 20));
|
|
|
+ myColumns3.add(new ExcelColumn("端口数量", "lib_service", 20));
|
|
|
+ myColumns3.add(new ExcelColumn("流水时间", "time", 20));
|
|
|
+ myColumns3.add(new ExcelColumn("流水备注", "remarks", 20));
|
|
|
+ myColumns3.add(new ExcelColumn("流水类型", "type", 20));
|
|
|
+
|
|
|
+ CustomizeToExcel.downFile(myColumns3, mapList, os);
|
|
|
+ }catch (IOException e) {
|
|
|
+ e.printStackTrace();
|
|
|
+ }catch (Exception e1){
|
|
|
+ e1.printStackTrace();
|
|
|
+ }finally{
|
|
|
+ if(os != null){
|
|
|
+ try {
|
|
|
+ os.flush();
|
|
|
+ os.close();
|
|
|
+ } catch (IOException e) {
|
|
|
+ e.printStackTrace();
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
//服务包订单明细表
|
|
|
@RequestMapping(value = "/exportMerchantMealList", method = RequestMethod.POST)
|
|
|
@ResponseBody
|
|
@@ -3833,11 +4065,26 @@ public class FxController extends BaseController {
|
|
|
default:
|
|
|
break;
|
|
|
}
|
|
|
+
|
|
|
+ switch (map.get("type").toString()) {
|
|
|
+ case "1":
|
|
|
+ map.put("type","激活");
|
|
|
+ break;
|
|
|
+ case "2":
|
|
|
+ map.put("type","赠送");
|
|
|
+ break;
|
|
|
+ case "3":
|
|
|
+ map.put("type","购买");
|
|
|
+ break;
|
|
|
+ default:
|
|
|
+ break;
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
List<ExcelColumn> myColumns3 = new ArrayList<ExcelColumn>();
|
|
|
myColumns3.add(new ExcelColumn("订单编号", "order_id", 20));
|
|
|
myColumns3.add(new ExcelColumn("单位名称", "unit_name", 20));
|
|
|
+ myColumns3.add(new ExcelColumn("明细类型", "type", 20));
|
|
|
myColumns3.add(new ExcelColumn("服务包类型", "sign_type", 20));
|
|
|
myColumns3.add(new ExcelColumn("服务包人数", "lib_service", 20));
|
|
|
myColumns3.add(new ExcelColumn("服务开始日期", "sign_time", 20));
|
|
@@ -3865,7 +4112,7 @@ public class FxController extends BaseController {
|
|
|
|
|
|
|
|
|
|
|
|
- //服务包订单明细表
|
|
|
+ //加油包订单明细列表
|
|
|
@RequestMapping(value = "/exportMerchantSignList", method = RequestMethod.POST)
|
|
|
@ResponseBody
|
|
|
public void exportMerchantSignList( HttpServletRequest request, HttpServletResponse response) {
|
|
@@ -4029,6 +4276,60 @@ public class FxController extends BaseController {
|
|
|
}
|
|
|
|
|
|
|
|
|
+ //手动刷新商户的服务人数与服务日期
|
|
|
+ @RequestMapping("/refAcMeal")
|
|
|
+ @ResponseBody
|
|
|
+ public Response refAcMeal(Model model,String id)throws Exception {
|
|
|
+ Response response = new Response();
|
|
|
+ if(StringUtils.isNotEmpty(id)) {
|
|
|
+ try {
|
|
|
+ //0点系统刷新商户的激活情况
|
|
|
+ logger.info("手动系统刷新商户的激活情况,开始>id="+id);
|
|
|
+ merchantMealService.updateMerchantActiveByMeal(id);
|
|
|
+ logger.info("手动系统刷新商户的激活情况,成功>id="+id);
|
|
|
+ } catch (Exception e) {
|
|
|
+ logger.info("手动系统刷新商户的激活情况,异常...>id="+id);
|
|
|
+ e.printStackTrace();
|
|
|
+ }
|
|
|
+ try {
|
|
|
+ //0点系统刷新服务人数与日期
|
|
|
+ logger.info("手动系统刷新服务人数与日期,开始>id="+id);
|
|
|
+ merchantMealService.updateMerchantByMeal(id);
|
|
|
+ logger.info("手动系统刷新服务人数与日期,成功>id="+id);
|
|
|
+ } catch (Exception e) {
|
|
|
+ logger.info("手动系统刷新服务人数与日期,异常...>id="+id);
|
|
|
+ e.printStackTrace();
|
|
|
+ }
|
|
|
+ }else {
|
|
|
+ List<Merchant> merchants=merchantService.findMerchantSignByAll();
|
|
|
+ for (Merchant merchant : merchants) {
|
|
|
+ try {
|
|
|
+ //0点系统刷新商户的激活情况
|
|
|
+ logger.info("手动系统刷新商户的激活情况,开始>id="+merchant.getId());
|
|
|
+ merchantMealService.updateMerchantActiveByMeal(merchant.getId());
|
|
|
+ logger.info("手动系统刷新商户的激活情况,成功>id="+merchant.getId());
|
|
|
+ } catch (Exception e) {
|
|
|
+ logger.info("手动系统刷新商户的激活情况,异常...>id="+merchant.getId());
|
|
|
+ e.printStackTrace();
|
|
|
+ }
|
|
|
+ try {
|
|
|
+ //0点系统刷新服务人数与日期
|
|
|
+ logger.info("手动系统刷新服务人数与日期,开始>id="+merchant.getId());
|
|
|
+ merchantMealService.updateMerchantByMeal(merchant.getId());
|
|
|
+ logger.info("手动系统刷新服务人数与日期,成功>id="+merchant.getId());
|
|
|
+ } catch (Exception e) {
|
|
|
+ logger.info("手动系统刷新服务人数与日期,异常...>id="+merchant.getId());
|
|
|
+ e.printStackTrace();
|
|
|
+ }
|
|
|
+ //停2秒
|
|
|
+ Thread.sleep(2000);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return response;
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
//服务包订单表
|
|
|
@RequestMapping("/merchantMealOrderList")
|
|
|
public String merchantMealOrderList(Model model,
|
|
@@ -4067,6 +4368,7 @@ public class FxController extends BaseController {
|
|
|
Map<String, Object> params = new HashMap<String, Object>();
|
|
|
params.put("orderId", request.getParameter("orderId")==null?"":request.getParameter("orderId"));
|
|
|
params.put("merchantId", request.getParameter("merchantId")==null?"":request.getParameter("merchantId"));
|
|
|
+ params.put("type", request.getParameter("type")==null?"":request.getParameter("type"));
|
|
|
SplitPage sp = new SplitPage();
|
|
|
sp.setAction(request.getRequestURI());
|
|
|
sp.setPageNo(pageNo);
|
|
@@ -4322,12 +4624,108 @@ public class FxController extends BaseController {
|
|
|
}
|
|
|
|
|
|
|
|
|
+ //塾币资金流水表
|
|
|
+ @RequestMapping("/merchantCapOldList")
|
|
|
+ public String merchantCapOldList(Model model,
|
|
|
+ @RequestParam(required = false, defaultValue = "100") int pageSize,
|
|
|
+ @RequestParam(required = false, defaultValue = "1") int pageNo)throws Exception {
|
|
|
+
|
|
|
+ Map<String, Object> params = new HashMap<String, Object>();
|
|
|
+ params.put("merchantId", request.getParameter("merchantId")==null?"":request.getParameter("merchantId"));
|
|
|
+ params.put("type", request.getParameter("type")==null?"":request.getParameter("type"));
|
|
|
+ params.put("merchantType", request.getParameter("merchantType")==null?"":request.getParameter("merchantType"));
|
|
|
+ params.put("createTime", request.getParameter("createTime")==null?"":request.getParameter("createTime"));
|
|
|
+ params.put("endCreateTime", request.getParameter("endCreateTime")==null?"":request.getParameter("endCreateTime"));
|
|
|
+
|
|
|
+
|
|
|
+ SplitPage sp = new SplitPage();
|
|
|
+ sp.setAction(request.getRequestURI());
|
|
|
+ sp.setPageNo(pageNo);
|
|
|
+ sp.setPageSize(pageSize);
|
|
|
+ sp.setParams(params);
|
|
|
+ Page<Map<String, Object>> page = merchantMealService.findMerchantCapOldByPage(params, initPage(pageNo, pageSize, Direction.DESC, new String[]{"createTime"}));
|
|
|
+ sp.setRowCnt((int) page.getTotalElements());
|
|
|
+
|
|
|
+ List<Map<String, Object>> mapList=page.getContent();
|
|
|
+ for (Map<String, Object> map : mapList) {
|
|
|
+ if(Integer.parseInt(map.get("cap_type").toString())==1) {
|
|
|
+ map.put("pr_1",new BigDecimal(new BigDecimal(map.get("price").toString()).doubleValue()*(Integer.parseInt(map.get("lib_service").toString()))).setScale(2, RoundingMode.UP).doubleValue());
|
|
|
+ map.put("pr_2","");
|
|
|
+ }else if(Integer.parseInt(map.get("cap_type").toString())==2) {
|
|
|
+ map.put("pr_1","");
|
|
|
+ map.put("pr_2",new BigDecimal(new BigDecimal(map.get("price").toString()).doubleValue()*(Integer.parseInt(map.get("lib_service").toString()))).setScale(2, RoundingMode.UP).doubleValue());
|
|
|
+ }else if(Integer.parseInt(map.get("cap_type").toString())==3) {
|
|
|
+ map.put("pr_1","");
|
|
|
+ map.put("pr_2",new BigDecimal(new BigDecimal(map.get("price").toString()).doubleValue()*(Integer.parseInt(map.get("lib_service").toString()))).setScale(2, RoundingMode.UP).doubleValue());
|
|
|
+ }else if(Integer.parseInt(map.get("cap_type").toString())==4) {
|
|
|
+ map.put("pr_1","");
|
|
|
+ map.put("pr_2",new BigDecimal(new BigDecimal(map.get("price").toString()).doubleValue()*(Integer.parseInt(map.get("lib_service").toString()))).setScale(2, RoundingMode.UP).doubleValue());
|
|
|
+ }else if(Integer.parseInt(map.get("cap_type").toString())==5) {
|
|
|
+ map.put("pr_1","");
|
|
|
+ map.put("pr_2",new BigDecimal(new BigDecimal(map.get("price").toString()).doubleValue()*(Integer.parseInt(map.get("lib_service").toString()))).setScale(2, RoundingMode.UP).doubleValue());
|
|
|
+ }
|
|
|
+ }
|
|
|
+ model.addAttribute("list", mapList);
|
|
|
+ model.addAttribute("listNavigatHtml", sp.getSysPaginHtml());
|
|
|
+ model.addAttribute("page", sp);
|
|
|
+ model.addAttribute("search", params);
|
|
|
+ List<Merchant> list=merchantService.findMerchantByPage();
|
|
|
+ model.addAttribute("poslist", list);
|
|
|
+ return "sys/fx/merchantCapOldList";
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ //端口激活流水表
|
|
|
+ @RequestMapping("/merchantActiveCapList")
|
|
|
+ public String merchantActiveCapList(Model model,
|
|
|
+ @RequestParam(required = false, defaultValue = "100") int pageSize,
|
|
|
+ @RequestParam(required = false, defaultValue = "1") int pageNo)throws Exception {
|
|
|
+
|
|
|
+ Map<String, Object> params = new HashMap<String, Object>();
|
|
|
+ params.put("merchantId", request.getParameter("merchantId")==null?"":request.getParameter("merchantId"));
|
|
|
+ params.put("type", request.getParameter("type")==null?"":request.getParameter("type"));
|
|
|
+ params.put("merchantType", request.getParameter("merchantType")==null?"":request.getParameter("merchantType"));
|
|
|
+ params.put("signTime", request.getParameter("signTime")==null?"":request.getParameter("signTime"));
|
|
|
+ params.put("endSignTime", request.getParameter("endSignTime")==null?"":request.getParameter("endSignTime"));
|
|
|
+
|
|
|
+
|
|
|
+ SplitPage sp = new SplitPage();
|
|
|
+ sp.setAction(request.getRequestURI());
|
|
|
+ sp.setPageNo(pageNo);
|
|
|
+ sp.setPageSize(pageSize);
|
|
|
+ sp.setParams(params);
|
|
|
+ Page<Map<String, Object>> page = merchantMealService.findMerchantActiveCapByPage(params, initPage(pageNo, pageSize, Direction.DESC, new String[]{"createTime"}));
|
|
|
+ sp.setRowCnt((int) page.getTotalElements());
|
|
|
+
|
|
|
+ List<Map<String, Object>> mapList=page.getContent();
|
|
|
+ for (Map<String, Object> map : mapList) {
|
|
|
+
|
|
|
+ }
|
|
|
+ model.addAttribute("list", mapList);
|
|
|
+ model.addAttribute("listNavigatHtml", sp.getSysPaginHtml());
|
|
|
+ model.addAttribute("page", sp);
|
|
|
+ model.addAttribute("search", params);
|
|
|
+ List<Merchant> list=merchantService.findMerchantByPage();
|
|
|
+ model.addAttribute("poslist", list);
|
|
|
+ return "sys/fx/merchantActiveCapList";
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
//端口服务包开通
|
|
|
@RequestMapping("/merchantMealAdd")
|
|
|
public String merchantMealAdd(Model model,String id)throws Exception {
|
|
|
Merchant merchant=merchantService.getById(id);
|
|
|
List<MerchantMealOrder> list=merchantMealOrderService.findMerchantMealOrderAll(id);
|
|
|
+ Date startActiveTime=null;
|
|
|
+ if(merchant.getStartActiveTime()==null || merchant.getActiveTime()==null) {
|
|
|
+ startActiveTime=new Date();
|
|
|
+ }
|
|
|
model.addAttribute("merchant", merchant);
|
|
|
+ model.addAttribute("startActiveTime", startActiveTime);
|
|
|
model.addAttribute("list", list);
|
|
|
return "sys/fx/merchantMealAdd";
|
|
|
}
|
|
@@ -4372,7 +4770,7 @@ public class FxController extends BaseController {
|
|
|
//端口服务包开通保存
|
|
|
@RequestMapping("/saveMerchantMeal")
|
|
|
@ResponseBody
|
|
|
- public Response saveMerchantMeal(Model model,String id,Integer signType,Integer libService,Integer buyMonth,Integer giveMonth,Double unitPrice,Double price)throws Exception {
|
|
|
+ public Response saveMerchantMeal(Model model,String id,Integer signType,Integer libService,Integer buyMonth,Integer giveMonth,Double unitPrice,Double price,String startActiveTime,String activeTime)throws Exception {
|
|
|
Response response = new Response();
|
|
|
if(signType==null) {
|
|
|
response.failure("请选择购买的服务包");
|
|
@@ -4393,7 +4791,7 @@ public class FxController extends BaseController {
|
|
|
}
|
|
|
Merchant merchant=merchantService.getById(id);
|
|
|
if(merchant.getPosType()==2) {
|
|
|
- merchantMealService.saveMerchantMeal(id, signType, libService, buyMonth, giveMonth, unitPrice, price);
|
|
|
+ merchantMealService.saveMerchantMeal(id, signType, libService, buyMonth, giveMonth, unitPrice, price, startActiveTime, activeTime);
|
|
|
response.success("成功");
|
|
|
}else {
|
|
|
response.failure("商户类型不可购买此服务包");
|