用户信息返回操作密码,菜单完善
This commit is contained in:
@@ -28,7 +28,7 @@ public class ShopActivateController {
|
|||||||
* 店铺充值活动列表
|
* 店铺充值活动列表
|
||||||
* 权限标识: activate:list
|
* 权限标识: activate:list
|
||||||
*/
|
*/
|
||||||
@SaAdminCheckPermission("activate:list")
|
@SaAdminCheckPermission(value = "activate:list", name = "店铺充值活动列表")
|
||||||
@GetMapping
|
@GetMapping
|
||||||
public CzgResult<List<ShopActivateDTO>> detail(@RequestParam(required = false) Long shopId) {
|
public CzgResult<List<ShopActivateDTO>> detail(@RequestParam(required = false) Long shopId) {
|
||||||
return CzgResult.success(shopActivateService.getList(shopId));
|
return CzgResult.success(shopActivateService.getList(shopId));
|
||||||
@@ -38,7 +38,7 @@ public class ShopActivateController {
|
|||||||
* 店铺充值活动新增
|
* 店铺充值活动新增
|
||||||
* 权限标识: activate:add
|
* 权限标识: activate:add
|
||||||
*/
|
*/
|
||||||
@SaAdminCheckPermission("activate:add")
|
@SaAdminCheckPermission(value = "activate:add", name = "店铺充值活动新增")
|
||||||
@PostMapping
|
@PostMapping
|
||||||
public CzgResult<Boolean> add(@RequestBody @Validated ShopActivateDTO activateDTO) {
|
public CzgResult<Boolean> add(@RequestBody @Validated ShopActivateDTO activateDTO) {
|
||||||
activateDTO.setShopId(StpKit.USER.getShopId());
|
activateDTO.setShopId(StpKit.USER.getShopId());
|
||||||
@@ -49,7 +49,7 @@ public class ShopActivateController {
|
|||||||
* 店铺充值活动修改
|
* 店铺充值活动修改
|
||||||
* 权限标识: activate:edit
|
* 权限标识: activate:edit
|
||||||
*/
|
*/
|
||||||
@SaAdminCheckPermission("activate:edit")
|
@SaAdminCheckPermission(value = "activate:edit", name = "店铺充值活动修改")
|
||||||
@PutMapping
|
@PutMapping
|
||||||
public CzgResult<Boolean> edit(@RequestBody @Validated ShopActivateDTO activateDTO) {
|
public CzgResult<Boolean> edit(@RequestBody @Validated ShopActivateDTO activateDTO) {
|
||||||
return CzgResult.success(shopActivateService.edit(activateDTO));
|
return CzgResult.success(shopActivateService.edit(activateDTO));
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ public class ShopMerchantController {
|
|||||||
* @return 支付信息
|
* @return 支付信息
|
||||||
*/
|
*/
|
||||||
@SaAdminCheckRole("管理员")
|
@SaAdminCheckRole("管理员")
|
||||||
@SaAdminCheckPermission("shopMerchant:detail")
|
@SaAdminCheckPermission(value = "shopMerchant:detail", name = "商户支付信息获取")
|
||||||
@GetMapping
|
@GetMapping
|
||||||
public CzgResult<ShopMerchant> detail() {
|
public CzgResult<ShopMerchant> detail() {
|
||||||
return CzgResult.success(shopMerchantService.detail());
|
return CzgResult.success(shopMerchantService.detail());
|
||||||
@@ -38,7 +38,7 @@ public class ShopMerchantController {
|
|||||||
* @return 是否成功
|
* @return 是否成功
|
||||||
*/
|
*/
|
||||||
@SaAdminCheckRole("管理员")
|
@SaAdminCheckRole("管理员")
|
||||||
@SaAdminCheckPermission("shopMerchant:edit")
|
@SaAdminCheckPermission(value = "shopMerchant:edit", name = "商户支付信息修改")
|
||||||
@PutMapping
|
@PutMapping
|
||||||
public CzgResult<Boolean> edit(@RequestBody @Validated ShopMerchantEditDTO shopMerchantEditDTO) {
|
public CzgResult<Boolean> edit(@RequestBody @Validated ShopMerchantEditDTO shopMerchantEditDTO) {
|
||||||
return CzgResult.success(shopMerchantService.edit(shopMerchantEditDTO));
|
return CzgResult.success(shopMerchantService.edit(shopMerchantEditDTO));
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ public class ShopPermissionController {
|
|||||||
* 获取店铺权限列表
|
* 获取店铺权限列表
|
||||||
* @return 权限列表
|
* @return 权限列表
|
||||||
*/
|
*/
|
||||||
@SaAdminCheckPermission("shopPermission:list")
|
@SaAdminCheckPermission(value = "shopPermission:list", name = "店铺权限列表")
|
||||||
@GetMapping
|
@GetMapping
|
||||||
public CzgResult<List<ShopPermission>> getPermission() {
|
public CzgResult<List<ShopPermission>> getPermission() {
|
||||||
return CzgResult.success(shopPermissionService.getPermission());
|
return CzgResult.success(shopPermissionService.getPermission());
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ public class ShopTableAreaController {
|
|||||||
* @param name 区域名称
|
* @param name 区域名称
|
||||||
* @return 是否成功
|
* @return 是否成功
|
||||||
*/
|
*/
|
||||||
@SaAdminCheckPermission("shopArea:list")
|
@SaAdminCheckPermission(value = "shopArea:list", name = "区域列表")
|
||||||
@GetMapping
|
@GetMapping
|
||||||
public CzgResult<Page<ShopTableArea>> list(String name) {
|
public CzgResult<Page<ShopTableArea>> list(String name) {
|
||||||
return CzgResult.success(shopTableAreaService.pageInfo(StpKit.USER.getShopId(), name));
|
return CzgResult.success(shopTableAreaService.pageInfo(StpKit.USER.getShopId(), name));
|
||||||
@@ -40,7 +40,7 @@ public class ShopTableAreaController {
|
|||||||
* 权限标识: shopArea:edit
|
* 权限标识: shopArea:edit
|
||||||
* @return 是否成功
|
* @return 是否成功
|
||||||
*/
|
*/
|
||||||
@SaAdminCheckPermission("shopArea:edit")
|
@SaAdminCheckPermission(value = "shopArea:edit", name = "区域修改")
|
||||||
@PutMapping
|
@PutMapping
|
||||||
public CzgResult<Boolean> edit(@RequestBody @Validated ShopAreaEditDTO shopAreaEditDTO) {
|
public CzgResult<Boolean> edit(@RequestBody @Validated ShopAreaEditDTO shopAreaEditDTO) {
|
||||||
return CzgResult.success(shopTableAreaService.edit(StpKit.USER.getShopId(), shopAreaEditDTO));
|
return CzgResult.success(shopTableAreaService.edit(StpKit.USER.getShopId(), shopAreaEditDTO));
|
||||||
@@ -51,7 +51,7 @@ public class ShopTableAreaController {
|
|||||||
* 权限标识: shopArea:del
|
* 权限标识: shopArea:del
|
||||||
* @return 是否成功
|
* @return 是否成功
|
||||||
*/
|
*/
|
||||||
@SaAdminCheckPermission("shopArea:del")
|
@SaAdminCheckPermission(value = "shopArea:del", name = "区域删除")
|
||||||
@DeleteMapping
|
@DeleteMapping
|
||||||
public CzgResult<Boolean> remove(@RequestBody @Validated ShopAreaEditDTO shopAreaEditDTO) {
|
public CzgResult<Boolean> remove(@RequestBody @Validated ShopAreaEditDTO shopAreaEditDTO) {
|
||||||
return CzgResult.success(shopTableAreaService.remove(new QueryWrapper().eq(ShopTableArea::getShopId, StpKit.USER.getShopId()).eq(ShopTableArea::getId, shopAreaEditDTO.getId())));
|
return CzgResult.success(shopTableAreaService.remove(new QueryWrapper().eq(ShopTableArea::getShopId, StpKit.USER.getShopId()).eq(ShopTableArea::getId, shopAreaEditDTO.getId())));
|
||||||
@@ -62,7 +62,7 @@ public class ShopTableAreaController {
|
|||||||
* 权限标识: shopArea:add
|
* 权限标识: shopArea:add
|
||||||
* @return 是否成功
|
* @return 是否成功
|
||||||
*/
|
*/
|
||||||
@SaAdminCheckPermission("shopArea:add")
|
@SaAdminCheckPermission(value = "shopArea:add", name = "区域新增")
|
||||||
@PostMapping
|
@PostMapping
|
||||||
public CzgResult<Boolean> add(@RequestBody @Validated ShopAreaAddDTO shopAreaAddDTO) {
|
public CzgResult<Boolean> add(@RequestBody @Validated ShopAreaAddDTO shopAreaAddDTO) {
|
||||||
return CzgResult.success(shopTableAreaService.add(shopAreaAddDTO));
|
return CzgResult.success(shopTableAreaService.add(shopAreaAddDTO));
|
||||||
|
|||||||
@@ -37,6 +37,10 @@ public class ShopUserDetailDTO extends ShopUser {
|
|||||||
* 店铺信息
|
* 店铺信息
|
||||||
*/
|
*/
|
||||||
private ShopInfo shopInfo;
|
private ShopInfo shopInfo;
|
||||||
|
/**
|
||||||
|
* 支付密码
|
||||||
|
*/
|
||||||
|
private String payPwd;
|
||||||
/**
|
/**
|
||||||
* 店铺拓展参数
|
* 店铺拓展参数
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -273,12 +273,13 @@ public class ShopUserServiceImpl extends ServiceImpl<ShopUserMapper, ShopUser> i
|
|||||||
@Override
|
@Override
|
||||||
public ShopUserDetailDTO getInfo(Long shopId, long userId) {
|
public ShopUserDetailDTO getInfo(Long shopId, long userId) {
|
||||||
ShopUser shopUser = getOne(new QueryWrapper().eq(ShopUser::getShopId, shopId).eq(ShopUser::getUserId, userId));
|
ShopUser shopUser = getOne(new QueryWrapper().eq(ShopUser::getShopId, shopId).eq(ShopUser::getUserId, userId));
|
||||||
|
UserInfo userInfo = userInfoService.getById(userId);
|
||||||
|
if (userInfo == null) {
|
||||||
|
throw new ApiNotPrintException("用户信息不存在");
|
||||||
|
}
|
||||||
|
|
||||||
long couponNum = 0;
|
long couponNum = 0;
|
||||||
if (shopUser == null) {
|
if (shopUser == null) {
|
||||||
UserInfo userInfo = userInfoService.getById(userId);
|
|
||||||
if (userInfo == null) {
|
|
||||||
throw new ApiNotPrintException("用户信息不存在");
|
|
||||||
}
|
|
||||||
shopUser = BeanUtil.copyProperties(userInfo, ShopUser.class);
|
shopUser = BeanUtil.copyProperties(userInfo, ShopUser.class);
|
||||||
shopUser.setShopId(shopId);
|
shopUser.setShopId(shopId);
|
||||||
shopUser.setId(null);
|
shopUser.setId(null);
|
||||||
@@ -299,6 +300,8 @@ public class ShopUserServiceImpl extends ServiceImpl<ShopUserMapper, ShopUser> i
|
|||||||
List<ShopExtend> shopExtends = shopExtendService.list(new QueryWrapper().eq(ShopExtend::getShopId, shopInfo.getId()));
|
List<ShopExtend> shopExtends = shopExtendService.list(new QueryWrapper().eq(ShopExtend::getShopId, shopInfo.getId()));
|
||||||
shopUserDetailDTO.setShopExtendList(shopExtends);
|
shopUserDetailDTO.setShopExtendList(shopExtends);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
shopUserDetailDTO.setPayPwd(userInfo.getPayPwd());
|
||||||
return shopUserDetailDTO;
|
return shopUserDetailDTO;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user