浏览代码

删除之前的投诉代码

eganwu 1 年之前
父节点
当前提交
574d2655ec

+ 0 - 11
src/custom/restcontroller/webmanage/saletool/complaint/SQL/投诉-列表.sql

@@ -1,11 +0,0 @@
-SELECT t1.sat_complaintid,
-       t1.createby,
-       t1.createdate,
-       t1.complainttype,
-       t1.content,
-       t1.notes,
-       t1.status,
-       t1.phonenumber
-FROM sat_complaint t1
-where $where$
-  and siteid = $siteid$

+ 0 - 3
src/custom/restcontroller/webmanage/saletool/complaint/SQL/投诉分类-新增.sql

@@ -1,3 +0,0 @@
-insert into sat_complaint_class (siteid, sat_complaint_classid, createuserid, createby, createdate, classname, isenable,
-                                 issystem)
-values ($siteid$,$sat_complaint_classid$,$createuserid$,$createby$,current_time ,$classname$,$isenable$,0);

+ 0 - 4
src/custom/restcontroller/webmanage/saletool/complaint/SQL/投诉分类-更新.sql

@@ -1,4 +0,0 @@
-update sat_complaint_class
-set classname=$classname$,
-    isenable = $isenable$
-where sat_complaint_classid = $sat_complaint_classid$;

+ 0 - 4
src/custom/restcontroller/webmanage/saletool/complaint/SQL/投诉板块-查询列表.sql

@@ -1,4 +0,0 @@
-SELECT sat_complaint_classid, classname, isenable, createby, createdate, issystem
-FROM sat_complaint_class t1
-WHERE t1.siteid = $siteid$
-ORDER BY t1.createdate

+ 0 - 76
src/custom/restcontroller/webmanage/saletool/complaint/complaint.java

@@ -1,76 +0,0 @@
-package restcontroller.webmanage.saletool.complaint;
-
-import com.alibaba.fastjson.JSONObject;
-import common.Controller;
-import common.YosException;
-import common.annotation.API;
-import common.annotation.CACHEING;
-import common.annotation.CACHEING_CLEAN;
-import common.annotation.cm;
-import common.data.Row;
-import common.data.Rows;
-import common.data.RowsMap;
-import common.data.SQLFactory;
-import restcontroller.webmanage.saletool.orderclue.publicclue.PublicClue;
-
-import java.util.ArrayList;
-
-@API(title = "管理端-投诉")
-public class complaint extends Controller {
-    public complaint(JSONObject content) throws YosException {
-        super(content);
-    }
-
-
-    @API(title = "管理端-投诉-列表")
-    @CACHEING
-    public String selectList() throws YosException {
-
-        boolean isAll = content.getBoolean("isAll");
-
-        /*
-          过滤条件设置
-         */
-        StringBuffer where = new StringBuffer(" 1=1 ");
-        if (content.containsKey("where")) {
-            JSONObject whereObject = content.getJSONObject("where");
-            if (whereObject.containsKey("condition") && !"".equals(whereObject.getString("condition"))) {
-                where.append(" and (");
-                where.append("t1.complainttype like'%").append(whereObject.getString("condition")).append("%' ");
-                where.append("or t1.content like'%").append(whereObject.getString("condition")).append("%' ");
-                where.append("or t1.notes like'%").append(whereObject.getString("condition")).append("%' ");
-                where.append(")");
-            }
-
-        }
-        SQLFactory sqlFactory = new SQLFactory(this, "投诉-列表", pageSize, pageNumber, pageSorting);
-        if (isAll) {
-            sqlFactory = new SQLFactory(this, "投诉-列表");
-        }
-        sqlFactory.addParameter("siteid", siteid);
-        sqlFactory.addParameter_SQL("where", where);
-        String sql = sqlFactory.getSQL();
-        Rows rows = dbConnect.runSqlQuery(sql);
-
-        ArrayList<Long> ids = rows.toArrayList("sat_complaintid", new ArrayList<>());
-
-        RowsMap attMap = getAttachmentUrl("sat_complaint", ids);
-        for (Row row : rows) {
-            String id = row.getString("sat_complaintid");
-            row.put("attinfos", attMap.getOrDefault(id, new Rows()));
-        }
-
-
-        return getSucReturnObject().setData(rows).toString();
-    }
-
-    @API(title = "管理端-投诉-确认处理")
-    @CACHEING_CLEAN(cms = {@cm(clazz = complaint.class, method = {"selectList"})})
-    public String changeStatus() throws YosException {
-        Long sat_complaintid = content.getLong("sat_complaintid");
-        String sql = "UPDATE sat_complaint SET status='已受理' WHERE sat_complaintid = " + sat_complaintid + " AND siteid = '" + siteid + "'";
-        dbConnect.runSqlUpdate(sql);
-        return getSucReturnObject().toString();
-    }
-
-}

+ 0 - 71
src/custom/restcontroller/webmanage/saletool/complaint/complaintclass.java

