Commit 9de1d062 authored by 赵啸非's avatar 赵啸非

重构部分功能模块

parent 384f0e2e
Pipeline #2311 canceled with stages
package com.mortals.xhx.module.matter.web;
import com.mortals.framework.common.Rest;
import com.mortals.framework.exception.AppException;
import com.mortals.framework.model.OrderCol;
import com.mortals.framework.web.BaseCRUDJsonBodyMappingController;
......@@ -66,23 +67,22 @@ public class MatterDatumController extends BaseCRUDJsonBodyMappingController<Mat
return 1;
}
@RequestMapping(value = {"recommend"},method = {RequestMethod.POST, RequestMethod.GET})
public String recommend(Long id) {
Context context = this.getContext();
@RequestMapping(value = {"recommend"}, method = {RequestMethod.POST, RequestMethod.GET})
public String recommend(Long id, Long siteId) {
Map<String, Object> model = new HashMap();
int code = 1;
int code = VALUE_RESULT_SUCCESS;
String busiDesc = "推荐or取消推荐" + this.getModuleDesc();
try {
this.service.recommend(id);
model.put("message_info", this.getModuleDesc() + "推荐or取消推荐成功!");
this.recordSysLog(this.request, busiDesc + " 【成功】 [id:" + id + "]");
} catch (Exception var7) {
code = -1;
this.doException(this.request, busiDesc, model, var7);
Rest<String> rest = this.service.recommend(id, siteId, getContext());
model.put("message_info", rest.getMsg());
this.recordSysLog(this.request, rest.getMsg());
} catch (Exception e) {
code = VALUE_RESULT_FAILURE;
this.doException(this.request, busiDesc, model, e);
}
JSONObject ret = new JSONObject();
ret.put("code", Integer.valueOf(code));
ret.put("code", code);
ret.put("msg", model.remove("message_info"));
ret.put("data", model);
return ret.toJSONString();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment