|
@@ -5,6 +5,8 @@ import com.jfinal.plugin.activerecord.Db;
|
|
|
import com.jfinal.plugin.activerecord.Record;
|
|
|
import com.xc.common.ServerResponse;
|
|
|
import com.xc.service.RiskService;
|
|
|
+import com.xc.utils.HttpRequest;
|
|
|
+import com.xc.utils.PropertiesUtil;
|
|
|
import org.slf4j.Logger;
|
|
|
import org.slf4j.LoggerFactory;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
@@ -37,7 +39,14 @@ public class RiskController {
|
|
|
@RequestMapping({"delete.do"})
|
|
|
@ResponseBody
|
|
|
public ServerResponse delete(String id) {
|
|
|
+ String data1 = Db.use("data").queryStr("select code from risk_control_formula where id = ? ", id);
|
|
|
int data = Db.use("data").update("delete from risk_control_formula where id = ? ", id);
|
|
|
+ try {
|
|
|
+ String url = PropertiesUtil.getProperty("httpdata.url");
|
|
|
+ HttpRequest.doGet(url+"remMap?key="+data1,"");
|
|
|
+ } catch (Exception e) {
|
|
|
+ e.printStackTrace();
|
|
|
+ }
|
|
|
return ServerResponse.createBySuccessMsg(data == 1 ? "true" : "false");
|
|
|
}
|
|
|
|
|
@@ -53,6 +62,12 @@ public class RiskController {
|
|
|
|
|
|
int data = Db.use("data").update("insert into risk_control_formula(code,codeName,minimumFluctuation,riskControl,status,tocode) " +
|
|
|
"values('" + code + "', '" + codeName + "','" + minimumFluctuation + "','" + riskControl + "','" + status + "','" + tocode + "')");
|
|
|
+ try {
|
|
|
+ String url = PropertiesUtil.getProperty("httpdata.url");
|
|
|
+ HttpRequest.doGet(url+"remMap?key="+code,"");
|
|
|
+ } catch (Exception e) {
|
|
|
+ e.printStackTrace();
|
|
|
+ }
|
|
|
return ServerResponse.createBySuccessMsg(data == 1 ? "true" : "false");
|
|
|
}
|
|
|
|
|
@@ -70,7 +85,12 @@ public class RiskController {
|
|
|
|
|
|
int data = Db.use("data").update("UPDATE risk_control_formula SET `code` = ? , `minimumFluctuation` = ?, `riskControl` = ?, " +
|
|
|
"`status` = ?, `codeName` = ?, `tocode` = ? WHERE `id` = ? ", code, minimumFluctuation, riskControl, status, codeName, tocode, id);
|
|
|
-
|
|
|
+ String url = PropertiesUtil.getProperty("httpdata.url");
|
|
|
+ try {
|
|
|
+ HttpRequest.doGet(url+"remMap?key="+code,"");
|
|
|
+ } catch (Exception e) {
|
|
|
+ e.printStackTrace();
|
|
|
+ }
|
|
|
return ServerResponse.createBySuccessMsg(data == 1 ? "true" : "false");
|
|
|
}
|
|
|
|