员工账号接口实现
This commit is contained in:
parent
119ef4397d
commit
8a4d083bc8
|
|
@ -34,7 +34,7 @@ public class ShopStaff implements Serializable {
|
|||
* 使用系统用户 sys_user id
|
||||
*/
|
||||
@Id(keyType = KeyType.Auto)
|
||||
private Integer id;
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 员工编号
|
||||
|
|
|
|||
|
|
@ -15,5 +15,5 @@ public interface SysUserService extends IService<SysUser> {
|
|||
|
||||
Boolean updateSysUserPwd(long sysUserId, String accountPwd);
|
||||
|
||||
Boolean removeUserAndRole(Integer id);
|
||||
Boolean removeUserAndRole(Long id);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -42,6 +42,7 @@ public class ShopStaffServiceImpl extends ServiceImpl<ShopStaffMapper, ShopStaff
|
|||
SysUser sysUser = sysUserService.addUser(shopStaffAddDTO.getName(), shopStaffAddDTO.getAccountName(), shopStaffAddDTO.getAccountPwd(), shopStaffAddDTO.getPhone(), shopStaffAddDTO.getRoleId());
|
||||
ShopStaff shopStaff = BeanUtil.copyProperties(shopStaffAddDTO, ShopStaff.class);
|
||||
shopStaff.setShopId(StpKit.ADMIN.getLoginIdAsLong());
|
||||
shopStaff.setId(sysUser.getId());
|
||||
return save(shopStaff);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -67,7 +67,7 @@ public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> imp
|
|||
}
|
||||
|
||||
@Override
|
||||
public Boolean removeUserAndRole(Integer id) {
|
||||
public Boolean removeUserAndRole(Long id) {
|
||||
sysUsersRolesMapper.deleteByQuery(new QueryWrapper().eq(SysUsersRoles::getUserId, id));
|
||||
return removeById(id);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue