master:代发权限添加;

pull/1121/head
liujiang 2025-08-04 23:10:11 +08:00
parent e57f2ea64a
commit 71160d9bb8
9 changed files with 38 additions and 36 deletions

View File

@ -54,7 +54,7 @@ public class AssetController extends XktBaseController {
return success(vo);
}
@PreAuthorize("@ss.hasAnyRoles('seller')")
@PreAuthorize("@ss.hasAnyRoles('seller,agent')")
@ApiOperation(value = "卖家资产")
@GetMapping(value = "user/current")
public R<AssetInfoVO> getCurrentUserAsset() {
@ -64,7 +64,7 @@ public class AssetController extends XktBaseController {
return success(vo);
}
@PreAuthorize("@ss.hasAnyRoles('store,seller')||@ss.hasSupplierSubRole()")
@PreAuthorize("@ss.hasAnyRoles('store,seller,agent')||@ss.hasSupplierSubRole()")
@ApiOperation(value = "发送短信验证码(资产相关功能)")
@PostMapping("/sendSmsVerificationCode")
public R sendSmsVerificationCode(@Validated @RequestBody PhoneNumberVO vo) {
@ -80,7 +80,7 @@ public class AssetController extends XktBaseController {
return R.ok(new PhoneNumberVO(pn));
}
@PreAuthorize("@ss.hasAnyRoles('seller')")
@PreAuthorize("@ss.hasAnyRoles('seller,agent')")
@ApiOperation(value = "获取卖家支付绑定手机号")
@GetMapping(value = "user/phonenumber")
public R<PhoneNumberVO> getUserPhoneNumber() {
@ -98,7 +98,7 @@ public class AssetController extends XktBaseController {
return success(BeanUtil.toBean(assetService.bindAlipay(dto), AssetInfoVO.class));
}
@PreAuthorize("@ss.hasAnyRoles('seller')")
@PreAuthorize("@ss.hasAnyRoles('seller,agent')")
@ApiOperation(value = "卖家绑定支付宝")
@PostMapping(value = "user/alipay/bind")
public R<AssetInfoVO> bindUserAlipay(@Validated @RequestBody AlipayUserBindVO vo) {
@ -146,7 +146,7 @@ public class AssetController extends XktBaseController {
return success(PageVO.of(pageDTO, TransDetailStorePageItemVO.class));
}
@PreAuthorize("@ss.hasAnyRoles('seller')")
@PreAuthorize("@ss.hasAnyRoles('seller,agent')")
@ApiOperation(value = "卖家交易明细")
@PostMapping("user/trans-detail/page")
public R<PageVO<TransDetailUserPageItemVO>> pageUserTransDetail(@Validated @RequestBody BasePageVO vo) {

View File

@ -68,7 +68,7 @@ public class NoticeController extends BaseController {
return R.ok(noticeService.page(BeanUtil.toBean(pageVO, NoticePageDTO.class)));
}
@PreAuthorize("@ss.hasAnyRoles('admin,general_admin,store')||@ss.hasSupplierSubRole()")
@PreAuthorize("@ss.hasAnyRoles('admin,general_admin,store,seller,agent')||@ss.hasSupplierSubRole()")
@ApiOperation(value = "档口首页、电商卖家首页获取公告列表", httpMethod = "GET", response = R.class)
@GetMapping("/list")
public R<List<NoticeLatest10ResVO>> latest10() {

View File

@ -30,7 +30,7 @@ public class PictureSearchController extends XktBaseController {
final IPictureSearchService picSearchService;
@PreAuthorize("@ss.hasAnyRoles('admin,general_admin,seller')")
@PreAuthorize("@ss.hasAnyRoles('admin,general_admin,seller,agent')")
@ApiOperation(value = "电商卖家 以图搜款", httpMethod = "POST", response = R.class)
@PostMapping("")
public R<List<StoreProdViewVO>> searchProductByPic(@Validated @RequestBody PicSearchVO searchVO) {

View File

@ -32,14 +32,14 @@ public class ShoppingCartController extends XktBaseController {
final IShoppingCartService shopCartService;
@PreAuthorize("@ss.hasRole('seller')")
@PreAuthorize("@ss.hasRole('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')")
@PreAuthorize("@ss.hasRole('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')")
@PreAuthorize("@ss.hasRole('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')")
@PreAuthorize("@ss.hasRole('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')")
@PreAuthorize("@ss.hasRole('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')")
@PreAuthorize("@ss.hasRole('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')")
@PreAuthorize("@ss.hasRole('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')")
@PreAuthorize("@ss.hasRole('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')")
@PreAuthorize("@ss.hasRole('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')")
@PreAuthorize("@ss.hasRole('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')")
@PreAuthorize("@ss.hasRole('seller,agent')")
@Log(title = "订单", businessType = BusinessType.UPDATE)
@ApiOperation("取消订单")
@PostMapping("cancel")
@ -158,7 +158,7 @@ public class StoreOrderController extends XktBaseController {
}
@PreAuthorize("@ss.hasAnyRoles('store,seller')||@ss.hasSupplierSubRole()")
@PreAuthorize("@ss.hasAnyRoles('store,seller,agent')||@ss.hasSupplierSubRole()")
@ApiOperation(value = "订单分页查询")
@PostMapping("/page")
@ResponseHeader
@ -178,7 +178,7 @@ public class StoreOrderController extends XktBaseController {
return success(PageVO.of(pageDTO, StoreOrderPageItemVO.class));
}
@PreAuthorize("@ss.hasAnyRoles('store,seller')||@ss.hasSupplierSubRole()")
@PreAuthorize("@ss.hasAnyRoles('store,seller,agent')||@ss.hasSupplierSubRole()")
@ApiOperation(value = "订单物流信息")
@GetMapping(value = "/count/{srcPage}")
public R<StoreOrderCountVO> count(@PathVariable("srcPage") Integer srcPage) {
@ -276,7 +276,7 @@ public class StoreOrderController extends XktBaseController {
return success(DesensitizationUtil.desensitize(BeanUtil.copyToList(dtos, ExpressShippingLabelVO.class)));
}
@PreAuthorize("@ss.hasAnyRoles('seller')")
@PreAuthorize("@ss.hasAnyRoles('seller,agent')")
@Log(title = "订单", businessType = BusinessType.OTHER)
@ApiOperation("确认收货")
@PostMapping("receipt")
@ -287,7 +287,7 @@ public class StoreOrderController extends XktBaseController {
return success();
}
@PreAuthorize("@ss.hasAnyRoles('seller')")
@PreAuthorize("@ss.hasAnyRoles('seller,agent')")
@Log(title = "订单", businessType = BusinessType.OTHER)
@ApiOperation("申请售后(创建售后订单)")
@PostMapping("refund/apply")
@ -351,7 +351,7 @@ public class StoreOrderController extends XktBaseController {
return R.ok(vo.getStoreOrderId());
}
@PreAuthorize("@ss.hasAnyRoles('seller')")
@PreAuthorize("@ss.hasAnyRoles('seller,agent')")
@Log(title = "订单", businessType = BusinessType.OTHER)
@ApiOperation("售后完成(用户)")
@PostMapping("refund/complete")

View File

@ -32,7 +32,7 @@ public class UserAddressController extends XktBaseController {
@Autowired
private IUserAddressService userAddressService;
@PreAuthorize("@ss.hasAnyRoles('seller')")
@PreAuthorize("@ss.hasAnyRoles('seller,agent')")
@ApiOperation(value = "创建用户收货地址", httpMethod = "POST", response = R.class)
@PostMapping("create")
public R<UserAddressInfoVO> create(@Valid @RequestBody UserAddressCreateVO vo) {
@ -41,7 +41,7 @@ public class UserAddressController extends XktBaseController {
return success(BeanUtil.toBean(userAddressService.createUserAddress(dto), UserAddressInfoVO.class));
}
@PreAuthorize("@ss.hasAnyRoles('seller')")
@PreAuthorize("@ss.hasAnyRoles('seller,agent')")
@ApiOperation(value = "修改用户收货地址", httpMethod = "POST", response = R.class)
@PostMapping("edit")
public R<UserAddressInfoVO> edit(@Valid @RequestBody UserAddressModifyVO vo) {
@ -51,7 +51,7 @@ public class UserAddressController extends XktBaseController {
return success(BeanUtil.toBean(userAddressService.modifyUserAddress(dto), UserAddressInfoVO.class));
}
@PreAuthorize("@ss.hasAnyRoles('seller')")
@PreAuthorize("@ss.hasAnyRoles('seller,agent')")
@ApiOperation(value = "复制用户收货地址", httpMethod = "POST", response = R.class)
@PostMapping("copy")
public R<UserAddressInfoVO> copy(@Valid @RequestBody IdVO vo) {
@ -60,7 +60,7 @@ public class UserAddressController extends XktBaseController {
return success(BeanUtil.toBean(dto, UserAddressInfoVO.class));
}
@PreAuthorize("@ss.hasAnyRoles('seller')")
@PreAuthorize("@ss.hasAnyRoles('seller,agent')")
@ApiOperation(value = "删除用户收货地址", httpMethod = "POST", response = R.class)
@PostMapping("delete")
public R delete(@Valid @RequestBody IdVO vo) {
@ -69,7 +69,7 @@ public class UserAddressController extends XktBaseController {
return success();
}
@PreAuthorize("@ss.hasAnyRoles('seller')")
@PreAuthorize("@ss.hasAnyRoles('seller,agent')")
@ApiOperation(value = "用户收货地址详情", httpMethod = "GET", response = R.class)
@GetMapping("/{id}")
public R<UserAddressInfoVO> getInfo(@PathVariable("id") Long id) {
@ -78,7 +78,7 @@ public class UserAddressController extends XktBaseController {
return success(BeanUtil.toBean(infoDTO, UserAddressInfoVO.class));
}
@PreAuthorize("@ss.hasAnyRoles('seller')")
@PreAuthorize("@ss.hasAnyRoles('seller,agent')")
@ApiOperation(value = "用户收货地址列表", httpMethod = "POST", response = R.class)
@PostMapping("/list")
public R<List<UserAddressInfoVO>> list() {

View File

@ -37,7 +37,7 @@ public class UserFavoritesController extends XktBaseController {
return R.ok(BeanUtil.toBean(userFavService.getStatusNum(), UserFavStatusCountResVO.class));
}
@PreAuthorize("@ss.hasAnyRoles('seller')")
@PreAuthorize("@ss.hasAnyRoles('seller,agent')")
@ApiOperation(value = "用户收藏商品", httpMethod = "POST", response = R.class)
@Log(title = "用户收藏商品", businessType = BusinessType.INSERT)
@PostMapping("/batch")
@ -45,14 +45,14 @@ public class UserFavoritesController extends XktBaseController {
return success(userFavService.create(BeanUtil.toBean(favoriteVO, UserFavoriteDTO.class)));
}
@PreAuthorize("@ss.hasAnyRoles('seller')")
@PreAuthorize("@ss.hasAnyRoles('seller,agent')")
@ApiOperation(value = "获取用户收藏列表", httpMethod = "POST", response = R.class)
@PostMapping("/page")
public R<Page<UserFavoritePageResDTO>> page(@Validated @RequestBody UserFavoritePageVO pageVO) {
return R.ok(userFavService.page(BeanUtil.toBean(pageVO, UserFavoritePageDTO.class)));
}
@PreAuthorize("@ss.hasAnyRoles('seller')")
@PreAuthorize("@ss.hasAnyRoles('seller,agent')")
@ApiOperation(value = "批量加入进货车", httpMethod = "POST", response = R.class)
@Log(title = "批量加入进货车", businessType = BusinessType.INSERT)
@PostMapping("/batch/shopping-cart")
@ -60,7 +60,7 @@ public class UserFavoritesController extends XktBaseController {
return success(userFavService.batchAddToShoppingCart(BeanUtil.toBean(batchVO, UserFavBatchAddToShopCartDTO.class)));
}
@PreAuthorize("@ss.hasAnyRoles('seller')")
@PreAuthorize("@ss.hasAnyRoles('seller,agent')")
@ApiOperation(value = "批量取消收藏", httpMethod = "DELETE", response = R.class)
@Log(title = "批量取消收藏", businessType = BusinessType.INSERT)
@DeleteMapping("/batch")

View File

@ -35,7 +35,7 @@ public class UserSubscriptionsController extends XktBaseController {
final IUserSubscriptionsService userSubService;
@PreAuthorize("@ss.hasAnyRoles('seller')")
@PreAuthorize("@ss.hasAnyRoles('seller,agent')")
@ApiOperation(value = "新增用户关注档口", httpMethod = "POST", response = R.class)
@Log(title = "新增用户关注档口", businessType = BusinessType.INSERT)
@PostMapping
@ -43,14 +43,14 @@ public class UserSubscriptionsController extends XktBaseController {
return R.ok(userSubService.create(BeanUtil.toBean(subscVO, UserSubscDTO.class)));
}
@PreAuthorize("@ss.hasAnyRoles('seller')")
@PreAuthorize("@ss.hasAnyRoles('seller,agent')")
@ApiOperation(value = "用户关注档口列表", httpMethod = "POST", response = R.class)
@PostMapping("/page")
public R<Page<UserSubscPageResDTO>> page(@Validated @RequestBody UserSubscPageVO pageVO) {
return R.ok(userSubService.page(BeanUtil.toBean(pageVO, UserSubscPageDTO.class)));
}
@PreAuthorize("@ss.hasAnyRoles('seller')")
@PreAuthorize("@ss.hasAnyRoles('seller,agent')")
@ApiOperation(value = "用户取消关注档口", httpMethod = "DELETE", response = R.class)
@Log(title = "用户取消关注档口", businessType = BusinessType.DELETE)
@DeleteMapping("/batch")

View File

@ -18,5 +18,7 @@ public class StoreProdStockPageVO extends BasePageVO {
@ApiModelProperty(value = "商品货号")
private String prodArtNum;
@ApiModelProperty(value = "档口ID")
private Long storeId;
}