Browse Source

Merge branch 'online' of http://git.dayaedu.com/yonge/cooleshow

zouxuan 2 years ago
parent
commit
2ebb293449
31 changed files with 94 additions and 84 deletions
  1. 1 1
      audio-analysis/src/main/resources/bootstrap-dev.yml
  2. 1 1
      audio-analysis/src/main/resources/bootstrap-prod.yml
  3. 1 1
      cooleshow-auth/auth-server/src/main/java/com/yonge/cooleshow/auth/core/provider/PhoneAuthenticationProvider.java
  4. 30 29
      cooleshow-auth/auth-server/src/main/java/com/yonge/cooleshow/auth/web/controller/UserController.java
  5. 1 1
      cooleshow-auth/auth-server/src/main/resources/bootstrap-dev.yml
  6. 1 1
      cooleshow-auth/auth-server/src/main/resources/bootstrap-prod.yml
  7. 3 2
      cooleshow-auth/auth-server/src/main/resources/config/mybatis/SysUserMapper.xml
  8. 1 1
      cooleshow-bbs/src/main/resources/bootstrap-dev.yml
  9. 1 1
      cooleshow-bbs/src/main/resources/bootstrap-prod.yml
  10. 1 1
      cooleshow-cms/src/main/resources/bootstrap-prod.properties
  11. 1 1
      cooleshow-gateway/gateway-web/src/main/resources/bootstrap-prod.yml
  12. 1 1
      cooleshow-mall/mall-admin/src/main/resources/bootstrap-dev.yml
  13. 1 1
      cooleshow-mall/mall-admin/src/main/resources/bootstrap-prod.yml
  14. 1 1
      cooleshow-mall/mall-portal/src/main/resources/bootstrap-dev.yml
  15. 1 1
      cooleshow-mall/mall-portal/src/main/resources/bootstrap-prod.yml
  16. 1 1
      cooleshow-task/src/main/resources/bootstrap-dev.yml
  17. 1 1
      cooleshow-task/src/main/resources/bootstrap-prod.yml
  18. 1 1
      cooleshow-user/user-admin/src/main/resources/bootstrap-dev.yml
  19. 1 1
      cooleshow-user/user-admin/src/main/resources/bootstrap-prod.yml
  20. 28 20
      cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/service/impl/StudentServiceImpl.java
  21. 1 1
      cooleshow-user/user-classroom/src/main/resources/bootstrap-dev.yml
  22. 1 1
      cooleshow-user/user-classroom/src/main/resources/bootstrap-prod.yml
  23. 1 1
      cooleshow-user/user-student/src/main/resources/bootstrap-dev.yml
  24. 1 1
      cooleshow-user/user-student/src/main/resources/bootstrap-prod.yml
  25. 1 1
      cooleshow-user/user-teacher/src/main/resources/bootstrap-dev.yml
  26. 1 1
      cooleshow-user/user-teacher/src/main/resources/bootstrap-prod.yml
  27. 1 1
      cooleshow-user/user-website/src/main/resources/bootstrap-dev.yml
  28. 1 1
      cooleshow-user/user-website/src/main/resources/bootstrap-prod.yml
  29. 1 1
      cooleshow-websocket/src/main/resources/bootstrap-dev.yml
  30. 1 1
      cooleshow-websocket/src/main/resources/bootstrap-prod.yml
  31. 6 6
      pom.xml

+ 1 - 1
audio-analysis/src/main/resources/bootstrap-dev.yml

@@ -2,7 +2,7 @@ spring:
   cloud:
   cloud:
     nacos:
     nacos:
       config:
       config:
-        server-addr: 47.114.1.200:8848
+        server-addr: 10.206.0.7:8848
         namespace: 6f8374a9-598f-4889-bb17-476070ffb8de
         namespace: 6f8374a9-598f-4889-bb17-476070ffb8de
         group: DEFAULT_GROUP
         group: DEFAULT_GROUP
         prefix: audio-analysis
         prefix: audio-analysis

+ 1 - 1
audio-analysis/src/main/resources/bootstrap-prod.yml

@@ -2,7 +2,7 @@ spring:
   cloud:
   cloud:
     nacos:
     nacos:
       config:
       config:
-        server-addr: 121.41.82.151:8848
+        server-addr: 10.206.0.16:8848
         namespace: dba505ee-020c-4c2b-bab2-e91d89cf248e
         namespace: dba505ee-020c-4c2b-bab2-e91d89cf248e
         group: DEFAULT_GROUP
         group: DEFAULT_GROUP
         prefix: audio-analysis
         prefix: audio-analysis

+ 1 - 1
cooleshow-auth/auth-server/src/main/java/com/yonge/cooleshow/auth/core/provider/PhoneAuthenticationProvider.java

@@ -47,7 +47,7 @@ public class PhoneAuthenticationProvider extends AbstractAuthenticationProvider
 
 
     @Override
     @Override
     @Transactional(rollbackFor = Exception.class)
     @Transactional(rollbackFor = Exception.class)
-    protected UserDetails retrieveUser(String username, Authentication authentication) throws AuthenticationException {
+    public UserDetails retrieveUser(String username, Authentication authentication) throws AuthenticationException {
         LoginEntity loginEntity = (LoginEntity) authentication.getCredentials();
         LoginEntity loginEntity = (LoginEntity) authentication.getCredentials();
         if (loginEntity == null) {
         if (loginEntity == null) {
             throw new BadCredentialsException("Bad credentials");
             throw new BadCredentialsException("Bad credentials");

+ 30 - 29
cooleshow-auth/auth-server/src/main/java/com/yonge/cooleshow/auth/web/controller/UserController.java

@@ -1,32 +1,5 @@
 package com.yonge.cooleshow.auth.web.controller;
 package com.yonge.cooleshow.auth.web.controller;
 
 
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiImplicitParam;
-import io.swagger.annotations.ApiImplicitParams;
-import io.swagger.annotations.ApiOperation;
-
-import java.util.Date;
-import java.util.List;
-import java.util.Objects;
-
-import javax.validation.Valid;
-
-import org.apache.commons.lang3.StringUtils;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.beans.factory.annotation.Value;
-import org.springframework.http.HttpStatus;
-import org.springframework.http.MediaType;
-import org.springframework.security.access.prepost.PreAuthorize;
-import org.springframework.security.authentication.BadCredentialsException;
-import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;
-import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.PathVariable;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.RequestBody;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.ResponseBody;
-import org.springframework.web.bind.annotation.RestController;
-
 import com.yonge.cooleshow.auth.api.dto.RealnameAuthReq;
 import com.yonge.cooleshow.auth.api.dto.RealnameAuthReq;
 import com.yonge.cooleshow.auth.api.dto.SysUserQueryInfo;
 import com.yonge.cooleshow.auth.api.dto.SysUserQueryInfo;
 import com.yonge.cooleshow.auth.api.dto.UpdatePasswordDto;
 import com.yonge.cooleshow.auth.api.dto.UpdatePasswordDto;
@@ -40,7 +13,6 @@ import com.yonge.cooleshow.auth.service.SysRoleService;
 import com.yonge.cooleshow.auth.service.SysUserRoleService;
 import com.yonge.cooleshow.auth.service.SysUserRoleService;
 import com.yonge.cooleshow.auth.service.SysUserService;
 import com.yonge.cooleshow.auth.service.SysUserService;
 import com.yonge.cooleshow.auth.web.controller.queryInfo.RoleQueryInfo;
 import com.yonge.cooleshow.auth.web.controller.queryInfo.RoleQueryInfo;
-import com.yonge.cooleshow.common.constant.CommonConstants;
 import com.yonge.cooleshow.common.constant.SysConfigConstant;
 import com.yonge.cooleshow.common.constant.SysConfigConstant;
 import com.yonge.cooleshow.common.controller.BaseController;
 import com.yonge.cooleshow.common.controller.BaseController;
 import com.yonge.cooleshow.common.entity.HttpResponseResult;
 import com.yonge.cooleshow.common.entity.HttpResponseResult;
@@ -56,6 +28,31 @@ import com.yonge.toolset.thirdparty.user.realname.RealnameAuthenticationPlugin;
 import com.yonge.toolset.utils.date.DateUtil;
 import com.yonge.toolset.utils.date.DateUtil;
 import com.yonge.toolset.utils.idcard.IdcardInfoExtractor;
 import com.yonge.toolset.utils.idcard.IdcardInfoExtractor;
 import com.yonge.toolset.utils.idcard.IdcardValidator;
 import com.yonge.toolset.utils.idcard.IdcardValidator;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiImplicitParam;
+import io.swagger.annotations.ApiImplicitParams;
+import io.swagger.annotations.ApiOperation;
+import org.apache.commons.lang3.StringUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.http.HttpStatus;
+import org.springframework.http.MediaType;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.security.authentication.BadCredentialsException;
+import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.ResponseBody;
+import org.springframework.web.bind.annotation.RestController;
+
+import javax.validation.Valid;
+import java.text.MessageFormat;
+import java.util.Date;
+import java.util.List;
+import java.util.Objects;
 
 
 @RestController()
 @RestController()
 @RequestMapping("user")
 @RequestMapping("user")
@@ -392,7 +389,11 @@ public class UserController extends BaseController {
             return failed("非法操作");
             return failed("非法操作");
         }
         }
 
 
-        String password = new BCryptPasswordEncoder().encode(CommonConstants.DEFULT_PASSWORD);
+        // 新密码规则:clx+手机号后四位
+        String newPassword = MessageFormat.format("klx{0}", sysUser.getPhone().substring(7));
+
+        // 生成重置默认密码
+        String password = new BCryptPasswordEncoder().encode(newPassword);
         sysUser.setPassword(password);
         sysUser.setPassword(password);
         sysUser.setUpdateTime(new Date());
         sysUser.setUpdateTime(new Date());
         sysUserService.update(sysUser);
         sysUserService.update(sysUser);

+ 1 - 1
cooleshow-auth/auth-server/src/main/resources/bootstrap-dev.yml

@@ -2,7 +2,7 @@ spring:
   cloud:
   cloud:
     nacos:
     nacos:
       config:
       config:
-        server-addr: 47.114.1.200:8848
+        server-addr: 10.206.0.7:8848
         namespace: 6f8374a9-598f-4889-bb17-476070ffb8de
         namespace: 6f8374a9-598f-4889-bb17-476070ffb8de
         group: DEFAULT_GROUP
         group: DEFAULT_GROUP
         prefix: auth
         prefix: auth

+ 1 - 1
cooleshow-auth/auth-server/src/main/resources/bootstrap-prod.yml

@@ -2,7 +2,7 @@ spring:
   cloud:
   cloud:
     nacos:
     nacos:
       config:
       config:
-        server-addr: 121.41.82.151:8848
+        server-addr: 10.206.0.16:8848
         namespace: dba505ee-020c-4c2b-bab2-e91d89cf248e
         namespace: dba505ee-020c-4c2b-bab2-e91d89cf248e
         group: DEFAULT_GROUP
         group: DEFAULT_GROUP
         prefix: auth
         prefix: auth

+ 3 - 2
cooleshow-auth/auth-server/src/main/resources/config/mybatis/SysUserMapper.xml

@@ -72,9 +72,11 @@
 
 
     <insert id="saveTeacher">
     <insert id="saveTeacher">
         INSERT INTO teacher (user_id_,create_time_,update_time_)VALUES(#{userId},NOW(),NOW())
         INSERT INTO teacher (user_id_,create_time_,update_time_)VALUES(#{userId},NOW(),NOW())
+        ON DUPLICATE KEY UPDATE user_id_ = VALUES(user_id_)
     </insert>
     </insert>
     <insert id="saveStudent">
     <insert id="saveStudent">
         INSERT INTO student (user_id_,create_time_,update_time_) VALUES(#{userId},NOW(),NOW())
         INSERT INTO student (user_id_,create_time_,update_time_) VALUES(#{userId},NOW(),NOW())
+        ON DUPLICATE KEY UPDATE user_id_ = VALUES(user_id_)
     </insert>
     </insert>
 
 
     <select id="queryUserAccount" resultType="java.lang.Boolean">
     <select id="queryUserAccount" resultType="java.lang.Boolean">
@@ -83,8 +85,7 @@
 
 
     <insert id="createUserAccount">
     <insert id="createUserAccount">
         INSERT INTO user_cash_account (user_id_,create_time_,update_time_)VALUES(#{userId},NOW(),NOW())
         INSERT INTO user_cash_account (user_id_,create_time_,update_time_)VALUES(#{userId},NOW(),NOW())
-            ON DUPLICATE KEY UPDATE
-                                 user_id_ = VALUES(user_id_)
+            ON DUPLICATE KEY UPDATE user_id_ = VALUES(user_id_)
     </insert>
     </insert>
 
 
     <!-- 根据主键查询一条记录 -->
     <!-- 根据主键查询一条记录 -->

+ 1 - 1
cooleshow-bbs/src/main/resources/bootstrap-dev.yml

@@ -2,7 +2,7 @@ spring:
   cloud:
   cloud:
     nacos:
     nacos:
       config:
       config:
-        server-addr: 47.114.1.200:8848
+        server-addr: 10.206.0.7:8848
         namespace: 6f8374a9-598f-4889-bb17-476070ffb8de
         namespace: 6f8374a9-598f-4889-bb17-476070ffb8de
         group: DEFAULT_GROUP
         group: DEFAULT_GROUP
         prefix: bbs
         prefix: bbs

+ 1 - 1
cooleshow-bbs/src/main/resources/bootstrap-prod.yml

@@ -2,7 +2,7 @@ spring:
   cloud:
   cloud:
     nacos:
     nacos:
       config:
       config:
-        server-addr: 121.41.82.151:8848
+        server-addr: 10.206.0.16:8848
         namespace: dba505ee-020c-4c2b-bab2-e91d89cf248e
         namespace: dba505ee-020c-4c2b-bab2-e91d89cf248e
         group: DEFAULT_GROUP
         group: DEFAULT_GROUP
         prefix: bbs
         prefix: bbs

+ 1 - 1
cooleshow-cms/src/main/resources/bootstrap-prod.properties

@@ -1,6 +1,6 @@
 
 
 #\u670d\u52a1\u5668\u5730\u5740
 #\u670d\u52a1\u5668\u5730\u5740
-spring.cloud.nacos.config.server-addr=121.41.82.151:8848
+spring.cloud.nacos.config.server-addr=10.206.0.16:8848
 #\u9ed8\u8ba4\u4e3aPublic\u547d\u540d\u7a7a\u95f4,\u53ef\u4ee5\u7701\u7565\u4e0d\u5199
 #\u9ed8\u8ba4\u4e3aPublic\u547d\u540d\u7a7a\u95f4,\u53ef\u4ee5\u7701\u7565\u4e0d\u5199
 spring.cloud.nacos.config.namespace=dba505ee-020c-4c2b-bab2-e91d89cf248e
 spring.cloud.nacos.config.namespace=dba505ee-020c-4c2b-bab2-e91d89cf248e
 #\u6307\u5b9a\u914d\u7f6e\u7fa4\u7ec4 --\u5982\u679c\u662fPublic\u547d\u540d\u7a7a\u95f4 \u5219\u53ef\u4ee5\u7701\u7565\u7fa4\u7ec4\u914d\u7f6e
 #\u6307\u5b9a\u914d\u7f6e\u7fa4\u7ec4 --\u5982\u679c\u662fPublic\u547d\u540d\u7a7a\u95f4 \u5219\u53ef\u4ee5\u7701\u7565\u7fa4\u7ec4\u914d\u7f6e

+ 1 - 1
cooleshow-gateway/gateway-web/src/main/resources/bootstrap-prod.yml

@@ -2,7 +2,7 @@ spring:
   cloud:
   cloud:
     nacos:
     nacos:
       config:
       config:
-        server-addr: 121.41.82.151:8848
+        server-addr: 10.206.0.16:8848
         namespace: dba505ee-020c-4c2b-bab2-e91d89cf248e
         namespace: dba505ee-020c-4c2b-bab2-e91d89cf248e
         group: DEFAULT_GROUP
         group: DEFAULT_GROUP
         prefix: gateway-web
         prefix: gateway-web

+ 1 - 1
cooleshow-mall/mall-admin/src/main/resources/bootstrap-dev.yml

@@ -2,7 +2,7 @@ spring:
   cloud:
   cloud:
     nacos:
     nacos:
       config:
       config:
-        server-addr: 47.114.1.200:8848
+        server-addr: 10.206.0.7:8848
         namespace: 6f8374a9-598f-4889-bb17-476070ffb8de
         namespace: 6f8374a9-598f-4889-bb17-476070ffb8de
         group: DEFAULT_GROUP
         group: DEFAULT_GROUP
         prefix: mall-admin
         prefix: mall-admin

+ 1 - 1
cooleshow-mall/mall-admin/src/main/resources/bootstrap-prod.yml

@@ -2,7 +2,7 @@ spring:
   cloud:
   cloud:
     nacos:
     nacos:
       config:
       config:
-        server-addr: 121.41.82.151:8848
+        server-addr: 10.206.0.16:8848
         namespace: dba505ee-020c-4c2b-bab2-e91d89cf248e
         namespace: dba505ee-020c-4c2b-bab2-e91d89cf248e
         group: DEFAULT_GROUP
         group: DEFAULT_GROUP
         prefix: mall-admin
         prefix: mall-admin

+ 1 - 1
cooleshow-mall/mall-portal/src/main/resources/bootstrap-dev.yml

@@ -2,7 +2,7 @@ spring:
   cloud:
   cloud:
     nacos:
     nacos:
       config:
       config:
-        server-addr: 47.114.1.200:8848
+        server-addr: 10.206.0.7:8848
         namespace: 6f8374a9-598f-4889-bb17-476070ffb8de
         namespace: 6f8374a9-598f-4889-bb17-476070ffb8de
         group: DEFAULT_GROUP
         group: DEFAULT_GROUP
         prefix: mall-portal
         prefix: mall-portal

+ 1 - 1
cooleshow-mall/mall-portal/src/main/resources/bootstrap-prod.yml

@@ -2,7 +2,7 @@ spring:
   cloud:
   cloud:
     nacos:
     nacos:
       config:
       config:
-        server-addr: 121.41.82.151:8848
+        server-addr: 10.206.0.16:8848
         namespace: dba505ee-020c-4c2b-bab2-e91d89cf248e
         namespace: dba505ee-020c-4c2b-bab2-e91d89cf248e
         group: DEFAULT_GROUP
         group: DEFAULT_GROUP
         prefix: mall-portal
         prefix: mall-portal

+ 1 - 1
cooleshow-task/src/main/resources/bootstrap-dev.yml

@@ -2,7 +2,7 @@ spring:
   cloud:
   cloud:
     nacos:
     nacos:
       config:
       config:
-        server-addr: 47.114.1.200:8848
+        server-addr: 10.206.0.7:8848
         namespace: 6f8374a9-598f-4889-bb17-476070ffb8de
         namespace: 6f8374a9-598f-4889-bb17-476070ffb8de
         group: DEFAULT_GROUP
         group: DEFAULT_GROUP
         prefix: task
         prefix: task

+ 1 - 1
cooleshow-task/src/main/resources/bootstrap-prod.yml

@@ -2,7 +2,7 @@ spring:
   cloud:
   cloud:
     nacos:
     nacos:
       config:
       config:
-        server-addr: 121.41.82.151:8848
+        server-addr: 10.206.0.16:8848
         namespace: dba505ee-020c-4c2b-bab2-e91d89cf248e
         namespace: dba505ee-020c-4c2b-bab2-e91d89cf248e
         group: DEFAULT_GROUP
         group: DEFAULT_GROUP
         prefix: task
         prefix: task

+ 1 - 1
cooleshow-user/user-admin/src/main/resources/bootstrap-dev.yml

@@ -2,7 +2,7 @@ spring:
   cloud:
   cloud:
     nacos:
     nacos:
       config:
       config:
-        server-addr: 47.114.1.200:8848
+        server-addr: 10.206.0.7:8848
         namespace: 6f8374a9-598f-4889-bb17-476070ffb8de
         namespace: 6f8374a9-598f-4889-bb17-476070ffb8de
         group: DEFAULT_GROUP
         group: DEFAULT_GROUP
         prefix: admin
         prefix: admin

+ 1 - 1
cooleshow-user/user-admin/src/main/resources/bootstrap-prod.yml

@@ -2,7 +2,7 @@ spring:
   cloud:
   cloud:
     nacos:
     nacos:
       config:
       config:
-        server-addr: 121.41.82.151:8848
+        server-addr: 10.206.0.16:8848
         namespace: dba505ee-020c-4c2b-bab2-e91d89cf248e
         namespace: dba505ee-020c-4c2b-bab2-e91d89cf248e
         group: DEFAULT_GROUP
         group: DEFAULT_GROUP
         prefix: admin
         prefix: admin

+ 28 - 20
cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/service/impl/StudentServiceImpl.java

@@ -41,6 +41,7 @@ import org.springframework.transaction.annotation.Transactional;
 
 
 import javax.annotation.Resource;
 import javax.annotation.Resource;
 import java.text.MessageFormat;
 import java.text.MessageFormat;
+import java.time.LocalDateTime;
 import java.util.Date;
 import java.util.Date;
 import java.util.HashMap;
 import java.util.HashMap;
 import java.util.HashSet;
 import java.util.HashSet;
@@ -246,7 +247,6 @@ public class StudentServiceImpl extends ServiceImpl<StudentDao, Student> impleme
         studentResp.setSysUser(sysUser);
         studentResp.setSysUser(sysUser);
         if (Objects.isNull(studentVo)) {
         if (Objects.isNull(studentVo)) {
 
 
-
             if (Objects.isNull(sysUser)) {
             if (Objects.isNull(sysUser)) {
 
 
                 // 自动注册创建用户
                 // 自动注册创建用户
@@ -259,24 +259,7 @@ public class StudentServiceImpl extends ServiceImpl<StudentDao, Student> impleme
                 user.setUserType(ClientEnum.STUDENT.getCode());
                 user.setUserType(ClientEnum.STUDENT.getCode());
                 sysUserMapper.insert(user);
                 sysUserMapper.insert(user);
 
 
-                studentResp.setSysUser(user);
-                String subjectId = null;
-                // 学生声部
-                if (!StringUtil.isEmpty(info.getSubjectName())) {
-                    Subject subject = subjectDao.getSubjectMatchByName(info.getSubjectName());
-                    if (Objects.nonNull(subject)) {
-                        subjectId = String.valueOf(subject.getId());
-                    }
-                }
-
-                // 添加学生帐号
-                Student student = new Student();
-                student.setUserId(user.getId());
-                student.setSubjectId(subjectId);
-                student.setUnionId(info.getUnionId());
-                student.setLockFlag(UserLockFlag.NORMAL);
-                student.setHideFlag(Optional.ofNullable(info.getLockFlag()).orElse(0));
-                save(student);
+                studentResp.username(user.getUsername()).userId(user.getId()).setSysUser(user);
 
 
                 // 更新标识
                 // 更新标识
                 studentResp.setUpdateFlag(true);
                 studentResp.setUpdateFlag(true);
@@ -284,7 +267,8 @@ public class StudentServiceImpl extends ServiceImpl<StudentDao, Student> impleme
 
 
                 com.yonge.cooleshow.biz.dal.entity.SysUser updateEntity = new com.yonge.cooleshow.biz.dal.entity.SysUser();
                 com.yonge.cooleshow.biz.dal.entity.SysUser updateEntity = new com.yonge.cooleshow.biz.dal.entity.SysUser();
                 updateEntity.setId(sysUser.getId());
                 updateEntity.setId(sysUser.getId());
-                updateEntity.setDelFlag(Optional.ofNullable(info.getLockFlag()).orElse(0)); // 激活帐号
+                updateEntity.setUpdateTime(LocalDateTime.now());
+                //updateEntity.setDelFlag(Optional.ofNullable(info.getLockFlag()).orElse(0)); // 激活帐号
                 if (StringUtils.isBlank(sysUser.getUsername())) {
                 if (StringUtils.isBlank(sysUser.getUsername())) {
                     updateEntity.setUsername(info.getUsername());
                     updateEntity.setUsername(info.getUsername());
                 }
                 }
@@ -295,17 +279,41 @@ public class StudentServiceImpl extends ServiceImpl<StudentDao, Student> impleme
 
 
                 Student student = lambdaQuery().eq(Student::getUserId, sysUser.getId()).one();
                 Student student = lambdaQuery().eq(Student::getUserId, sysUser.getId()).one();
 
 
+                if (Objects.nonNull(student)) {
+                    // 重置学生隐藏状态
+                    info.setLockFlag(0);
+                }
                 // 更新学生关联帐号
                 // 更新学生关联帐号
                 updateStudentUnionStatus(info, studentResp, student);
                 updateStudentUnionStatus(info, studentResp, student);
 
 
             }
             }
 
 
+            String subjectId = null;
+            // 学生声部
+            if (!StringUtil.isEmpty(info.getSubjectName())) {
+                Subject subject = subjectDao.getSubjectMatchByName(info.getSubjectName());
+                if (Objects.nonNull(subject)) {
+                    subjectId = String.valueOf(subject.getId());
+                }
+            }
+
+            // 添加学生帐号
+            Student student = new Student();
+            student.setUserId(studentResp.getUserId());
+            student.setSubjectId(subjectId);
+            student.setUnionId(info.getUnionId());
+            student.setLockFlag(UserLockFlag.NORMAL);
+            student.setHideFlag(Optional.ofNullable(info.getLockFlag()).orElse(0));
+            save(student);
+
         } else {
         } else {
 
 
             studentResp.username(studentVo.getUsername()).userId(studentVo.getUserId());
             studentResp.username(studentVo.getUsername()).userId(studentVo.getUserId());
 
 
             Student student = lambdaQuery().eq(Student::getUserId, studentVo.getUserId()).one();
             Student student = lambdaQuery().eq(Student::getUserId, studentVo.getUserId()).one();
 
 
+            // 重置学生隐藏状态
+            info.setLockFlag(0);
             // 更新学生关联帐号
             // 更新学生关联帐号
             updateStudentUnionStatus(info, studentResp, student);
             updateStudentUnionStatus(info, studentResp, student);
         }
         }

+ 1 - 1
cooleshow-user/user-classroom/src/main/resources/bootstrap-dev.yml

@@ -2,7 +2,7 @@ spring:
   cloud:
   cloud:
     nacos:
     nacos:
       config:
       config:
-        server-addr: 47.114.1.200:8848
+        server-addr: 10.206.0.7:8848
         namespace: 6f8374a9-598f-4889-bb17-476070ffb8de
         namespace: 6f8374a9-598f-4889-bb17-476070ffb8de
         group: DEFAULT_GROUP
         group: DEFAULT_GROUP
         prefix: classroom
         prefix: classroom

+ 1 - 1
cooleshow-user/user-classroom/src/main/resources/bootstrap-prod.yml

@@ -2,7 +2,7 @@ spring:
   cloud:
   cloud:
     nacos:
     nacos:
       config:
       config:
-        server-addr: 121.41.82.151:8848
+        server-addr: 10.206.0.16:8848
         namespace: dba505ee-020c-4c2b-bab2-e91d89cf248e
         namespace: dba505ee-020c-4c2b-bab2-e91d89cf248e
         group: DEFAULT_GROUP
         group: DEFAULT_GROUP
         prefix: classroom
         prefix: classroom

+ 1 - 1
cooleshow-user/user-student/src/main/resources/bootstrap-dev.yml

@@ -2,7 +2,7 @@ spring:
   cloud:
   cloud:
     nacos:
     nacos:
       config:
       config:
-        server-addr: 47.114.1.200:8848
+        server-addr: 10.206.0.7:8848
         namespace: 6f8374a9-598f-4889-bb17-476070ffb8de
         namespace: 6f8374a9-598f-4889-bb17-476070ffb8de
         group: DEFAULT_GROUP
         group: DEFAULT_GROUP
         prefix: student
         prefix: student

+ 1 - 1
cooleshow-user/user-student/src/main/resources/bootstrap-prod.yml

@@ -2,7 +2,7 @@ spring:
   cloud:
   cloud:
     nacos:
     nacos:
       config:
       config:
-        server-addr: 121.41.82.151:8848
+        server-addr: 10.206.0.16:8848
         namespace: dba505ee-020c-4c2b-bab2-e91d89cf248e
         namespace: dba505ee-020c-4c2b-bab2-e91d89cf248e
         group: DEFAULT_GROUP
         group: DEFAULT_GROUP
         prefix: student
         prefix: student

+ 1 - 1
cooleshow-user/user-teacher/src/main/resources/bootstrap-dev.yml

@@ -2,7 +2,7 @@ spring:
   cloud:
   cloud:
     nacos:
     nacos:
       config:
       config:
-        server-addr: 47.114.1.200:8848
+        server-addr: 10.206.0.7:8848
         namespace: 6f8374a9-598f-4889-bb17-476070ffb8de
         namespace: 6f8374a9-598f-4889-bb17-476070ffb8de
         group: DEFAULT_GROUP
         group: DEFAULT_GROUP
         prefix: teacher
         prefix: teacher

+ 1 - 1
cooleshow-user/user-teacher/src/main/resources/bootstrap-prod.yml

@@ -2,7 +2,7 @@ spring:
   cloud:
   cloud:
     nacos:
     nacos:
       config:
       config:
-        server-addr: 121.41.82.151:8848
+        server-addr: 10.206.0.16:8848
         namespace: dba505ee-020c-4c2b-bab2-e91d89cf248e
         namespace: dba505ee-020c-4c2b-bab2-e91d89cf248e
         group: DEFAULT_GROUP
         group: DEFAULT_GROUP
         prefix: teacher
         prefix: teacher

+ 1 - 1
cooleshow-user/user-website/src/main/resources/bootstrap-dev.yml

@@ -2,7 +2,7 @@ spring:
   cloud:
   cloud:
     nacos:
     nacos:
       config:
       config:
-        server-addr: 47.114.1.200:8848
+        server-addr: 10.206.0.7:8848
         namespace: 6f8374a9-598f-4889-bb17-476070ffb8de
         namespace: 6f8374a9-598f-4889-bb17-476070ffb8de
         group: DEFAULT_GROUP
         group: DEFAULT_GROUP
         prefix: website
         prefix: website

+ 1 - 1
cooleshow-user/user-website/src/main/resources/bootstrap-prod.yml

@@ -2,7 +2,7 @@ spring:
   cloud:
   cloud:
     nacos:
     nacos:
       config:
       config:
-        server-addr: 121.41.82.151:8848
+        server-addr: 10.206.0.16:8848
         namespace: dba505ee-020c-4c2b-bab2-e91d89cf248e
         namespace: dba505ee-020c-4c2b-bab2-e91d89cf248e
         group: DEFAULT_GROUP
         group: DEFAULT_GROUP
         prefix: website
         prefix: website

+ 1 - 1
cooleshow-websocket/src/main/resources/bootstrap-dev.yml

@@ -2,7 +2,7 @@ spring:
   cloud:
   cloud:
     nacos:
     nacos:
       config:
       config:
-        server-addr: 47.114.1.200:8848
+        server-addr: 10.206.0.7:8848
         namespace: 6f8374a9-598f-4889-bb17-476070ffb8de
         namespace: 6f8374a9-598f-4889-bb17-476070ffb8de
         group: DEFAULT_GROUP
         group: DEFAULT_GROUP
         prefix: websocket
         prefix: websocket

+ 1 - 1
cooleshow-websocket/src/main/resources/bootstrap-prod.yml

@@ -2,7 +2,7 @@ spring:
   cloud:
   cloud:
     nacos:
     nacos:
       config:
       config:
-        server-addr: 121.41.82.151:8848
+        server-addr: 10.206.0.16:8848
         namespace: dba505ee-020c-4c2b-bab2-e91d89cf248e
         namespace: dba505ee-020c-4c2b-bab2-e91d89cf248e
         group: DEFAULT_GROUP
         group: DEFAULT_GROUP
         prefix: websocket
         prefix: websocket

+ 6 - 6
pom.xml

@@ -223,14 +223,14 @@
 
 
 	<repositories>
 	<repositories>
 		<repository>
 		<repository>
-			<id>alimaven</id>
-			<name>aliyun maven</name>
-			<url>http://maven.aliyun.com/nexus/content/groups/public/</url>
-		</repository>
-		<repository>
 			<id>anigiomaven</id>
 			<id>anigiomaven</id>
 			<name>AnigioMaven</name>
 			<name>AnigioMaven</name>
-			<url>http://maven.anigio.com/nexus/content/groups/public/</url>
+			<url>https://mvn.dayaedu.com/repository/maven-public/</url>
+		</repository>
+		<repository>
+			<id>alimaven</id>
+			<name>aliyun maven</name>
+			<url>https://maven.aliyun.com/nexus/content/groups/public/</url>
 		</repository>
 		</repository>
 		<repository>
 		<repository>
 			<id>spring-milestones</id>
 			<id>spring-milestones</id>