|
@@ -248,7 +248,7 @@ public class StorePlatformUserRoleController {
|
|
|
@ApiImplicitParams({
|
|
@ApiImplicitParams({
|
|
|
@ApiImplicitParam(name = "pageNum", value = "页码", dataType = "int", paramType = "query", required = false, defaultValue = "1"),
|
|
@ApiImplicitParam(name = "pageNum", value = "页码", dataType = "int", paramType = "query", required = false, defaultValue = "1"),
|
|
|
@ApiImplicitParam(name = "pageSize", value = "每页大小", dataType = "int", paramType = "query", required = false, defaultValue = "10"),
|
|
@ApiImplicitParam(name = "pageSize", value = "每页大小", dataType = "int", paramType = "query", required = false, defaultValue = "10"),
|
|
|
- @ApiImplicitParam(name = "accountId", value = "账号ID(主账号ID或子账号用户ID,模糊查询)", dataType = "String", paramType = "query", required = false),
|
|
|
|
|
|
|
+ @ApiImplicitParam(name = "mainAccountId", value = "账号ID(主账号ID或子账号用户ID,模糊查询)", dataType = "String", paramType = "query", required = false),
|
|
|
@ApiImplicitParam(name = "phone", value = "联系电话(子账号电话,模糊查询)", dataType = "String", paramType = "query", required = false),
|
|
@ApiImplicitParam(name = "phone", value = "联系电话(子账号电话,模糊查询)", dataType = "String", paramType = "query", required = false),
|
|
|
@ApiImplicitParam(name = "status", value = "状态(0:启用 1:禁用)", dataType = "int", paramType = "query", required = false)
|
|
@ApiImplicitParam(name = "status", value = "状态(0:启用 1:禁用)", dataType = "int", paramType = "query", required = false)
|
|
|
})
|
|
})
|
|
@@ -256,12 +256,12 @@ public class StorePlatformUserRoleController {
|
|
|
public R<IPage<SubAccountListVo>> queryAllSubAccounts(
|
|
public R<IPage<SubAccountListVo>> queryAllSubAccounts(
|
|
|
@RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum,
|
|
@RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum,
|
|
|
@RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize,
|
|
@RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize,
|
|
|
- @RequestParam(value = "accountId", required = false) String accountId,
|
|
|
|
|
|
|
+ @RequestParam(value = "mainAccountId", required = false) String mainAccountId,
|
|
|
@RequestParam(value = "phone", required = false) String phone,
|
|
@RequestParam(value = "phone", required = false) String phone,
|
|
|
@RequestParam(value = "status", required = false) Integer status) {
|
|
@RequestParam(value = "status", required = false) Integer status) {
|
|
|
- log.info("StorePlatformUserRoleController.queryAllSubAccounts?pageNum={}, pageSize={}, accountId={}, phone={}, status={}",
|
|
|
|
|
- pageNum, pageSize, accountId, phone, status);
|
|
|
|
|
- IPage<SubAccountListVo> subAccountPage = storePlatformUserRoleService.queryAllSubAccounts(pageNum, pageSize, accountId, phone, status);
|
|
|
|
|
|
|
+ log.info("StorePlatformUserRoleController.queryAllSubAccounts?pageNum={}, pageSize={}, mainAccountId={}, phone={}, status={}",
|
|
|
|
|
+ pageNum, pageSize, mainAccountId, phone, status);
|
|
|
|
|
+ IPage<SubAccountListVo> subAccountPage = storePlatformUserRoleService.queryAllSubAccounts(pageNum, pageSize, mainAccountId, phone, status);
|
|
|
return R.data(subAccountPage);
|
|
return R.data(subAccountPage);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -273,21 +273,28 @@ public class StorePlatformUserRoleController {
|
|
|
content = "禁用子账号(关联记录ID=#{#id})"
|
|
content = "禁用子账号(关联记录ID=#{#id})"
|
|
|
)
|
|
)
|
|
|
@ApiImplicitParams({
|
|
@ApiImplicitParams({
|
|
|
- @ApiImplicitParam(name = "id", value = "子账号关联记录的主键ID", dataType = "Long", paramType = "query", required = true)
|
|
|
|
|
|
|
+ @ApiImplicitParam(name = "id", value = "子账号关联记录的主键ID", dataType = "Long", paramType = "query", required = true),
|
|
|
|
|
+ @ApiImplicitParam(name = "status", value = "状态标志(0启用 1禁用)", dataType = "Integer", paramType = "query", required = true)
|
|
|
})
|
|
})
|
|
|
- @PostMapping("/disableSubAccount")
|
|
|
|
|
- public R<String> disableSubAccount(@RequestParam("id") Long id) {
|
|
|
|
|
- log.info("StorePlatformUserRoleController.disableSubAccount?id={}", id);
|
|
|
|
|
|
|
+ @GetMapping("/disableSubAccount")
|
|
|
|
|
+ public R<String> disableSubAccount(@RequestParam("id") Long id, @RequestParam("status") Integer status) {
|
|
|
|
|
+ log.info("StorePlatformUserRoleController.disableSubAccount?id={}, status={}", id, status);
|
|
|
|
|
|
|
|
if (id == null) {
|
|
if (id == null) {
|
|
|
return R.fail("子账号关联记录ID不能为空");
|
|
return R.fail("子账号关联记录ID不能为空");
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- boolean result = storePlatformUserRoleService.disableSubAccount(id);
|
|
|
|
|
|
|
+ if (status == null || (status != 0 && status != 1)) {
|
|
|
|
|
+ return R.fail("状态参数必须为0(启用)或1(禁用)");
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ boolean result = storePlatformUserRoleService.disableSubAccount(id, status);
|
|
|
if (result) {
|
|
if (result) {
|
|
|
- return R.success("禁用子账号成功");
|
|
|
|
|
|
|
+ String message = status == 0 ? "启用子账号成功" : "禁用子账号成功";
|
|
|
|
|
+ return R.success(message);
|
|
|
}
|
|
}
|
|
|
- return R.fail("禁用子账号失败");
|
|
|
|
|
|
|
+ String message = status == 0 ? "启用子账号失败" : "禁用子账号失败";
|
|
|
|
|
+ return R.fail(message);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
}
|
|
}
|