|
@@ -2,6 +2,8 @@ package com.kede.admin.controller;
|
|
|
|
|
|
|
|
|
|
|
|
|
import javax.annotation.Resource;
|
|
import javax.annotation.Resource;
|
|
|
|
|
+
|
|
|
|
|
+import com.kede.common.model.SysConfig;
|
|
|
import org.springframework.beans.BeanUtils;
|
|
import org.springframework.beans.BeanUtils;
|
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
import org.springframework.web.bind.annotation.RequestMethod;
|
|
import org.springframework.web.bind.annotation.RequestMethod;
|
|
@@ -31,8 +33,8 @@ public class AdminSystemController extends BaseApiController {
|
|
|
@Resource(name = "passwordUtil")
|
|
@Resource(name = "passwordUtil")
|
|
|
private PasswordUtil passwordUtil;
|
|
private PasswordUtil passwordUtil;
|
|
|
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
/**
|
|
/**
|
|
|
* 管理员修改本人信息
|
|
* 管理员修改本人信息
|
|
|
*/
|
|
*/
|
|
@@ -64,18 +66,41 @@ public class AdminSystemController extends BaseApiController {
|
|
|
res.setData(adminService.updateByPrimaryKey(ad));
|
|
res.setData(adminService.updateByPrimaryKey(ad));
|
|
|
return res;
|
|
return res;
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
@RequestMapping(value = "/userList",method = RequestMethod.GET)
|
|
@RequestMapping(value = "/userList",method = RequestMethod.GET)
|
|
|
public Result userList(String name,Integer pageNo,Integer PageSize) {
|
|
public Result userList(String name,Integer pageNo,Integer PageSize) {
|
|
|
Result res =new Result();
|
|
Result res =new Result();
|
|
|
return res.data(userService.list(name,pageNo,PageSize));
|
|
return res.data(userService.list(name,pageNo,PageSize));
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
@RequestMapping(value = "/orderList",method = RequestMethod.GET)
|
|
@RequestMapping(value = "/orderList",method = RequestMethod.GET)
|
|
|
public Result orderList(String name,Integer payStatus,String startTime,String endTime,Integer pageNo,Integer PageSize) {
|
|
public Result orderList(String name,Integer payStatus,String startTime,String endTime,Integer pageNo,Integer PageSize) {
|
|
|
Result res =new Result();
|
|
Result res =new Result();
|
|
|
return res.data(OrderService.list( name, 1,payStatus, startTime, endTime, pageNo, PageSize));
|
|
return res.data(OrderService.list( name, 1,payStatus, startTime, endTime, pageNo, PageSize));
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-
|
|
|
|
|
|
|
+ @RequestMapping(value = "/addSysConfig",method = RequestMethod.POST)
|
|
|
|
|
+ public Result addSysConfig(SysConfig in){
|
|
|
|
|
+ Result res=new Result();
|
|
|
|
|
+ if(in.getContent()==null){
|
|
|
|
|
+ res.getError().add(buildError("内容不能为空"));
|
|
|
|
|
+ }
|
|
|
|
|
+ return res.data(adminService.addSysConfig(in));
|
|
|
|
|
+ }
|
|
|
|
|
+ @RequestMapping(value = "/getSysConfig",method = RequestMethod.POST)
|
|
|
|
|
+ public Result getSysConfig(Integer id){
|
|
|
|
|
+ Result res=new Result();
|
|
|
|
|
+ return res.data(adminService.getSysConfig(id));
|
|
|
|
|
+ }
|
|
|
|
|
+ @RequestMapping(value = "/updateSysConfig",method = RequestMethod.POST)
|
|
|
|
|
+ public Result updateSysConfig(SysConfig in){
|
|
|
|
|
+ Result res=new Result();
|
|
|
|
|
+ if(in.getContent()==null){
|
|
|
|
|
+ res.getError().add(buildError("内容不能为空"));
|
|
|
|
|
+ }
|
|
|
|
|
+ return res.data(adminService.updateSysConfig(in));
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
}
|
|
}
|