Commit a576e758 authored by 廖旭伟's avatar 廖旭伟

修改bug

parent 81d9b657
package com.mortals.xhx.module.customer.web; package com.mortals.xhx.module.customer.web;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import com.mortals.framework.annotation.UnAuth;
import com.mortals.framework.common.IBaseEnum; import com.mortals.framework.common.IBaseEnum;
import com.mortals.framework.common.Rest;
import com.mortals.framework.exception.AppException; import com.mortals.framework.exception.AppException;
import com.mortals.framework.model.Context; import com.mortals.framework.model.Context;
import com.mortals.framework.model.PageInfo; import com.mortals.framework.model.PageInfo;
...@@ -47,9 +47,9 @@ public class CustomerController extends BaseCRUDJsonBodyMappingController<Custom ...@@ -47,9 +47,9 @@ public class CustomerController extends BaseCRUDJsonBodyMappingController<Custom
} }
@Override @Override
public String list(@RequestBody(required = false) CustomerEntity query) { public Rest<Map<String, Object>> list(@RequestBody(required = false) CustomerEntity query) {
Map<String, Object> model = new HashMap(); Map<String, Object> model = new HashMap();
JSONObject ret = new JSONObject(); Rest<Map<String, Object>> ret = new Rest();
Context context = this.getContext(); Context context = this.getContext();
String busiDesc = "查询" + this.getModuleDesc(); String busiDesc = "查询" + this.getModuleDesc();
...@@ -69,11 +69,11 @@ public class CustomerController extends BaseCRUDJsonBodyMappingController<Custom ...@@ -69,11 +69,11 @@ public class CustomerController extends BaseCRUDJsonBodyMappingController<Custom
} }
this.init(model, context); this.init(model, context);
ret.put("code", code); ret.setCode(code);
ret.put("msg", model.remove("message_info")); ret.setData(model);
ret.put("dict", model.remove("dict")); ret.setDict(model.get("dict") == null ? null : (Map)model.remove("dict"));
ret.put("data", model); ret.setMsg(model.get("message_info") == null ? "" : model.remove("message_info").toString());
return ret.toJSONString(); return ret;
} }
@GetMapping({"status/enable"}) @GetMapping({"status/enable"})
......
package com.mortals.xhx.module.customer.web; package com.mortals.xhx.module.customer.web;
import com.mortals.framework.annotation.UnAuth; import com.mortals.framework.annotation.UnAuth;
import com.mortals.framework.common.IBaseEnum; import com.mortals.framework.common.IBaseEnum;
import com.mortals.framework.common.Rest;
import com.mortals.framework.model.BaseEntity; import com.mortals.framework.model.BaseEntity;
import com.mortals.framework.model.PageInfo; import com.mortals.framework.model.PageInfo;
import com.mortals.framework.model.Result; import com.mortals.framework.model.Result;
...@@ -56,9 +57,9 @@ public class CustomerTrialController extends BaseCRUDJsonBodyMappingController<C ...@@ -56,9 +57,9 @@ public class CustomerTrialController extends BaseCRUDJsonBodyMappingController<C
} }
@Override @Override
public String list(@RequestBody(required = false) CustomerTrialEntity query) { public Rest<Map<String, Object>> list(@RequestBody(required = false) CustomerTrialEntity query) {
Map<String, Object> model = new HashMap(); Map<String, Object> model = new HashMap();
JSONObject ret = new JSONObject(); Rest<Map<String, Object>> ret = new Rest();
Context context = this.getContext(); Context context = this.getContext();
String busiDesc = "查询" + this.getModuleDesc(); String busiDesc = "查询" + this.getModuleDesc();
...@@ -78,11 +79,11 @@ public class CustomerTrialController extends BaseCRUDJsonBodyMappingController<C ...@@ -78,11 +79,11 @@ public class CustomerTrialController extends BaseCRUDJsonBodyMappingController<C
} }
this.init(model, context); this.init(model, context);
ret.put("code", code); ret.setCode(code);
ret.put("msg", model.remove("message_info")); ret.setData(model);
ret.put("dict", model.remove("dict")); ret.setDict(model.get("dict") == null ? null : (Map)model.remove("dict"));
ret.put("data", model); ret.setMsg(model.get("message_info") == null ? "" : model.remove("message_info").toString());
return ret.toJSONString(); return ret;
} }
@PostMapping({"accept"}) @PostMapping({"accept"})
......
...@@ -2,6 +2,7 @@ package com.mortals.xhx.module.picture.web; ...@@ -2,6 +2,7 @@ package com.mortals.xhx.module.picture.web;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import com.mortals.framework.annotation.UnAuth; import com.mortals.framework.annotation.UnAuth;
import com.mortals.framework.common.Rest;
import com.mortals.framework.exception.AppException; import com.mortals.framework.exception.AppException;
import com.mortals.framework.model.Context; import com.mortals.framework.model.Context;
import com.mortals.framework.model.PageInfo; import com.mortals.framework.model.PageInfo;
...@@ -65,13 +66,14 @@ public class PictureGroupController extends BaseCRUDJsonBodyMappingController<Pa ...@@ -65,13 +66,14 @@ public class PictureGroupController extends BaseCRUDJsonBodyMappingController<Pa
} }
@Override @Override
public String list(@RequestBody ParamEntity entity) { public Rest<Map<String, Object>> list(@RequestBody ParamEntity entity) {
Map<String, Object> model = new HashMap(); Map<String, Object> model = new HashMap();
JSONObject ret = new JSONObject(); Rest<Map<String, Object>> ret = new Rest();
ret.put("code", -1); ret.setCode(-1);
ret.put("msg", "无法访问"); ret.setData(model);
ret.put("data", model); ret.setDict(model.get("dict") == null ? null : (Map)model.remove("dict"));
return ret.toJSONString(); ret.setMsg("无法访问");
return ret;
} }
@PostMapping({"element"}) @PostMapping({"element"})
......
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