|
|
@@ -1,5 +1,6 @@
|
|
|
package restcontroller.webmanage.sale.order;
|
|
|
|
|
|
+import com.alibaba.fastjson.JSONArray;
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
import com.huaweicloud.sdk.lts.v2.model.SqlAlarmRuleRespList;
|
|
|
import common.Controller;
|
|
|
@@ -9,6 +10,8 @@ import common.data.*;
|
|
|
import io.swagger.annotations.Api;
|
|
|
import restcontroller.R;
|
|
|
|
|
|
+import java.util.ArrayList;
|
|
|
+
|
|
|
/**
|
|
|
* 订单费用计算方案
|
|
|
*/
|
|
|
@@ -92,17 +95,28 @@ public class OrderFeeCostPlan extends Controller {
|
|
|
Long sys_datafunctionid = detailRow.getLong("sys_datafunctionid");
|
|
|
|
|
|
Rows paramRows = dbConnect.runSqlQuery("SELECT * from sys_datafunction_params WHERE param!='siteid' and sys_datafunctionid=" + sys_datafunctionid);
|
|
|
- detailRow.put("params",paramRows);
|
|
|
+ detailRow.put("params", paramRows);
|
|
|
|
|
|
return getSucReturnObject().setData(detailRow).toString();
|
|
|
}
|
|
|
|
|
|
|
|
|
-// @API(title = "修改参数值")
|
|
|
-// public String modifyFunctionParams() throws YosException {
|
|
|
-//
|
|
|
-//
|
|
|
-// return getSucReturnObject().setData(detailRow).toString();
|
|
|
-// }
|
|
|
+ @API(title = "修改参数值", apiversion = R.ID20231211141802.v1.class)
|
|
|
+ public String modifyFunctionParams() throws YosException {
|
|
|
+
|
|
|
+ JSONArray items = content.getJSONArray("items");
|
|
|
+ ArrayList<String> sqlList = new ArrayList<>();
|
|
|
+ for (Object obj : items) {
|
|
|
+ JSONObject item = (JSONObject) obj;
|
|
|
+ UpdateSQL updateSQL = SQLFactory.createUpdateSQL(this, "sys_datafunction_params");
|
|
|
+ updateSQL.setUniqueid(item.getLongValue("sys_datafunction_paramsid"));
|
|
|
+ updateSQL.setValue("value", item.getStringValue("value"));
|
|
|
+ sqlList.add(updateSQL.getSQL());
|
|
|
+ }
|
|
|
+ dbConnect.runSqlUpdate(sqlList);
|
|
|
+
|
|
|
+
|
|
|
+ return getSucReturnObject().toString();
|
|
|
+ }
|
|
|
|
|
|
}
|