Commit fc96357a authored by 周健威's avatar 周健威

优惠券,权限相关

parent b8d855d1
package com.github.wxiaoqi.security.common.vo; package com.github.wxiaoqi.security.common.vo;
import com.github.wxiaoqi.security.common.util.Query;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
...@@ -10,5 +11,7 @@ public class PageParam { ...@@ -10,5 +11,7 @@ public class PageParam {
@ApiModelProperty("每页限制") @ApiModelProperty("每页限制")
Integer limit; Integer limit;
public Query initQuery() {
return new Query(this);
}
} }
...@@ -10,7 +10,10 @@ import com.github.wxiaoqi.security.admin.vo.GroupUsers; ...@@ -10,7 +10,10 @@ import com.github.wxiaoqi.security.admin.vo.GroupUsers;
import com.github.wxiaoqi.security.common.msg.ObjectRestResponse; import com.github.wxiaoqi.security.common.msg.ObjectRestResponse;
import com.github.wxiaoqi.security.common.rest.BaseController; import com.github.wxiaoqi.security.common.rest.BaseController;
import com.github.wxiaoqi.security.common.util.TreeUtil; import com.github.wxiaoqi.security.common.util.TreeUtil;
import com.github.wxiaoqi.security.common.vo.PageDataVO;
import com.github.wxiaoqi.security.common.vo.PageParam;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import lombok.Data;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.BeanUtils; import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
...@@ -50,6 +53,13 @@ public class GroupController extends BaseController<GroupBiz, Group> { ...@@ -50,6 +53,13 @@ public class GroupController extends BaseController<GroupBiz, Group> {
return baseBiz.selectByExample(example); return baseBiz.selectByExample(example);
} }
@RequestMapping(value = "/listPage", method = RequestMethod.GET)
@ResponseBody
public ObjectRestResponse<PageDataVO<Group>> listPage(ListPageDTO dto) {
ObjectRestResponse.succ(PageDataVO.pageInfo(dto.initQuery(), () -> list(dto.getName(), dto.getGroupType())));
}
@GetMapping(value = "/list_all") @GetMapping(value = "/list_all")
@ResponseBody @ResponseBody
public List<Group> listAll() { public List<Group> listAll() {
...@@ -158,4 +168,10 @@ public class GroupController extends BaseController<GroupBiz, Group> { ...@@ -158,4 +168,10 @@ public class GroupController extends BaseController<GroupBiz, Group> {
} }
return TreeUtil.bulid(trees,root) ; return TreeUtil.bulid(trees,root) ;
} }
@Data
static public class ListPageDTO extends PageParam {
String name;
String groupType;
}
} }
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