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

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

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