pull/1121/head
parent
10800b9a44
commit
0e0036a45e
|
|
@ -32,14 +32,14 @@ public class ShoppingCartController extends XktBaseController {
|
||||||
|
|
||||||
final IShoppingCartService shopCartService;
|
final IShoppingCartService shopCartService;
|
||||||
|
|
||||||
@PreAuthorize("@ss.hasRole('seller,agent')")
|
@PreAuthorize("@ss.hasAnyRoles('seller,agent')")
|
||||||
@ApiOperation(value = "获取用户进货车各状态数量", httpMethod = "GET", response = R.class)
|
@ApiOperation(value = "获取用户进货车各状态数量", httpMethod = "GET", response = R.class)
|
||||||
@GetMapping("/status/num")
|
@GetMapping("/status/num")
|
||||||
public R<ShopCartStatusCountResVO> getStatusNum() {
|
public R<ShopCartStatusCountResVO> getStatusNum() {
|
||||||
return R.ok(BeanUtil.toBean(shopCartService.getStatusNum(), ShopCartStatusCountResVO.class));
|
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)
|
@ApiOperation(value = "电商卖家添加商品到进货车", httpMethod = "POST", response = R.class)
|
||||||
@Log(title = "电商卖家添加商品到进货车", businessType = BusinessType.INSERT)
|
@Log(title = "电商卖家添加商品到进货车", businessType = BusinessType.INSERT)
|
||||||
@PostMapping
|
@PostMapping
|
||||||
|
|
@ -47,7 +47,7 @@ public class ShoppingCartController extends XktBaseController {
|
||||||
return R.ok(shopCartService.create(BeanUtil.toBean(shopCartVO, ShoppingCartDTO.class)));
|
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)
|
@ApiOperation(value = "电商卖家编辑进货车商品", httpMethod = "PUT", response = R.class)
|
||||||
@Log(title = "电商卖家编辑进货车商品", businessType = BusinessType.UPDATE)
|
@Log(title = "电商卖家编辑进货车商品", businessType = BusinessType.UPDATE)
|
||||||
@PutMapping
|
@PutMapping
|
||||||
|
|
@ -55,28 +55,28 @@ public class ShoppingCartController extends XktBaseController {
|
||||||
return R.ok(shopCartService.update(BeanUtil.toBean(editVO, ShoppingCartEditDTO.class)));
|
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)
|
@ApiOperation(value = "获取用户进货车列表", httpMethod = "POST", response = R.class)
|
||||||
@PostMapping("/page")
|
@PostMapping("/page")
|
||||||
public R<Page<ShopCartPageResDTO>> page(@Validated @RequestBody ShopCartPageVO pageVO) {
|
public R<Page<ShopCartPageResDTO>> page(@Validated @RequestBody ShopCartPageVO pageVO) {
|
||||||
return R.ok(shopCartService.page(BeanUtil.toBean(pageVO, ShopCartPageDTO.class)));
|
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)
|
@ApiOperation(value = "用户进货车列表点击编辑获取数据", httpMethod = "GET", response = R.class)
|
||||||
@GetMapping("/edit/{shoppingCartId}")
|
@GetMapping("/edit/{shoppingCartId}")
|
||||||
public R<ShopCartEditDetailResVO> getEditInfo(@PathVariable Long shoppingCartId) {
|
public R<ShopCartEditDetailResVO> getEditInfo(@PathVariable Long shoppingCartId) {
|
||||||
return R.ok(BeanUtil.toBean(shopCartService.getEditInfo(shoppingCartId), ShopCartEditDetailResVO.class));
|
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)
|
@ApiOperation(value = "进货车下单时及商品下单时获取商品列表", httpMethod = "POST", response = R.class)
|
||||||
@PostMapping("/list")
|
@PostMapping("/list")
|
||||||
public R<List<ShopCartResVO>> getList(@Validated @RequestBody ShopCartListVO listVO) {
|
public R<List<ShopCartResVO>> getList(@Validated @RequestBody ShopCartListVO listVO) {
|
||||||
return R.ok(BeanUtil.copyToList(shopCartService.getList(BeanUtil.toBean(listVO, ShopCartListDTO.class)), ShopCartResVO.class));
|
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)
|
@ApiOperation(value = "用户删除进货车商品", httpMethod = "DELETE", response = R.class)
|
||||||
@Log(title = "用户删除进货车商品", businessType = BusinessType.DELETE)
|
@Log(title = "用户删除进货车商品", businessType = BusinessType.DELETE)
|
||||||
@DeleteMapping
|
@DeleteMapping
|
||||||
|
|
|
||||||
|
|
@ -69,7 +69,7 @@ public class StoreOrderController extends XktBaseController {
|
||||||
@Autowired
|
@Autowired
|
||||||
private RedisCache redisCache;
|
private RedisCache redisCache;
|
||||||
|
|
||||||
@PreAuthorize("@ss.hasRole('seller,agent')")
|
@PreAuthorize("@ss.hasAnyRoles('seller,agent')")
|
||||||
@Log(title = "订单", businessType = BusinessType.INSERT)
|
@Log(title = "订单", businessType = BusinessType.INSERT)
|
||||||
@ApiOperation("创建订单")
|
@ApiOperation("创建订单")
|
||||||
@PostMapping("create")
|
@PostMapping("create")
|
||||||
|
|
@ -85,7 +85,7 @@ public class StoreOrderController extends XktBaseController {
|
||||||
return success(respVO);
|
return success(respVO);
|
||||||
}
|
}
|
||||||
|
|
||||||
@PreAuthorize("@ss.hasRole('seller,agent')")
|
@PreAuthorize("@ss.hasAnyRoles('seller,agent')")
|
||||||
@Log(title = "订单", businessType = BusinessType.UPDATE)
|
@Log(title = "订单", businessType = BusinessType.UPDATE)
|
||||||
@ApiOperation("修改订单")
|
@ApiOperation("修改订单")
|
||||||
@PostMapping("edit")
|
@PostMapping("edit")
|
||||||
|
|
@ -98,7 +98,7 @@ public class StoreOrderController extends XktBaseController {
|
||||||
return success(result.getOrder().getId());
|
return success(result.getOrder().getId());
|
||||||
}
|
}
|
||||||
|
|
||||||
@PreAuthorize("@ss.hasRole('seller,agent')")
|
@PreAuthorize("@ss.hasAnyRoles('seller,agent')")
|
||||||
@Log(title = "订单", businessType = BusinessType.OTHER)
|
@Log(title = "订单", businessType = BusinessType.OTHER)
|
||||||
@ApiOperation("支付订单")
|
@ApiOperation("支付订单")
|
||||||
@PostMapping("pay")
|
@PostMapping("pay")
|
||||||
|
|
@ -115,7 +115,7 @@ public class StoreOrderController extends XktBaseController {
|
||||||
return success(respVO);
|
return success(respVO);
|
||||||
}
|
}
|
||||||
|
|
||||||
@PreAuthorize("@ss.hasRole('seller,agent')")
|
@PreAuthorize("@ss.hasAnyRoles('seller,agent')")
|
||||||
@Log(title = "订单", businessType = BusinessType.UPDATE)
|
@Log(title = "订单", businessType = BusinessType.UPDATE)
|
||||||
@ApiOperation("取消订单")
|
@ApiOperation("取消订单")
|
||||||
@PostMapping("cancel")
|
@PostMapping("cancel")
|
||||||
|
|
@ -283,7 +283,7 @@ public class StoreOrderController extends XktBaseController {
|
||||||
public R receipt(@Valid @RequestBody StoreOrderReceiptReqVO vo) {
|
public R receipt(@Valid @RequestBody StoreOrderReceiptReqVO vo) {
|
||||||
//仅本人可操作
|
//仅本人可操作
|
||||||
storeOrderService.checkOrderUser(vo.getStoreOrderId(), SecurityUtils.getUserId());
|
storeOrderService.checkOrderUser(vo.getStoreOrderId(), SecurityUtils.getUserId());
|
||||||
storeOrderService.receiptOrder(vo.getStoreOrderId(), SecurityUtils.getUserId());
|
storeOrderService.completeOrder(vo.getStoreOrderId(), SecurityUtils.getUserId());
|
||||||
return success();
|
return success();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -391,7 +391,7 @@ public class FinanceBillServiceImpl implements IFinanceBillService {
|
||||||
@Override
|
@Override
|
||||||
public FinanceBillExt createWithdrawPaymentBill(Long storeId, BigDecimal amount, EPayChannel payChannel) {
|
public FinanceBillExt createWithdrawPaymentBill(Long storeId, BigDecimal amount, EPayChannel payChannel) {
|
||||||
Assert.notNull(storeId);
|
Assert.notNull(storeId);
|
||||||
Assert.isTrue(NumberUtil.isGreater(amount, BigDecimal.ONE), "提现金额异常");
|
Assert.isTrue(NumberUtil.isGreaterOrEqual(amount, BigDecimal.ONE), "提现金额异常");
|
||||||
Assert.notNull(payChannel);
|
Assert.notNull(payChannel);
|
||||||
FinanceBill bill = new FinanceBill();
|
FinanceBill bill = new FinanceBill();
|
||||||
bill.setBillNo(generateBillNo(EFinBillType.PAYMENT));
|
bill.setBillNo(generateBillNo(EFinBillType.PAYMENT));
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue