|  |  | 
 |  |  | import org.springframework.stereotype.Service; | 
 |  |  | import org.springframework.transaction.annotation.Transactional; | 
 |  |  |  | 
 |  |  | import java.util.*; | 
 |  |  | import java.util.List; | 
 |  |  | import java.util.Map; | 
 |  |  | import java.util.Random; | 
 |  |  |  | 
 |  |  | @Slf4j | 
 |  |  | @Service | 
 |  |  | 
 |  |  |     } | 
 |  |  |  | 
 |  |  |     /** | 
 |  |  |      * 禁用或启用用户信息 | 
 |  |  |      * @param id | 
 |  |  |      * @param disabled | 
 |  |  |      * @return | 
 |  |  |      */ | 
 |  |  |     @Transactional | 
 |  |  |     public int disabled(Long id,Boolean disabled) { | 
 |  |  |         BaUser user=new BaUser(); | 
 |  |  |         user.id=id; | 
 |  |  |         user.disabled=disabled; | 
 |  |  |         return dao.updateByPrimaryKeySelective(user); | 
 |  |  |     } | 
 |  |  |  | 
 |  |  |     /** | 
 |  |  |      * 修改密码 | 
 |  |  |      * | 
 |  |  |      * @param id       用户ID | 
 |  |  | 
 |  |  |      * @return 插入用户与角色关联记录数量 | 
 |  |  |      */ | 
 |  |  |     @Transactional | 
 |  |  |     private int saveUserRoles(Long userId, String[] roleIds) { | 
 |  |  |     public int saveUserRoles(Long userId, String[] roleIds) { | 
 |  |  |         this.urDao.deleteByUserId(userId); | 
 |  |  |         int count = 0; | 
 |  |  |         if (roleIds != null && roleIds.length > 0) { |