| | |
| | | System.out.println(user.getOrganizationId()); |
| | | System.out.println(user.getUserId()); |
| | | |
| | | // String hql = "from UserReRoleUser u where deleteFlag is false and userId = ? "; |
| | | // |
| | | // find(hql, CollectionUtils.newList(param.getUserId()), UserReRoleUser.class); |
| | | |
| | | ClsClass objClsClass = this.findUnique("select c from StuStudent t," |
| | | + " ClsClass c where c.classId = t.classId " |
| | | + "ClsClass c where c.classId = t.classId " |
| | | + " and c.orgId = ? and t.userId = ? and t.status = ? order by t.createTime desc", CollectionUtils.newList(user.getOrganizationId(), user.getUserId(), StuStudent.STATUS_ACTIVE), ClsClass.class); |
| | | wrapper.setUser(user); |
| | | wrapper.setOrg(org); |
| | |
| | | } |
| | | |
| | | @Override |
| | | public User insertUser(String name, String account, String mobilePhone, String password, Boolean sex, String orgId) { |
| | | return newUser(name, account, mobilePhone, password, sex, orgId); |
| | | public User insertUser( String photo,String name, String account, String mobilePhone, String password, Boolean sex, String orgId) { |
| | | return newUser( photo,name, account, mobilePhone, password, sex, orgId); |
| | | } |
| | | |
| | | private User newUser(String name, String account, String mobilePhone, String password, Boolean sex, String orgId) { |
| | | private User newUser(String photo,String name, String account, String mobilePhone, String password, Boolean sex, String orgId) { |
| | | //随机字符串 |
| | | String salt= UUID.randomUUID().toString(); |
| | | User user = new User(); |
| | |
| | | String newPassword= DigestUtils.md5DigestAsHex((salt+password).getBytes()); |
| | | user.setPassword(newPassword); |
| | | user.setMobilePhone(mobilePhone); |
| | | user.setImgPath(photo); |
| | | user.setSex(sex); |
| | | user.setOrganizationId(orgId); |
| | | save(user); |
| | |
| | | user.setImgPath(headPath); |
| | | TraceUtils.setUpdateTrace(user); |
| | | save(user); |
| | | this.bulkUpdate("update StuStudent set photo = ? , " + |
| | | " updateTime = sysdate(), updateId = ? , updator = ? where userId = ? " , |
| | | new Object[]{ headPath,userId, ClientUtils.getUserName(), userId } ); |
| | | |
| | | return new Result(true); |
| | | } |
| | |
| | | /** |
| | | * 用户设置手机号 |
| | | * |
| | | * @param headPath |
| | | * @param |
| | | * @return |
| | | */ |
| | | public Result updateUserInfo(String userId, String mobilePhone) { |
| | |
| | | String hql = "from count User where sex=? and deleteFlag is false"; |
| | | return new Result(true,findCount(hql,CollectionUtils.newList(1))); |
| | | } |
| | | |
| | | @Override |
| | | public Result countUsersex() { |
| | | String hql = "from count User where sex=? and deleteFlag is false"; |
| | | return new Result(true,findCount(hql,CollectionUtils.newList(0))); |
| | | } |
| | | } |