|
@@ -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();
|
|
|
- }
|
|
|
-}
|