Merge remote-tracking branch 'origin/master'
This commit is contained in:
@@ -131,7 +131,7 @@ public class ShopInfoServiceImpl extends ServiceImpl<ShopInfoMapper, ShopInfo> i
|
||||
}
|
||||
|
||||
@Override
|
||||
public ShopDetailDTO detail(Integer id) {
|
||||
public ShopDetailDTO detail(Long id) {
|
||||
ShopInfo shopInfo = queryChain().eq(ShopInfo::getId, id == null ? StpKit.USER.getShopId() : id).one();
|
||||
if (shopInfo == null) {
|
||||
throw new ApiNotPrintException("店铺信息不存在");
|
||||
|
||||
@@ -78,7 +78,7 @@ public class ShopStaffServiceImpl extends ServiceImpl<ShopStaffMapper, ShopStaff
|
||||
}
|
||||
|
||||
if (StrUtil.isNotBlank(shopStaffEditDTO.getAccountName()) && !shopStaffEditDTO.getAccountName().equals(sysUser.getAccount())) {
|
||||
long count = sysUserService.count(new QueryWrapper().eq(SysUser::getAccount, shopStaffEditDTO.getAccountName()));
|
||||
long count = sysUserService.count(new QueryWrapper().eq(SysUser::getAccount, shopStaffEditDTO.getAccountName()).ne(SysUser::getId, sysUser.getId()));
|
||||
if (count > 0) {
|
||||
throw new ApiNotPrintException("此账户名已存在");
|
||||
}
|
||||
|
||||
@@ -150,8 +150,6 @@ public class ShopUserServiceImpl extends ServiceImpl<ShopUserMapper, ShopUser> i
|
||||
if (userInfo == null) {
|
||||
userInfo = BeanUtil.copyProperties(shopUserAddDTO, UserInfo.class);
|
||||
userInfoService.save(userInfo);
|
||||
} else {
|
||||
throw new ApiNotPrintException("此用户已存在");
|
||||
}
|
||||
|
||||
ShopUser shopUser = BeanUtil.copyProperties(shopUserAddDTO, ShopUser.class);
|
||||
|
||||
Reference in New Issue
Block a user