派生自 projectDept/qhighschool

EricsHu
2023-11-26 1da190e7f267bcd3501884f3aeaac7476850fec7
src/main/java/com/qxueyou/scc/user/service/impl/UserService.java
@@ -90,11 +90,11 @@
    }
    @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();
@@ -107,6 +107,7 @@
        String newPassword= DigestUtils.md5DigestAsHex((salt+password).getBytes());
        user.setPassword(newPassword);
        user.setMobilePhone(mobilePhone);
        user.setImgPath(photo);
        user.setSex(sex);
        user.setOrganizationId(orgId);
        save(user);
@@ -180,6 +181,9 @@
        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);
    }