合并
This commit is contained in:
@@ -1,9 +1,8 @@
|
||||
package cn.lili.controller.goods;
|
||||
|
||||
import cn.lili.common.enums.ResultCode;
|
||||
import cn.lili.common.exception.ServiceException;
|
||||
import cn.lili.common.enums.ResultUtil;
|
||||
import cn.lili.common.utils.StringUtils;
|
||||
import cn.lili.common.exception.ServiceException;
|
||||
import cn.lili.common.vo.ResultMessage;
|
||||
import cn.lili.modules.goods.entity.dos.Category;
|
||||
import cn.lili.modules.goods.entity.vos.CategoryVO;
|
||||
@@ -62,7 +61,7 @@ public class CategoryManagerController {
|
||||
@ApiOperation(value = "添加商品分类")
|
||||
public ResultMessage<Category> saveCategory(@Valid Category category) {
|
||||
//非顶级分类
|
||||
if (category.getParentId() != null && !category.getParentId().equals("0")) {
|
||||
if (category.getParentId() != null && !"0".equals(category.getParentId())) {
|
||||
Category parent = categoryService.getById(category.getParentId());
|
||||
if (parent == null) {
|
||||
throw new ServiceException(ResultCode.CATEGORY_PARENT_NOT_EXIST);
|
||||
|
||||
@@ -34,10 +34,14 @@ import java.util.List;
|
||||
@Api(tags = "管理端,商品管理接口")
|
||||
@RequestMapping("/manager/goods")
|
||||
public class GoodsManagerController {
|
||||
//商品
|
||||
/**
|
||||
* 商品
|
||||
*/
|
||||
@Autowired
|
||||
private GoodsService goodsService;
|
||||
//规格商品
|
||||
/**
|
||||
* 规格商品
|
||||
*/
|
||||
@Autowired
|
||||
private GoodsSkuService goodsSkuService;
|
||||
|
||||
|
||||
@@ -4,11 +4,8 @@ import cn.lili.common.enums.ResultUtil;
|
||||
import cn.lili.common.vo.PageVO;
|
||||
import cn.lili.common.vo.ResultMessage;
|
||||
import cn.lili.modules.message.entity.dos.MemberMessage;
|
||||
import cn.lili.modules.message.entity.dos.StoreMessage;
|
||||
import cn.lili.modules.message.entity.vos.MemberMessageQueryVO;
|
||||
import cn.lili.modules.message.entity.vos.StoreMessageQueryVO;
|
||||
import cn.lili.modules.message.service.MemberMessageService;
|
||||
import cn.lili.modules.message.service.StoreMessageService;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
@@ -25,8 +22,8 @@ import org.springframework.web.bind.annotation.RestController;
|
||||
* @author pikachu
|
||||
* @date: 2020/12/6 16:09
|
||||
*/
|
||||
@Transactional
|
||||
@RestController
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
@Api(tags = "管理端,会员消息消息管理接口")
|
||||
@RequestMapping("/manager/message/member")
|
||||
public class MemberMessageManagerController {
|
||||
|
||||
@@ -39,8 +39,8 @@ public class MemberWithdrawApplyManagerController {
|
||||
@GetMapping
|
||||
public ResultMessage<IPage<MemberWithdrawApply>> getByPage(PageVO page, MemberWithdrawApplyQueryVO memberWithdrawApplyQueryVO) {
|
||||
//构建查询 返回数据
|
||||
IPage<MemberWithdrawApply> memberWithdrawApplyIPage = memberWithdrawApplyService.getMemberWithdrawPage(page, memberWithdrawApplyQueryVO);
|
||||
return ResultUtil.data(memberWithdrawApplyIPage);
|
||||
IPage<MemberWithdrawApply> memberWithdrawApplyPage = memberWithdrawApplyService.getMemberWithdrawPage(page, memberWithdrawApplyQueryVO);
|
||||
return ResultUtil.data(memberWithdrawApplyPage);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -43,7 +43,7 @@ import java.util.List;
|
||||
@RestController
|
||||
@Api(tags = "管理员")
|
||||
@RequestMapping("/manager/user")
|
||||
@Transactional
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
@Validated
|
||||
public class AdminUserManagerController {
|
||||
@Autowired
|
||||
@@ -156,8 +156,9 @@ public class AdminUserManagerController {
|
||||
@ApiOperation(value = "添加用户")
|
||||
public ResultMessage<Object> register(AdminUserDTO adminUser,
|
||||
@RequestParam(required = false) List<String> roles) {
|
||||
int rolesMaxSize=10;
|
||||
try {
|
||||
if (roles != null && roles.size() >= 10) {
|
||||
if (roles != null && roles.size() >= rolesMaxSize) {
|
||||
throw new ServiceException(ResultCode.PERMISSION_BEYOND_TEN);
|
||||
}
|
||||
adminUserService.saveAdminUser(adminUser, roles);
|
||||
|
||||
@@ -22,8 +22,8 @@ import java.util.List;
|
||||
* @date: 2020/11/17 7:56 下午
|
||||
*/
|
||||
@Slf4j
|
||||
@Transactional
|
||||
@RestController
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
@Api(tags = "日志管理接口")
|
||||
@RequestMapping("/manager/log")
|
||||
public class LogManagerController {
|
||||
|
||||
@@ -25,7 +25,7 @@ import java.util.List;
|
||||
@RestController
|
||||
@Api(tags = "管理端,行政地区管理接口")
|
||||
@RequestMapping("/manager/region")
|
||||
@Transactional
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public class RegionManagerController {
|
||||
@Autowired
|
||||
private RegionService regionService;
|
||||
|
||||
@@ -49,7 +49,7 @@ public class StoreManagerController {
|
||||
|
||||
@ApiOperation(value = "获取店铺分页列表")
|
||||
@GetMapping("/all")
|
||||
public ResultMessage<List<Store>> getALL() {
|
||||
public ResultMessage<List<Store>> getAll() {
|
||||
return ResultUtil.data(storeService.list(new QueryWrapper<Store>().eq("store_disable", "OPEN")));
|
||||
}
|
||||
|
||||
|
||||
@@ -22,15 +22,15 @@ import org.springframework.web.bind.annotation.RestController;
|
||||
* @author pikachu
|
||||
* @date: 2020/12/6 16:09
|
||||
*/
|
||||
@Transactional
|
||||
@RestController
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
@Api(tags = "管理端,店铺消息消息管理接口")
|
||||
@RequestMapping("/manager/message/store")
|
||||
public class StoreMessageManagerController {
|
||||
|
||||
@Autowired
|
||||
private StoreMessageService storeMessageService;
|
||||
|
||||
|
||||
@GetMapping
|
||||
@ApiOperation(value = "多条件分页获取")
|
||||
public ResultMessage<IPage<StoreMessage>> getByCondition(StoreMessageQueryVO storeMessageQueryVO,
|
||||
|
||||
@@ -23,8 +23,8 @@ import org.springframework.web.bind.annotation.RestController;
|
||||
* @author Chopper
|
||||
* @date 2020/11/17 4:34 下午
|
||||
*/
|
||||
@Transactional
|
||||
@RestController
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
@Api(tags = "管理端,订单日志管理接口")
|
||||
@RequestMapping("/manager/orderLog")
|
||||
public class OrderLogManagerController {
|
||||
|
||||
@@ -34,10 +34,14 @@ import java.util.List;
|
||||
@Api(tags = "管理端,订单API")
|
||||
public class OrderManagerController {
|
||||
|
||||
//订单
|
||||
/**
|
||||
* 订单
|
||||
*/
|
||||
@Autowired
|
||||
private OrderService orderService;
|
||||
//订单价格
|
||||
/**
|
||||
* 订单价格
|
||||
*/
|
||||
@Autowired
|
||||
private OrderPriceService orderPriceService;
|
||||
|
||||
|
||||
@@ -1,19 +0,0 @@
|
||||
___ ___ ___ ___ ________ ________ _______ ________ _____ ______ ___ __ ________ ________ ___ __
|
||||
|\ \ |\ \|\ \ |\ \ |\ _____\\ __ \|\ ___ \ |\ __ \|\ _ \ _ \|\ \ |\ \|\ __ \|\ __ \|\ \|\ \
|
||||
\ \ \ \ \ \ \ \ \ \ \ ____________\ \ \__/\ \ \|\ \ \ __/|\ \ \|\ \ \ \\\__\ \ \ \ \ \ \ \ \ \|\ \ \ \|\ \ \ \/ /|_
|
||||
\ \ \ \ \ \ \ \ \ \ \|\____________\ \ __\\ \ _ _\ \ \_|/_\ \ __ \ \ \\|__| \ \ \ \ __\ \ \ \ \\\ \ \ _ _\ \ ___ \
|
||||
\ \ \____\ \ \ \ \____\ \ \|____________|\ \ \_| \ \ \\ \\ \ \_|\ \ \ \ \ \ \ \ \ \ \ \ \|\__\_\ \ \ \\\ \ \ \\ \\ \ \\ \ \
|
||||
\ \_______\ \__\ \_______\ \__\ \ \__\ \ \__\\ _\\ \_______\ \__\ \__\ \__\ \ \__\ \____________\ \_______\ \__\\ _\\ \__\\ \__\
|
||||
\|_______|\|__|\|_______|\|__| \|__| \|__|\|__|\|_______|\|__|\|__|\|__| \|__|\|____________|\|_______|\|__|\|__|\|__| \|__|
|
||||
|
||||
|
||||
|
||||
___ ___ ___ ___ ________ ___ ___ ________ ________
|
||||
|\ \ |\ \|\ \ |\ \ |\ ____\|\ \|\ \|\ __ \|\ __ \
|
||||
\ \ \ \ \ \ \ \ \ \ \ ____________\ \ \___|\ \ \\\ \ \ \|\ \ \ \|\ \
|
||||
\ \ \ \ \ \ \ \ \ \ \|\____________\ \_____ \ \ __ \ \ \\\ \ \ ____\
|
||||
\ \ \____\ \ \ \ \____\ \ \|____________|\|____|\ \ \ \ \ \ \ \\\ \ \ \___|
|
||||
\ \_______\ \__\ \_______\ \__\ ____\_\ \ \__\ \__\ \_______\ \__\
|
||||
\|_______|\|__|\|_______|\|__| |\_________\|__|\|__|\|_______|\|__|
|
||||
\|_________|
|
||||
|
||||
Reference in New Issue
Block a user