Commit 6eaed785 authored by 张俊's avatar 张俊

添加招行渠道和住建部手机小程序渠道对应的编辑审核状态

parent f668edfc
...@@ -76,6 +76,22 @@ public class M_YWZTKZ_2 { ...@@ -76,6 +76,22 @@ public class M_YWZTKZ_2 {
@JsonProperty("SHZNZDZT") @JsonProperty("SHZNZDZT")
private int shznzdzt; private int shznzdzt;
// 招行渠道编辑状态1.开启0.停止
@JsonProperty("ZH308ZT")
private int zh308zt;
// 招行渠道审核状态1.开启0.停止
@JsonProperty("SHZH308ZT")
private int shzh308zt;
// 住建部手机小程序渠道 编辑状态 1.开启0.停止
@JsonProperty("SJZT")
private int sjzt;
// 住建部手机小程序 审核状态 1.开启0.停止
@JsonProperty("SHSJZT")
private int shsjzt;
// 审核停止开始时间 // 审核停止开始时间
@JsonProperty("SHQYKSSJ") @JsonProperty("SHQYKSSJ")
private String shqykssj; private String shqykssj;
...@@ -339,4 +355,19 @@ public class M_YWZTKZ_2 { ...@@ -339,4 +355,19 @@ public class M_YWZTKZ_2 {
this.czlx = czlx; this.czlx = czlx;
} }
public int getZh308zt() {
return zh308zt;
}
public int getShzh308zt() {
return shzh308zt;
}
public int getSjzt() {
return sjzt;
}
public int getShsjzt() {
return shsjzt;
}
} }
package com.changda.gjjapp.zhfwpt.qdywqxgl.controller; package com.changda.gjjapp.zhfwpt.qdywqxgl.controller;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import javax.servlet.http.HttpServletRequest;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import com.changda.cd4j.foundation.core.dto.ResultDto; import com.changda.cd4j.foundation.core.dto.ResultDto;
import com.changda.gjjapp.db.entity.M_XEKZB; import com.changda.gjjapp.db.entity.M_XEKZB;
import com.changda.gjjapp.db.entity.M_YWZTKZ_2; import com.changda.gjjapp.db.entity.M_YWZTKZ_2;
import com.changda.gjjapp.zhfwpt.dto.qdywqxgl.DuanXinQuanXianGuanLiDto; import com.changda.gjjapp.zhfwpt.dto.qdywqxgl.*;
import com.changda.gjjapp.zhfwpt.dto.qdywqxgl.FwkzLogginInfoDto;
import com.changda.gjjapp.zhfwpt.dto.qdywqxgl.QDYWQuanXianGuanLiDto;
import com.changda.gjjapp.zhfwpt.dto.qdywqxgl.QdzkLoggingInfoDto;
import com.changda.gjjapp.zhfwpt.dto.qdywqxgl.QuDaoQuanXianGuanLiDto;
import com.changda.gjjapp.zhfwpt.qdxxgl.controller.QuDaoXinXiGuanLiController; import com.changda.gjjapp.zhfwpt.qdxxgl.controller.QuDaoXinXiGuanLiController;
import com.changda.gjjapp.zhfwpt.service.qdywquanxiankz.QuDaoQuanXianKongZhiService; import com.changda.gjjapp.zhfwpt.service.qdywquanxiankz.QuDaoQuanXianKongZhiService;
import com.changda.gjjapp.zhfwpt.service.qdywquanxiankz.YeWuQuanXianKongZhiService; import com.changda.gjjapp.zhfwpt.service.qdywquanxiankz.YeWuQuanXianKongZhiService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import javax.servlet.http.HttpServletRequest;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.*;
/** /**
* 渠道、业务权限管理 * 渠道、业务权限管理
...@@ -36,460 +26,464 @@ import com.changda.gjjapp.zhfwpt.service.qdywquanxiankz.YeWuQuanXianKongZhiServi ...@@ -36,460 +26,464 @@ import com.changda.gjjapp.zhfwpt.service.qdywquanxiankz.YeWuQuanXianKongZhiServi
@RequestMapping(value = "/zhfwpt/qdywqxgl") @RequestMapping(value = "/zhfwpt/qdywqxgl")
public class QuDaoYeWuQuanXianGuanLiController { public class QuDaoYeWuQuanXianGuanLiController {
@Autowired @Autowired
private YeWuQuanXianKongZhiService yeWuQuanXianKongZhiService; private YeWuQuanXianKongZhiService yeWuQuanXianKongZhiService;
@Autowired @Autowired
private QuDaoQuanXianKongZhiService quDaoQuanXianKongZhiService; private QuDaoQuanXianKongZhiService quDaoQuanXianKongZhiService;
// 查询渠道状态表用于管理渠道权限 // 查询渠道状态表用于管理渠道权限
@RequestMapping("quDaoZhuangTaiSearch") @RequestMapping("quDaoZhuangTaiSearch")
@ResponseBody @ResponseBody
public ResultDto quDaoZhuangTaiSearch(HttpServletRequest request) { public ResultDto quDaoZhuangTaiSearch(HttpServletRequest request) {
String primaryid = request.getParameter("primaryid"); String primaryid = request.getParameter("primaryid");
ResultDto resultDto = new ResultDto(); ResultDto resultDto = new ResultDto();
if(primaryid==null){ if (primaryid == null) {
List<QuDaoQuanXianGuanLiDto> list = quDaoQuanXianKongZhiService.quDaoZhuangTaiSearch(primaryid); List<QuDaoQuanXianGuanLiDto> list = quDaoQuanXianKongZhiService.quDaoZhuangTaiSearch(primaryid);
resultDto.setData(list); resultDto.setData(list);
resultDto.setSuccess(true); resultDto.setSuccess(true);
}else{ } else {
boolean a=QuDaoXinXiGuanLiController.SqlFilter2(primaryid); boolean a = QuDaoXinXiGuanLiController.SqlFilter2(primaryid);
if(a){ if (a) {
resultDto.setData(0); resultDto.setData(0);
resultDto.setMessage("存在sql注入"); resultDto.setMessage("存在sql注入");
resultDto.setSuccess(false); resultDto.setSuccess(false);
}else{ } else {
List<QuDaoQuanXianGuanLiDto> list = quDaoQuanXianKongZhiService.quDaoZhuangTaiSearch(primaryid); List<QuDaoQuanXianGuanLiDto> list = quDaoQuanXianKongZhiService.quDaoZhuangTaiSearch(primaryid);
resultDto.setData(list); resultDto.setData(list);
resultDto.setSuccess(true); resultDto.setSuccess(true);
} }
} }
return resultDto; return resultDto;
} }
public Date show() { public Date show() {
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
Calendar c = Calendar.getInstance(); Calendar c = Calendar.getInstance();
c = Calendar.getInstance(); c = Calendar.getInstance();
c.add(Calendar.MINUTE, +5); c.add(Calendar.MINUTE, +5);
System.out.println(sdf.format(c.getTime())); System.out.println(sdf.format(c.getTime()));
return c.getTime(); return c.getTime();
} }
// 修改阀值和控制渠道权限的时间 // 修改阀值和控制渠道权限的时间
@RequestMapping("updateTimeAndFz") @RequestMapping("updateTimeAndFz")
@ResponseBody @ResponseBody
public ResultDto updateTimeAndFz(HttpServletRequest request) { public ResultDto updateTimeAndFz(HttpServletRequest request) {
String kssj = request.getParameter("kssj"); String kssj = request.getParameter("kssj");
String jssj = request.getParameter("jssj"); String jssj = request.getParameter("jssj");
String qdid = request.getParameter("qdid"); String qdid = request.getParameter("qdid");
String ksrq = request.getParameter("ksrq"); String ksrq = request.getParameter("ksrq");
String tzrq = request.getParameter("tzrq"); String tzrq = request.getParameter("tzrq");
String fz = request.getParameter("fz"); String fz = request.getParameter("fz");
int qdzt = Integer.parseInt(request.getParameter("qdzt")); int qdzt = Integer.parseInt(request.getParameter("qdzt"));
ResultDto resultDto = new ResultDto(); ResultDto resultDto = new ResultDto();
String z=kssj+jssj+qdid+ksrq+tzrq+fz; String z = kssj + jssj + qdid + ksrq + tzrq + fz;
boolean a=QuDaoXinXiGuanLiController.SqlFilter2(z); boolean a = QuDaoXinXiGuanLiController.SqlFilter2(z);
if(a){ if (a) {
resultDto.setData(0); resultDto.setData(0);
resultDto.setMessage("存在sql注入"); resultDto.setMessage("存在sql注入");
resultDto.setSuccess(false); resultDto.setSuccess(false);
}else{ } else {
boolean flag = quDaoQuanXianKongZhiService.updateTimeAndFz(kssj, jssj, ksrq, tzrq, fz, qdid, qdzt); boolean flag = quDaoQuanXianKongZhiService.updateTimeAndFz(kssj, jssj, ksrq, tzrq, fz, qdid, qdzt);
resultDto.setData(flag); resultDto.setData(flag);
resultDto.setSuccess(true); resultDto.setSuccess(true);
} }
return resultDto; return resultDto;
} }
@RequestMapping("ywztSreach") @RequestMapping("ywztSreach")
@ResponseBody @ResponseBody
public ResultDto ywztSreach(HttpServletRequest request) { public ResultDto ywztSreach(HttpServletRequest request) {
String qdid = request.getParameter("qdid"); String qdid = request.getParameter("qdid");
ResultDto resultDto = new ResultDto(); ResultDto resultDto = new ResultDto();
boolean a=QuDaoXinXiGuanLiController.SqlFilter2(qdid); boolean a = QuDaoXinXiGuanLiController.SqlFilter2(qdid);
if(a){ if (a) {
resultDto.setData(0); resultDto.setData(0);
resultDto.setMessage("存在sql注入"); resultDto.setMessage("存在sql注入");
resultDto.setSuccess(false); resultDto.setSuccess(false);
}else{ } else {
List<QDYWQuanXianGuanLiDto> list = yeWuQuanXianKongZhiService.ywztSreach(qdid); List<QDYWQuanXianGuanLiDto> list = yeWuQuanXianKongZhiService.ywztSreach(qdid);
resultDto.setData(list); resultDto.setData(list);
resultDto.setSuccess(true); resultDto.setSuccess(true);
} }
return resultDto; return resultDto;
} }
@RequestMapping("updateYWZT") @RequestMapping("updateYWZT")
public void updateYWZT(HttpServletRequest request) { public void updateYWZT(HttpServletRequest request) {
String ywzt = request.getParameter("ywzt"); String ywzt = request.getParameter("ywzt");
String qdid = request.getParameter("qdid"); String qdid = request.getParameter("qdid");
String ywbm = request.getParameter("ywbm"); String ywbm = request.getParameter("ywbm");
String z=ywzt+qdid+ywbm; String z = ywzt + qdid + ywbm;
boolean a=QuDaoXinXiGuanLiController.SqlFilter2(z); boolean a = QuDaoXinXiGuanLiController.SqlFilter2(z);
if(a){ if (a) {
}else{ } else {
yeWuQuanXianKongZhiService.updateYWZT(ywzt, qdid, ywbm); yeWuQuanXianKongZhiService.updateYWZT(ywzt, qdid, ywbm);
} }
} }
@RequestMapping("updateDuanXinZT") @RequestMapping("updateDuanXinZT")
public void updateDuanXinZT(HttpServletRequest request) { public void updateDuanXinZT(HttpServletRequest request) {
String zjzxdm = request.getParameter("zjzxdm"); String zjzxdm = request.getParameter("zjzxdm");
String dxzt = request.getParameter("dxzt"); String dxzt = request.getParameter("dxzt");
String z=zjzxdm+dxzt; String z = zjzxdm + dxzt;
boolean a=QuDaoXinXiGuanLiController.SqlFilter2(z); boolean a = QuDaoXinXiGuanLiController.SqlFilter2(z);
if(a){ if (a) {
}else{ } else {
quDaoQuanXianKongZhiService.updateDuanXinZT(zjzxdm, dxzt); quDaoQuanXianKongZhiService.updateDuanXinZT(zjzxdm, dxzt);
} }
} }
// 更新渠道状态 // 更新渠道状态
@RequestMapping("updateQDZT") @RequestMapping("updateQDZT")
@ResponseBody @ResponseBody
public ResultDto updateQDZT(HttpServletRequest request) { public ResultDto updateQDZT(HttpServletRequest request) {
// 渠道id // 渠道id
String qdid = request.getParameter("qdid"); String qdid = request.getParameter("qdid");
// 阀值 // 阀值
String fz = request.getParameter("fz"); String fz = request.getParameter("fz");
// 待机时间 // 待机时间
String djsj = request.getParameter("djsj"); String djsj = request.getParameter("djsj");
// 渠道状态 // 渠道状态
String qdzt = request.getParameter("qdzt"); String qdzt = request.getParameter("qdzt");
ResultDto resultDto = new ResultDto(); ResultDto resultDto = new ResultDto();
String z=qdid+fz+djsj+qdzt; String z = qdid + fz + djsj + qdzt;
boolean a=QuDaoXinXiGuanLiController.SqlFilter2(z); boolean a = QuDaoXinXiGuanLiController.SqlFilter2(z);
if(a){ if (a) {
resultDto.setData(0); resultDto.setData(0);
resultDto.setMessage("存在sql注入"); resultDto.setMessage("存在sql注入");
resultDto.setSuccess(false); resultDto.setSuccess(false);
}else{ } else {
resultDto = quDaoQuanXianKongZhiService.updateQDZT(qdid, fz, djsj, qdzt); resultDto = quDaoQuanXianKongZhiService.updateQDZT(qdid, fz, djsj, qdzt);
} }
return resultDto; return resultDto;
} }
// 渠道控制接口 // 渠道控制接口
@RequestMapping("qdkzInfo") @RequestMapping("qdkzInfo")
@ResponseBody @ResponseBody
public ResultDto qdkzInfo(HttpServletRequest request) { public ResultDto qdkzInfo(HttpServletRequest request) {
String qdid = request.getParameter("qdid"); String qdid = request.getParameter("qdid");
ResultDto resultDto = new ResultDto(); ResultDto resultDto = new ResultDto();
boolean a=QuDaoXinXiGuanLiController.SqlFilter2(qdid); boolean a = QuDaoXinXiGuanLiController.SqlFilter2(qdid);
if(a){ if (a) {
resultDto.setData(0); resultDto.setData(0);
resultDto.setMessage("存在sql注入"); resultDto.setMessage("存在sql注入");
resultDto.setSuccess(false); resultDto.setSuccess(false);
}else{ } else {
List<QuDaoQuanXianGuanLiDto> list = quDaoQuanXianKongZhiService.qdkzInfo(qdid); List<QuDaoQuanXianGuanLiDto> list = quDaoQuanXianKongZhiService.qdkzInfo(qdid);
resultDto.setData(list); resultDto.setData(list);
resultDto.setSuccess(true); resultDto.setSuccess(true);
} }
return resultDto; return resultDto;
} }
// 渠道业务控制接口 // 渠道业务控制接口
@RequestMapping("qdywkz") @RequestMapping("qdywkz")
@ResponseBody @ResponseBody
public ResultDto qdywkz(HttpServletRequest request) { public ResultDto qdywkz(HttpServletRequest request) {
String qdid = request.getParameter("qdid"); String qdid = request.getParameter("qdid");
String ywbm = request.getParameter("ywbm"); String ywbm = request.getParameter("ywbm");
ResultDto resultDto = new ResultDto(); ResultDto resultDto = new ResultDto();
String z=qdid+ywbm; String z = qdid + ywbm;
boolean a=QuDaoXinXiGuanLiController.SqlFilter2(z); boolean a = QuDaoXinXiGuanLiController.SqlFilter2(z);
if(a){ if (a) {
resultDto.setData(0); resultDto.setData(0);
resultDto.setMessage("存在sql注入"); resultDto.setMessage("存在sql注入");
resultDto.setSuccess(false); resultDto.setSuccess(false);
}else{ } else {
List<QDYWQuanXianGuanLiDto> list = yeWuQuanXianKongZhiService.qdywkz(qdid, ywbm); List<QDYWQuanXianGuanLiDto> list = yeWuQuanXianKongZhiService.qdywkz(qdid, ywbm);
resultDto.setData(list); resultDto.setData(list);
resultDto.setSuccess(true); resultDto.setSuccess(true);
} }
return resultDto; return resultDto;
} }
// 待机时间控制恶意刷新 // 待机时间控制恶意刷新
@RequestMapping("qx") @RequestMapping("qx")
public void AccessControl() throws ParseException { public void AccessControl() throws ParseException {
quDaoQuanXianKongZhiService.onlineUsers(); quDaoQuanXianKongZhiService.onlineUsers();
} }
// 在线人数 // 在线人数
@RequestMapping("quDaoSSKZ") @RequestMapping("quDaoSSKZ")
public void quDaoSSKZ() throws ParseException { public void quDaoSSKZ() throws ParseException {
quDaoQuanXianKongZhiService.quDaoSSKZ(); quDaoQuanXianKongZhiService.quDaoSSKZ();
} }
// 业务控制2 // 业务控制2
@RequestMapping("sreachM_YWZTKZ_2") @RequestMapping("sreachM_YWZTKZ_2")
@ResponseBody @ResponseBody
public ResultDto sreachM_YWZTKZ_2(HttpServletRequest request) { public ResultDto sreachM_YWZTKZ_2(HttpServletRequest request) {
Integer limit = Integer.parseInt(request.getParameter("limit")); Integer limit = Integer.parseInt(request.getParameter("limit"));
Integer page = Integer.parseInt(request.getParameter("page")); Integer page = Integer.parseInt(request.getParameter("page"));
// 业务操作类型2(1.查询业务2.申请业务3.其他业务类型) // 业务操作类型2(1.查询业务2.申请业务3.其他业务类型)
String ywczlx_2 = request.getParameter("ywczlx_2"); String ywczlx_2 = request.getParameter("ywczlx_2");
// 业务名称 // 业务名称
String ywmc = request.getParameter("ywmc"); String ywmc = request.getParameter("ywmc");
String ywbm = request.getParameter("ywbm"); String ywbm = request.getParameter("ywbm");
String issh = request.getParameter("issh"); String issh = request.getParameter("issh");
ResultDto resultDto = new ResultDto(); ResultDto resultDto = new ResultDto();
String z=ywczlx_2+ywmc+ywbm+issh; String z = ywczlx_2 + ywmc + ywbm + issh;
boolean a=QuDaoXinXiGuanLiController.SqlFilter2(z); boolean a = QuDaoXinXiGuanLiController.SqlFilter2(z);
if(a){ if (a) {
resultDto.setData(0); resultDto.setData(0);
resultDto.setMessage("存在sql注入"); resultDto.setMessage("存在sql注入");
resultDto.setSuccess(false); resultDto.setSuccess(false);
}else{ } else {
Map<String, Object> map = quDaoQuanXianKongZhiService.sreachM_YWZTKZ_2(limit, page, ywczlx_2, ywmc, issh, ywbm); Map<String, Object> map = quDaoQuanXianKongZhiService.sreachM_YWZTKZ_2(limit, page, ywczlx_2, ywmc, issh, ywbm);
List<M_YWZTKZ_2> list = (List<M_YWZTKZ_2>) map.get("data"); List<M_YWZTKZ_2> list = (List<M_YWZTKZ_2>) map.get("data");
int total = (int) map.get("total"); int total = (int) map.get("total");
resultDto.setData(list); resultDto.setData(list);
resultDto.setTotal(total); resultDto.setTotal(total);
resultDto.setSuccess(true); resultDto.setSuccess(true);
} }
return resultDto; return resultDto;
} }
// 修改渠道状态 // 修改渠道状态
@RequestMapping("updateQD_state") @RequestMapping("updateQD_state")
@ResponseBody @ResponseBody
public ResultDto updateQD_state(HttpServletRequest request) { public ResultDto updateQD_state(HttpServletRequest request) {
// 主键 // 主键
String primaryid = request.getParameter("primaryid"); String primaryid = request.getParameter("primaryid");
// 是否审核1.审核0.未审核 // 是否审核1.审核0.未审核
String qdzt = request.getParameter("qdzt"); String qdzt = request.getParameter("qdzt");
// 阀值 // 阀值
String fz = request.getParameter("fz"); String fz = request.getParameter("fz");
// 待机时间 // 待机时间
String djsj = request.getParameter("djsj"); String djsj = request.getParameter("djsj");
// 渠道 // 渠道
String qdid = request.getParameter("qdid"); String qdid = request.getParameter("qdid");
// 操作人 // 操作人
String czr = request.getParameter("czr"); String czr = request.getParameter("czr");
String z=primaryid+qdzt+fz+djsj+qdid+czr; String z = primaryid + qdzt + fz + djsj + qdid + czr;
ResultDto resultDto = new ResultDto(); ResultDto resultDto = new ResultDto();
boolean a=QuDaoXinXiGuanLiController.SqlFilter2(z); boolean a = QuDaoXinXiGuanLiController.SqlFilter2(z);
if(a){ if (a) {
resultDto.setData(0); resultDto.setData(0);
resultDto.setMessage("存在sql注入"); resultDto.setMessage("存在sql注入");
resultDto.setSuccess(false); resultDto.setSuccess(false);
}else{ } else {
resultDto = quDaoQuanXianKongZhiService.updateQD_state(qdzt, fz, djsj, primaryid, qdid, czr); resultDto = quDaoQuanXianKongZhiService.updateQD_state(qdzt, fz, djsj, primaryid, qdid, czr);
} }
return resultDto; return resultDto;
} }
// 修改业务状态(保存按钮) // 修改业务状态(保存按钮)
@RequestMapping("updateM_YWZTKZ_2State") @RequestMapping("updateM_YWZTKZ_2State")
@ResponseBody @ResponseBody
public ResultDto updateM_YWZTKZ_2State(HttpServletRequest request) { public ResultDto updateM_YWZTKZ_2State(HttpServletRequest request) {
// 主键 // 主键
String primaryid = request.getParameter("primaryid"); String primaryid = request.getParameter("primaryid");
// 业务状态1.开启0.停止 // 业务状态1.开启0.停止
String wxzt = request.getParameter("wxzt"); String wxzt = request.getParameter("wxzt");
String wtzt = request.getParameter("wtzt"); String wtzt = request.getParameter("wtzt");
String appzt = request.getParameter("appzt"); String appzt = request.getParameter("appzt");
String znzdzt = request.getParameter("znzdzt"); String znzdzt = request.getParameter("znzdzt");
// 启用结束时间 String zh308zt = request.getParameter("zh308zt");
String qyjssj = request.getParameter("qyjssj"); String sjzt = request.getParameter("sjzt");
// 启用开始时间 // 启用结束时间
String qykssj = request.getParameter("qykssj"); String qyjssj = request.getParameter("qyjssj");
// 启用开始日期 // 启用开始时间
String qyksrq = request.getParameter("qyksrq"); String qykssj = request.getParameter("qykssj");
// 启用结束日期 // 启用开始日期
String qyjsrq = request.getParameter("qyjsrq"); String qyksrq = request.getParameter("qyksrq");
// 操作类型 // 启用结束日期
String czlx = request.getParameter("czlx"); String qyjsrq = request.getParameter("qyjsrq");
// 操作人 // 操作类型
String czr = request.getParameter("czr"); String czlx = request.getParameter("czlx");
// 启用时间段 // 操作人
String qysjd = request.getParameter("qysjd"); String czr = request.getParameter("czr");
// 业务名称 // 启用时间段
String ywbm = request.getParameter("ywbm"); String qysjd = request.getParameter("qysjd");
// 业务类别 // 业务名称
String ywlb = request.getParameter("ywlb"); String ywbm = request.getParameter("ywbm");
ResultDto resultDto = new ResultDto(); // 业务类别
String z=primaryid+wxzt+wtzt+appzt+znzdzt+qyjssj+qykssj+qyksrq+qyjsrq+czlx+czr+qysjd+ywbm+ywlb; String ywlb = request.getParameter("ywlb");
boolean a=QuDaoXinXiGuanLiController.SqlFilter2(z); ResultDto resultDto = new ResultDto();
if(a){ String z = primaryid + wxzt + wtzt + appzt + znzdzt + zh308zt + sjzt + qyjssj + qykssj + qyksrq + qyjsrq + czlx + czr + qysjd + ywbm + ywlb;
resultDto.setData(0); boolean a = QuDaoXinXiGuanLiController.SqlFilter2(z);
resultDto.setMessage("存在sql注入"); if (a) {
resultDto.setSuccess(false); resultDto.setData(0);
}else{ resultDto.setMessage("存在sql注入");
resultDto = quDaoQuanXianKongZhiService.updateM_YWZTKZ_2State(primaryid, wtzt, wxzt, appzt, znzdzt, resultDto.setSuccess(false);
qyjssj, qykssj, qyksrq, qyjsrq, czlx, czr, qysjd, ywbm, ywlb); } else {
} resultDto = quDaoQuanXianKongZhiService.updateM_YWZTKZ_2State(primaryid, wtzt, wxzt, appzt, znzdzt, zh308zt, sjzt,
return resultDto; qyjssj, qykssj, qyksrq, qyjsrq, czlx, czr, qysjd, ywbm, ywlb);
} }
return resultDto;
// 审核业务状态(审核按钮) }
@RequestMapping("updateSHState")
@ResponseBody // 审核业务状态(审核按钮)
public ResultDto updateSHState(HttpServletRequest request) { @RequestMapping("updateSHState")
ResultDto resultDto = new ResultDto(); @ResponseBody
// 主键 public ResultDto updateSHState(HttpServletRequest request) {
String primaryid = request.getParameter("primaryid"); ResultDto resultDto = new ResultDto();
// 主键
String czlx = request.getParameter("czlx"); String primaryid = request.getParameter("primaryid");
String ywlb = request.getParameter("ywlb"); String czlx = request.getParameter("czlx");
String ywbm = request.getParameter("ywbm");
String qysjd = request.getParameter("qysjd"); String ywlb = request.getParameter("ywlb");
String czr = request.getParameter("czr"); String ywbm = request.getParameter("ywbm");
String wxzt = request.getParameter("wxzt"); String qysjd = request.getParameter("qysjd");
String appzt = request.getParameter("appzt"); String czr = request.getParameter("czr");
String znzdzt = request.getParameter("znzdzt"); String wxzt = request.getParameter("wxzt");
String wtzt = request.getParameter("wtzt"); String appzt = request.getParameter("appzt");
String z=primaryid+czlx+ywlb+ywbm+qysjd+czr+wxzt+appzt+znzdzt+wtzt; String znzdzt = request.getParameter("znzdzt");
boolean a=QuDaoXinXiGuanLiController.SqlFilter2(z); String zh308zt = request.getParameter("zh308zt");
if(a){ String sjzt = request.getParameter("sjzt");
resultDto.setData(0); String wtzt = request.getParameter("wtzt");
resultDto.setMessage("存在sql注入"); String z = primaryid + czlx + ywlb + ywbm + qysjd + czr + wxzt + appzt + znzdzt + zh308zt + sjzt + wtzt;
resultDto.setSuccess(false); boolean a = QuDaoXinXiGuanLiController.SqlFilter2(z);
}else{ if (a) {
resultDto = quDaoQuanXianKongZhiService.updateSHState(primaryid, czlx, ywlb, ywbm, qysjd, czr, wxzt, appzt, znzdzt, wtzt); resultDto.setData(0);
} resultDto.setMessage("存在sql注入");
return resultDto; resultDto.setSuccess(false);
} } else {
resultDto = quDaoQuanXianKongZhiService.updateSHState(primaryid, czlx, ywlb, ywbm, qysjd, czr, wxzt, appzt, znzdzt, zh308zt, sjzt, wtzt);
// 渠道状态接口 }
@RequestMapping("qdztkzInterface") return resultDto;
@ResponseBody }
public ResultDto qdztkzInterface(HttpServletRequest request) {
// 业务编码 // 渠道状态接口
ResultDto resultDto = new ResultDto(); @RequestMapping("qdztkzInterface")
String ywbm = request.getParameter("ywbm"); @ResponseBody
String qdid = request.getParameter("qdid"); public ResultDto qdztkzInterface(HttpServletRequest request) {
String z=ywbm+qdid; // 业务编码
boolean a=QuDaoXinXiGuanLiController.SqlFilter2(z); ResultDto resultDto = new ResultDto();
if(a){ String ywbm = request.getParameter("ywbm");
resultDto.setData(0); String qdid = request.getParameter("qdid");
resultDto.setMessage("存在sql注入"); String z = ywbm + qdid;
resultDto.setSuccess(false); boolean a = QuDaoXinXiGuanLiController.SqlFilter2(z);
}else{ if (a) {
int num = quDaoQuanXianKongZhiService.qdztkzInterface(ywbm,qdid); resultDto.setData(0);
Map<String, Object> map = new HashMap<>(); resultDto.setMessage("存在sql注入");
map.put("num", num); resultDto.setSuccess(false);
resultDto.setData(map); } else {
resultDto.setSuccess(true); int num = quDaoQuanXianKongZhiService.qdztkzInterface(ywbm, qdid);
} Map<String, Object> map = new HashMap<>();
return resultDto; map.put("num", num);
} resultDto.setData(map);
resultDto.setSuccess(true);
// 短信控制信息 }
@RequestMapping("dxkzInfo") return resultDto;
@ResponseBody }
public ResultDto dxkzInfo(HttpServletRequest request) throws Exception {
ResultDto resultDto = new ResultDto(); // 短信控制信息
String page = request.getParameter("page"); @RequestMapping("dxkzInfo")
String limit = request.getParameter("limit"); @ResponseBody
String z=page+limit; public ResultDto dxkzInfo(HttpServletRequest request) throws Exception {
boolean a=QuDaoXinXiGuanLiController.SqlFilter2(z); ResultDto resultDto = new ResultDto();
if(a){ String page = request.getParameter("page");
resultDto.setData(0); String limit = request.getParameter("limit");
resultDto.setMessage("存在sql注入"); String z = page + limit;
resultDto.setSuccess(false); boolean a = QuDaoXinXiGuanLiController.SqlFilter2(z);
}else{ if (a) {
Map<String, Object> map = quDaoQuanXianKongZhiService.dxkzInfo(page, limit); resultDto.setData(0);
List<DuanXinQuanXianGuanLiDto> list = (List<DuanXinQuanXianGuanLiDto>) map.get("list"); resultDto.setMessage("存在sql注入");
int total = (int) map.get("total"); resultDto.setSuccess(false);
resultDto.setTotal(total); } else {
resultDto.setData(list); Map<String, Object> map = quDaoQuanXianKongZhiService.dxkzInfo(page, limit);
resultDto.setSuccess(true); List<DuanXinQuanXianGuanLiDto> list = (List<DuanXinQuanXianGuanLiDto>) map.get("list");
} int total = (int) map.get("total");
return resultDto; resultDto.setTotal(total);
} resultDto.setData(list);
resultDto.setSuccess(true);
// 限额控制信息 }
@RequestMapping("xekzInfo") return resultDto;
@ResponseBody }
public ResultDto xekzInfo(HttpServletRequest request) throws Exception {
List<M_XEKZB> list = quDaoQuanXianKongZhiService.xekzInfo(); // 限额控制信息
ResultDto resultDto = new ResultDto(); @RequestMapping("xekzInfo")
resultDto.setData(list); @ResponseBody
resultDto.setSuccess(true); public ResultDto xekzInfo(HttpServletRequest request) throws Exception {
return resultDto; List<M_XEKZB> list = quDaoQuanXianKongZhiService.xekzInfo();
} ResultDto resultDto = new ResultDto();
resultDto.setData(list);
// 修改限额值 resultDto.setSuccess(true);
@RequestMapping("xeUpdate") return resultDto;
@ResponseBody }
public ResultDto xeUpdate(HttpServletRequest request) {
ResultDto resultDto = new ResultDto(); // 修改限额值
// 主键 @RequestMapping("xeUpdate")
String id = request.getParameter("id"); @ResponseBody
// 限额值 public ResultDto xeUpdate(HttpServletRequest request) {
String value = request.getParameter("value"); ResultDto resultDto = new ResultDto();
String zString=id+value; // 主键
boolean a=QuDaoXinXiGuanLiController.SqlFilter2(zString); String id = request.getParameter("id");
if(a){ // 限额值
resultDto.setData(0); String value = request.getParameter("value");
resultDto.setMessage("存在sql注入"); String zString = id + value;
resultDto.setSuccess(false); boolean a = QuDaoXinXiGuanLiController.SqlFilter2(zString);
}else{ if (a) {
resultDto = quDaoQuanXianKongZhiService.xeUpdate(id, value); resultDto.setData(0);
} resultDto.setMessage("存在sql注入");
return resultDto; resultDto.setSuccess(false);
} } else {
resultDto = quDaoQuanXianKongZhiService.xeUpdate(id, value);
// 渠道总控修改日志记录 }
@RequestMapping("qdzkLoggingInfo") return resultDto;
@ResponseBody }
public ResultDto qdzkLoggingInfo(HttpServletRequest request) {
ResultDto resultDto = new ResultDto(); // 渠道总控修改日志记录
Integer limit = Integer.parseInt(request.getParameter("limit")); @RequestMapping("qdzkLoggingInfo")
Integer page = Integer.parseInt(request.getParameter("page")); @ResponseBody
String czsj = request.getParameter("czsj"); public ResultDto qdzkLoggingInfo(HttpServletRequest request) {
String qdid = request.getParameter("qdid"); ResultDto resultDto = new ResultDto();
String z=limit+page+czsj+qdid; Integer limit = Integer.parseInt(request.getParameter("limit"));
boolean a=QuDaoXinXiGuanLiController.SqlFilter2(z); Integer page = Integer.parseInt(request.getParameter("page"));
if(a){ String czsj = request.getParameter("czsj");
resultDto.setData(0); String qdid = request.getParameter("qdid");
resultDto.setMessage("存在sql注入"); String z = limit + page + czsj + qdid;
resultDto.setSuccess(false); boolean a = QuDaoXinXiGuanLiController.SqlFilter2(z);
}else{ if (a) {
Map<String, Object> map = quDaoQuanXianKongZhiService.qdzkLoggingInfo(qdid,czsj,page, limit); resultDto.setData(0);
List<QdzkLoggingInfoDto> list = (List<QdzkLoggingInfoDto>) map.get("data"); resultDto.setMessage("存在sql注入");
int total = (int) map.get("total"); resultDto.setSuccess(false);
resultDto.setData(list); } else {
resultDto.setTotal(total); Map<String, Object> map = quDaoQuanXianKongZhiService.qdzkLoggingInfo(qdid, czsj, page, limit);
resultDto.setSuccess(true); List<QdzkLoggingInfoDto> list = (List<QdzkLoggingInfoDto>) map.get("data");
} int total = (int) map.get("total");
return resultDto; resultDto.setData(list);
} resultDto.setTotal(total);
resultDto.setSuccess(true);
// 渠道总控修改日志记录 }
@RequestMapping("fwkzLoggingInfo") return resultDto;
@ResponseBody }
public ResultDto fwkzLoggingInfo(HttpServletRequest request) {
Integer limit = Integer.parseInt(request.getParameter("limit")); // 渠道总控修改日志记录
Integer page = Integer.parseInt(request.getParameter("page")); @RequestMapping("fwkzLoggingInfo")
String ywbm = request.getParameter("ywbm"); @ResponseBody
ResultDto resultDto = new ResultDto(); public ResultDto fwkzLoggingInfo(HttpServletRequest request) {
String z=limit+page+ywbm; Integer limit = Integer.parseInt(request.getParameter("limit"));
boolean a=QuDaoXinXiGuanLiController.SqlFilter2(z); Integer page = Integer.parseInt(request.getParameter("page"));
if(a){ String ywbm = request.getParameter("ywbm");
resultDto.setData(0); ResultDto resultDto = new ResultDto();
resultDto.setMessage("存在sql注入"); String z = limit + page + ywbm;
resultDto.setSuccess(false); boolean a = QuDaoXinXiGuanLiController.SqlFilter2(z);
}else{ if (a) {
Map<String, Object> map = quDaoQuanXianKongZhiService.fwkzLoggingInfo(page, limit, ywbm); resultDto.setData(0);
List<FwkzLogginInfoDto> list = (List<FwkzLogginInfoDto>) map.get("data"); resultDto.setMessage("存在sql注入");
int total = (int) map.get("total"); resultDto.setSuccess(false);
resultDto.setData(list); } else {
resultDto.setTotal(total); Map<String, Object> map = quDaoQuanXianKongZhiService.fwkzLoggingInfo(page, limit, ywbm);
resultDto.setSuccess(true); List<FwkzLogginInfoDto> list = (List<FwkzLogginInfoDto>) map.get("data");
} int total = (int) map.get("total");
return resultDto; resultDto.setData(list);
} resultDto.setTotal(total);
resultDto.setSuccess(true);
}
return resultDto;
}
} }
package com.changda.gjjapp.zhfwpt.dao.qdywqxgl; package com.changda.gjjapp.zhfwpt.dao.qdywqxgl;
import java.util.List;
import java.util.Map;
import org.apache.ibatis.annotations.Param;
import com.changda.cd4j.foundation.core.persistence.annotation.MyBatisDao; import com.changda.cd4j.foundation.core.persistence.annotation.MyBatisDao;
import com.changda.gjjapp.db.entity.M_XEKZB; import com.changda.gjjapp.db.entity.M_XEKZB;
import com.changda.gjjapp.db.entity.M_YWZTKZ_2; import com.changda.gjjapp.db.entity.M_YWZTKZ_2;
...@@ -12,6 +7,10 @@ import com.changda.gjjapp.zhfwpt.dto.qdywqxgl.DuanXinQuanXianGuanLiDto; ...@@ -12,6 +7,10 @@ import com.changda.gjjapp.zhfwpt.dto.qdywqxgl.DuanXinQuanXianGuanLiDto;
import com.changda.gjjapp.zhfwpt.dto.qdywqxgl.FwkzLogginInfoDto; import com.changda.gjjapp.zhfwpt.dto.qdywqxgl.FwkzLogginInfoDto;
import com.changda.gjjapp.zhfwpt.dto.qdywqxgl.Page2; import com.changda.gjjapp.zhfwpt.dto.qdywqxgl.Page2;
import com.changda.gjjapp.zhfwpt.dto.qdywqxgl.QdzkLoggingInfoDto; import com.changda.gjjapp.zhfwpt.dto.qdywqxgl.QdzkLoggingInfoDto;
import org.apache.ibatis.annotations.Param;
import java.util.List;
import java.util.Map;
/** /**
* 渠道权限管理 * 渠道权限管理
...@@ -89,155 +88,181 @@ public interface QuDaoQuanXianGuanLiDao { ...@@ -89,155 +88,181 @@ public interface QuDaoQuanXianGuanLiDao {
* @param dxzt 短信状态 * @param dxzt 短信状态
*/ */
void updateDuanXinZT(@Param("zjzxdm") String zjzxdm, @Param("dxzt") String dxzt); void updateDuanXinZT(@Param("zjzxdm") String zjzxdm, @Param("dxzt") String dxzt);
/** /**
* 渠道控制接口 * 渠道控制接口
*
* @param qdid * @param qdid
* @return * @return
*/ */
List<Map<String, Object>> qdkzInfo(@Param("qdid")String qdid); List<Map<String, Object>> qdkzInfo(@Param("qdid") String qdid);
/** /**
* 在线人数计算 * 在线人数计算
*
* @param qdid * @param qdid
* @return * @return
*/ */
List<Map<String, Object>> onlineUsers(@Param("qdid")String qdid); List<Map<String, Object>> onlineUsers(@Param("qdid") String qdid);
/** /**
* 更新在线状态 * 更新在线状态
*
* @param id * @param id
* @return * @return
*/ */
int updateOnlineUsers2(@Param("qdid")String qdid,@Param("djsj")String djsj); int updateOnlineUsers2(@Param("qdid") String qdid, @Param("djsj") String djsj);
/** /**
* 更新渠道状态 * 更新渠道状态
*
* @param qdid * @param qdid
* @return * @return
*/ */
int updateQDZT(@Param("qdid")String qdid,@Param("qdzt")String qdzt,@Param("fz")String fz,@Param("djsj")String djsj); int updateQDZT(@Param("qdid") String qdid, @Param("qdzt") String qdzt, @Param("fz") String fz, @Param("djsj") String djsj);
/** /**
* 业务控制2 * 业务控制2
*
* @return * @return
*/ */
List<M_YWZTKZ_2> sreachM_YWZTKZ_2(@Param("ywczlx_2")String ywczlx_2,@Param("ywmc")String ywmc,@Param("issh")String issh,@Param("ywbm")String ywbm); List<M_YWZTKZ_2> sreachM_YWZTKZ_2(@Param("ywczlx_2") String ywczlx_2, @Param("ywmc") String ywmc, @Param("issh") String issh, @Param("ywbm") String ywbm);
/** /**
* 修改业务状态 * 修改业务状态
*
* @param primaryid 主键 * @param primaryid 主键
* @param issh 是否审核 * @param issh 是否审核
* @param ywzt 业务状态 * @param ywzt 业务状态
* @param tzjssj 停止结束时间 * @param tzjssj 停止结束时间
* @param tzkssj 停止开始时间 * @param tzkssj 停止开始时间
* @return * @return
*/ */
int updateM_YWZTKZ_2State(@Param("primaryid")String primaryid,@Param("wtzt")String wtzt,@Param("wxzt") String wxzt,@Param("appzt") String appzt,@Param("znzdzt") String znzdzt,@Param("qyjssj")String qyjssj,@Param("qykssj")String qykssj,@Param("qyksrq")String qyksrq,@Param("qyjsrq")String qyjsrq,@Param("czlx")String czlx); int updateM_YWZTKZ_2State(@Param("primaryid") String primaryid, @Param("wtzt") String wtzt, @Param("wxzt") String wxzt,
@Param("appzt") String appzt, @Param("znzdzt") String znzdzt, @Param("zh308zt") String zh308zt,
@Param("sjzt") String sjzt, @Param("qyjssj") String qyjssj, @Param("qykssj") String qykssj,
@Param("qyksrq") String qyksrq, @Param("qyjsrq") String qyjsrq, @Param("czlx") String czlx);
/** /**
* 渠道状态修改 * 渠道状态修改
* @param qdzt 渠道状态 *
* @param fz 阈值 * @param qdzt 渠道状态
* @param djsj 待机时间 * @param fz 阈值
* @param djsj 待机时间
* @param primaryid 主键ID * @param primaryid 主键ID
* @return * @return
*/ */
int updateQD_state(@Param("qdzt")String qdzt,@Param("fz")String fz,@Param("djsj")String djsj,@Param("primaryid")String primaryid); int updateQD_state(@Param("qdzt") String qdzt, @Param("fz") String fz, @Param("djsj") String djsj, @Param("primaryid") String primaryid);
/** /**
* 渠道总控修改日志记录 * 渠道总控修改日志记录
*
* @return * @return
*/ */
List<QdzkLoggingInfoDto> qdzkLoggingInfo(@Param("czsj")String czsj,@Param("qdid")String qdid); List<QdzkLoggingInfoDto> qdzkLoggingInfo(@Param("czsj") String czsj, @Param("qdid") String qdid);
/** /**
* 渠道总控修改日志记录 * 渠道总控修改日志记录
*
* @param qdzt 渠道状态 * @param qdzt 渠道状态
* @param fz 阀值 * @param fz 阀值
* @param djsj 待机时间 * @param djsj 待机时间
* @param qdmc 渠道名称 * @param qdmc 渠道名称
* @param czr 操作人 * @param czr 操作人
* @param czzt 操作状态 * @param czzt 操作状态
* @return * @return
*/ */
int qdzkLogging(@Param("qdzt")String qdzt,@Param("fz")String fz,@Param("djsj")String djsj,@Param("qdid")String qdid,@Param("czr")String czr,@Param("czzt")String czzt); int qdzkLogging(@Param("qdzt") String qdzt, @Param("fz") String fz, @Param("djsj") String djsj, @Param("qdid") String qdid, @Param("czr") String czr, @Param("czzt") String czzt);
/** /**
* 修改业务状态 * 修改业务状态
* @param issh 是否审核1.审核0.未审核 *
* @param issh 是否审核1.审核0.未审核
* @param primaryid 主键id * @param primaryid 主键id
* @return * @return
*/ */
int updateYWZT2(@Param("issh")String issh,@Param("primaryid")String primaryid,@Param("czlx")String czlx); int updateYWZT2(@Param("issh") String issh, @Param("primaryid") String primaryid, @Param("czlx") String czlx);
/** /**
* 修改审核后业务状态 * 修改审核后业务状态
*
* @param mYwztkz_2 * @param mYwztkz_2
* @return * @return
*/ */
int updateSHState(@Param("primaryid")String primaryid,@Param("czlx")String czlx); int updateSHState(@Param("primaryid") String primaryid, @Param("czlx") String czlx);
/** /**
* 渠道业务控制 shywzt是否开启1.开启0.未开启 * 渠道业务控制 shywzt是否开启1.开启0.未开启
*
* @return * @return
*/ */
M_YWZTKZ_2 qdztkzInterface(@Param("ywbm")String ywbm); M_YWZTKZ_2 qdztkzInterface(@Param("ywbm") String ywbm);
/** /**
* 渠道业务控制 是否在审核过的时间范围内 * 渠道业务控制 是否在审核过的时间范围内
*
* @return * @return
*/ */
int qdztkzInterface2(@Param("ywbm")String ywbm,@Param("day")String day,@Param("sj")String sj); int qdztkzInterface2(@Param("ywbm") String ywbm, @Param("day") String day, @Param("sj") String sj);
/** /**
* 短信控制信息 * 短信控制信息
*
* @return * @return
*/ */
List<DuanXinQuanXianGuanLiDto> dxkzInfo(); List<DuanXinQuanXianGuanLiDto> dxkzInfo();
/** /**
* 短信控制信息查询临时表 * 短信控制信息查询临时表
*
* @return * @return
*/ */
List<DuanXinQuanXianGuanLiDto> tMP_SMS_DIS(@Param("sizeCountStart")String sizeCountStart,@Param("sizeCountEnd")String sizeCountEnd); List<DuanXinQuanXianGuanLiDto> tMP_SMS_DIS(@Param("sizeCountStart") String sizeCountStart, @Param("sizeCountEnd") String sizeCountEnd);
/** /**
* 短信控制信息查询临时表2 * 短信控制信息查询临时表2
*
* @return * @return
*/ */
List<Page2> tMP_SMS_DIS2(); List<Page2> tMP_SMS_DIS2();
/** /**
* 限额控制信息 * 限额控制信息
*
* @return * @return
*/ */
List<M_XEKZB> xekzInfo(); List<M_XEKZB> xekzInfo();
/** /**
* 修改限额值 * 修改限额值
*
* @param id * @param id
* @return * @return
*/ */
int xeUpdate(@Param("id")String id,@Param("value")String value); int xeUpdate(@Param("id") String id, @Param("value") String value);
/** /**
* 服务控制日志记录 * 服务控制日志记录
* @param ywlb 业务类别 *
* @param ywmc 业务名称 * @param ywlb 业务类别
* @param ywmc 业务名称
* @param qdqyzt 渠道启用状态 * @param qdqyzt 渠道启用状态
* @param qysjd 启用时间段 * @param qysjd 启用时间段
* @param czr 操作人 * @param czr 操作人
* @param czzt 操作状态(操作状态0.保存1.修改2.删除3.审核) * @param czzt 操作状态(操作状态0.保存1.修改2.删除3.审核)
* @return * @return
*/ */
int fwkzLogging(@Param("ywlb")String ywlb,@Param("ywbm")String ywbm,@Param("qysjd")String qysjd,@Param("czr")String czr,@Param("czzt")String czzt,@Param("wxzt")String wxzt,@Param("appzt")String appzt,@Param("znzdzt")String znzdzt,@Param("wtzt")String wtzt); int fwkzLogging(@Param("ywlb") String ywlb, @Param("ywbm") String ywbm, @Param("qysjd") String qysjd,
@Param("czr") String czr, @Param("czzt") String czzt, @Param("wxzt") String wxzt,
@Param("appzt") String appzt, @Param("znzdzt") String znzdzt, @Param("zh308zt") String zh308zt, @Param("sjzt") String sjzt,
@Param("wtzt") String wtzt);
/** /**
* 服务控制日志 * 服务控制日志
*
* @param czsj * @param czsj
* @return * @return
*/ */
List<FwkzLogginInfoDto> fwkzLoggingInfo(@Param("ywbm")String ywbm); List<FwkzLogginInfoDto> fwkzLoggingInfo(@Param("ywbm") String ywbm);
} }
...@@ -48,7 +48,15 @@ public class FwkzLogginInfoDto { ...@@ -48,7 +48,15 @@ public class FwkzLogginInfoDto {
// 智能终端状态(1.开启0.关闭) // 智能终端状态(1.开启0.关闭)
@JsonProperty("ZNZDZT") @JsonProperty("ZNZDZT")
private int znzdzt; private int znzdzt;
// 招行渠道编辑状态1.开启0.停止
@JsonProperty("ZH308ZT")
private int zh308zt;
// 住建部手机小程序渠道 编辑状态 1.开启0.停止
@JsonProperty("SJZT")
private int sjzt;
// 微信状态(1.开启0.关闭) // 微信状态(1.开启0.关闭)
@JsonProperty("WXZT") @JsonProperty("WXZT")
private int wxzt; private int wxzt;
...@@ -162,6 +170,20 @@ public class FwkzLogginInfoDto { ...@@ -162,6 +170,20 @@ public class FwkzLogginInfoDto {
{ {
this.wxzt = wxzt; this.wxzt = wxzt;
} }
public int getZh308zt() {
return zh308zt;
}
public void setZh308zt(int zh308zt) {
this.zh308zt = zh308zt;
}
public int getSjzt() {
return sjzt;
}
public void setSjzt(int sjzt) {
this.sjzt = sjzt;
}
} }
...@@ -3,14 +3,14 @@ ...@@ -3,14 +3,14 @@
<mapper namespace="com.changda.gjjapp.zhfwpt.dao.qdywqxgl.QuDaoQuanXianGuanLiDao"> <mapper namespace="com.changda.gjjapp.zhfwpt.dao.qdywqxgl.QuDaoQuanXianGuanLiDao">
<select id="quDaoZhuangTaiSearch" resultType="map"> <select id="quDaoZhuangTaiSearch" resultType="map">
select a.primaryid,a.qdid,b.qdmc,a.qdzt,a.fz,a.mfzrs,a.djsj from m_qdztkz a,s_qdzd b where b.qdid = a.qdid <if test="primaryid != null and primaryid !=''">and a.primaryid = #{primaryid}</if> select a.primaryid,a.qdid,b.qdmc,a.qdzt,a.fz,a.mfzrs,a.djsj from m_qdztkz a,s_qdzd b where b.qdid = a.qdid <if test="primaryid != null and primaryid !=''">and a.primaryid = #{primaryid}</if>
</select> </select>
<select id="quDaoZhuangTai" resultType="map"> <select id="quDaoZhuangTai" resultType="map">
select * from M_QDZTKZ where qdid = #{qdid} select * from M_QDZTKZ where qdid = #{qdid}
</select> </select>
<select id="quDaoFangWenCount" resultType="int"> <select id="quDaoFangWenCount" resultType="int">
select count(*) from m_userloginrecord where qdid = #{qdid} and istc=0 select count(*) from m_userloginrecord where qdid = #{qdid} and istc=0
</select> </select>
<update id="updateQuDaoStatus"> <update id="updateQuDaoStatus">
...@@ -18,11 +18,11 @@ ...@@ -18,11 +18,11 @@
</update> </update>
<update id="updateQuDaoSSStatus"> <update id="updateQuDaoSSStatus">
update M_QDZTKZ set M_QDZTKZ.sszt = #{status} <if test="tzsj != null and tzsj !=''">, M_QDZTKZ.tzsj = update M_QDZTKZ set M_QDZTKZ.sszt = #{status}
to_date(#{tzsj},'yyyy-mm-dd hh24:mi:ss') <if test="tzsj != null and tzsj !=''">, M_QDZTKZ.tzsj = to_date(#{tzsj},'yyyy-mm-dd hh24:mi:ss')</if>
</if> where qdid = #{qdid} where qdid = #{qdid}
</update> </update>
<update id="updateOnlineUsers"> <update id="updateOnlineUsers">
update M_QDZTKZ set M_QDZTKZ.mfzrs = #{mfzrs} where qdid = #{qdid} update M_QDZTKZ set M_QDZTKZ.mfzrs = #{mfzrs} where qdid = #{qdid}
</update> </update>
...@@ -44,95 +44,126 @@ ...@@ -44,95 +44,126 @@
<select id="qdkzInfo" resultType="map"> <select id="qdkzInfo" resultType="map">
select a.qdid,b.qdmc,a.qdzt,a.fz,a.mfzrs,a.djsj from m_qdztkz a,s_qdzd b where b.qdid = a.qdid and a.qdid = #{qdid} select a.qdid,b.qdmc,a.qdzt,a.fz,a.mfzrs,a.djsj from m_qdztkz a,s_qdzd b where b.qdid = a.qdid and a.qdid = #{qdid}
</select> </select>
<select id="onlineUsers" resultType="map"> <select id="onlineUsers" resultType="map">
select * from m_userloginrecord where istc = 0 and zhczsj is not null and qdid = #{qdid} select * from m_userloginrecord where istc = 0 and zhczsj is not null and qdid = #{qdid}
</select> </select>
<update id="updateOnlineUsers2"> <update id="updateOnlineUsers2">
update m_userloginrecord set istc = 1 where istc = 0 and zhczsj is not null and to_char(sysdate-#{djsj}/24/60,'yyyy-mm-dd HH24:MI:SS') &gt; to_char(zhczsj,'yyyy-mm-dd HH24:MI:SS') and qdid = #{qdid} update m_userloginrecord set istc = 1
where istc = 0 and zhczsj is not null
and to_char(sysdate-#{djsj}/24/60,'yyyy-mm-dd HH24:MI:SS') &gt; to_char(zhczsj,'yyyy-mm-dd HH24:MI:SS')
and qdid = #{qdid}
</update> </update>
<update id="updateQDZT"> <update id="updateQDZT">
update m_qdztkz a set qdid = qdid <if test="qdzt != null and qdzt !=''">,a.qdzt = #{qdzt}</if> <if test="fz != null and fz !=''">,a.fz = #{fz} </if><if test="djsj != null and djsj !=''">, djsj = #{djsj}</if> where qdid = #{qdid} update m_qdztkz a set qdid = qdid
<if test="qdzt != null and qdzt !=''">,a.qdzt = #{qdzt}</if>
<if test="fz != null and fz !=''">,a.fz = #{fz} </if>
<if test="djsj != null and djsj !=''">, djsj = #{djsj}</if>
where qdid = #{qdid}
</update> </update>
<select id="sreachM_YWZTKZ_2" resultType="com.changda.gjjapp.db.entity.M_YWZTKZ_2"> <select id="sreachM_YWZTKZ_2" resultType="com.changda.gjjapp.db.entity.M_YWZTKZ_2">
select b.ywczlx_2 as ywczlx,a.primaryid,a.ywbm,a.ywmc,a.issh,substr(a.qykssj,1,2) kshh,substr(a.qykssj,3,2) ksmm,substr(a.qyjssj,1,2) jshh,substr(a.qyjssj,3,2) jsmm,a.qyksrq,a.qyjsrq,a.shwtzt,a.shappzt,a.shwxzt,a.shznzdzt select b.ywczlx_2 as ywczlx,a.primaryid,a.ywbm,a.ywmc,a.issh,substr(a.qykssj,1,2) kshh,substr(a.qykssj,3,2) ksmm,substr(a.qyjssj,1,2) jshh,substr(a.qyjssj,3,2) jsmm,
,a.shqyksrq||'日'||substr(a.shqykssj,1,2)||'时'||substr(a.shqykssj,3,2)||'分至'||a.shqyjsrq||'日'||substr(a.shqyjssj,1,2)||'时'||substr(a.shqyjssj,3,2)||'分' as dqzxsjd,a.wtzt,a.wxzt,a.znzdzt,a.appzt, a.qyksrq,a.qyjsrq,a.shwtzt,a.shappzt,a.shwxzt,a.shznzdzt,a.shzh308zt,a.shsjzt,
(case b.ywczlx_2 when 1 then '查询业务' when 2 then '申请业务' when 3 then '其他业务' end) czlx a.shqyksrq||'日'||substr(a.shqykssj,1,2)||'时'||substr(a.shqykssj,3,2)||'分至'||a.shqyjsrq||'日'||substr(a.shqyjssj,1,2)||'时'||substr(a.shqyjssj,3,2)||'分' as dqzxsjd,
from m_ywztkz_2 a,s_ywzd b where a.ywbm = b.bm a.wtzt,a.wxzt,a.znzdzt,a.zh308zt,a.sjzt,a.appzt,
<if test="ywczlx_2 != null and ywczlx_2 !=''"> and b.ywczlx_2 = #{ywczlx_2}</if> (case b.ywczlx_2 when 1 then '查询业务' when 2 then '申请业务' when 3 then '其他业务' end) czlx
<if test="ywmc != null and ywmc !=''"> and b.ywmc like '%${ywmc}%'</if> from m_ywztkz_2 a,s_ywzd b
<if test="issh != null and issh !=''"> and a.issh = #{issh}</if> where a.ywbm = b.bm
<if test="ywbm != null and ywbm !=''"> and a.ywbm = #{ywbm}</if> <if test="ywczlx_2 != null and ywczlx_2 !=''"> and b.ywczlx_2 = #{ywczlx_2}</if>
order by b.sort <if test="ywmc != null and ywmc !=''"> and b.ywmc like '%${ywmc}%'</if>
<if test="issh != null and issh !=''"> and a.issh = #{issh}</if>
<if test="ywbm != null and ywbm !=''"> and a.ywbm = #{ywbm}</if>
order by b.sort
</select> </select>
<update id="updateM_YWZTKZ_2State"> <update id="updateM_YWZTKZ_2State">
update M_YWZTKZ_2 a set a.primaryid = a.primaryid <if test="qykssj != null and qykssj !='' and qyjssj != null and qyjssj !='' and qyksrq != null and qyksrq !='' and qyjsrq != null and qyjsrq !=''">,a.qykssj = #{qykssj},a.qyjssj=#{qyjssj},a.qyksrq = #{qyksrq},a.qyjsrq =#{qyjsrq}</if>,a.wxzt = #{wxzt},a.appzt = #{appzt},a.wtzt = #{wtzt},a.znzdzt = #{znzdzt} update M_YWZTKZ_2 a set a.primaryid = a.primaryid
where 1=1 <if test="primaryid != null and primaryid !=''">and a.primaryid = #{primaryid}</if> <if test="czlx != null and czlx !=''">and a.ywbm in (select b.bm from s_ywzd b where b.ywczlx_2 = #{czlx})</if> <if test="qykssj != null and qykssj !='' and qyjssj != null and qyjssj !='' and qyksrq != null and qyksrq !='' and qyjsrq != null and qyjsrq !=''">
, a.qykssj = #{qykssj},a.qyjssj=#{qyjssj},a.qyksrq = #{qyksrq},a.qyjsrq =#{qyjsrq}
</if>
,a.wxzt = #{wxzt},a.appzt = #{appzt},a.wtzt = #{wtzt},a.znzdzt = #{znzdzt},a.zh308zt = #{zh308zt},a.sjzt = #{sjzt}
where 1=1
<if test="primaryid != null and primaryid !=''">and a.primaryid = #{primaryid}</if>
<if test="czlx != null and czlx !=''">and a.ywbm in (select b.bm from s_ywzd b where b.ywczlx_2 = #{czlx})</if>
</update> </update>
<update id="updateQD_state"> <update id="updateQD_state">
update m_qdztkz a set a.primaryid = a.primaryid <if test="qdzt != null and qdzt !=''">,a.qdzt = #{qdzt}</if> <if test="fz != null and fz !=''">,a.fz = #{fz}</if><if test="djsj != null and djsj !=''">,djsj = #{djsj} </if> update m_qdztkz a set a.primaryid = a.primaryid
<if test="qdzt != null and qdzt !=''">,a.qdzt = #{qdzt}</if>
<if test="fz != null and fz !=''">,a.fz = #{fz}</if>
<if test="djsj != null and djsj !=''">,djsj = #{djsj} </if>
where a.primaryid = #{primaryid} where a.primaryid = #{primaryid}
</update> </update>
<select id="qdzkLoggingInfo" resultType="com.changda.gjjapp.zhfwpt.dto.qdywqxgl.QdzkLoggingInfoDto"> <select id="qdzkLoggingInfo" resultType="com.changda.gjjapp.zhfwpt.dto.qdywqxgl.QdzkLoggingInfoDto">
select b.qdmc,a.fz,(case when a.qdzt=1 then '开启' when a.qdzt=0 then '关闭' end) qdzt,a.djsj,a.czsj,a.czr,(case when a.czzt=0 then '保存' when a.czzt=1 then '修改' when a.czzt=2 then '删除' when a.czzt = 3 then '审核' end) czzt from m_logging_qdzk a,s_qdzd b where a.qdid = b.qdid and a.qdid = #{qdid} <if test="czsj != null and czsj !=''">and to_char(a.czsj,'yyyy-mm-dd') = #{czsj}</if> order by a.czsj desc select b.qdmc,a.fz,(case when a.qdzt=1 then '开启' when a.qdzt=0 then '关闭' end) qdzt,a.djsj,a.czsj,a.czr,
(case when a.czzt=0 then '保存' when a.czzt=1 then '修改' when a.czzt=2 then '删除' when a.czzt = 3 then '审核' end) czzt
from m_logging_qdzk a,s_qdzd b
where a.qdid = b.qdid and a.qdid = #{qdid}
<if test="czsj != null and czsj !=''">and to_char(a.czsj,'yyyy-mm-dd') = #{czsj}</if>
order by a.czsj desc
</select> </select>
<insert id="qdzkLogging"> <insert id="qdzkLogging">
insert into m_logging_qdzk(qdid,fz,qdzt,djsj,czsj,czr,czzt) values(#{qdid},#{fz},#{qdzt},#{djsj},sysdate,#{czr},#{czzt}) insert into m_logging_qdzk(qdid,fz,qdzt,djsj,czsj,czr,czzt) values(#{qdid},#{fz},#{qdzt},#{djsj},sysdate,#{czr},#{czzt})
</insert> </insert>
<update id="updateYWZT2"> <update id="updateYWZT2">
update M_YWZTKZ_2 a set a.issh = #{issh} where 1=1 <if test="primaryid != null and primaryid !=''">and a.primaryid = #{primaryid}</if> update M_YWZTKZ_2 a set a.issh = #{issh} where 1=1 <if test="primaryid != null and primaryid !=''">and a.primaryid = #{primaryid}</if>
<if test="czlx != null and czlx !=''">and a.ywbm in (select b.bm from s_ywzd b where b.ywczlx_2 = #{czlx})</if> <if test="czlx != null and czlx !=''">and a.ywbm in (select b.bm from s_ywzd b where b.ywczlx_2 = #{czlx})</if>
</update> </update>
<update id="updateSHState"> <update id="updateSHState">
update M_YWZTKZ_2 a set a.shqykssj = a.qykssj,a.shqyjssj=a.qyjssj,a.shqyksrq = a.qyksrq,a.shqyjsrq =a.qyjsrq,a.shwtzt = a.wtzt,a.shwxzt = a.wxzt,a.shappzt = a.appzt,a.shznzdzt = a.znzdzt update M_YWZTKZ_2 a set a.shqykssj = a.qykssj,a.shqyjssj=a.qyjssj,a.shqyksrq = a.qyksrq,a.shqyjsrq =a.qyjsrq,
where 1=1 <if test="primaryid != null and primaryid !=''">and a.primaryid = #{primaryid}</if> <if test="czlx != null and czlx !=''">and a.ywbm in (select b.bm from s_ywzd b where b.ywczlx_2 = #{czlx})</if> a.shwtzt = a.wtzt,a.shwxzt = a.wxzt,a.shappzt = a.appzt,a.shznzdzt = a.znzdzt,a.shzh308zt = a.zh308zt,a.shsjzt = a.sjzt
where 1=1
<if test="primaryid != null and primaryid !=''">and a.primaryid = #{primaryid}</if>
<if test="czlx != null and czlx !=''">and a.ywbm in (select b.bm from s_ywzd b where b.ywczlx_2 = #{czlx})</if>
</update> </update>
<select id="qdztkzInterface" resultType="com.changda.gjjapp.db.entity.M_YWZTKZ_2"> <select id="qdztkzInterface" resultType="com.changda.gjjapp.db.entity.M_YWZTKZ_2">
select * from m_ywztkz_2 a where a.ywbm=#{ywbm} select * from m_ywztkz_2 a where a.ywbm=#{ywbm}
</select> </select>
<select id="qdztkzInterface2" resultType="int"> <select id="qdztkzInterface2" resultType="int">
select count(*) from m_ywztkz_2 a where a.ywbm=#{ywbm} and #{day} between a.shqyksrq and a.shqyjsrq and #{sj} between a.shqykssj and a.shqyjssj select count(*) from m_ywztkz_2 a where a.ywbm=#{ywbm} and #{day} between a.shqyksrq and a.shqyjsrq and #{sj} between a.shqykssj and a.shqyjssj
</select> </select>
<select id="dxkzInfo" statementType="CALLABLE" > <select id="dxkzInfo" statementType="CALLABLE" >
<![CDATA[ <![CDATA[
{call SMS_CONTROL.SMS_SEL2} {call SMS_CONTROL.SMS_SEL2}
]]> ]]>
</select> </select>
<select id="tMP_SMS_DIS" resultType="com.changda.gjjapp.zhfwpt.dto.qdywqxgl.DuanXinQuanXianGuanLiDto"> <select id="tMP_SMS_DIS" resultType="com.changda.gjjapp.zhfwpt.dto.qdywqxgl.DuanXinQuanXianGuanLiDto">
select * from TMP_SMS_DIS select * from TMP_SMS_DIS
</select> </select>
<select id="tMP_SMS_DIS2" resultType="com.changda.gjjapp.zhfwpt.dto.qdywqxgl.Page2"> <select id="tMP_SMS_DIS2" resultType="com.changda.gjjapp.zhfwpt.dto.qdywqxgl.Page2">
select count (*) as rowCount from TMP_SMS_DIS select count (*) as rowCount from TMP_SMS_DIS
</select> </select>
<select id="xekzInfo" resultType="com.changda.gjjapp.db.entity.M_XEKZB"> <select id="xekzInfo" resultType="com.changda.gjjapp.db.entity.M_XEKZB">
select * from m_xekzb select * from m_xekzb
</select> </select>
<update id="xeUpdate"> <update id="xeUpdate">
update m_xekzb a set a.value = #{value} where id = #{id} update m_xekzb a set a.value = #{value} where id = #{id}
</update> </update>
<insert id="fwkzLogging"> <insert id="fwkzLogging">
insert into m_logging_fwkz(ywlb,ywbm,qysjd,czr,wxzt,appzt,wtzt,znzdzt,czzt,czsj) values(#{ywlb},#{ywbm},#{qysjd},#{czr},#{wxzt},#{appzt},#{wtzt},#{znzdzt},#{czzt},sysdate) insert into m_logging_fwkz(ywlb,ywbm,qysjd,czr,wxzt,appzt,wtzt,znzdzt,zh308zt,sjzt,czzt,czsj)
values(#{ywlb},#{ywbm},#{qysjd},#{czr},#{wxzt},#{appzt},#{wtzt},#{znzdzt},#{zh308zt},#{sjzt},#{czzt},sysdate)
</insert> </insert>
<select id="fwkzLoggingInfo" resultType="com.changda.gjjapp.zhfwpt.dto.qdywqxgl.FwkzLogginInfoDto"> <select id="fwkzLoggingInfo" resultType="com.changda.gjjapp.zhfwpt.dto.qdywqxgl.FwkzLogginInfoDto">
select a.primaryid,(case when a.ywlb=1 then '查询业务类' when a.ywlb=2 then '申请业务类' when a.ywlb=3 then '其他业务类' end) ywlb,b.ywmc,a.wtzt,a.appzt,a.znzdzt,a.wxzt,a.qysjd,a.czr,a.czsj,(case when a.czzt=0 then '保存' when a.czzt=1 then '修改' when a.czzt=2 then '删除' when a.czzt = 3 then '审核' end) czzt from m_logging_fwkz a,s_ywzd b where a.ywbm = b.bm and a.ywbm = #{ywbm} order by a.czsj desc select a.primaryid,(case when a.ywlb=1 then '查询业务类' when a.ywlb=2 then '申请业务类' when a.ywlb=3 then '其他业务类' end) ywlb,
b.ywmc,a.wtzt,a.appzt,a.znzdzt,a.zh308zt,a.sjzt,a.wxzt,a.qysjd,a.czr,a.czsj,
(case when a.czzt=0 then '保存' when a.czzt=1 then '修改' when a.czzt=2 then '删除' when a.czzt = 3 then '审核' end) czzt
from m_logging_fwkz a,s_ywzd b where a.ywbm = b.bm and a.ywbm = #{ywbm} order by a.czsj desc
</select> </select>
</mapper> </mapper>
\ No newline at end of file
package com.changda.gjjapp.zhfwpt.service.impl.qdywquanxiankz; package com.changda.gjjapp.zhfwpt.service.impl.qdywquanxiankz;
import java.io.IOException;
import java.io.InputStream;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Calendar;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.apache.ibatis.io.Resources;
import org.apache.ibatis.session.SqlSession;
import org.apache.ibatis.session.SqlSessionFactory;
import org.apache.ibatis.session.SqlSessionFactoryBuilder;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.changda.cd4j.foundation.core.dto.ResultDto; import com.changda.cd4j.foundation.core.dto.ResultDto;
import com.changda.gjjapp.db.entity.M_XEKZB; import com.changda.gjjapp.db.entity.M_XEKZB;
import com.changda.gjjapp.db.entity.M_XWINFO;
import com.changda.gjjapp.db.entity.M_YWZTKZ_2; import com.changda.gjjapp.db.entity.M_YWZTKZ_2;
import com.changda.gjjapp.db.entity.TMP_YW_GDHK_QKMX_WH;
import com.changda.gjjapp.zhfwpt.dao.qdywqxgl.QuDaoQuanXianGuanLiDao; import com.changda.gjjapp.zhfwpt.dao.qdywqxgl.QuDaoQuanXianGuanLiDao;
import com.changda.gjjapp.zhfwpt.dto.qdywqxgl.DuanXinQuanXianGuanLiDto; import com.changda.gjjapp.zhfwpt.dto.qdywqxgl.*;
import com.changda.gjjapp.zhfwpt.dto.qdywqxgl.FwkzLogginInfoDto;
import com.changda.gjjapp.zhfwpt.dto.qdywqxgl.Page2;
import com.changda.gjjapp.zhfwpt.dto.qdywqxgl.PageDto;
import com.changda.gjjapp.zhfwpt.dto.qdywqxgl.QdzkLoggingInfoDto;
import com.changda.gjjapp.zhfwpt.dto.qdywqxgl.QuDaoQuanXianGuanLiDto;
import com.changda.gjjapp.zhfwpt.dto.yhxxgl.YongHuXinXiSearchDto;
import com.changda.gjjapp.zhfwpt.service.qdywquanxiankz.QuDaoQuanXianKongZhiService; import com.changda.gjjapp.zhfwpt.service.qdywquanxiankz.QuDaoQuanXianKongZhiService;
import com.github.pagehelper.Page; import com.github.pagehelper.Page;
import com.github.pagehelper.PageHelper; import com.github.pagehelper.PageHelper;
import org.apache.ibatis.io.Resources;
import org.apache.ibatis.session.SqlSession;
import org.apache.ibatis.session.SqlSessionFactory;
import org.apache.ibatis.session.SqlSessionFactoryBuilder;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.io.IOException;
import java.io.InputStream;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.*;
@Service @Service
public class QuDaoQuanXianKZServiceImp implements QuDaoQuanXianKongZhiService { public class QuDaoQuanXianKZServiceImp implements QuDaoQuanXianKongZhiService {
@Autowired @Autowired
private QuDaoQuanXianGuanLiDao quDaoQuanXianGuanLiDao; private QuDaoQuanXianGuanLiDao quDaoQuanXianGuanLiDao;
// 查询渠道状态表用于管理渠道权限 // 查询渠道状态表用于管理渠道权限
@Override @Override
public List<QuDaoQuanXianGuanLiDto> quDaoZhuangTaiSearch(String primaryid) { public List<QuDaoQuanXianGuanLiDto> quDaoZhuangTaiSearch(String primaryid) {
List<Map<String, Object>> data = quDaoQuanXianGuanLiDao.quDaoZhuangTaiSearch(primaryid); List<Map<String, Object>> data = quDaoQuanXianGuanLiDao.quDaoZhuangTaiSearch(primaryid);
List<QuDaoQuanXianGuanLiDto> list = new ArrayList<>(); List<QuDaoQuanXianGuanLiDto> list = new ArrayList<>();
for (Map<String, Object> qdqxgl : data) { for (Map<String, Object> qdqxgl : data) {
QuDaoQuanXianGuanLiDto qLiDto = new QuDaoQuanXianGuanLiDto(); QuDaoQuanXianGuanLiDto qLiDto = new QuDaoQuanXianGuanLiDto();
qLiDto.setPrimaryid(qdqxgl.get("PRIMARYID").toString()); qLiDto.setPrimaryid(qdqxgl.get("PRIMARYID").toString());
qLiDto.setQdid(qdqxgl.get("QDID").toString()); qLiDto.setQdid(qdqxgl.get("QDID").toString());
qLiDto.setQdmc(qdqxgl.get("QDMC").toString()); qLiDto.setQdmc(qdqxgl.get("QDMC").toString());
qLiDto.setQdzt(qdqxgl.get("QDZT").toString()); qLiDto.setQdzt(qdqxgl.get("QDZT").toString());
qLiDto.setFz(qdqxgl.get("FZ").toString()); qLiDto.setFz(qdqxgl.get("FZ").toString());
qLiDto.setMfzrs(qdqxgl.get("MFZRS").toString()); qLiDto.setMfzrs(qdqxgl.get("MFZRS").toString());
qLiDto.setDjsj(qdqxgl.get("DJSJ").toString()); qLiDto.setDjsj(qdqxgl.get("DJSJ").toString());
list.add(qLiDto); list.add(qLiDto);
} }
return list; return list;
} }
// 计算在线人数 // 计算在线人数
public void onlineUsers() throws ParseException { public void onlineUsers() throws ParseException {
// long nd = 1000 * 24 * 60 * 60; // long nd = 1000 * 24 * 60 * 60;
// long nh = 1000 * 60 * 60; // long nh = 1000 * 60 * 60;
// long nm = 1000 * 60; // long nm = 1000 * 60;
List<Map<String, Object>> data = quDaoQuanXianGuanLiDao.quDaoZhuangTaiSearch(null); List<Map<String, Object>> data = quDaoQuanXianGuanLiDao.quDaoZhuangTaiSearch(null);
for (Map<String, Object> map : data) { for (Map<String, Object> map : data) {
String qdid = map.get("QDID").toString(); String qdid = map.get("QDID").toString();
// 待机时间 // 待机时间
String djsj = map.get("DJSJ").toString(); String djsj = map.get("DJSJ").toString();
long djsj2 = Long.parseLong(djsj); long djsj2 = Long.parseLong(djsj);
quDaoQuanXianGuanLiDao.updateOnlineUsers2(qdid, djsj); quDaoQuanXianGuanLiDao.updateOnlineUsers2(qdid, djsj);
// List<Map<String, Object>> data2 = quDaoQuanXianGuanLiDao.onlineUsers(qdid); // List<Map<String, Object>> data2 = quDaoQuanXianGuanLiDao.onlineUsers(qdid);
// for (Map<String, Object> map2 : data2) { // for (Map<String, Object> map2 : data2) {
// // 主键id // // 主键id
...@@ -101,24 +87,24 @@ public class QuDaoQuanXianKZServiceImp implements QuDaoQuanXianKongZhiService { ...@@ -101,24 +87,24 @@ public class QuDaoQuanXianKZServiceImp implements QuDaoQuanXianKongZhiService {
// //
// // System.out.println(day + "天" + hour + "小时" + min + "分钟"); // // System.out.println(day + "天" + hour + "小时" + min + "分钟");
// } // }
} }
} }
// 渠道状态实时状态控制 // 渠道状态实时状态控制
@Override @Override
public void quDaoSSKZ() { public void quDaoSSKZ() {
// 手机App // 手机App
String App = "06"; String App = "06";
// 网厅 // 网厅
String wt = "02"; String wt = "02";
// 微信 // 微信
String wx = "05"; String wx = "05";
// 智能终端 // 智能终端
String zhiNengZhongDuan = "07"; String zhiNengZhongDuan = "07";
// SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); // SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
// Calendar c = Calendar.getInstance(); // Calendar c = Calendar.getInstance();
...@@ -126,483 +112,483 @@ public class QuDaoQuanXianKZServiceImp implements QuDaoQuanXianKongZhiService { ...@@ -126,483 +112,483 @@ public class QuDaoQuanXianKZServiceImp implements QuDaoQuanXianKongZhiService {
// c.add(Calendar.MINUTE, -5); // c.add(Calendar.MINUTE, -5);
// // 获取前五分钟 的时间 // // 获取前五分钟 的时间
// String LastMinute = sdf.format(c.getTime()); // String LastMinute = sdf.format(c.getTime());
//System.out.println("减后时间:" + LastMinute); // System.out.println("减后时间:" + LastMinute);
// 智能终端在线人数 // 智能终端在线人数
int zhiNengZhongDuanCount = quDaoQuanXianGuanLiDao.quDaoFangWenCount(zhiNengZhongDuan); int zhiNengZhongDuanCount = quDaoQuanXianGuanLiDao.quDaoFangWenCount(zhiNengZhongDuan);
//System.out.println("智能终端"+zhiNengZhongDuanCount); // System.out.println("智能终端"+zhiNengZhongDuanCount);
// 网厅在线人数 // 网厅在线人数
int wtCount = quDaoQuanXianGuanLiDao.quDaoFangWenCount( wt); int wtCount = quDaoQuanXianGuanLiDao.quDaoFangWenCount(wt);
//System.out.println("网厅在线人数:" + wtCount); // System.out.println("网厅在线人数:" + wtCount);
// 微信在线人数 // 微信在线人数
int wxCount = quDaoQuanXianGuanLiDao.quDaoFangWenCount( wx); int wxCount = quDaoQuanXianGuanLiDao.quDaoFangWenCount(wx);
//System.out.println("微信在线人数"+wxCount); // System.out.println("微信在线人数"+wxCount);
// 手机App在线人数 // 手机App在线人数
int appCount = quDaoQuanXianGuanLiDao.quDaoFangWenCount( App); int appCount = quDaoQuanXianGuanLiDao.quDaoFangWenCount(App);
//System.out.println("手机app"+appCount); // System.out.println("手机app"+appCount);
// 更新M_QDZTKZ(渠道控制表中前五分钟的在线人数) // 更新M_QDZTKZ(渠道控制表中前五分钟的在线人数)
quDaoQuanXianGuanLiDao.updateOnlineUsers(zhiNengZhongDuan, zhiNengZhongDuanCount); quDaoQuanXianGuanLiDao.updateOnlineUsers(zhiNengZhongDuan, zhiNengZhongDuanCount);
quDaoQuanXianGuanLiDao.updateOnlineUsers(wt, wtCount); quDaoQuanXianGuanLiDao.updateOnlineUsers(wt, wtCount);
quDaoQuanXianGuanLiDao.updateOnlineUsers(wx, wxCount); quDaoQuanXianGuanLiDao.updateOnlineUsers(wx, wxCount);
quDaoQuanXianGuanLiDao.updateOnlineUsers(App, appCount); quDaoQuanXianGuanLiDao.updateOnlineUsers(App, appCount);
/* /*
* System.err.println("1111111111111111111111111111111"); // APP渠道状态 * System.err.println("1111111111111111111111111111111"); // APP渠道状态
* Map<String, Object> quanXianGuanLiDtoAPP = * Map<String, Object> quanXianGuanLiDtoAPP =
* quDaoQuanXianGuanLiDao.quDaoZhuangTai(App); System.err.println("APP" * quDaoQuanXianGuanLiDao.quDaoZhuangTai(App); System.err.println("APP"
* + quanXianGuanLiDtoAPP); // 微信渠道状态 Map<String, Object> * + quanXianGuanLiDtoAPP); // 微信渠道状态 Map<String, Object>
* quanXianGuanLiDtoWX = quDaoQuanXianGuanLiDao.quDaoZhuangTai(wx); // * quanXianGuanLiDtoWX = quDaoQuanXianGuanLiDao.quDaoZhuangTai(wx); //
* 网厅渠道状态 Map<String, Object> quanXianGuanLiDtoWT = * 网厅渠道状态 Map<String, Object> quanXianGuanLiDtoWT =
* quDaoQuanXianGuanLiDao.quDaoZhuangTai(wt); // 智能终端渠道状态 Map<String, * quDaoQuanXianGuanLiDao.quDaoZhuangTai(wt); // 智能终端渠道状态 Map<String,
* Object> quanXianGuanLiDtoZNZD = * Object> quanXianGuanLiDtoZNZD =
* quDaoQuanXianGuanLiDao.quDaoZhuangTai(zhiNengZhongDuan); * quDaoQuanXianGuanLiDao.quDaoZhuangTai(zhiNengZhongDuan);
*/ */
/* /*
* Date now = new Date(); SimpleDateFormat dateFormat = new * Date now = new Date(); SimpleDateFormat dateFormat = new
* SimpleDateFormat("yyyy/MM/dd HH:mm:ss"); //获取手机app、微信、网厅、智能终端的控制时间 * SimpleDateFormat("yyyy/MM/dd HH:mm:ss"); //获取手机app、微信、网厅、智能终端的控制时间
* Date appStartTime = (Date) quanXianGuanLiDtoAPP.get("KSSJ"); Date * Date appStartTime = (Date) quanXianGuanLiDtoAPP.get("KSSJ"); Date
* appEndTime = (Date) quanXianGuanLiDtoAPP.get("JSSJ"); * appEndTime = (Date) quanXianGuanLiDtoAPP.get("JSSJ");
* *
* Date wxStartTime = (Date) quanXianGuanLiDtoWX.get("KSSJ"); Date * Date wxStartTime = (Date) quanXianGuanLiDtoWX.get("KSSJ"); Date
* wxEndTime = (Date) quanXianGuanLiDtoWX.get("JSSJ"); * wxEndTime = (Date) quanXianGuanLiDtoWX.get("JSSJ");
* *
* Date wtStartTime = (Date) quanXianGuanLiDtoWT.get("KSSJ"); Date * Date wtStartTime = (Date) quanXianGuanLiDtoWT.get("KSSJ"); Date
* wtEndTime = (Date) quanXianGuanLiDtoWT.get("JSSJ"); * wtEndTime = (Date) quanXianGuanLiDtoWT.get("JSSJ");
* *
* Date znzdStartTime = (Date) quanXianGuanLiDtoZNZD.get("KSSJ"); Date * Date znzdStartTime = (Date) quanXianGuanLiDtoZNZD.get("KSSJ"); Date
* znzdEndTime = (Date) quanXianGuanLiDtoZNZD.get("JSSJ"); * znzdEndTime = (Date) quanXianGuanLiDtoZNZD.get("JSSJ");
*/ */
// System.err.println("222222222222222222222222222222222222222222"); // System.err.println("222222222222222222222222222222222222222222");
// 获取当前时间 // 获取当前时间
/* /*
* String data = dateFormat.format(now); * String data = dateFormat.format(now);
* *
* try { Date nowTime = dateFormat.parse(data); * try { Date nowTime = dateFormat.parse(data);
* *
* // APP判断当前时间是否在停止时间中 如果是的状态改成2停止 如不是改成1启动 Calendar appdDate = * // APP判断当前时间是否在停止时间中 如果是的状态改成2停止 如不是改成1启动 Calendar appdDate =
* Calendar.getInstance(); appdDate.setTime(nowTime); Calendar appBegin * Calendar.getInstance(); appdDate.setTime(nowTime); Calendar appBegin
* = Calendar.getInstance(); appBegin.setTime(appStartTime); Calendar * = Calendar.getInstance(); appBegin.setTime(appStartTime); Calendar
* appEnd = Calendar.getInstance(); appEnd.setTime(appEndTime); if * appEnd = Calendar.getInstance(); appEnd.setTime(appEndTime); if
* (appdDate.after(appBegin) && appdDate.before(appEnd)) { * (appdDate.after(appBegin) && appdDate.before(appEnd)) {
* quDaoQuanXianGuanLiDao.updateQuDaoStatus(App, 1); } else { * quDaoQuanXianGuanLiDao.updateQuDaoStatus(App, 1); } else {
* quDaoQuanXianGuanLiDao.updateQuDaoStatus(App, 2); } * quDaoQuanXianGuanLiDao.updateQuDaoStatus(App, 2); }
* *
* // 网厅判断当前时间是否在停止时间中 如果是的状态改成2停止 如不是改成1启动 Calendar wtDate = * // 网厅判断当前时间是否在停止时间中 如果是的状态改成2停止 如不是改成1启动 Calendar wtDate =
* Calendar.getInstance(); wtDate.setTime(nowTime); Calendar wtBegin = * Calendar.getInstance(); wtDate.setTime(nowTime); Calendar wtBegin =
* Calendar.getInstance(); wtDate.setTime(wtStartTime); Calendar wtEnd = * Calendar.getInstance(); wtDate.setTime(wtStartTime); Calendar wtEnd =
* Calendar.getInstance(); wtEnd.setTime(wtEndTime); if * Calendar.getInstance(); wtEnd.setTime(wtEndTime); if
* (wtDate.after(wtBegin) && wtDate.before(wtEnd)) { * (wtDate.after(wtBegin) && wtDate.before(wtEnd)) {
* quDaoQuanXianGuanLiDao.updateQuDaoStatus(wt, 1); } else { * quDaoQuanXianGuanLiDao.updateQuDaoStatus(wt, 1); } else {
* quDaoQuanXianGuanLiDao.updateQuDaoStatus(wt, 2); } * quDaoQuanXianGuanLiDao.updateQuDaoStatus(wt, 2); }
* *
* // 微信判断当前时间是否在停止时间中 如果是的状态改成2停止 如不是改成1启动 Calendar wxdDate = * // 微信判断当前时间是否在停止时间中 如果是的状态改成2停止 如不是改成1启动 Calendar wxdDate =
* Calendar.getInstance(); wxdDate.setTime(nowTime); Calendar wxBegin = * Calendar.getInstance(); wxdDate.setTime(nowTime); Calendar wxBegin =
* Calendar.getInstance(); wxdDate.setTime(wxStartTime); Calendar wxEnd * Calendar.getInstance(); wxdDate.setTime(wxStartTime); Calendar wxEnd
* = Calendar.getInstance(); wxEnd.setTime(wxEndTime); if * = Calendar.getInstance(); wxEnd.setTime(wxEndTime); if
* (wxdDate.after(wxBegin) && wxdDate.before(wxEnd)) { * (wxdDate.after(wxBegin) && wxdDate.before(wxEnd)) {
* quDaoQuanXianGuanLiDao.updateQuDaoStatus(wx, 1); } else { * quDaoQuanXianGuanLiDao.updateQuDaoStatus(wx, 1); } else {
* quDaoQuanXianGuanLiDao.updateQuDaoStatus(wx, 2); } * quDaoQuanXianGuanLiDao.updateQuDaoStatus(wx, 2); }
* *
* // 智能终端判断当前时间是否在停止时间中 如果是的状态改成2停止 如不是改成1启动 Calendar * // 智能终端判断当前时间是否在停止时间中 如果是的状态改成2停止 如不是改成1启动 Calendar
* zhiNengZhongDuanDate = Calendar.getInstance(); * zhiNengZhongDuanDate = Calendar.getInstance();
* zhiNengZhongDuanDate.setTime(nowTime); Calendar zhiNengZhongDuanBegin * zhiNengZhongDuanDate.setTime(nowTime); Calendar zhiNengZhongDuanBegin
* = Calendar.getInstance(); * = Calendar.getInstance();
* zhiNengZhongDuanDate.setTime(znzdStartTime); Calendar * zhiNengZhongDuanDate.setTime(znzdStartTime); Calendar
* zhiNengZhongDuanEnd = Calendar.getInstance(); * zhiNengZhongDuanEnd = Calendar.getInstance();
* zhiNengZhongDuanEnd.setTime(znzdEndTime); if * zhiNengZhongDuanEnd.setTime(znzdEndTime); if
* (zhiNengZhongDuanDate.after(zhiNengZhongDuanBegin) && * (zhiNengZhongDuanDate.after(zhiNengZhongDuanBegin) &&
* zhiNengZhongDuanDate.before(zhiNengZhongDuanEnd)) { * zhiNengZhongDuanDate.before(zhiNengZhongDuanEnd)) {
* quDaoQuanXianGuanLiDao.updateQuDaoStatus(zhiNengZhongDuan, 1); } else * quDaoQuanXianGuanLiDao.updateQuDaoStatus(zhiNengZhongDuan, 1); } else
* { quDaoQuanXianGuanLiDao.updateQuDaoStatus(zhiNengZhongDuan, 2); } * { quDaoQuanXianGuanLiDao.updateQuDaoStatus(zhiNengZhongDuan, 2); }
*/ */
// System.err.println("3333333333333333333333333333333"); // System.err.println("3333333333333333333333333333333");
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
// 实时管理在线人数阀值控制 // 实时管理在线人数阀值控制
// 智能终端的访问人数限制的停止时间 // 智能终端的访问人数限制的停止时间
/* /*
* Date nowDate = new Date(); Date tzsjZNZDEndTime = (Date) * Date nowDate = new Date(); Date tzsjZNZDEndTime = (Date)
* quanXianGuanLiDtoZNZD.get("TZSJ"); * quanXianGuanLiDtoZNZD.get("TZSJ");
* *
* *
* //微信的访问人数限制的停止时间 Date tzsjWXEndTime = (Date) * //微信的访问人数限制的停止时间 Date tzsjWXEndTime = (Date)
* quanXianGuanLiDtoWX.get("TZSJ"); * quanXianGuanLiDtoWX.get("TZSJ");
* *
* *
* //手机App的访问人数限制的停止时间 Date tzsjAppEndTime = (Date) * //手机App的访问人数限制的停止时间 Date tzsjAppEndTime = (Date)
* quanXianGuanLiDtoAPP.get("TZSJ"); * quanXianGuanLiDtoAPP.get("TZSJ");
* *
* *
* //网厅的访问人数限制的停止时间 Date tzsjWTEndTime = (Date) * //网厅的访问人数限制的停止时间 Date tzsjWTEndTime = (Date)
* quanXianGuanLiDtoWT.get("TZSJ"); * quanXianGuanLiDtoWT.get("TZSJ");
*/ */
// 停止时间,就是当前时间加上五分钟 // 停止时间,就是当前时间加上五分钟
/* /*
* SimpleDateFormat sdf2 = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); * SimpleDateFormat sdf2 = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
* Calendar c2 = Calendar.getInstance(); c2 = Calendar.getInstance(); * Calendar c2 = Calendar.getInstance(); c2 = Calendar.getInstance();
* c2.add(Calendar.MINUTE, +5); String tzsj = sdf2.format(c.getTime()); * c2.add(Calendar.MINUTE, +5); String tzsj = sdf2.format(c.getTime());
* *
* *
* System.err.println("44444444444444444444444444444444444444444444"); * System.err.println("44444444444444444444444444444444444444444444");
* //如果当前时间在停止时间之后,并且当前时间的访问人数超过了阀值数量,就改状态 boolean znzdflag = * //如果当前时间在停止时间之后,并且当前时间的访问人数超过了阀值数量,就改状态 boolean znzdflag =
* nowDate.after(tzsjZNZDEndTime); if (znzdflag) { // 智能终端限制人数 int * nowDate.after(tzsjZNZDEndTime); if (znzdflag) { // 智能终端限制人数 int
* zhiNengZhongDuanXianZhiCount = * zhiNengZhongDuanXianZhiCount =
* Integer.parseInt(quanXianGuanLiDtoZNZD.get("FZ").toString()); if * Integer.parseInt(quanXianGuanLiDtoZNZD.get("FZ").toString()); if
* (zhiNengZhongDuanCount >= zhiNengZhongDuanXianZhiCount) { * (zhiNengZhongDuanCount >= zhiNengZhongDuanXianZhiCount) {
* quDaoQuanXianGuanLiDao.updateQuDaoSSStatus(zhiNengZhongDuan, 1, * quDaoQuanXianGuanLiDao.updateQuDaoSSStatus(zhiNengZhongDuan, 1,
* tzsj); } else { * tzsj); } else {
* quDaoQuanXianGuanLiDao.updateQuDaoSSStatus(zhiNengZhongDuan, 2, * quDaoQuanXianGuanLiDao.updateQuDaoSSStatus(zhiNengZhongDuan, 2,
* null); } } boolean wxflag = nowDate.after(tzsjWXEndTime); if (wxflag) * null); } } boolean wxflag = nowDate.after(tzsjWXEndTime); if (wxflag)
* { // 微信限制人数 int wxXianZhiCount = * { // 微信限制人数 int wxXianZhiCount =
* Integer.parseInt(quanXianGuanLiDtoWX.get("FZ").toString()); if * Integer.parseInt(quanXianGuanLiDtoWX.get("FZ").toString()); if
* (wxCount >= wxXianZhiCount) { * (wxCount >= wxXianZhiCount) {
* quDaoQuanXianGuanLiDao.updateQuDaoSSStatus(wx, 1, tzsj); } else { * quDaoQuanXianGuanLiDao.updateQuDaoSSStatus(wx, 1, tzsj); } else {
* quDaoQuanXianGuanLiDao.updateQuDaoSSStatus(wx, 2, null); } } boolean * quDaoQuanXianGuanLiDao.updateQuDaoSSStatus(wx, 2, null); } } boolean
* appflag = nowDate.after(tzsjAppEndTime); if (appflag) { //手机app限制人数 * appflag = nowDate.after(tzsjAppEndTime); if (appflag) { //手机app限制人数
* int appXianZhiCount = * int appXianZhiCount =
* Integer.parseInt(quanXianGuanLiDtoAPP.get("FZ").toString()); if * Integer.parseInt(quanXianGuanLiDtoAPP.get("FZ").toString()); if
* (appCount >= appXianZhiCount) { * (appCount >= appXianZhiCount) {
* quDaoQuanXianGuanLiDao.updateQuDaoSSStatus(App, 1, tzsj); } else { * quDaoQuanXianGuanLiDao.updateQuDaoSSStatus(App, 1, tzsj); } else {
* quDaoQuanXianGuanLiDao.updateQuDaoSSStatus(App, 2, null); } } boolean * quDaoQuanXianGuanLiDao.updateQuDaoSSStatus(App, 2, null); } } boolean
* wtflag = nowDate.after(tzsjWTEndTime); if (wtflag) { //网厅限制人数 int * wtflag = nowDate.after(tzsjWTEndTime); if (wtflag) { //网厅限制人数 int
* wtXianZhiCount = * wtXianZhiCount =
* Integer.parseInt(quanXianGuanLiDtoWT.get("FZ").toString()); if * Integer.parseInt(quanXianGuanLiDtoWT.get("FZ").toString()); if
* (wtCount >= wtXianZhiCount) { * (wtCount >= wtXianZhiCount) {
* quDaoQuanXianGuanLiDao.updateQuDaoSSStatus(wt, 1, tzsj); } else { * quDaoQuanXianGuanLiDao.updateQuDaoSSStatus(wt, 1, tzsj); } else {
* quDaoQuanXianGuanLiDao.updateQuDaoSSStatus(App, 2, null); } * quDaoQuanXianGuanLiDao.updateQuDaoSSStatus(App, 2, null); }
* *
* } * }
*/ */
} }
// 更新渠道状态 // 更新渠道状态
public ResultDto updateQDZT(String qdid, String fz, String djsj, String qdzt) { public ResultDto updateQDZT(String qdid, String fz, String djsj, String qdzt) {
ResultDto resultDto = new ResultDto(); ResultDto resultDto = new ResultDto();
int num = quDaoQuanXianGuanLiDao.updateQDZT(qdid, qdzt, fz, djsj); int num = quDaoQuanXianGuanLiDao.updateQDZT(qdid, qdzt, fz, djsj);
if (num > 0) { if (num > 0) {
resultDto.setSuccess(true); resultDto.setSuccess(true);
} else { } else {
resultDto.setSuccess(false); resultDto.setSuccess(false);
} }
return resultDto; return resultDto;
} }
// 修改阀值和控制渠道权限的时间 // 修改阀值和控制渠道权限的时间
@Override @Override
public boolean updateTimeAndFz(String kssj, String jssj, String ksrq, String tzrq, String fz, String qdid, public boolean updateTimeAndFz(String kssj, String jssj, String ksrq, String tzrq, String fz, String qdid,
int qdzt) { int qdzt) {
Integer fzNum = Integer.parseInt(fz); Integer fzNum = Integer.parseInt(fz);
Integer kssjNum = Integer.parseInt(kssj); Integer kssjNum = Integer.parseInt(kssj);
Integer jssjNum = Integer.parseInt(jssj); Integer jssjNum = Integer.parseInt(jssj);
Integer ksrqNum = Integer.parseInt(ksrq); Integer ksrqNum = Integer.parseInt(ksrq);
Integer tzrqNum = Integer.parseInt(tzrq); Integer tzrqNum = Integer.parseInt(tzrq);
if (fz != null && !fz.equals("") && ksrqNum > 0 && ksrqNum <= 31 && tzrqNum <= 31 && tzrqNum >= ksrqNum) { if (fz != null && !fz.equals("") && ksrqNum > 0 && ksrqNum <= 31 && tzrqNum <= 31 && tzrqNum >= ksrqNum) {
if (fzNum > 0 && kssjNum >= 0000 && kssjNum <= 2400 && jssjNum >= kssjNum && jssjNum <= 2400) { if (fzNum > 0 && kssjNum >= 0000 && kssjNum <= 2400 && jssjNum >= kssjNum && jssjNum <= 2400) {
int num = quDaoQuanXianGuanLiDao.updateTimeAndFz(kssj, fzNum, jssj, ksrq, tzrq, qdid, qdzt); int num = quDaoQuanXianGuanLiDao.updateTimeAndFz(kssj, fzNum, jssj, ksrq, tzrq, qdid, qdzt);
if (num > 0) { if (num > 0) {
return true; return true;
} else { } else {
return false; return false;
} }
} else { } else {
return false; return false;
} }
} else { } else {
return false; return false;
} }
} }
// 修改短信状态 // 修改短信状态
@Override @Override
public void updateDuanXinZT(String zjzxdm, String dxzt) { public void updateDuanXinZT(String zjzxdm, String dxzt) {
quDaoQuanXianGuanLiDao.updateDuanXinZT(zjzxdm, dxzt); quDaoQuanXianGuanLiDao.updateDuanXinZT(zjzxdm, dxzt);
} }
// 渠道开关控制接口 // 渠道开关控制接口
@Override @Override
public List<QuDaoQuanXianGuanLiDto> qdkzInfo(String qdid) { public List<QuDaoQuanXianGuanLiDto> qdkzInfo(String qdid) {
List<Map<String, Object>> dataList = quDaoQuanXianGuanLiDao.qdkzInfo(qdid); List<Map<String, Object>> dataList = quDaoQuanXianGuanLiDao.qdkzInfo(qdid);
List<QuDaoQuanXianGuanLiDto> list = new ArrayList<QuDaoQuanXianGuanLiDto>(); List<QuDaoQuanXianGuanLiDto> list = new ArrayList<QuDaoQuanXianGuanLiDto>();
for (Map<String, Object> map : dataList) { for (Map<String, Object> map : dataList) {
QuDaoQuanXianGuanLiDto qDto = new QuDaoQuanXianGuanLiDto(); QuDaoQuanXianGuanLiDto qDto = new QuDaoQuanXianGuanLiDto();
qDto.setQdid(map.get("QDID").toString()); qDto.setQdid(map.get("QDID").toString());
qDto.setQdmc(map.get("QDMC").toString()); qDto.setQdmc(map.get("QDMC").toString());
qDto.setQdzt(map.get("QDZT").toString()); qDto.setQdzt(map.get("QDZT").toString());
qDto.setFz(map.get("FZ").toString()); qDto.setFz(map.get("FZ").toString());
qDto.setMfzrs(map.get("MFZRS").toString()); qDto.setMfzrs(map.get("MFZRS").toString());
qDto.setDjsj(map.get("DJSJ").toString()); qDto.setDjsj(map.get("DJSJ").toString());
list.add(qDto); list.add(qDto);
} }
return list; return list;
} }
// 业务控制2 // 业务控制2
@Override @Override
public Map<String, Object> sreachM_YWZTKZ_2(int limit, int page,String ywczlx_2,String ywmc,String issh,String ywbm) { public Map<String, Object> sreachM_YWZTKZ_2(int limit, int page, String ywczlx_2, String ywmc, String issh, String ywbm) {
Map<String, Object> map = new HashMap<>(); Map<String, Object> map = new HashMap<>();
try { try {
Page<M_YWZTKZ_2> page2 = PageHelper.startPage(page, limit, true); Page<M_YWZTKZ_2> page2 = PageHelper.startPage(page, limit, true);
List<M_YWZTKZ_2> list = quDaoQuanXianGuanLiDao.sreachM_YWZTKZ_2(ywczlx_2,ywmc,issh,ywbm); List<M_YWZTKZ_2> list = quDaoQuanXianGuanLiDao.sreachM_YWZTKZ_2(ywczlx_2, ywmc, issh, ywbm);
int count = (int) page2.getTotal(); int count = (int) page2.getTotal();
map.put("total", count); map.put("total", count);
map.put("data", list); map.put("data", list);
} catch (Exception e) { } catch (Exception e) {
System.out.println("业务控制显示异常"); System.out.println("业务控制显示异常");
} }
return map; return map;
} }
// 修改业务状态(保存按钮) // 修改业务状态(保存按钮)
@Override @Override
public ResultDto updateM_YWZTKZ_2State(String primaryid, String wtzt, String wxzt, String appzt, String znzdzt, String qyjssj, String qykssj, String qyksrq, public ResultDto updateM_YWZTKZ_2State(String primaryid, String wtzt, String wxzt, String appzt, String znzdzt, String zh308zt, String sjzt, String qyjssj, String qykssj, String qyksrq,
String qyjsrq,String czlx,String czr,String qysjd,String ywbm,String ywlb) { String qyjsrq, String czlx, String czr, String qysjd, String ywbm, String ywlb) {
ResultDto resultDto = new ResultDto(); ResultDto resultDto = new ResultDto();
if (primaryid != null ) { if (primaryid != null) {
String[] primaryids = primaryid.split(","); String[] primaryids = primaryid.split(",");
String[] ywlbs = ywlb.split(","); String[] ywlbs = ywlb.split(",");
String[] ywbms = ywbm.split(","); String[] ywbms = ywbm.split(",");
String[] qysjds = qysjd.split(","); String[] qysjds = qysjd.split(",");
//String[] czrs = czr.split(","); // String[] czrs = czr.split(",");
for (int i = 0; i < primaryids.length; i++) { for (int i = 0; i < primaryids.length; i++) {
String id = primaryids[i]; String id = primaryids[i];
String ywlbs2 = ywlbs[i]; String ywlbs2 = ywlbs[i];
String ywbms2 = ywbms[i]; String ywbms2 = ywbms[i];
String qysjds2 = qysjds[i]; String qysjds2 = qysjds[i];
//String czrs2 = czrs[i]; // String czrs2 = czrs[i];
int num2 = quDaoQuanXianGuanLiDao.updateM_YWZTKZ_2State(id,wtzt,wxzt,appzt,znzdzt,qyjssj,qykssj, qyksrq, qyjsrq,czlx); int num2 = quDaoQuanXianGuanLiDao.updateM_YWZTKZ_2State(id, wtzt, wxzt, appzt, znzdzt, zh308zt, sjzt, qyjssj, qykssj, qyksrq, qyjsrq, czlx);
if (num2 > 0) { if (num2 > 0) {
quDaoQuanXianGuanLiDao.fwkzLogging(ywlbs2, ywbms2, qysjds2, czr, "1", wxzt, appzt, znzdzt, wtzt); quDaoQuanXianGuanLiDao.fwkzLogging(ywlbs2, ywbms2, qysjds2, czr, "1", wxzt, appzt, znzdzt, zh308zt, sjzt, wtzt);
int num1 = quDaoQuanXianGuanLiDao.updateYWZT2("0", id,czlx); int num1 = quDaoQuanXianGuanLiDao.updateYWZT2("0", id, czlx);
if (num1 > 0) { if (num1 > 0) {
resultDto.setSuccess(true); resultDto.setSuccess(true);
} else { } else {
resultDto.setSuccess(false); resultDto.setSuccess(false);
} }
resultDto.setSuccess(true); resultDto.setSuccess(true);
} else { } else {
resultDto.setSuccess(false); resultDto.setSuccess(false);
} }
} }
} }
return resultDto; return resultDto;
} }
// 渠道状态修改 // 渠道状态修改
@Override @Override
public ResultDto updateQD_state(String qdzt, String fz, String djsj, String primaryid,String qdid,String czr) { public ResultDto updateQD_state(String qdzt, String fz, String djsj, String primaryid, String qdid, String czr) {
ResultDto resultDto = new ResultDto(); ResultDto resultDto = new ResultDto();
int num = quDaoQuanXianGuanLiDao.updateQD_state(qdzt, fz, djsj, primaryid); int num = quDaoQuanXianGuanLiDao.updateQD_state(qdzt, fz, djsj, primaryid);
if (num > 0) { if (num > 0) {
//渠道总控修改日志记录 // 渠道总控修改日志记录
quDaoQuanXianGuanLiDao.qdzkLogging(qdzt, fz, djsj, qdid, czr, "0"); quDaoQuanXianGuanLiDao.qdzkLogging(qdzt, fz, djsj, qdid, czr, "0");
resultDto.setSuccess(true); resultDto.setSuccess(true);
} else { } else {
resultDto.setSuccess(false); resultDto.setSuccess(false);
} }
return resultDto; return resultDto;
} }
// 修改审核后业务状态 // 修改审核后业务状态
@Override @Override
public ResultDto updateSHState(String primaryid,String czlx,String ywlb,String ywbm,String qysjd,String czr,String wxzt,String appzt,String znzdzt,String wtzt) { public ResultDto updateSHState(String primaryid, String czlx, String ywlb, String ywbm, String qysjd, String czr, String wxzt, String appzt, String znzdzt, String zh308zt, String sjzt, String wtzt) {
ResultDto resultDto = new ResultDto(); ResultDto resultDto = new ResultDto();
int num1 = quDaoQuanXianGuanLiDao.updateYWZT2("1", primaryid,czlx); int num1 = quDaoQuanXianGuanLiDao.updateYWZT2("1", primaryid, czlx);
if (num1 > 0) { if (num1 > 0) {
resultDto.setSuccess(true); resultDto.setSuccess(true);
} else { } else {
resultDto.setSuccess(false); resultDto.setSuccess(false);
} }
int num2 = quDaoQuanXianGuanLiDao.updateSHState(primaryid,czlx); int num2 = quDaoQuanXianGuanLiDao.updateSHState(primaryid, czlx);
if (num2 > 0) { if (num2 > 0) {
quDaoQuanXianGuanLiDao.fwkzLogging(ywlb, ywbm, qysjd, czr, "3", wxzt, appzt, znzdzt, wtzt); quDaoQuanXianGuanLiDao.fwkzLogging(ywlb, ywbm, qysjd, czr, "3", wxzt, appzt, znzdzt, zh308zt, sjzt, wtzt);
resultDto.setSuccess(true); resultDto.setSuccess(true);
} else { } else {
resultDto.setSuccess(false); resultDto.setSuccess(false);
} }
return resultDto; return resultDto;
} }
// 渠道业务控制接口 // 渠道业务控制接口
@Override @Override
public int qdztkzInterface(String ywbm,String qdid) { public int qdztkzInterface(String ywbm, String qdid) {
M_YWZTKZ_2 mYwztkz_2 = quDaoQuanXianGuanLiDao.qdztkzInterface(ywbm); M_YWZTKZ_2 mYwztkz_2 = quDaoQuanXianGuanLiDao.qdztkzInterface(ywbm);
String tstzr = mYwztkz_2.getTstzr(); String tstzr = mYwztkz_2.getTstzr();
// 特殊时间停止 // 特殊时间停止
if (tstzr != null) { if (tstzr != null) {
String[] tstzrs = tstzr.split(","); String[] tstzrs = tstzr.split(",");
for (int i = 0; i < tstzrs.length; i++) { for (int i = 0; i < tstzrs.length; i++) {
String tzr = tstzrs[i]; String tzr = tstzrs[i];
String[] tstzsjs = tzr.split("-"); String[] tstzsjs = tzr.split("-");
String kssj = tstzsjs[0];// 开始拒绝时间 String kssj = tstzsjs[0];// 开始拒绝时间
String jssj = tstzsjs[0].substring(0, 2) + "2359";// 结束拒绝时间 String jssj = tstzsjs[0].substring(0, 2) + "2359";// 结束拒绝时间
if (tstzsjs.length > 1) { if (tstzsjs.length > 1) {
jssj = tstzsjs[1]; jssj = tstzsjs[1];
} }
if (kssj.length() == 6 && kssj.length() == 6) { if (kssj.length() == 6 && kssj.length() == 6) {
boolean kssj_f = false; boolean kssj_f = false;
if (kssj.matches("^[0-3][0-9][0-2][0-9][0-5][0-9]$")) { if (kssj.matches("^[0-3][0-9][0-2][0-9][0-5][0-9]$")) {
kssj_f = true; kssj_f = true;
} }
boolean jssj_f = false; boolean jssj_f = false;
if (jssj.matches("^[0-3][0-9][0-2][0-9][0-5][0-9]$")) { if (jssj.matches("^[0-3][0-9][0-2][0-9][0-5][0-9]$")) {
jssj_f = true; jssj_f = true;
} }
if (kssj_f && jssj_f) { if (kssj_f && jssj_f) {
Date dt = new Date(); Date dt = new Date();
SimpleDateFormat sdf = new SimpleDateFormat("ddHHmm"); SimpleDateFormat sdf = new SimpleDateFormat("ddHHmm");
String nowdayhm = sdf.format(dt); String nowdayhm = sdf.format(dt);
int nowdayhm_i = Integer.parseInt(nowdayhm); int nowdayhm_i = Integer.parseInt(nowdayhm);
int kssj_i = Integer.parseInt(kssj); int kssj_i = Integer.parseInt(kssj);
int jssj_i = Integer.parseInt(jssj); int jssj_i = Integer.parseInt(jssj);
if (nowdayhm_i >= kssj_i && nowdayhm_i <= jssj_i) { if (nowdayhm_i >= kssj_i && nowdayhm_i <= jssj_i) {
return 0; return 0;
} }
} }
} }
} }
} }
String temp_str = ""; String temp_str = "";
Date dt = new Date(); Date dt = new Date();
// 最后的aa表示“上午”或“下午” HH表示24小时制 如果换成hh表示12小时制 // 最后的aa表示“上午”或“下午” HH表示24小时制 如果换成hh表示12小时制
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm"); SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm");
temp_str = sdf.format(dt); temp_str = sdf.format(dt);
// 日期 // 日期
String day = temp_str.substring(8, 10); String day = temp_str.substring(8, 10);
// 时间 // 时间
String sj = temp_str.substring(11, 13) + temp_str.substring(14, 16); String sj = temp_str.substring(11, 13) + temp_str.substring(14, 16);
int num = 0; int num = 0;
// 审核业务状态 // 审核业务状态
int shywzt = 0; int shywzt = 0;
if (qdid.equals("02")) { if (qdid.equals("02")) {
shywzt = mYwztkz_2.getShwtzt(); shywzt = mYwztkz_2.getShwtzt();
}else if (qdid.equals("05")) { } else if (qdid.equals("05")) {
shywzt = mYwztkz_2.getShwxzt(); shywzt = mYwztkz_2.getShwxzt();
}else if (qdid.equals("06")) { } else if (qdid.equals("06")) {
shywzt = mYwztkz_2.getShappzt(); shywzt = mYwztkz_2.getShappzt();
}else { } else {
shywzt = mYwztkz_2.getShznzdzt(); shywzt = mYwztkz_2.getShznzdzt();
} }
if (shywzt > 0) { if (shywzt > 0) {
num = quDaoQuanXianGuanLiDao.qdztkzInterface2(ywbm, day, sj); num = quDaoQuanXianGuanLiDao.qdztkzInterface2(ywbm, day, sj);
if (num > 0) { if (num > 0) {
return 1; return 1;
} else { } else {
return 0; return 0;
} }
} else { } else {
return 0; return 0;
} }
} }
// 短信控制信息 // 短信控制信息
@Override @Override
public Map<String, Object> dxkzInfo(String page,String limit) throws IOException { public Map<String, Object> dxkzInfo(String page, String limit) throws IOException {
Map<String, Object> map = new HashMap<>(); Map<String, Object> map = new HashMap<>();
PageDto pDto = new PageDto(); PageDto pDto = new PageDto();
int pageNum = Integer.parseInt(page); int pageNum = Integer.parseInt(page);
int pageSize2 = Integer.parseInt(limit); int pageSize2 = Integer.parseInt(limit);
// pDto.setSizeCountStart(String.valueOf(sizeCountStart)); // pDto.setSizeCountStart(String.valueOf(sizeCountStart));
// pDto.setSizeCountEnd(String.valueOf(sizeCountEnd)); // pDto.setSizeCountEnd(String.valueOf(sizeCountEnd));
String fileName = "mybatis.xml"; String fileName = "mybatis.xml";
InputStream inputStream = Resources.getResourceAsStream(fileName); InputStream inputStream = Resources.getResourceAsStream(fileName);
SqlSessionFactory sqlSessionFactory = new SqlSessionFactoryBuilder().build(inputStream); SqlSessionFactory sqlSessionFactory = new SqlSessionFactoryBuilder().build(inputStream);
SqlSession sqlSession = sqlSessionFactory.openSession(false);// 通过这种方式打开的SqlSession,autoCommit默认为false,需要手动提交事务 SqlSession sqlSession = sqlSessionFactory.openSession(false);// 通过这种方式打开的SqlSession,autoCommit默认为false,需要手动提交事务
DuanXinQuanXianGuanLiDto qDto = new DuanXinQuanXianGuanLiDto(); DuanXinQuanXianGuanLiDto qDto = new DuanXinQuanXianGuanLiDto();
sqlSession.selectList("com.changda.gjjapp.zhfwpt.dao.qdywqxgl.QuDaoQuanXianGuanLiDao.dxkzInfo",qDto); sqlSession.selectList("com.changda.gjjapp.zhfwpt.dao.qdywqxgl.QuDaoQuanXianGuanLiDao.dxkzInfo", qDto);
Page<DuanXinQuanXianGuanLiDto> page2 = PageHelper.startPage(pageNum, pageSize2, true); Page<DuanXinQuanXianGuanLiDto> page2 = PageHelper.startPage(pageNum, pageSize2, true);
// 循环查询临时表 // 循环查询临时表
List<DuanXinQuanXianGuanLiDto> list2 = sqlSession.selectList("com.changda.gjjapp.zhfwpt.dao.qdywqxgl.QuDaoQuanXianGuanLiDao.tMP_SMS_DIS",pDto); List<DuanXinQuanXianGuanLiDto> list2 = sqlSession.selectList("com.changda.gjjapp.zhfwpt.dao.qdywqxgl.QuDaoQuanXianGuanLiDao.tMP_SMS_DIS", pDto);
List<Page2> list = sqlSession.selectList("com.changda.gjjapp.zhfwpt.dao.qdywqxgl.QuDaoQuanXianGuanLiDao.tMP_SMS_DIS2"); List<Page2> list = sqlSession.selectList("com.changda.gjjapp.zhfwpt.dao.qdywqxgl.QuDaoQuanXianGuanLiDao.tMP_SMS_DIS2");
//总记录数 // 总记录数
Page2 page3=list.get(0); Page2 page3 = list.get(0);
map.put("total", page3.getRowCount()); map.put("total", page3.getRowCount());
map.put("list", list2); map.put("list", list2);
// 提交事务 // 提交事务
sqlSession.commit(); sqlSession.commit();
sqlSession.close(); sqlSession.close();
inputStream.close(); inputStream.close();
return map; return map;
} }
//限额控制信息 // 限额控制信息
@Override @Override
public List<M_XEKZB> xekzInfo() { public List<M_XEKZB> xekzInfo() {
return quDaoQuanXianGuanLiDao.xekzInfo(); return quDaoQuanXianGuanLiDao.xekzInfo();
} }
//修改限额值 // 修改限额值
@Override @Override
public ResultDto xeUpdate(String id, String value) { public ResultDto xeUpdate(String id, String value) {
ResultDto resultDto = new ResultDto(); ResultDto resultDto = new ResultDto();
int num = quDaoQuanXianGuanLiDao.xeUpdate(id, value); int num = quDaoQuanXianGuanLiDao.xeUpdate(id, value);
if (num > 0) { if (num > 0) {
resultDto.setSuccess(true); resultDto.setSuccess(true);
}else { } else {
resultDto.setSuccess(false); resultDto.setSuccess(false);
} }
return resultDto; return resultDto;
} }
//渠道总控修改日志记录 // 渠道总控修改日志记录
@Override @Override
public Map<String, Object> qdzkLoggingInfo(String qdid,String czsj,int page, int limit) { public Map<String, Object> qdzkLoggingInfo(String qdid, String czsj, int page, int limit) {
Map<String, Object> map = new HashMap<>(); Map<String, Object> map = new HashMap<>();
try { try {
Page<QdzkLoggingInfoDto> page2 = PageHelper.startPage(page, limit, true); Page<QdzkLoggingInfoDto> page2 = PageHelper.startPage(page, limit, true);
List<QdzkLoggingInfoDto> list = quDaoQuanXianGuanLiDao.qdzkLoggingInfo(czsj,qdid); List<QdzkLoggingInfoDto> list = quDaoQuanXianGuanLiDao.qdzkLoggingInfo(czsj, qdid);
int count = (int) page2.getTotal(); int count = (int) page2.getTotal();
map.put("total", count); map.put("total", count);
map.put("data", list); map.put("data", list);
} catch (Exception e) { } catch (Exception e) {
System.out.println("渠道总控日志异常"); System.out.println("渠道总控日志异常");
} }
return map; return map;
} }
//服务控制日志记录 // 服务控制日志记录
@Override @Override
public Map<String, Object> fwkzLoggingInfo(int page,int limit,String ywbm) { public Map<String, Object> fwkzLoggingInfo(int page, int limit, String ywbm) {
Map<String, Object> map = new HashMap<>(); Map<String, Object> map = new HashMap<>();
try { try {
Page<FwkzLogginInfoDto> page2 = PageHelper.startPage(page, limit, true); Page<FwkzLogginInfoDto> page2 = PageHelper.startPage(page, limit, true);
List<FwkzLogginInfoDto> list = quDaoQuanXianGuanLiDao.fwkzLoggingInfo(ywbm); List<FwkzLogginInfoDto> list = quDaoQuanXianGuanLiDao.fwkzLoggingInfo(ywbm);
int count = (int) page2.getTotal(); int count = (int) page2.getTotal();
map.put("total", count); map.put("total", count);
map.put("data", list); map.put("data", list);
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); e.printStackTrace();
System.out.println("服务控制显示异常"); System.out.println("服务控制显示异常");
} }
return map; return map;
} }
} }
...@@ -86,7 +86,8 @@ public interface QuDaoQuanXianKongZhiService { ...@@ -86,7 +86,8 @@ public interface QuDaoQuanXianKongZhiService {
* @param tzkssj 停止开始时间 * @param tzkssj 停止开始时间
* @return * @return
*/ */
ResultDto updateM_YWZTKZ_2State(String primaryid, String wtzt, String wxzt, String appzt, String znzdzt,String qyjssj,String qykssj,String qyksrq,String qyjsrq,String czlx,String czr,String qysjd,String ywbm,String ywlb); ResultDto updateM_YWZTKZ_2State(String primaryid, String wtzt, String wxzt, String appzt, String znzdzt,String zh308zt, String sjzt,
String qyjssj,String qykssj,String qyksrq,String qyjsrq,String czlx,String czr,String qysjd,String ywbm,String ywlb);
/** /**
* 渠道状态修改 * 渠道状态修改
...@@ -114,7 +115,7 @@ public interface QuDaoQuanXianKongZhiService { ...@@ -114,7 +115,7 @@ public interface QuDaoQuanXianKongZhiService {
* @param shtzjsrq * @param shtzjsrq
* @return * @return
*/ */
ResultDto updateSHState(String primaryid,String czlx,String ywlb,String ywbm,String qysjd,String czr,String wxzt,String appzt,String znzdzt,String wtzt); ResultDto updateSHState(String primaryid,String czlx,String ywlb,String ywbm,String qysjd,String czr,String wxzt,String appzt,String znzdzt,String zh308zt, String sjzt, String wtzt);
/** /**
* 渠道业务控制 1.开启0.关闭 * 渠道业务控制 1.开启0.关闭
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment