店员分类
This commit is contained in:
@@ -52,7 +52,7 @@ public class PlayPersonnelGroupInfoController {
|
||||
public R listByPage(@Validated @RequestBody PlayPersonnelGroupInfoQueryVo vo) {
|
||||
IPage<PlayPersonnelGroupInfoReturnVo> list = playClerkGroupInfoService.selectByPage(vo);
|
||||
for (PlayPersonnelGroupInfoReturnVo record : list.getRecords()) {
|
||||
List<PlayClerkUserInfoEntity> clerkUserInfoEntities = playClerkUserInfoService.selecyByGroupId(record.getId());
|
||||
List<PlayClerkUserInfoEntity> clerkUserInfoEntities = playClerkUserInfoService.selectByGroupId(record.getId());
|
||||
record.setTotalEmployeesNumber(clerkUserInfoEntities.size());
|
||||
record.setListingEmployeesNumber(clerkUserInfoEntities.stream().collect(Collectors.toMap(PlayClerkUserInfoEntity::getListingState, PlayClerkUserInfoEntity::getId)).size());
|
||||
}
|
||||
@@ -101,7 +101,7 @@ public class PlayPersonnelGroupInfoController {
|
||||
@DeleteMapping("/{ids}")
|
||||
public R remove(@PathVariable String[] ids) {
|
||||
for (String id : ids) {
|
||||
List<PlayClerkUserInfoEntity> clerkUserInfoEntities = playClerkUserInfoService.selecyByGroupId(id);
|
||||
List<PlayClerkUserInfoEntity> clerkUserInfoEntities = playClerkUserInfoService.selectByGroupId(id);
|
||||
if (!clerkUserInfoEntities.isEmpty()) {
|
||||
throw new CustomException("分组中存在店员,禁止删除");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user