fix:用户分配角色由多角色修改为单角色

This commit is contained in:
lhb 2025-04-16 14:14:21 +08:00
parent 94d499ab28
commit 263cdaab1f
2 changed files with 9 additions and 0 deletions

View File

@ -145,5 +145,11 @@ public class BatteryStation implements Serializable {
@Schema(description = "换电费用标准", hidden = true)
@TableField(exist = false)
private List<BatteryStationHdFeeStandard> feeStandardList;
@Schema(description = "营业起时间")
private String runStartTime;
@Schema(description = "营业止时间")
private String runEndTime;
}

View File

@ -108,6 +108,9 @@ public class AuthUserServiceImpl implements AuthUserService {
@Override
public Result<Integer> addUserRole(AuthUserRole aur) {
authUserRoleDao.delete(new QueryWrapper<AuthUserRole>()
.eq("uid", aur.getUid()));//先删除该用户的所有角色
boolean exists = authUserRoleDao.exists(new QueryWrapper<AuthUserRole>()
.eq("uid", aur.getUid()).eq("rcode", aur.getRcode()));
if (exists) {