master
lujian 6 years ago
parent 968c4848c5
commit 56602e9b09

@ -22,8 +22,13 @@ public class RiskMaterialServiceImpl implements RiskMaterialService {
@Override @Override
public void updateRiskMaterial(String riskId, String description) { public void updateRiskMaterial(String riskId, String description) {
System.out.println("--------------------------------------------------------");
System.out.println("description: " + description);
List<JSONObject> materialList = riskMaterialMapper.findAllMaterials(riskId); List<JSONObject> materialList = riskMaterialMapper.findAllMaterials(riskId);
if (!materialList.isEmpty()){ System.out.println("--------------------------------------------------------");
System.out.println("materialList.size: ");
if (!materialList.isEmpty()) {
System.out.println(materialList.size());
JSONObject material = materialList.get(0); JSONObject material = materialList.get(0);
material.put("refuse_description", description); material.put("refuse_description", description);
riskMaterialMapper.update(material); riskMaterialMapper.update(material);

@ -84,6 +84,8 @@ public class RiskBusinessController {
@RequestMapping(value = "/{risk_id}/refuse",method = RequestMethod.PUT) @RequestMapping(value = "/{risk_id}/refuse",method = RequestMethod.PUT)
public void refuseEmail(@PathVariable String risk_id, @RequestBody JSONObject otherParams) throws IOException { public void refuseEmail(@PathVariable String risk_id, @RequestBody JSONObject otherParams) throws IOException {
System.out.println("--------------------------------------------------------");
System.out.println("拒绝逻辑开始");
riskMaterialService.updateRiskMaterial(risk_id, otherParams.getString("refuse_description")); riskMaterialService.updateRiskMaterial(risk_id, otherParams.getString("refuse_description"));
riskBusinessService.sendRefuseEmail(risk_id); riskBusinessService.sendRefuseEmail(risk_id);
} }

Loading…
Cancel
Save