pull/1121/head
梁宇奇 2025-08-05 14:21:35 +08:00
parent 10800b9a44
commit 0e0036a45e
3 changed files with 13 additions and 13 deletions

View File

@ -32,14 +32,14 @@ public class ShoppingCartController extends XktBaseController {
final IShoppingCartService shopCartService;
@PreAuthorize("@ss.hasRole('seller,agent')")
@PreAuthorize("@ss.hasAnyRoles('seller,agent')")
@ApiOperation(value = "获取用户进货车各状态数量", httpMethod = "GET", response = R.class)
@GetMapping("/status/num")
public R<ShopCartStatusCountResVO> getStatusNum() {
return R.ok(BeanUtil.toBean(shopCartService.getStatusNum(), ShopCartStatusCountResVO.class));
}
@PreAuthorize("@ss.hasRole('seller,agent')")
@PreAuthorize("@ss.hasAnyRoles('seller,agent')")
@ApiOperation(value = "电商卖家添加商品到进货车", httpMethod = "POST", response = R.class)
@Log(title = "电商卖家添加商品到进货车", businessType = BusinessType.INSERT)
@PostMapping
@ -47,7 +47,7 @@ public class ShoppingCartController extends XktBaseController {
return R.ok(shopCartService.create(BeanUtil.toBean(shopCartVO, ShoppingCartDTO.class)));
}
@PreAuthorize("@ss.hasRole('seller,agent')")
@PreAuthorize("@ss.hasAnyRoles('seller,agent')")
@ApiOperation(value = "电商卖家编辑进货车商品", httpMethod = "PUT", response = R.class)
@Log(title = "电商卖家编辑进货车商品", businessType = BusinessType.UPDATE)
@PutMapping
@ -55,28 +55,28 @@ public class ShoppingCartController extends XktBaseController {
return R.ok(shopCartService.update(BeanUtil.toBean(editVO, ShoppingCartEditDTO.class)));
}
@PreAuthorize("@ss.hasRole('seller,agent')")
@PreAuthorize("@ss.hasAnyRoles('seller,agent')")
@ApiOperation(value = "获取用户进货车列表", httpMethod = "POST", response = R.class)
@PostMapping("/page")
public R<Page<ShopCartPageResDTO>> page(@Validated @RequestBody ShopCartPageVO pageVO) {
return R.ok(shopCartService.page(BeanUtil.toBean(pageVO, ShopCartPageDTO.class)));
}
@PreAuthorize("@ss.hasRole('seller,agent')")
@PreAuthorize("@ss.hasAnyRoles('seller,agent')")
@ApiOperation(value = "用户进货车列表点击编辑获取数据", httpMethod = "GET", response = R.class)
@GetMapping("/edit/{shoppingCartId}")
public R<ShopCartEditDetailResVO> getEditInfo(@PathVariable Long shoppingCartId) {
return R.ok(BeanUtil.toBean(shopCartService.getEditInfo(shoppingCartId), ShopCartEditDetailResVO.class));
}
@PreAuthorize("@ss.hasRole('seller,agent')")
@PreAuthorize("@ss.hasAnyRoles('seller,agent')")
@ApiOperation(value = "进货车下单时及商品下单时获取商品列表", httpMethod = "POST", response = R.class)
@PostMapping("/list")
public R<List<ShopCartResVO>> getList(@Validated @RequestBody ShopCartListVO listVO) {
return R.ok(BeanUtil.copyToList(shopCartService.getList(BeanUtil.toBean(listVO, ShopCartListDTO.class)), ShopCartResVO.class));
}
@PreAuthorize("@ss.hasRole('seller,agent')")
@PreAuthorize("@ss.hasAnyRoles('seller,agent')")
@ApiOperation(value = "用户删除进货车商品", httpMethod = "DELETE", response = R.class)
@Log(title = "用户删除进货车商品", businessType = BusinessType.DELETE)
@DeleteMapping

View File

@ -69,7 +69,7 @@ public class StoreOrderController extends XktBaseController {
@Autowired
private RedisCache redisCache;
@PreAuthorize("@ss.hasRole('seller,agent')")
@PreAuthorize("@ss.hasAnyRoles('seller,agent')")
@Log(title = "订单", businessType = BusinessType.INSERT)
@ApiOperation("创建订单")
@PostMapping("create")
@ -85,7 +85,7 @@ public class StoreOrderController extends XktBaseController {
return success(respVO);
}
@PreAuthorize("@ss.hasRole('seller,agent')")
@PreAuthorize("@ss.hasAnyRoles('seller,agent')")
@Log(title = "订单", businessType = BusinessType.UPDATE)
@ApiOperation("修改订单")
@PostMapping("edit")
@ -98,7 +98,7 @@ public class StoreOrderController extends XktBaseController {
return success(result.getOrder().getId());
}
@PreAuthorize("@ss.hasRole('seller,agent')")
@PreAuthorize("@ss.hasAnyRoles('seller,agent')")
@Log(title = "订单", businessType = BusinessType.OTHER)
@ApiOperation("支付订单")
@PostMapping("pay")
@ -115,7 +115,7 @@ public class StoreOrderController extends XktBaseController {
return success(respVO);
}
@PreAuthorize("@ss.hasRole('seller,agent')")
@PreAuthorize("@ss.hasAnyRoles('seller,agent')")
@Log(title = "订单", businessType = BusinessType.UPDATE)
@ApiOperation("取消订单")
@PostMapping("cancel")
@ -283,7 +283,7 @@ public class StoreOrderController extends XktBaseController {
public R receipt(@Valid @RequestBody StoreOrderReceiptReqVO vo) {
//仅本人可操作
storeOrderService.checkOrderUser(vo.getStoreOrderId(), SecurityUtils.getUserId());
storeOrderService.receiptOrder(vo.getStoreOrderId(), SecurityUtils.getUserId());
storeOrderService.completeOrder(vo.getStoreOrderId(), SecurityUtils.getUserId());
return success();
}

View File

@ -391,7 +391,7 @@ public class FinanceBillServiceImpl implements IFinanceBillService {
@Override
public FinanceBillExt createWithdrawPaymentBill(Long storeId, BigDecimal amount, EPayChannel payChannel) {
Assert.notNull(storeId);
Assert.isTrue(NumberUtil.isGreater(amount, BigDecimal.ONE), "提现金额异常");
Assert.isTrue(NumberUtil.isGreaterOrEqual(amount, BigDecimal.ONE), "提现金额异常");
Assert.notNull(payChannel);
FinanceBill bill = new FinanceBill();
bill.setBillNo(generateBillNo(EFinBillType.PAYMENT));