|
|
@@ -217,7 +217,7 @@ public class StoreUserController {
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
- * web端查询用户列表(支持主账号和子账号查询)
|
|
|
+ * web端查询用户列表(支持主账号和子账号查询) 分页查询重构
|
|
|
*/
|
|
|
@ApiOperation("web端查询用户列表(支持主账号和子账号查询)")
|
|
|
@ApiOperationSupport(order = 7)
|
|
|
@@ -281,27 +281,21 @@ public class StoreUserController {
|
|
|
return R.success("初始化成功");
|
|
|
}
|
|
|
|
|
|
- /**
|
|
|
- * web端删除商家端用户
|
|
|
- */
|
|
|
- @ApiOperation("web端删除商家端用户")
|
|
|
- @ApiOperationSupport(order = 7)
|
|
|
- @DeleteMapping("/deleteStoreUser")
|
|
|
- public R<StoreUserVo> deleteStoreUser(@RequestParam(value = "id") String id) {
|
|
|
- log.info("StoreUserController.deleteStoreUser?id={}", id);
|
|
|
- return storeUserService.deleteStoreUser(id);
|
|
|
- }
|
|
|
|
|
|
/**
|
|
|
- * web端切换商家端用户
|
|
|
+ * web端切换商家端用户状态(主账号有子账号时禁止禁用;子账号无限制;返回更新后状态供前端及时展示)
|
|
|
*/
|
|
|
- @ApiOperation("web端切换商家端用户")
|
|
|
+ @ApiOperation("web端切换商家端用户状态(主账号有子账号时禁止禁用;返回更新后状态供前端及时展示)")
|
|
|
@ApiOperationSupport(order = 7)
|
|
|
@PutMapping("/switchingStates")
|
|
|
public R<StoreUserVo> switchingStates(@RequestBody StoreUser storeUser) {
|
|
|
log.info("StoreUserController.switchingStates?storeUser={}", storeUser);
|
|
|
- storeUserService.switchingStates(storeUser);
|
|
|
- return R.success("切换成功");
|
|
|
+ try {
|
|
|
+ return storeUserService.switchingStates(storeUser);
|
|
|
+ } catch (Exception e) {
|
|
|
+ log.warn("StoreUserController.switchingStates 校验或切换失败: {}", e.getMessage());
|
|
|
+ return R.fail(e.getMessage());
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
@ApiOperation(value = "web端导出商家端账号相关信息")
|
|
|
@@ -426,8 +420,13 @@ public class StoreUserController {
|
|
|
@PostMapping("/deleteStoreAccountInfo")
|
|
|
public R<StoreUserVo> deleteStoreAccountInfo(@RequestBody StoreUserVo storeUserVo) {
|
|
|
log.info("StoreUserController.deleteStoreAccountInfo?storeUserVo={}", storeUserVo);
|
|
|
- storeUserService.deleteStoreAccountInfo(storeUserVo);
|
|
|
- return R.success("删除成功");
|
|
|
+ try {
|
|
|
+ storeUserService.deleteStoreAccountInfo(storeUserVo);
|
|
|
+ return R.success("删除成功");
|
|
|
+ } catch (Exception e) {
|
|
|
+ log.warn("StoreUserController.deleteStoreAccountInfo 校验或删除失败: {}", e.getMessage());
|
|
|
+ return R.fail(e.getMessage());
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
/**
|