|
|
@@ -3,6 +3,7 @@ package com.cnd3b.restcontroller.enterprise.tagents;
|
|
|
import com.alibaba.fastjson.JSONArray;
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
import com.cnd3b.common.Controller;
|
|
|
+import com.cnd3b.common.D3BReturnObject_Err;
|
|
|
import com.cnd3b.common.D3bException;
|
|
|
import com.cnd3b.common.data.Row;
|
|
|
import com.cnd3b.common.data.Rows;
|
|
|
@@ -161,7 +162,13 @@ public class tagents extends Controller {
|
|
|
fchangemsgObject.checkStringLength("femail", "tagents.femail", "邮箱");//邮箱
|
|
|
fchangemsgObject.checkStringLength("fdutyparagraph", "tagents.fdutyparagraph", "统一社会代码");//统一社会信用代码
|
|
|
fchangemsgObject.checkStringLength("fbrand", "tagents.fbrand", "经营品牌");//统一社会信用代码
|
|
|
-
|
|
|
+ if (fchangemsgObject.containsKey("saleprodclass")) {
|
|
|
+ try {
|
|
|
+ fchangemsgObject.getJSONArray("saleprodclass");
|
|
|
+ } catch (Exception e) {
|
|
|
+ return new D3BReturnObject_Err().setErrMsg("saleprodclass不是有效的JSONArray格式").toString();
|
|
|
+ }
|
|
|
+ }
|
|
|
if (tagentsid > 0) {
|
|
|
dbConnect.runSqlUpdate("update tagents_msgchangeapp set fstatus='作废' where siteid='" + siteid + "' and tagentsid='" + tagentsid + "' and fstatus='申请'");
|
|
|
}
|
|
|
@@ -221,7 +228,12 @@ public class tagents extends Controller {
|
|
|
Iterator it = changemsgObject.keySet().iterator();
|
|
|
while (it.hasNext()) {
|
|
|
String key = (String) it.next();
|
|
|
- if ("saleprodclass".equals(key)) {
|
|
|
+ if ("saleprodclass".equalsIgnoreCase(key)) {
|
|
|
+ try {
|
|
|
+ changemsgObject.getJSONArray("saleprodclass");
|
|
|
+ } catch (Exception e) {
|
|
|
+ return new D3BReturnObject_Err().setErrMsg("saleprodclass不是有效的JSONArray格式").toString();
|
|
|
+ }
|
|
|
//经营类目修改
|
|
|
JSONArray saleprodclassArray = changemsgObject.getJSONArray("saleprodclass");
|
|
|
PaoSetRemote tagents_prodclassSet = tagents.getPaoSet("$tagents_prodclass", "tagents_prodclass", "tagentsid=" + tagentsid);
|
|
|
@@ -234,11 +246,11 @@ public class tagents extends Controller {
|
|
|
saleprodclassPao.setValue("fprodclassname", fprodclassname, 11L);
|
|
|
}
|
|
|
} else {
|
|
|
- if (Arrays.asList(getTableColumns("tagents")).contains(key)) {
|
|
|
- if (getTableColumnType("tagents", key).equals("datetime")) {
|
|
|
- tagents.setValue(key, changemsgObject.getDate(key), 11L);
|
|
|
+ if (Arrays.asList(getTableColumns("tagents")).contains(key.toLowerCase())) {
|
|
|
+ if (getTableColumnType("tagents", key.toLowerCase()).equals("datetime")) {
|
|
|
+ tagents.setValue(key, changemsgObject.getDate(key.toLowerCase()), 11L);
|
|
|
} else {
|
|
|
- tagents.setValue(key, changemsgObject.getString(key), 11L);
|
|
|
+ tagents.setValue(key, changemsgObject.getString(key.toLowerCase()), 11L);
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
@@ -246,7 +258,6 @@ public class tagents extends Controller {
|
|
|
if (ftype.equals("商户认证") || ftype.equals("新增")) {
|
|
|
tagents.setValue("ftype", "普通", 11L);
|
|
|
}
|
|
|
-
|
|
|
PaoSetRemote tagents_msgchangeappSet = tagents.getPaoSet("$tagents_msgchangeapp", "tagents_msgchangeapp", "tagents_msgchangappid=" + tagents_msgchangappid);
|
|
|
tagents_msgchangeappSet.getPao(0).setValue("fstatus", "审核", 11L);
|
|
|
tagents_msgchangeappSet.getPao(0).setValue("checkby", username, 11L);
|