|
|
@@ -16,6 +16,7 @@ import org.apache.commons.lang.StringUtils;
|
|
|
import restcontroller.R;
|
|
|
import restcontroller.webmanage.executorService.Executor;
|
|
|
|
|
|
+import java.math.BigDecimal;
|
|
|
import java.util.ArrayList;
|
|
|
import java.util.HashMap;
|
|
|
import java.util.List;
|
|
|
@@ -32,162 +33,118 @@ public class ordercluecampaign extends Controller {
|
|
|
public String insertormodify_campaign() throws YosException {
|
|
|
long sat_campaignid = content.getLong("sat_campaignid");
|
|
|
ArrayList<String> sqllist = new ArrayList<>();
|
|
|
- String name = content.getString("name");
|
|
|
- String director = content.getString("director");
|
|
|
- String address = content.getString("address", true);
|
|
|
- String type = content.getString("type");
|
|
|
- String begdate = content.getString("begdate");
|
|
|
- String enddate = content.getString("enddate");
|
|
|
- SQLFactory sqlFactory = new SQLFactory(this, "活动新增");
|
|
|
- if (sat_campaignid <= 0 || dbConnect
|
|
|
- .runSqlQuery("select sat_campaignid from sat_campaign where sat_campaignid=" + sat_campaignid).isEmpty()) {
|
|
|
+
|
|
|
+ if (sat_campaignid <= 0) {
|
|
|
sat_campaignid = createTableID("sat_campaign");
|
|
|
- content.put("sat_campaignid", sat_campaignid);
|
|
|
+ InsertSQL insertSQL = SQLFactory.createInsertSQL(this, "sat_campaign");
|
|
|
+ insertSQL.setSiteid(siteid);
|
|
|
+ insertSQL.setUniqueid(sat_campaignid);
|
|
|
+ insertSQL.setValue("name", content.getStringValue("name"));
|
|
|
+ insertSQL.setValue("sa_customersid", content.getLongValue("sa_customersid"));
|
|
|
+ insertSQL.setValue("sa_hospitaldepid", content.getLongValue("sa_hospitaldepid"));
|
|
|
+ insertSQL.setValue("type", content.getStringValue("type"));
|
|
|
+ insertSQL.setValue("begdate", content.getStringValueForDate("begdate", "yyyy-MM-dd", "null"));
|
|
|
+ insertSQL.setValue("enddate", content.getStringValueForDate("enddate", "yyyy-MM-dd", "null"));
|
|
|
+ insertSQL.setValue("activitytype", content.getStringValue("activitytype"));
|
|
|
+ insertSQL.setValue("activityformat", content.getStringValue("activityformat"));
|
|
|
+ insertSQL.setValue("province", content.getStringValue("province"));
|
|
|
+ insertSQL.setValue("city", content.getStringValue("city"));
|
|
|
+ insertSQL.setValue("county", content.getStringValue("county"));
|
|
|
+ insertSQL.setValue("address", content.getStringValue("address"));
|
|
|
+ insertSQL.setValue("otheramount", content.getBigDecimalValue("otheramount"));
|
|
|
+ insertSQL.setValue("amount", content.getBigDecimalValue("amount"));
|
|
|
+ insertSQL.setValue("remarks", content.getStringValue("remarks"));
|
|
|
+ sqllist.add(insertSQL.getSQL());
|
|
|
// 数据团队新增
|
|
|
sqllist.addAll(DataTeam.createTeamSQL(this, "sat_campaign", sat_campaignid, userid));
|
|
|
- sqllist.addAll(DataTeam.createTeamMemberSql(this, "sat_campaign", sat_campaignid, userid));
|
|
|
- sqllist.add(DataContrlLog.createLog(this, "sat_campaign", sat_campaignid, "新增", "新建市场活动" + name).getSQL());
|
|
|
- DataExtend.markDataFrom(this, "sat_campaign", sat_campaignid);
|
|
|
+ sqllist.add(DataContrlLog.createLog(this, "sat_campaign", sat_campaignid, "新建", "新建成功").getSQL());
|
|
|
} else {
|
|
|
- Rows rowscount = dbConnect.runSqlQuery("select status from sat_campaign where sat_campaignid=" + sat_campaignid);
|
|
|
- if (rowscount.isEmpty()) {
|
|
|
- return getReturnObject().setCode("0601",new String[0]).toString();//此活动不存在
|
|
|
- } else {
|
|
|
- if (!rowscount.get(0).getString("status").equals("新建")) {
|
|
|
- return getReturnObject().setCode("0602",new String[0]).toString();//非新建状态的活动无法更新
|
|
|
- }
|
|
|
- }
|
|
|
- sqlFactory = new SQLFactory(this, "活动更新");
|
|
|
- sqllist.add(DataContrlLog.createLog(this, "sat_campaign", sat_campaignid, "更新", "编辑市场活动" + name).getSQL());
|
|
|
+ UpdateSQL updateSQL = SQLFactory.createUpdateSQL(this, "sat_campaign");
|
|
|
+ updateSQL.setSiteid(siteid);
|
|
|
+ updateSQL.setUniqueid(sat_campaignid);
|
|
|
+ updateSQL.setValue("name", content.getStringValue("name"));
|
|
|
+ updateSQL.setValue("sa_customersid", content.getLongValue("sa_customersid"));
|
|
|
+ updateSQL.setValue("sa_hospitaldepid", content.getLongValue("sa_hospitaldepid"));
|
|
|
+ updateSQL.setValue("type", content.getStringValue("type"));
|
|
|
+ updateSQL.setValue("begdate", content.getStringValueForDate("begdate", "yyyy-MM-dd", "null"));
|
|
|
+ updateSQL.setValue("enddate", content.getStringValueForDate("enddate", "yyyy-MM-dd", "null"));
|
|
|
+ updateSQL.setValue("activitytype", content.getStringValue("activitytype"));
|
|
|
+ updateSQL.setValue("activityformat", content.getStringValue("activityformat"));
|
|
|
+ updateSQL.setValue("province", content.getStringValue("province"));
|
|
|
+ updateSQL.setValue("city", content.getStringValue("city"));
|
|
|
+ updateSQL.setValue("county", content.getStringValue("county"));
|
|
|
+ updateSQL.setValue("address", content.getStringValue("address"));
|
|
|
+ updateSQL.setValue("otheramount", content.getBigDecimalValue("otheramount"));
|
|
|
+ updateSQL.setValue("amount", content.getBigDecimalValue("amount"));
|
|
|
+ updateSQL.setValue("remarks", content.getStringValue("remarks"));
|
|
|
+ sqllist.add(updateSQL.getSQL());
|
|
|
+ sqllist.add(DataContrlLog.createLog(this, "sat_campaign", sat_campaignid, "编辑", "编辑成功").getSQL());
|
|
|
}
|
|
|
- sqlFactory.addParameter("sat_campaignid", sat_campaignid);
|
|
|
- sqlFactory.addParameter("siteid", siteid);
|
|
|
- sqlFactory.addParameter("username", username);
|
|
|
- sqlFactory.addParameter("userid", userid);
|
|
|
- sqlFactory.addParameter("name", name);
|
|
|
- sqlFactory.addParameter("director", director);
|
|
|
- sqlFactory.addParameter("address", address);
|
|
|
- sqlFactory.addParameter("type", type);
|
|
|
- sqlFactory.addParameter("begdate", begdate);
|
|
|
- if (!StringUtils.isBlank(enddate)) {
|
|
|
- sqlFactory.addParameter("enddate", enddate);
|
|
|
- } else {
|
|
|
|
|
|
- sqlFactory.addParameter("enddate", "null");
|
|
|
+ sqllist.add("DELETE FROM sat_campaign_doctor WHERE sat_campaignid=" + sat_campaignid + " AND siteid='" + siteid + "'");
|
|
|
+
|
|
|
+ JSONArray doctors = content.getJSONArray("doctors");
|
|
|
+ for (Object object : doctors) {
|
|
|
+ JSONObject doctor = (JSONObject) object;
|
|
|
+ InsertSQL insertSQL = SQLFactory.createInsertSQL(this, "sat_campaign_doctor");
|
|
|
+ insertSQL.setSiteid(siteid);
|
|
|
+ insertSQL.setUniqueid(createTableID("sat_campaign_doctor"));
|
|
|
+ insertSQL.setValue("sat_campaignid", sat_campaignid);
|
|
|
+ insertSQL.setValue("sa_doctorid", doctor.getLong("sa_doctorid"));
|
|
|
+ insertSQL.setValue("amount", doctor.getBigDecimalValue("amount"));
|
|
|
+ sqllist.add(insertSQL.getSQL());
|
|
|
}
|
|
|
- sqllist.add(sqlFactory.getSQL());
|
|
|
- dbConnect.runSqlUpdate(sqllist);
|
|
|
- return queryCampaignMain();
|
|
|
- }
|
|
|
|
|
|
- @API(title = "活动列表", apiversion = R.ID20221101095102.v1.class)
|
|
|
- @CACHEING
|
|
|
- public String queryCampaignList() throws YosException {
|
|
|
- /*
|
|
|
- 排序条件设置
|
|
|
- */
|
|
|
- String sort = "t1.createdate desc";
|
|
|
- /*
|
|
|
- * 过滤条件设置
|
|
|
- */
|
|
|
- String where = " 1=1 ";
|
|
|
- // 1:我负责的;2:我参与的;3:我下属负责的;4:我下属参与的
|
|
|
- int type = content.getIntValue("type");
|
|
|
- if (content.containsKey("where")) {
|
|
|
- JSONObject whereObject = content.getJSONObject("where");
|
|
|
- if (whereObject.containsKey("condition") && !"".equals(whereObject.getString("condition"))) {
|
|
|
- where = where + " and(t1.name like'%" + whereObject.getString("condition")
|
|
|
- + "%' or t1.address like '%" + whereObject.getString("condition") + "%')";
|
|
|
- }
|
|
|
- if (whereObject.containsKey("status") && !"".equals(whereObject.getString("status"))) {
|
|
|
- where = where + " and t1.status ='" + whereObject.getString("status") + "' ";
|
|
|
- }
|
|
|
- if (whereObject.containsKey("type") && !"".equals(whereObject.getString("type"))) {
|
|
|
- where = where + " and t1.type ='" + whereObject.getString("type") + "' ";
|
|
|
- }
|
|
|
- if (whereObject.containsKey("unend") && !"".equals(whereObject.getString("unend"))) {
|
|
|
- if (whereObject.getLong("unend") == 1) {
|
|
|
- where = where + " and t1.status !='结束' ";
|
|
|
- }
|
|
|
|
|
|
- }
|
|
|
- }
|
|
|
- boolean isAll = content.getBooleanValue("isAll");
|
|
|
+ dbConnect.runSqlUpdate(sqllist);
|
|
|
+ content.put("sat_campaignid", sat_campaignid);
|
|
|
|
|
|
- SQLFactory sqlFactory = new SQLFactory(this, "活动列表查询", pageSize, pageNumber, pageSorting);
|
|
|
- if (isAll) {
|
|
|
- sqlFactory = new SQLFactory(this, "活动列表查询");
|
|
|
- }
|
|
|
- sqlFactory.addParameter_SQL("where", where);
|
|
|
- String where2 = "";
|
|
|
- if (type == 0) {
|
|
|
- where2 = DataTeam.getDataWhereStr(this, "sat_campaign", "t1", 1) + " or "
|
|
|
- + DataTeam.getDataWhereStr(this, "sat_campaign", "t1", 2) ;
|
|
|
- } else {
|
|
|
- where2 = DataTeam.getDataWhereStr(this, "sat_campaign", "t1", type);
|
|
|
- }
|
|
|
- sqlFactory.addParameter_SQL("where2", where2);
|
|
|
- sqlFactory.addParameter("siteid", siteid);
|
|
|
- Rows rows = dbConnect.runSqlQuery(sqlFactory);
|
|
|
-
|
|
|
-// ArrayList<Long> ids = rows.toArrayList("sat_campaignid", new ArrayList<Long>());
|
|
|
-// // 附件
|
|
|
-// RowsMap RowsMap = getAttachmentUrl("sat_campaign", ids);
|
|
|
-// // 封面cover
|
|
|
-// RowsMap coverRowsMap = getAttachmentUrl("sat_campaign", ids, "cover");
|
|
|
-// for (Row row : rows) {
|
|
|
-// Rows Rows = RowsMap.get(row.getString("sat_campaignid"));
|
|
|
-// if (Rows.isEmpty()) {
|
|
|
-// row.put("attinfos", new Rows());
|
|
|
-// } else {
|
|
|
-// row.put("attinfos", Rows);
|
|
|
-// }
|
|
|
-//
|
|
|
-//// row.put("attinfos", attRowsMap.getOrDefault(row.getString("sat_coursewareid"), new Rows()));
|
|
|
-// }
|
|
|
-// for (Row row : rows) {
|
|
|
-// Rows coverRows = coverRowsMap.get(row.getString("sat_campaignid"));
|
|
|
-// if (coverRows.isEmpty()) {
|
|
|
-// row.put("cover", "");
|
|
|
-// } else {
|
|
|
-// row.put("cover", coverRows.get(0).getString("url"));
|
|
|
-// }
|
|
|
-// }
|
|
|
- RowsMap leaderRows = DataTeam.getLeaderWithoutHeadpic(this, "sat_campaign", rows.toArrayList("sat_campaignid")).toRowsMap("ownerid");
|
|
|
- for (Row row : rows) {
|
|
|
- row.put("leader", leaderRows.get(row.getString("sat_campaignid")));
|
|
|
- }
|
|
|
- return getSucReturnObject().setData(rows).toString();
|
|
|
+ return queryCampaignMain();
|
|
|
}
|
|
|
|
|
|
@API(title = "活动详情")
|
|
|
public String queryCampaignMain() throws YosException {
|
|
|
Long sat_campaignid = content.getLong("sat_campaignid");
|
|
|
|
|
|
- SQLFactory sqlFactory = new SQLFactory(this, "活动详情查询");
|
|
|
- sqlFactory.addParameter("sat_campaignid", sat_campaignid);
|
|
|
- Rows rows = dbConnect.runSqlQuery(sqlFactory);
|
|
|
-
|
|
|
-// ArrayList<Long> ids = rows.toArrayList("sat_campaignid", new ArrayList<Long>());
|
|
|
-// // 附件
|
|
|
-// RowsMap attRowsMap = getAttachmentUrl("sat_campaign", ids, "default");
|
|
|
-// // 封面cover
|
|
|
-// RowsMap coverRowsMap = getAttachmentUrl("sat_campaign", ids, "cover");
|
|
|
-// for (Row row : rows) {
|
|
|
-// Rows coverRows = coverRowsMap.get(row.getString("sat_campaignid"));
|
|
|
-// if (coverRows.isEmpty()) {
|
|
|
-// row.put("cover", "");
|
|
|
-// } else {
|
|
|
-// row.put("cover", coverRows.get(0).getString("url"));
|
|
|
-// }
|
|
|
-// row.put("attinfos", attRowsMap.getOrDefault(row.getString("sat_campaignid"), new Rows()));
|
|
|
-// }
|
|
|
+ QuerySQL querySQL = SQLFactory.createQuerySQL(this, "sat_campaign", "*").setTableAlias("t1");
|
|
|
+ querySQL.addJoinTable(JOINTYPE.left, "sa_customers", "t2", "t2.sa_customersid=t1.sa_customersid and t2.siteid=t1.siteid",
|
|
|
+ "sa_customersid");
|
|
|
+ querySQL.addJoinTable(JOINTYPE.left, "sys_enterprise", "t3", "t3.sys_enterpriseid=t2.sys_enterpriseid and t3.siteid=t2.siteid");
|
|
|
+ querySQL.addJoinTable(JOINTYPE.left, "sa_hospitaldep", "t4", "t4.sa_hospitaldepid=t1.sa_hospitaldepid and t4.siteid=t1.siteid",
|
|
|
+ "hospitaldepname");
|
|
|
+ querySQL.setSiteid(siteid);
|
|
|
+ querySQL.setWhere("t1.sat_campaignid=" + sat_campaignid);
|
|
|
+ Rows rows = querySQL.query();
|
|
|
+
|
|
|
|
|
|
for (Row row : rows) {
|
|
|
row.put("leader", DataTeam.getLeader(this, "sat_campaign", row.getLong("sat_campaignid")));
|
|
|
+ String begdate = row.getString("begdate");
|
|
|
+ String enddate = row.getString("enddate");
|
|
|
+ row.put("begdate", begdate.length() > 10 ? begdate.substring(0, 10) : "");
|
|
|
+ row.put("enddate", enddate.length() > 10 ? enddate.substring(0, 10) : "");
|
|
|
}
|
|
|
-
|
|
|
- return getSucReturnObject().setData(rows.size() > 0 ? rows.get(0) : new Row()).toString();
|
|
|
+ Row row = rows.size() > 0 ? rows.get(0) : new Row();
|
|
|
+
|
|
|
+ QuerySQL doctorQuerySQL = SQLFactory.createQuerySQL(this, "sat_campaign_doctor", "*").setTableAlias("t1");
|
|
|
+ doctorQuerySQL.addJoinTable(JOINTYPE.left, "sa_doctor", "t2", "t2.sa_doctorid=t1.sa_doctorid and t2.siteid=t1.siteid",
|
|
|
+ "doctorname");
|
|
|
+ doctorQuerySQL.addJoinTable(JOINTYPE.left, "sa_hospitaldep", "t3", "t3.sa_hospitaldepid=t2.sa_hospitaldepid and t3.siteid=t2.siteid",
|
|
|
+ "hospitaldepname");
|
|
|
+ doctorQuerySQL.addJoinTable(JOINTYPE.left, "sa_customers", "t4", "t4.sa_customersid=t3.sa_customersid and t4.siteid=t3.siteid");
|
|
|
+ doctorQuerySQL.addJoinTable(JOINTYPE.left, "sys_enterprise", "t5", "t5.sys_enterpriseid=t4.sys_enterpriseid and t5.siteid=t4.siteid");
|
|
|
+ doctorQuerySQL.addQueryFields("hospitalname","t5.enterprisename");
|
|
|
+ doctorQuerySQL.setSiteid(siteid);
|
|
|
+ doctorQuerySQL.setWhere("t1.sat_campaignid=" + sat_campaignid);
|
|
|
+ Rows doctorRows = doctorQuerySQL.query();
|
|
|
+ row.put("doctors", doctorRows);
|
|
|
+
|
|
|
+ BigDecimal doctorAmount=doctorRows.sum("amount");
|
|
|
+ BigDecimal actualAmount=doctorAmount.add(row.getBigDecimal("otheramount"));
|
|
|
+ row.put("doctorAmount", doctorAmount);
|
|
|
+ row.put("actualAmount", actualAmount);
|
|
|
+
|
|
|
+ return getSucReturnObject().setData(row).toString();
|
|
|
}
|
|
|
|
|
|
@API(title = "删除", apiversion = R.ID20230329163504.v1.class)
|
|
|
@@ -198,21 +155,21 @@ public class ordercluecampaign extends Controller {
|
|
|
Rows rowscount = dbConnect.runSqlQuery("select status from sat_campaign where siteid='" + siteid + "' and sat_campaignid=" + sat_campaignid);
|
|
|
Rows orderclueRows = dbConnect.runSqlQuery("select sat_orderclueid from sat_orderclue where siteid='" + siteid + "' and deleted=0 and sat_campaignid=" + sat_campaignid);
|
|
|
if (rowscount.isEmpty()) {
|
|
|
- return getReturnObject().setCode("0603",new String[0]).toString();//此活动不存在,无法删除
|
|
|
- }else {
|
|
|
+ return getReturnObject().setCode("0603", new String[0]).toString();//此活动不存在,无法删除
|
|
|
+ } else {
|
|
|
if (rowscount.get(0).getString("status").equals("发布")) {
|
|
|
- return getReturnObject().setCode("0604",new String[0]).toString();//已发布的活动无法删除
|
|
|
+ return getReturnObject().setCode("0604", new String[0]).toString();//已发布的活动无法删除
|
|
|
}
|
|
|
if (orderclueRows.isNotEmpty()) {
|
|
|
- return getReturnObject().setCode("0605",new String[0]).toString();//活动中存在线索无法删除
|
|
|
+ return getReturnObject().setCode("0605", new String[0]).toString();//活动中存在线索无法删除
|
|
|
}
|
|
|
}
|
|
|
// String sql = "DELETE FROM sat_campaign WHERE sat_campaignid = '" + sat_campaignid + "'";
|
|
|
// dbConnect.runSqlUpdate(sql);
|
|
|
|
|
|
- DeleteSQL deleteSQL=SQLFactory.createDeleteSQL(this,"sat_campaign");
|
|
|
+ DeleteSQL deleteSQL = SQLFactory.createDeleteSQL(this, "sat_campaign");
|
|
|
deleteSQL.setSiteid(siteid);
|
|
|
- deleteSQL.setWhere("sat_campaignid",sat_campaignid);
|
|
|
+ deleteSQL.setWhere("sat_campaignid", sat_campaignid);
|
|
|
deleteSQL.delete();
|
|
|
|
|
|
return getSucReturnObject().toString();
|
|
|
@@ -225,11 +182,11 @@ public class ordercluecampaign extends Controller {
|
|
|
Long sat_campaignid = content.getLong("sat_campaignid");
|
|
|
Rows rowscount = dbConnect.runSqlQuery("select status from sat_campaign where siteid='" + siteid + "' and sat_campaignid=" + sat_campaignid);
|
|
|
if (rowscount.isEmpty()) {
|
|
|
- return getReturnObject().setCode("0603",new String[0]).toString();//此活动不存在,无法删除
|
|
|
+ return getReturnObject().setCode("0603", new String[0]).toString();//此活动不存在,无法删除
|
|
|
}
|
|
|
- DeleteSQL deleteSQL=SQLFactory.createDeleteSQL(this,"sat_campaign");
|
|
|
+ DeleteSQL deleteSQL = SQLFactory.createDeleteSQL(this, "sat_campaign");
|
|
|
deleteSQL.setSiteid(siteid);
|
|
|
- deleteSQL.setWhere("sat_campaignid",sat_campaignid);
|
|
|
+ deleteSQL.setWhere("sat_campaignid", sat_campaignid);
|
|
|
deleteSQL.delete();
|
|
|
|
|
|
return getSucReturnObject().toString();
|
|
|
@@ -289,7 +246,7 @@ public class ordercluecampaign extends Controller {
|
|
|
String[] s = {"sat_campaignids"};
|
|
|
for (String s1 : s) {
|
|
|
if (!content.containsKey(s1))
|
|
|
- return getReturnObject().setCode("0635",new String[]{s1}).toString();//缺少" + s1 + "参数
|
|
|
+ return getReturnObject().setCode("0635", new String[]{s1}).toString();//缺少" + s1 + "参数
|
|
|
}
|
|
|
List<String> list = sat_campaignids.toJavaList(String.class);
|
|
|
String[] stringArray = list.toArray(new String[0]);
|
|
|
@@ -299,10 +256,10 @@ public class ordercluecampaign extends Controller {
|
|
|
Rows rows = dbConnect.runSqlQuery(sqlFactoryquery);
|
|
|
for (Row row : rows) {
|
|
|
if (row.getString("status").equals("发布")) {
|
|
|
- return getReturnObject().setCode("0606",new String[]{row.getString("name")}).toString();//【" + row.getString("name") + "】活动已发布,无法再次发布
|
|
|
+ return getReturnObject().setCode("0606", new String[]{row.getString("name")}).toString();//【" + row.getString("name") + "】活动已发布,无法再次发布
|
|
|
}
|
|
|
if (row.getString("status").equals("结束")) {
|
|
|
- return getReturnObject().setCode("0607",new String[]{row.getString("name")}).toString();//【" + row.getString("name") + "】活动已结束,无法发布
|
|
|
+ return getReturnObject().setCode("0607", new String[]{row.getString("name")}).toString();//【" + row.getString("name") + "】活动已结束,无法发布
|
|
|
}
|
|
|
sqllist.add(DataContrlLog.createLog(this, "sat_campaign", row.getLong("sat_campaignid"), "发布", "发布市场活动" + row.getString("name")).getSQL());
|
|
|
}
|
|
|
@@ -343,7 +300,7 @@ public class ordercluecampaign extends Controller {
|
|
|
String[] s = {"sat_campaignids"};
|
|
|
for (String s1 : s) {
|
|
|
if (!content.containsKey(s1))
|
|
|
- return getReturnObject().setCode("0635",new String[]{s1}).toString();//缺少" + s1 + "参数
|
|
|
+ return getReturnObject().setCode("0635", new String[]{s1}).toString();//缺少" + s1 + "参数
|
|
|
}
|
|
|
List<String> list = sat_campaignids.toJavaList(String.class);
|
|
|
String[] stringArray = list.toArray(new String[0]);
|
|
|
@@ -353,10 +310,10 @@ public class ordercluecampaign extends Controller {
|
|
|
Rows rows = dbConnect.runSqlQuery(sqlFactoryquery);
|
|
|
for (Row row : rows) {
|
|
|
if (row.getString("status").equals("新建")) {
|
|
|
- return getReturnObject().setCode("0608",new String[]{row.getString("name")}).toString();//【" + row.getString("name") + "】活动已下架,无法再次下架
|
|
|
+ return getReturnObject().setCode("0608", new String[]{row.getString("name")}).toString();//【" + row.getString("name") + "】活动已下架,无法再次下架
|
|
|
}
|
|
|
if (row.getString("status").equals("结束")) {
|
|
|
- return getReturnObject().setCode("0609",new String[]{row.getString("name")}).toString();//【" + row.getString("name") + "】活动已结束,无法下架
|
|
|
+ return getReturnObject().setCode("0609", new String[]{row.getString("name")}).toString();//【" + row.getString("name") + "】活动已结束,无法下架
|
|
|
}
|
|
|
sqllist.add(DataContrlLog.createLog(this, "sat_campaign", row.getLong("sat_campaignid"), "下架", "下架市场活动" + row.getString("name")).getSQL());
|
|
|
}
|
|
|
@@ -382,7 +339,7 @@ public class ordercluecampaign extends Controller {
|
|
|
String[] s = {"sat_campaignids"};
|
|
|
for (String s1 : s) {
|
|
|
if (!content.containsKey(s1))
|
|
|
- return getReturnObject().setCode("0635",new String[]{s1}).toString();//缺少" + s1 + "参数
|
|
|
+ return getReturnObject().setCode("0635", new String[]{s1}).toString();//缺少" + s1 + "参数
|
|
|
}
|
|
|
List<String> list = sat_campaignids.toJavaList(String.class);
|
|
|
String[] stringArray = list.toArray(new String[0]);
|
|
|
@@ -392,7 +349,7 @@ public class ordercluecampaign extends Controller {
|
|
|
Rows rows = dbConnect.runSqlQuery(sqlFactoryquery);
|
|
|
for (Row row : rows) {
|
|
|
if (row.getString("status").equals("结束")) {
|
|
|
- return getReturnObject().setCode("0610",new String[]{ row.getString("name")}).toString();//【" + row.getString("name") + "】活动已结束,无法再次结束
|
|
|
+ return getReturnObject().setCode("0610", new String[]{row.getString("name")}).toString();//【" + row.getString("name") + "】活动已结束,无法再次结束
|
|
|
}
|
|
|
sqllist.add(DataContrlLog.createLog(this, "sat_campaign", row.getLong("sat_campaignid"), "结束", "结束市场活动" + row.getString("name")).getSQL());
|
|
|
}
|