@@ -1,71 +0,0 @@
-package restcontroller.webmanage.saletool.complaint;
-
-
-import com.alibaba.fastjson.JSONObject;
-import common.Controller;
-import common.YosException;
-import common.annotation.API;
-import common.annotation.CACHEING;
-import common.annotation.CACHEING_CLEAN;
-import common.annotation.cm;
-import common.data.Rows;
-import common.data.SQLFactory;
-import restcontroller.webmanage.saletool.courseware.courseware;
-
-@API(title = "管理端-投诉分类")
-public class complaintclass extends Controller {
-
-
-    public complaintclass(JSONObject content) throws YosException {
-        super(content);
-    }
-
-    @API(title = "管理端-投诉分类-新增或更新")
-    @CACHEING_CLEAN(cms = {@cm(clazz = complaintclass.class, method = {"selectList"})})
-    public String inseretOrUpdate() throws YosException {
-        Long id = content.getLong("sat_complaint_classid");
-        boolean isenable = content.getBoolean("isenable");
-        String classname = content.getString("classname","sat_complaint_class");
-
-        SQLFactory sqlFactory;
-        if (id <= 0) {
-            id = createTableID("sat_complaint_class");
-            sqlFactory = new SQLFactory(this, "投诉分类-新增");
-        } else {
-            sqlFactory = new SQLFactory(this, "投诉分类-更新");
-        }
-
-        sqlFactory.addParameter("siteid", siteid);
-        sqlFactory.addParameter("sat_complaint_classid", id);
-        sqlFactory.addParameter("createuserid", userid);
-        sqlFactory.addParameter("createby", username);
-        sqlFactory.addParameter("classname", classname);
-        sqlFactory.addParameter("isenable", isenable);
-        String sql = sqlFactory.getSQL();
-
-        dbConnect.runSqlUpdate(sql);
-
-
-        return getSucReturnObject().toString();
-    }
-
-    @API(title = "管理端-投诉分类-删除")
-    @CACHEING_CLEAN(cms = {@cm(clazz = complaintclass.class, method = {"selectList"})})
-    public String delete() throws YosException {
-        Long id = content.getLong("sat_complaint_classid");
-        String sql = "DELETE FROM sat_complaint_class WHERE sat_complaint_classid = " + id + " AND siteid = '" + siteid + "'";
-        dbConnect.runSqlUpdate(sql);
-        return getSucReturnObject().toString();
-    }
-
-    @API(title = "管理端-投诉分类-查询列表")
-    @CACHEING
-    public String selectList() throws YosException {
-
-        SQLFactory sqlFactory = new SQLFactory(this, "投诉板块-查询列表");
-        sqlFactory.addParameter("siteid", siteid);
-        Rows rows = dbConnect.runSqlQuery(sqlFactory);
-
-        return getSucReturnObject().setData(rows).toString();
-    }
-}

+ 0 - 5
src/custom/restcontroller/webmanage/saletool/complaint/statistics/SQL/折线图.sql

@@ -1,5 +0,0 @@
-select count(0) AS counts, DATE_FORMAT(t1.createdate, $format1$)AS time
-from sat_complaint t1
-where DATE_FORMAT(t1.createdate, $format2$) = DATE_FORMAT($date$, $format2$) AND siteid = $siteid$ AND  $where$
-group by time
-ORDER BY time;

+ 0 - 5
src/custom/restcontroller/webmanage/saletool/complaint/statistics/SQL/饼图.sql

@@ -1,5 +0,0 @@
-SELECT COUNT(0) counts, complainttype
-FROM sat_complaint t1
-where DATE_FORMAT(t1.createdate, '%m') = DATE_FORMAT($date$, '%m')
-  AND siteid = $siteid$
-group by complainttype

+ 0 - 77
src/custom/restcontroller/webmanage/saletool/complaint/statistics/data.java

@@ -1,77 +0,0 @@
-package restcontroller.webmanage.saletool.complaint.statistics;
-
-import com.alibaba.fastjson.JSONObject;
-import common.Controller;
-import common.YosException;
-import common.annotation.API;
-import common.data.Rows;
-import common.data.SQLFactory;
-
-@API(title = "投诉-数据分析")
-public class data extends Controller {
-    public data(JSONObject content) throws YosException {
-        super(content);
-    }
-
-    @API(title = "投诉-数据分析-折线图")
-    public String getLineChart() throws YosException {
-        String date = content.getString("date");
-        int type = content.getIntValue("type");
-        String format1 = "";
-        String format2 = "";
-        switch (type) {
-            //年
-            case 1:
-                format1 = "%Y-%m";
-                format2 = "%Y";
-                break;
-            //月
-            case 2:
-                format1 = "%c-%e";
-                format2 = "%m";
-                break;
-            //日
-            case 3:
-                format1 = "%k:00";
-                format2 = "%j";
-                break;
-        }
-
-        /*
-          过滤条件设置
-         */
-        StringBuffer where = new StringBuffer(" 1=1 ");
-        if (content.containsKey("where")) {
-            JSONObject whereObject = content.getJSONObject("where");
-            if (whereObject.containsKey("condition") && !"".equals(whereObject.getString("condition"))) {
-                where.append(" and (");
-                where.append("t1.complainttype ='").append(whereObject.getString("condition")).append("' ");
-                where.append(")");
-            }
-
-        }
-
-        SQLFactory sqlFactory = new SQLFactory(this, "折线图");
-        sqlFactory.addParameter("format1", format1);
-        sqlFactory.addParameter("format2", format2);
-        sqlFactory.addParameter("date", date);
-        sqlFactory.addParameter("siteid", siteid);
-        sqlFactory.addParameter_SQL("where", where);
-        String sql = sqlFactory.getSQL();
-        Rows rows = dbConnect.runSqlQuery(sql);
-
-        return getSucReturnObject().setData(rows).toString();
-    }
-
-    @API(title = "投诉-数据分析-饼图")
-    public String getPieChart() throws YosException {
-        String date = content.getString("date");
-        SQLFactory sqlFactory = new SQLFactory(this, "饼图");
-        sqlFactory.addParameter("date", date);
-        sqlFactory.addParameter("siteid", siteid);
-        String sql = sqlFactory.getSQL();
-        Rows rows = dbConnect.runSqlQuery(sql);
-        return getSucReturnObject().setData(rows).toString();
-    }
-
-}