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

修改bug

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