韩星耀 před 3 měsíci
rodič
revize
2afb29936c
54 změnil soubory, kde provedl 332 přidání a 755 odebrání
  1. 6 0
      gig/.idea/vcs.xml
  2. 2 0
      gig/gig-auth/gig-auth-gateway-sdk/src/main/java/com/stellvoy/authsdk/gateway/util/JwtSignerHolder.java
  3. 0 11
      gig/gig-auth/gig-auth-service/src/main/resources/bootstrap-dev.yml
  4. 0 11
      gig/gig-auth/gig-auth-service/src/main/resources/bootstrap-local.yml
  5. 9 0
      gig/gig-auth/gig-auth-service/src/main/resources/bootstrap-pro.yaml
  6. 4 13
      gig/gig-auth/gig-auth-service/src/main/resources/bootstrap.yml
  7. 9 0
      gig/gig-customer/pom.xml
  8. 11 2
      gig/gig-customer/src/main/java/com/stellvoy/customer/controller/sessionController.java
  9. 1 1
      gig/gig-customer/src/main/java/com/stellvoy/customer/customerApplication.java
  10. 1 2
      gig/gig-customer/src/main/java/com/stellvoy/customer/entity/fileEntity.java
  11. 2 1
      gig/gig-customer/src/main/java/com/stellvoy/customer/entity/messageEntity.java
  12. 2 3
      gig/gig-customer/src/main/java/com/stellvoy/customer/entity/questionEntity.java
  13. 3 2
      gig/gig-customer/src/main/java/com/stellvoy/customer/entity/sessionEntity.java
  14. 0 1
      gig/gig-customer/src/main/java/com/stellvoy/customer/entity/userEntity.java
  15. 0 2
      gig/gig-customer/src/main/java/com/stellvoy/customer/mapper/sessionMapper.java
  16. 3 3
      gig/gig-customer/src/main/java/com/stellvoy/customer/service/serviceImpl/questionServiceImpl.java
  17. 14 7
      gig/gig-customer/src/main/java/com/stellvoy/customer/service/serviceImpl/sessionServiceImpl.java
  18. 1 1
      gig/gig-customer/src/main/java/com/stellvoy/customer/service/sessionService.java
  19. 2 2
      gig/gig-customer/src/main/resources/bootstrap-dev.yml
  20. 10 0
      gig/gig-customer/src/main/resources/bootstrap-pro.yml
  21. 11 11
      gig/gig-customer/src/main/resources/bootstrap.yaml
  22. 3 3
      gig/gig-customer/src/main/resources/mapper/questionMapper.xml
  23. 17 72
      gig/gig-customer/src/main/resources/mapper/sessionMapper.xml
  24. 0 11
      gig/gig-gateway/src/main/resources/bootstrap-dev.yml
  25. 10 0
      gig/gig-gateway/src/main/resources/bootstrap-pro.yaml
  26. 14 10
      gig/gig-gateway/src/main/resources/bootstrap.yml
  27. binární
      gig/gig-gateway/src/main/resources/stellvoy.com.pfx
  28. 9 0
      gig/gig-learning/pom.xml
  29. 10 0
      gig/gig-learning/src/main/resources/bootstrap-pro.yml
  30. 11 11
      gig/gig-learning/src/main/resources/bootstrap.yaml
  31. 9 0
      gig/gig-message/pom.xml
  32. 10 0
      gig/gig-message/src/main/resources/bootstrap-pro.yml
  33. 11 11
      gig/gig-message/src/main/resources/bootstrap.yaml
  34. 9 1
      gig/gig-task/pom.xml
  35. 1 1
      gig/gig-task/src/main/java/com/stellvoy/task/TaskApplication.java
  36. 0 2
      gig/gig-task/src/main/java/com/stellvoy/task/entity/TaskEntity.java
  37. 24 0
      gig/gig-task/src/main/java/com/stellvoy/task/entity/TaskInsterestEntity.java
  38. 10 0
      gig/gig-task/src/main/resources/bootstrap-pro.yml
  39. 9 13
      gig/gig-task/src/main/resources/bootstrap.yaml
  40. 18 22
      gig/gig-task/src/main/resources/mapper/TaskMapper.xml
  41. 4 0
      gig/gig-user/src/main/java/com/stellvoy/user/domain/po/User.java
  42. 0 128
      gig/gig-user/src/main/java/com/stellvoy/user/domain/po/UserDetail.java
  43. 0 38
      gig/gig-user/src/main/java/com/stellvoy/user/domain/vo/UserDetailVO.java
  44. 0 23
      gig/gig-user/src/main/java/com/stellvoy/user/mapper/UserDetailMapper.java
  45. 0 23
      gig/gig-user/src/main/java/com/stellvoy/user/service/IUserDetailService.java
  46. 0 16
      gig/gig-user/src/main/java/com/stellvoy/user/service/IUserService.java
  47. 0 53
      gig/gig-user/src/main/java/com/stellvoy/user/service/impl/UserDetailServiceImpl.java
  48. 38 172
      gig/gig-user/src/main/java/com/stellvoy/user/service/impl/UserServiceImpl.java
  49. 2 2
      gig/gig-user/src/main/resources/bootstrap-local.yml
  50. 10 0
      gig/gig-user/src/main/resources/bootstrap-pro.yml
  51. 0 11
      gig/gig-user/src/main/resources/bootstrap-public.yml
  52. 12 11
      gig/gig-user/src/main/resources/bootstrap.yaml
  53. 0 16
      gig/gig-user/src/main/resources/mapper/TaskService.xml
  54. 0 32
      gig/gig-user/src/main/resources/mapper/UserDetailMapper.xml

+ 6 - 0
gig/.idea/vcs.xml

@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+  <component name="VcsDirectoryMappings">
+    <mapping directory="$PROJECT_DIR$/.." vcs="Git" />
+  </component>
+</project>

+ 2 - 0
gig/gig-auth/gig-auth-gateway-sdk/src/main/java/com/stellvoy/authsdk/gateway/util/JwtSignerHolder.java

@@ -76,6 +76,8 @@ public class JwtSignerHolder {
                     List<ServiceInstance> instances = discoveryClient.getInstances("auth-service");
                     if(CollUtils.isEmpty(instances)){
                         log.error("加载auth服务地址失败,原因:数据为空");
+                        log.info("尝试从服务注册中心获取服务列表: {}", discoveryClient.getServices());
+                        log.info("Nacos DiscoveryClient: {}", discoveryClient);
                         sleep(10000);
                         continue;
                     }

+ 0 - 11
gig/gig-auth/gig-auth-service/src/main/resources/bootstrap-dev.yml

@@ -1,11 +0,0 @@
-spring:
-  cloud:
-    nacos:
-      server-addr: 127.0.0.1:8848 # nacos注册中心
-      discovery:
-        namespace: 13a249cc-69c6-476e-a83f-3c884dcb5b97
-        group: DEFAULT_GROUP
-        ip: 127.0.0.1
-logging:
-  level:
-    com.gig: debug

+ 0 - 11
gig/gig-auth/gig-auth-service/src/main/resources/bootstrap-local.yml

@@ -1,11 +0,0 @@
-spring:
-  cloud:
-    nacos:
-      server-addr: 192.168.150.101:8848 # nacos注册中心
-      discovery:
-        namespace: f923fb34-cb0a-4c06-8fca-ad61ea61a3f0
-        group: DEFAULT_GROUP
-        ip: 192.168.150.1
-logging:
-  level:
-    com.gig: debug

+ 9 - 0
gig/gig-auth/gig-auth-service/src/main/resources/bootstrap-pro.yaml

@@ -0,0 +1,9 @@
+spring:
+  application:
+    name: auth-service
+  cloud:
+    nacos:
+      config:
+        refresh-enabled: true
+        username: nacos
+        password: LableX@nacos

+ 4 - 13
gig/gig-auth/gig-auth-service/src/main/resources/bootstrap.yml

@@ -4,28 +4,19 @@ server:
     uri-encoding: UTF-8   #服务编码
 spring:
   profiles:
-    active: dev
+    active: pro
   application:
     name: auth-service
   cloud:
     nacos:
       config:
         file-extension: yaml
+        server-addr: 124.223.41.222:8848
+        namespace: cdf0ddb0-a036-40d4-ac50-f6a8692e12ce
+        group: DEFAULT_GROUP
         shared-configs: # 共享配置
-          - data-id: shared-spring.yaml # 共享spring配置
-            refresh: false
           - data-id: shared-redis.yaml # 共享redis配置
             refresh: false
-          - data-id: shared-mybatis.yaml # 共享mybatis配置
-            refresh: false
-          - data-id: shared-logs.yaml # 共享日志配置
-            refresh: false
-
-  datasource:
-    driver-class-name: com.mysql.cj.jdbc.Driver
-    url: jdbc:mysql://127.0.0.1:3306/gig-user?useSSL=false&useUnicode=true&characterEncoding=UTF-8&autoReconnect=true&serverTimezone=Asia/Shanghai
-    username: root
-    password: 123123
 
 encrypt:
   key-store:

+ 9 - 0
gig/gig-customer/pom.xml

@@ -69,4 +69,13 @@
 
 
     </dependencies>
+    <build>
+        <finalName>${project.artifactId}</finalName>
+        <plugins>
+            <plugin>
+                <groupId>org.springframework.boot</groupId>
+                <artifactId>spring-boot-maven-plugin</artifactId>
+            </plugin>
+        </plugins>
+    </build>
 </project>

+ 11 - 2
gig/gig-customer/src/main/java/com/stellvoy/customer/controller/sessionController.java

@@ -1,6 +1,8 @@
 package com.stellvoy.customer.controller;
 
 
+import com.stellvoy.api.client.user.UserClient;
+import com.stellvoy.api.dto.user.NewUserDTO;
 import com.stellvoy.customer.entity.sessionEntity;
 import com.stellvoy.customer.service.sessionService;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -17,7 +19,8 @@ import java.util.Map;
 public class sessionController {
     @Autowired
     private sessionService sessionService;
-
+    @Autowired
+    private UserClient userClient;
     /**
      * 根据用户ID获取会话信息。
      *
@@ -32,7 +35,13 @@ public class sessionController {
             return response;
         }
 
-        return sessionService.getSessionByUserId(userId);
+        NewUserDTO user = userClient.queryUserById(userId);
+        if (user == null) {
+            throw new IllegalArgumentException("用户不存在");
+        }
+
+        String userName = user.getUsername();
+        return sessionService.getSessionByUserId(userId, userName);
     }
 
 

+ 1 - 1
gig/gig-customer/src/main/java/com/stellvoy/customerApplication.java → gig/gig-customer/src/main/java/com/stellvoy/customer/customerApplication.java

@@ -1,4 +1,4 @@
-package com.stellvoy;
+package com.stellvoy.customer;
 
 import org.mybatis.spring.annotation.MapperScan;
 import org.springframework.boot.SpringApplication;

+ 1 - 2
gig/gig-customer/src/main/java/com/stellvoy/customer/entity/fileEntity.java

@@ -1,6 +1,5 @@
 package com.stellvoy.customer.entity;
 
-import cn.hutool.core.date.DateTime;
 import com.baomidou.mybatisplus.annotation.IdType;
 import com.baomidou.mybatisplus.annotation.TableField;
 import com.baomidou.mybatisplus.annotation.TableId;
@@ -23,7 +22,7 @@ public class fileEntity implements Serializable {
     private String filePath; // 文件路径
     private String fileName; // 文件名称
     private Long fileType;// 文件类型:0,图片;1,视频;3,文本
-    private LocalDateTime createdTime; // 创建时间
+    private LocalDateTime createTime; // 创建时间
 
     @TableField("session_id")
     private Long sessionId ; // 会话ID

+ 2 - 1
gig/gig-customer/src/main/java/com/stellvoy/customer/entity/messageEntity.java

@@ -21,7 +21,8 @@ public class messageEntity implements Serializable {
     private Long messageId;  // 消息ID
     private Long  senderId ; // 发送者ID
     private String messageContent; // 消息内容
-    private LocalDateTime createdTime; // 假设这是你的字段名
+    private LocalDateTime createTime;// 假设这是你的字段名
+    private Long  messageStatus;
     @TableField("session_id")
     private Long sessionId ; // 会话ID
 }

+ 2 - 3
gig/gig-customer/src/main/java/com/stellvoy/customer/entity/questionEntity.java

@@ -1,6 +1,5 @@
 package com.stellvoy.customer.entity;
 
-import cn.hutool.core.date.DateTime;
 import com.baomidou.mybatisplus.annotation.IdType;
 import com.baomidou.mybatisplus.annotation.TableId;
 import com.baomidou.mybatisplus.annotation.TableName;
@@ -21,6 +20,6 @@ public class questionEntity implements Serializable {
     private Long questionId;
     private String questionContent; // 问题
     private String answerContent; // 回答
-    private LocalDateTime createdTime; // 创建时间
-    private LocalDateTime updatedTime; // 更新时间
+    private LocalDateTime createTime; // 创建时间
+    private LocalDateTime updateTime; // 更新时间
 }

+ 3 - 2
gig/gig-customer/src/main/java/com/stellvoy/customer/entity/sessionEntity.java

@@ -20,11 +20,12 @@ public class sessionEntity implements Serializable {
     @TableId(value = "session_id",type = IdType.AUTO)
     private Long sessionId;
     private Long userId;
-    private LocalDateTime createdTime;
+    private String userName;
+    private LocalDateTime createTime;
 
     private List<messageEntity> messageEntity;
     private List<fileEntity> fileEntity;
-    private List<userEntity> userEntity;
+    private userEntity userEntity;
 
 //    private List<questionEntity> questionEntity;
 }

+ 0 - 1
gig/gig-customer/src/main/java/com/stellvoy/customer/entity/userEntity.java

@@ -2,7 +2,6 @@ package com.stellvoy.customer.entity;
 
 import com.baomidou.mybatisplus.annotation.TableId;
 import com.baomidou.mybatisplus.annotation.TableName;
-import com.stellvoy.common.enums.UserType;
 import lombok.Data;
 import lombok.EqualsAndHashCode;
 import lombok.experimental.Accessors;

+ 0 - 2
gig/gig-customer/src/main/java/com/stellvoy/customer/mapper/sessionMapper.java

@@ -5,7 +5,6 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
 import com.stellvoy.customer.entity.fileEntity;
 import com.stellvoy.customer.entity.messageEntity;
 import com.stellvoy.customer.entity.sessionEntity;
-import com.stellvoy.customer.entity.userEntity;
 import org.apache.ibatis.annotations.Mapper;
 import org.apache.ibatis.annotations.Param;
 
@@ -17,6 +16,5 @@ public interface sessionMapper extends BaseMapper<sessionEntity> {
     sessionEntity findSessionByUserId(@Param("userId") Long userId);
     void insertSession(sessionEntity sessionEntity);
     void insertMessage(messageEntity messageEntity);
-    userEntity getUserById(@Param("userId") Long userId);
     void insertFileData(fileEntity fileEntity);
 }

+ 3 - 3
gig/gig-customer/src/main/java/com/stellvoy/customer/service/serviceImpl/questionServiceImpl.java

@@ -38,14 +38,14 @@ public class questionServiceImpl extends ServiceImpl<questionMapper, questionEnt
                 message.setMessageContent(questionContent);
                 message.setSessionId(sessionId);
                 message.setSenderId(userId);
-                message.setCreatedTime(LocalDateTime.now());
+                message.setCreateTime(LocalDateTime.now());
                 sessionMapper.insertMessage(message);
             }
             if(questions.isEmpty()){
                 message.setSenderId(0L); // 假设系统发送者的ID为0
                 message.setMessageContent("您好!您的问题我们已经收到,团队正在为您耐心解决中。请您稍等片刻,如有任何进展或需要您提供进一步的信息,我们将及时与您联系。感谢您的耐心等待和理解。");
                 message.setSessionId(session.getSessionId());
-                message.setCreatedTime(LocalDateTime.now());
+                message.setCreateTime(LocalDateTime.now());
                 sessionMapper.insertMessage(message);
             }else if(!questions.isEmpty()){
                 for (questionEntity question : questions) {
@@ -53,7 +53,7 @@ public class questionServiceImpl extends ServiceImpl<questionMapper, questionEnt
                 }
                 message.setSessionId(sessionId);
                 message.setSenderId(0L);
-                message.setCreatedTime(LocalDateTime.now());
+                message.setCreateTime(LocalDateTime.now());
                 sessionMapper.insertMessage(message);
             }
         return questions;

+ 14 - 7
gig/gig-customer/src/main/java/com/stellvoy/customer/service/serviceImpl/sessionServiceImpl.java

@@ -1,6 +1,9 @@
 package com.stellvoy.customer.service.serviceImpl;
 
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.stellvoy.api.client.user.UserClient;
+import com.stellvoy.api.dto.user.NewUserDTO;
+import com.stellvoy.api.dto.user.UserDTO;
 import com.stellvoy.customer.entity.*;
 import com.stellvoy.customer.mapper.sessionMapper;
 import com.stellvoy.customer.service.sessionService;
@@ -16,6 +19,8 @@ import java.util.*;
 public class sessionServiceImpl extends ServiceImpl<sessionMapper, sessionEntity> implements sessionService {
     @Autowired
     private sessionMapper sessionMapper;
+    @Autowired
+    private UserClient userClient;
 
     /**
      * 根据用户ID获取会话信息。
@@ -23,7 +28,7 @@ public class sessionServiceImpl extends ServiceImpl<sessionMapper, sessionEntity
      * @param userId 用户ID
      * @return 包含会话信息和消息的Map
      */
-    public Map<String, Object> getSessionByUserId(Long userId) {
+    public Map<String, Object> getSessionByUserId(Long userId,String userName) {
         Map<String, Object> result = new HashMap<>();
 
         try {
@@ -37,7 +42,8 @@ public class sessionServiceImpl extends ServiceImpl<sessionMapper, sessionEntity
                 // 创建一条新的会话记录
                 session = new sessionEntity();
                 session.setUserId(userId);
-                session.setCreatedTime(LocalDateTime.now());
+                session.setUserName(userName);
+                session.setCreateTime(LocalDateTime.now());
                 sessionMapper.insertSession(session);
 
                 // 创建一条新的消息记录
@@ -45,8 +51,9 @@ public class sessionServiceImpl extends ServiceImpl<sessionMapper, sessionEntity
                 messageEntity message = new messageEntity();
                 message.setSenderId(0L); // 假设系统发送者的ID为0
                 message.setMessageContent("亲,请问有什么可以帮到您呢?");
+                message.setMessageStatus(1L);
                 message.setSessionId(session.getSessionId());
-                message.setCreatedTime(LocalDateTime.now());
+                message.setCreateTime(LocalDateTime.now());
                 sessionMapper.insertMessage(message);
 
                 result.put("message", "亲,请问有什么可以帮到您呢?");
@@ -56,9 +63,9 @@ public class sessionServiceImpl extends ServiceImpl<sessionMapper, sessionEntity
                 List<sessionEntity> sessions = sessionMapper.getSessionWithMessagesByUserId(userId);
                 result.put("sessions", sessions);
             }
-            userEntity user = sessionMapper.getUserById(userId);
+            NewUserDTO user = userClient.queryUserById(userId);
             if (user== null) {
-                throw new IllegalArgumentException("用户不存在");
+                throw new IllegalArgumentException("该用户已被禁用");
             }
 
             result.put("user", user);
@@ -99,14 +106,14 @@ public class sessionServiceImpl extends ServiceImpl<sessionMapper, sessionEntity
                 file.setSessionId(sessionId);
                 file.setFilePath(filePath);
                 file.setFileType(fileType);
-                file.setCreatedTime(LocalDateTime.now());
+                file.setCreateTime(LocalDateTime.now());
                 file.setFileName(fileNam);
                 sessionMapper.insertFileData(file);
 
                 message.setMessageContent(fileName);
                 message.setSessionId(sessionId);
                 message.setSenderId(userId);
-                message.setCreatedTime(LocalDateTime.now());
+                message.setCreateTime(LocalDateTime.now());
                 sessionMapper.insertMessage(message);
             }
 

+ 1 - 1
gig/gig-customer/src/main/java/com/stellvoy/customer/service/sessionService.java

@@ -9,7 +9,7 @@ import java.util.Map;
 
 
 public interface sessionService extends IService<sessionEntity> {
-    Map<String, Object> getSessionByUserId(Long userId);
+    Map<String, Object> getSessionByUserId(Long userId,String userName);
 
    List<sessionEntity> getFileByUserId( Long userId,String filePath,Long fileType,String fileName);
 }

+ 2 - 2
gig/gig-customer/src/main/resources/bootstrap-dev.yml

@@ -1,11 +1,11 @@
 spring:
   cloud:
     nacos:
-      server-addr: 127.0.0.1:8848 # nacos注册中心
+      server-addr: 124.223.41.222:8848 # nacos注册中心
       discovery:
         namespace: 13a249cc-69c6-476e-a83f-3c884dcb5b97
         group: DEFAULT_GROUP
-        ip: 127.0.0.1
+        ip: 124.223.41.222
 logging:
   level:
     com.gig: debug

+ 10 - 0
gig/gig-customer/src/main/resources/bootstrap-pro.yml

@@ -0,0 +1,10 @@
+spring:
+  application:
+    name: customer-service
+  cloud:
+    nacos:
+      config:
+        refresh-enabled: true
+        username: nacos
+        password: LableX@nacos
+        server-addr: 124.223.41.222:8848

+ 11 - 11
gig/gig-customer/src/main/resources/bootstrap.yaml

@@ -4,29 +4,29 @@ server:
     uri-encoding: UTF-8   #服务编码
 spring:
   profiles:
-    active: dev
+    active: pro
   application:
     name: customer-service
   cloud:
     nacos:
       config:
         file-extension: yaml
+        server-addr: 124.223.41.222:8848
+        namespace: cdf0ddb0-a036-40d4-ac50-f6a8692e12ce
+        group: DEFAULT_GROUP
         shared-configs: # 共享配置
-          - data-id: shared-spring.yaml # 共享spring配置
-            refresh: false
           - data-id: shared-redis.yaml # 共享redis配置
             refresh: false
-          - data-id: shared-mybatis.yaml # 共享mybatis配置
-            refresh: false
-          - data-id: shared-logs.yaml # 共享日志配置
-            refresh: false
-          - data-id: shared-feign.yaml # 共享feign配置
-            refresh: false
+      discovery:
+        server-addr: 124.223.41.222:8848
+        namespace: cdf0ddb0-a036-40d4-ac50-f6a8692e12ce
+        username: nacos
+        password: LableX@nacos
   datasource:
     driver-class-name: com.mysql.cj.jdbc.Driver
-    url: jdbc:mysql://127.0.0.1:3306/gig-task?useSSL=false&useUnicode=true&characterEncoding=UTF-8&autoReconnect=true&serverTimezone=Asia/Shanghai
+    url: jdbc:mysql://124.223.41.222:3306/gig-customer?useSSL=false&serverTimezone=Asia/Shanghai
     username: root
-    password: 123123
+    password: MyStrongPassword123!
 gig:
   auth:
     resource:

+ 3 - 3
gig/gig-customer/src/main/resources/mapper/TaskService.xml → gig/gig-customer/src/main/resources/mapper/questionMapper.xml

@@ -6,12 +6,12 @@
         <result property="questionId" column="question_id" />
         <result property="questionContent" column="question_content" />
         <result property="answerContent" column="answer_content" />
-        <result property="createdTime" column="created_time" />
-        <result property="updatedTime" column="updated_time" />
+        <result property="createTime" column="create_time" />
+        <result property="updateTime" column="update_time" />
     </resultMap>
 
     <sql id="Base_Column_List">
-        question_id, question_content, answer_content, created_time,updated_time
+        question_id, question_content, answer_content, create_time,update_time
     </sql>
     <!-- 根据用户发送问题模糊匹配对应答案 -->
     <select id="findAnswerByQuestion" resultType="com.stellvoy.customer.entity.questionEntity">

+ 17 - 72
gig/gig-customer/src/main/resources/mapper/sessionMapper.xml

@@ -5,7 +5,8 @@
     <resultMap id="BaseResultMap" type="com.stellvoy.customer.entity.sessionEntity">
         <result column="session_id" property="sessionId" />
         <result column="user_id" property="userId" />
-        <result column="created_time" property="createdTime" />
+        <result column="user_name" property="userName" />
+        <result column="create_time" property="createTime" />
 
         <!-- 处理一对一关系(会话表-用户表) -->
         <association property="userEntity" javaType="com.stellvoy.customer.entity.userEntity">
@@ -29,7 +30,7 @@
             <result property="filePath" column="file_path"/>
             <result property="fileName" column="file_name"/>
             <result property="fileType" column="file_type"/>
-            <result property="createdTime" column="created_time"/>
+            <result property="createTime" column="create_time"/>
         </collection>
         <!-- 处理一对多关系(会话表-消息表) -->
         <collection property="messageEntity" ofType="com.stellvoy.customer.entity.messageEntity">
@@ -37,7 +38,8 @@
             <result property="senderId" column="sender_id"/>
             <result property="sessionId" column="session_id"/>
             <result property="messageContent" column="message_content"/>
-            <result property="createdTime" column="created_time"/>
+            <result property="createTime" column="create_time"/>
+            <result property="messageStatus" column="message_status"/>
         </collection>
     </resultMap>
 
@@ -46,8 +48,8 @@
         <result property="questionId" column="question_id" />
         <result property="questionContent" column="question_content" />
         <result property="answerContent" column="answer_content" />
-        <result property="createdTime" column="created_time" />
-        <result property="updatedTime" column="updated_time" />
+        <result property="createTime" column="create_time" />
+        <result property="updateTime" column="update_time" />
     </resultMap>
 
     <sql id="Base_Column_List">
@@ -61,11 +63,11 @@
     </select>
     <!-- 查询会话表并关联消息表 -->
     <select id="getSessionWithMessagesByUserId" resultMap="BaseResultMap">
-        SELECT s.session_id, s.user_id, s.created_time,
+        SELECT s.session_id, s.user_id, s.create_time,
                f.file_id, f.file_path, f.file_name,
-               f.created_time AS file_created_time,
-               m.message_id, m.sender_id, m.message_content,
-               m.created_time AS message_created_time
+               f.create_time AS file_create_time,
+               m.message_id, m.sender_id, m.message_content,m.message_status,
+               m.create_time AS message_create_time
         FROM session s
                  LEFT JOIN file f ON s.session_id = f.session_id
                  LEFT JOIN message m ON s.session_id = m.session_id
@@ -73,82 +75,25 @@
     </select>
     <!-- 插入会话 -->
     <insert id="insertSession" parameterType="com.stellvoy.customer.entity.sessionEntity">
-        INSERT INTO session (user_id, created_time)
-        VALUES (#{userId}, #{createdTime})
+        INSERT INTO session (user_id,user_name, create_time)
+        VALUES (#{userId},#{userName},#{createTime})
     </insert>
-    <!-- 更新会话 -->
-<!--    <update id="updateSession" parameterType="com.stellvoy.customer.entity.sessionEntity">-->
-<!--        UPDATE session-->
-<!--        SET user_id = #{userId}, created_time = #{createdTime}-->
-<!--        WHERE session_id = #{sessionId}-->
-<!--    </update>-->
-
-    <!-- 删除会话 -->
-<!--    <delete id="deleteSession" parameterType="Long">-->
-<!--        DELETE FROM session WHERE session_id = #{sessionId}-->
-<!--    </delete>-->
 
 <!--    操作消息表-->
     <!-- 插入消息 -->
     <insert id="insertMessage" parameterType="com.stellvoy.customer.entity.messageEntity">
-        INSERT INTO message (sender_id, message_content, session_id, created_time)
-        VALUES (#{senderId}, #{messageContent}, #{sessionId}, #{createdTime})
+        INSERT INTO message (sender_id, message_content, session_id, create_time,message_status)
+        VALUES (#{senderId}, #{messageContent}, #{sessionId}, #{createTime},#{messageStatus})
     </insert>
 
-    <!-- 更新消息 -->
-<!--    <update id="updateMessage" parameterType="com.stellvoy.customer.entity.messageEntity">-->
-<!--        UPDATE message-->
-<!--        SET sender_id = #{senderId}, message_content = #{messageContent}, session_id = #{sessionId}-->
-<!--        WHERE message_id = #{messageId}-->
-<!--    </update>-->
-
-    <!-- 删除消息 -->
-<!--    <delete id="deleteMessage" parameterType="Long">-->
-<!--        DELETE FROM message WHERE message_id = #{messageId}-->
-<!--    </delete>-->
-
     <!--    操作文件表-->
     <!-- 插入文件 -->
     <insert id="insertFileData" parameterType="com.stellvoy.customer.entity.fileEntity">
-        INSERT INTO file (file_id, file_path, file_name, session_id,created_time)
-        VALUES (#{fileId}, #{filePath}, #{fileName}, #{sessionId}, #{createdTime})
+        INSERT INTO file (file_id, file_path, file_name, session_id,create_time)
+        VALUES (#{fileId}, #{filePath}, #{fileName}, #{sessionId}, #{createTime})
     </insert>
 
-    <!-- 查询文件 -->
-<!--    <select id="getFilesBySessionId" resultType="com.stellvoy.customer.entity.fileEntity">-->
-<!--        SELECT * FROM file WHERE session_id = #{sessionId}-->
-<!--    </select>-->
-
-    <!-- 更新文件 -->
-<!--    <update id="updateFileData" parameterType="com.stellvoy.customer.entity.fileEntity">-->
-<!--        UPDATE file-->
-<!--        SET file_path = #{filePath}, file_name = #{fileName}, session_id = #{sessionId}-->
-<!--        WHERE file_id = #{fileId}-->
-<!--    </update>-->
-
-    <!-- 删除文件 -->
-<!--    <delete id="deleteFileData" parameterType="Long">-->
-<!--        DELETE FROM file WHERE file_id = #{fileId}-->
-<!--    </delete>-->
 
 
-    <!--    操作问题表-->
-    <!-- 插入问题 -->
-<!--    <insert id="insertQuestion" parameterType="com.stellvoy.customer.entity.questionEntity">-->
-<!--        INSERT INTO question (question_id, question_text, session_id)-->
-<!--        VALUES (#{questionId}, #{questionText}, #{sessionId})-->
-<!--    </insert>-->
-
-    <!-- 根据用户发送问题模糊匹配对应答案 -->
-<!--    <select id="getQuestionsByContent" resultType="com.stellvoy.customer.entity.fileEntity">-->
-<!--        SELECT * FROM question WHERE question_content like '%'#{questionContent}'%'-->
-<!--    </select>-->
-
-<!--    操作用户表-->
-<!--    查询当前用户用户信息(已激活)-->
-    <select id="getUserById" resultType="com.stellvoy.customer.entity.userEntity">
-        SELECT * FROM user WHERE status = 'NORMAL' AND id = #{userId}
-    </select>
-
 
 </mapper>

+ 0 - 11
gig/gig-gateway/src/main/resources/bootstrap-dev.yml

@@ -1,11 +0,0 @@
-spring:
-  cloud:
-    nacos:
-      server-addr: 127.0.0.1:8848 # nacos注册中心
-      discovery:
-        namespace: 13a249cc-69c6-476e-a83f-3c884dcb5b97
-        group: DEFAULT_GROUP
-        ip: 127.0.0.1
-logging:
-  level:
-    com.gig: debug

+ 10 - 0
gig/gig-gateway/src/main/resources/bootstrap-pro.yaml

@@ -0,0 +1,10 @@
+spring:
+  application:
+    name: gateway-service
+  cloud:
+    nacos:
+      config:
+        refresh-enabled: true
+        username: nacos
+        password: LableX@nacos
+        server-addr: 124.223.41.222:8848

+ 14 - 10
gig/gig-gateway/src/main/resources/bootstrap.yml

@@ -2,22 +2,30 @@ server:
   port: 10010  #端口
   tomcat:
     uri-encoding: UTF-8   #服务编码
+  ssl:
+    key-store: classpath:stellvoy.com.pfx
+    key-store-password: 81kbu88j
+    keyStoreType: PKCS12
 spring:
   profiles:
-    active: dev
+    active: pro
   application:
     name: gateway-service
   cloud:
     nacos:
       config:
         file-extension: yaml
+        server-addr: 124.223.41.222:8848
+        namespace: cdf0ddb0-a036-40d4-ac50-f6a8692e12ce
+        group: DEFAULT_GROUP
         shared-configs: # 共享配置
-          - data-id: shared-spring.yaml # 共享spring配置
-            refresh: false
           - data-id: shared-redis.yaml # 共享redis配置
             refresh: false
-          - data-id: shared-logs.yaml # 共享日志配置
-            refresh: false
+      discovery:
+        server-addr: 124.223.41.222:8848
+        namespace: cdf0ddb0-a036-40d4-ac50-f6a8692e12ce
+        username: nacos
+        password: LableX@nacos
     gateway:
       routes:
         - id: ms
@@ -102,8 +110,4 @@ spring:
               - "OPTIONS"
             allowedHeaders: "*" # 允许在请求中携带的头信息
             allowCredentials: true # 是否允许携带cookie
-            maxAge: 360000 # 这次跨域检测的有效期
-
-logging:
-  level:
-    com.stellvoy: debug
+            maxAge: 360000 # 这次跨域检测的有效期

binární
gig/gig-gateway/src/main/resources/stellvoy.com.pfx


+ 9 - 0
gig/gig-learning/pom.xml

@@ -70,4 +70,13 @@
             <version>1.0.0</version>
         </dependency>
     </dependencies>
+    <build>
+        <finalName>${project.artifactId}</finalName>
+        <plugins>
+            <plugin>
+                <groupId>org.springframework.boot</groupId>
+                <artifactId>spring-boot-maven-plugin</artifactId>
+            </plugin>
+        </plugins>
+    </build>
 </project>

+ 10 - 0
gig/gig-learning/src/main/resources/bootstrap-pro.yml

@@ -0,0 +1,10 @@
+spring:
+  application:
+    name: learning-service
+  cloud:
+    nacos:
+      config:
+        refresh-enabled: true
+        username: nacos
+        password: LableX@nacos
+        server-addr: 124.223.41.222:8848

+ 11 - 11
gig/gig-learning/src/main/resources/bootstrap.yaml

@@ -4,29 +4,29 @@ server:
     uri-encoding: UTF-8   #服务编码
 spring:
   profiles:
-    active: dev
+    active: pro
   application:
     name: learning-service
   cloud:
     nacos:
       config:
         file-extension: yaml
+        server-addr: 124.223.41.222:8848
+        namespace: cdf0ddb0-a036-40d4-ac50-f6a8692e12ce
+        group: DEFAULT_GROUP
         shared-configs: # 共享配置
-          - data-id: shared-spring.yaml # 共享spring配置
-            refresh: false
           - data-id: shared-redis.yaml # 共享redis配置
             refresh: false
-          - data-id: shared-mybatis.yaml # 共享mybatis配置
-            refresh: false
-          - data-id: shared-logs.yaml # 共享日志配置
-            refresh: false
-          - data-id: shared-feign.yaml # 共享feign配置
-            refresh: false
+      discovery:
+        server-addr: 124.223.41.222:8848
+        namespace: cdf0ddb0-a036-40d4-ac50-f6a8692e12ce
+        username: nacos
+        password: LableX@nacos
   datasource:
     driver-class-name: com.mysql.cj.jdbc.Driver
-    url: jdbc:mysql://127.0.0.1:3306/gig-learning?useSSL=false&useUnicode=true&characterEncoding=UTF-8&autoReconnect=true&serverTimezone=Asia/Shanghai
+    url: jdbc:mysql://124.223.41.222:3306/gig-learning?useSSL=false&serverTimezone=Asia/Shanghai
     username: root
-    password: 123123
+    password: MyStrongPassword123!
 gig:
   auth:
     resource:

+ 9 - 0
gig/gig-message/pom.xml

@@ -65,4 +65,13 @@
             <artifactId>aspectjweaver</artifactId>
         </dependency>
     </dependencies>
+    <build>
+        <finalName>${project.artifactId}</finalName>
+        <plugins>
+            <plugin>
+                <groupId>org.springframework.boot</groupId>
+                <artifactId>spring-boot-maven-plugin</artifactId>
+            </plugin>
+        </plugins>
+    </build>
 </project>

+ 10 - 0
gig/gig-message/src/main/resources/bootstrap-pro.yml

@@ -0,0 +1,10 @@
+spring:
+  application:
+    name: message-service
+  cloud:
+    nacos:
+      config:
+        refresh-enabled: true
+        username: nacos
+        password: LableX@nacos
+        server-addr: 124.223.41.222:8848

+ 11 - 11
gig/gig-message/src/main/resources/bootstrap.yaml

@@ -4,29 +4,29 @@ server:
     uri-encoding: UTF-8   #服务编码
 spring:
   profiles:
-    active: dev
+    active: pro
   application:
     name: message-service
   cloud:
     nacos:
       config:
         file-extension: yaml
+        server-addr: 124.223.41.222:8848
+        namespace: cdf0ddb0-a036-40d4-ac50-f6a8692e12ce
+        group: DEFAULT_GROUP
         shared-configs: # 共享配置
-          - data-id: shared-spring.yaml # 共享spring配置
-            refresh: false
           - data-id: shared-redis.yaml # 共享redis配置
             refresh: false
-          - data-id: shared-mybatis.yaml # 共享mybatis配置
-            refresh: false
-          - data-id: shared-logs.yaml # 共享日志配置
-            refresh: false
-          - data-id: shared-feign.yaml # 共享feign配置
-            refresh: false
+      discovery:
+        server-addr: 124.223.41.222:8848
+        namespace: cdf0ddb0-a036-40d4-ac50-f6a8692e12ce
+        username: nacos
+        password: LableX@nacos
   datasource:
     driver-class-name: com.mysql.cj.jdbc.Driver
-    url: jdbc:mysql://127.0.0.1:3306/gig-message?useSSL=false&useUnicode=true&characterEncoding=UTF-8&autoReconnect=true&serverTimezone=Asia/Shanghai
+    url: jdbc:mysql://124.223.41.222:3306/gig-message?useSSL=false&serverTimezone=Asia/Shanghai
     username: root
-    password: 123123
+    password: MyStrongPassword123!
 gig:
   auth:
     resource:

+ 9 - 1
gig/gig-task/pom.xml

@@ -69,5 +69,13 @@
 
 
     </dependencies>
-
+    <build>
+        <finalName>${project.artifactId}</finalName>
+        <plugins>
+            <plugin>
+                <groupId>org.springframework.boot</groupId>
+                <artifactId>spring-boot-maven-plugin</artifactId>
+            </plugin>
+        </plugins>
+    </build>
 </project>

+ 1 - 1
gig/gig-task/src/main/java/com/stellvoy/TaskApplication.java → gig/gig-task/src/main/java/com/stellvoy/task/TaskApplication.java

@@ -1,4 +1,4 @@
-package com.stellvoy;
+package com.stellvoy.task;
 
 import org.mybatis.spring.annotation.MapperScan;
 import org.springframework.boot.SpringApplication;

+ 0 - 2
gig/gig-task/src/main/java/com/stellvoy/task/entity/TaskEntity.java

@@ -26,12 +26,10 @@ public class TaskEntity implements Serializable {
     private String projectCycle; // 项目周期
     private Long createId; // 创建人id
     private String createName; // 创建人姓名
-    private Long labelId; // 标签
     private Long number; // 所需人数
     private Long recruitedNumber; // 已招券人数
     private Long status; // 任务状态:0,库存中;1,已出库;2,已完成
     private String image; // 推送任务显示图
-    private String pdfFile; // 任务要求(pdf,文件格式)
     private Double taskRate; // 任务单价(元/条)
     private String requirementType; // 需求类型
     private LocalDateTime feedBack; // 报名反馈

+ 24 - 0
gig/gig-task/src/main/java/com/stellvoy/task/entity/TaskInsterestEntity.java

@@ -0,0 +1,24 @@
+package com.stellvoy.task.entity;
+
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.experimental.Accessors;
+
+import java.io.Serializable;
+import java.time.LocalDateTime;
+
+@Data
+@EqualsAndHashCode(callSuper = false)
+@Accessors(chain = true)
+@TableName("task_interest")
+public class TaskInsterestEntity implements Serializable {
+    private static final long serialVersionUID = 1L;
+    @TableId(value = "id")
+    private Long id;
+    private Long taskId;
+    private Long userId;
+    private Long interestId;
+    private LocalDateTime createTime;
+}

+ 10 - 0
gig/gig-task/src/main/resources/bootstrap-pro.yml

@@ -0,0 +1,10 @@
+spring:
+  application:
+    name: task-service
+  cloud:
+    nacos:
+      config:
+        refresh-enabled: true
+        username: nacos
+        password: LableX@nacos
+        server-addr: 124.223.41.222:8848

+ 9 - 13
gig/gig-task/src/main/resources/bootstrap.yaml

@@ -4,31 +4,27 @@ server:
     uri-encoding: UTF-8   #服务编码
 spring:
   profiles:
-    active: dev
+    active: pro
   application:
     name: task-service
   cloud:
     nacos:
       config:
         file-extension: yaml
+        group: DEFAULT_GROUP
         shared-configs: # 共享配置
-          - data-id: shared-spring.yaml # 共享spring配置
-            refresh: false
           - data-id: shared-redis.yaml # 共享redis配置
             refresh: false
-          - data-id: shared-mybatis.yaml # 共享mybatis配置
-            refresh: false
-          - data-id: shared-logs.yaml # 共享日志配置
-            refresh: false
-          - data-id: shared-feign.yaml # 共享feign配置
-            refresh: false
+      discovery:
+        server-addr: 124.223.41.222:8848
+        namespace: cdf0ddb0-a036-40d4-ac50-f6a8692e12ce
+        username: nacos
+        password: LableX@nacos
   datasource:
     driver-class-name: com.mysql.cj.jdbc.Driver
-    url: jdbc:mysql://127.0.0.1:3306/gig-task?useSSL=false&useUnicode=true&characterEncoding=UTF-8&autoReconnect=true&serverTimezone=Asia/Shanghai
+    url: jdbc:mysql://124.223.41.222:3306/gig-task?useSSL=false&serverTimezone=Asia/Shanghai
     username: root
-    password: 123123
-mybatis:
-  type-aliases-package: com.stellvoy.task.entity
+    password: MyStrongPassword123!
 gig:
   auth:
     resource:

+ 18 - 22
gig/gig-task/src/main/resources/mapper/TaskMapper.xml

@@ -13,12 +13,10 @@
         <result column="project_cycle" property="projectCycle" />
         <result column="create_id" property="createId" />
         <result column="create_name" property="createName" />
-        <result column="label_id" property="labelId" />
         <result column="number" property="number" />
         <result column="recruited_number" property="recruitedNumber" />
         <result column="status" property="status" />
         <result column="image" property="image" />
-        <result column="pdf_file" property="pdfFile" />
         <result column="task_rate" property="taskRate" />
         <result column="feed_back" property="feedBack" />
         <result column="code" property="code" />
@@ -36,8 +34,8 @@
 
     <sql id="Base_Column_List">
         id, task_name, task_description, create_time, end_time, update_time,
-        project_cycle, create_id, create_name, label_id, number,
-        recruited_number, status, image, pdf_file, task_rate, feed_back, code, application_deadline, total_workload
+        project_cycle, create_id, create_name, number,
+        recruited_number, status, image, task_rate, feed_back, code, application_deadline, total_workload
     </sql>
 
     <!-- 根据获取每个用户的技能列表,并根据技能匹配任务标签,最多推送 8 条数据(状态为 0) -->
@@ -45,24 +43,24 @@
         SELECT *
         FROM (
                  -- 子查询一:根据用户匹配的任务
-                 (SELECT gt.id, gt.task_name, gt.task_description, gt.create_time,gt.begin_time, gt.end_time, gt.update_time,
-                         gt.project_cycle, gt.create_id, gt.create_name, gt.label_id, gt.number,
-                         gt.recruited_number, gt.status, gt.image, gt.pdf_file, gt.task_rate,
+                 (SELECT gt.id, gt.task_name, gt.task_description, gt.create_time, gt.begin_time, gt.end_time, gt.update_time,
+                         gt.project_cycle, gt.create_id, gt.create_name, gt.number,
+                         gt.recruited_number, gt.status, gt.image, gt.task_rate,
                          gt.feed_back, gt.code, gt.application_deadline, gt.total_workload
                   FROM task gt
-                           JOIN label l ON gt.label_id = l.task_id
-                  WHERE l.id IN (
-                      SELECT ul.user_id
-                      FROM user_task ul
-                      WHERE ul.user_id = #{userId} AND gt.status = 0
+                           JOIN task_interest t ON gt.id = t.task_id
+                  WHERE t.interest_id IN (
+                      SELECT ut.user_id
+                      FROM user_task ut
+                      WHERE ut.user_id = #{userId} AND gt.status = 0
                   )
                       LIMIT 4
                  )
                  UNION ALL
                  -- 子查询二:随机选择四个状态为0的任务,但排除已匹配的任务
-                 (SELECT gt.id, gt.task_name, gt.task_description, gt.create_time,gt.begin_time, gt.end_time, gt.update_time,
-                         gt.project_cycle, gt.create_id, gt.create_name, gt.label_id, gt.number,
-                         gt.recruited_number, gt.status, gt.image, gt.pdf_file, gt.task_rate,
+                 (SELECT gt.id, gt.task_name, gt.task_description, gt.create_time, gt.begin_time, gt.end_time, gt.update_time,
+                         gt.project_cycle, gt.create_id, gt.create_name, gt.number,
+                         gt.recruited_number, gt.status, gt.image, gt.task_rate,
                          gt.feed_back, gt.code, gt.application_deadline, gt.total_workload
                   FROM task gt
                   WHERE gt.status = 0
@@ -70,11 +68,11 @@
                       SELECT id FROM (
                                          SELECT gt.id
                                          FROM task gt
-                                                  JOIN label l ON gt.label_id = l.task_id
-                                         WHERE l.id IN (
-                                             SELECT ul.user_id
-                                             FROM user_task ul
-                                             WHERE ul.user_id = #{userId} AND gt.status = 0
+                                                  JOIN task_interest t ON gt.id = t.task_id
+                                         WHERE t.interest_id IN (
+                                             SELECT ut.user_id
+                                             FROM user_task ut
+                                             WHERE ut.user_id = #{userId} AND gt.status = 0
                                          )
                                      ) AS matched_tasks
                   )
@@ -97,12 +95,10 @@
             gt.project_cycle,
             gt.create_id,
             gt.create_name,
-            gt.label_id,
             gt.number,
             gt.recruited_number,
             gt.status,
             gt.image,
-            gt.pdf_file,
             gt.task_rate,
             gt.feed_back,
             gt.code,

+ 4 - 0
gig/gig-user/src/main/java/com/stellvoy/user/domain/po/User.java

@@ -87,4 +87,8 @@ public class User{
      * 简历
      */
     private String resume;
+    /**
+     * 性别
+     */
+    private Integer sex;
 }

+ 0 - 128
gig/gig-user/src/main/java/com/stellvoy/user/domain/po/UserDetail.java

@@ -1,128 +0,0 @@
-package com.stellvoy.user.domain.po;
-
-import com.baomidou.mybatisplus.annotation.IdType;
-import com.baomidou.mybatisplus.annotation.TableField;
-import com.baomidou.mybatisplus.annotation.TableId;
-import com.baomidou.mybatisplus.annotation.TableName;
-import com.stellvoy.common.enums.UserType;
-import lombok.Data;
-
-import java.time.LocalDate;
-import java.time.LocalDateTime;
-
-/**
- * <p>
- * 教师详情表
- * </p>
- */
-@Data
-@TableName("user_detail")
-public class UserDetail {
-    /**
-     * 关联用户id
-     */
-    @TableId(value = "id", type = IdType.NONE)
-    private Long id;
-
-    /**
-     * 用户类型:1-员工, 2-普通学员,3-老师
-     */
-    private UserType type;
-
-    /**
-     * 名字
-     */
-    private String name;
-
-    /**
-     * 性别:0-男性,1-女性
-     */
-    private Integer gender;
-
-    /**
-     * 头像地址
-     */
-    private String icon;
-
-    /**
-     * 邮箱
-     */
-    private String email;
-
-    /**
-     * QQ号码
-     */
-    private String qq;
-
-    /**
-     * 生日
-     */
-    private LocalDate birthday;
-
-    /**
-     * 岗位
-     */
-    private String job;
-
-    /**
-     * 省
-     */
-    private String province;
-
-    /**
-     * 市
-     */
-    private String city;
-
-    /**
-     * 区
-     */
-    private String district;
-
-    /**
-     * 个人介绍
-     */
-    private String intro;
-
-    /**
-     * 形象照地址
-     */
-    private String photo;
-
-    /**
-     * 角色id
-     */
-    private Long roleId;
-
-    /**
-     * 创建时间
-     */
-    private LocalDateTime createTime;
-
-    /**
-     * 更新时间
-     */
-    private LocalDateTime updateTime;
-
-    /**
-     * 创建者id
-     */
-    private Long creater;
-
-    /**
-     * 更新者id
-     */
-    private Long updater;
-
-    /**
-     * 部门id
-     */
-    private Long depId;
-
-    @TableField(exist = false)
-    private String cellPhone;
-    @TableField(exist = false)
-    private String username;
-    @TableField(exist = false)
-    private Integer status;
-}

+ 0 - 38
gig/gig-user/src/main/java/com/stellvoy/user/domain/vo/UserDetailVO.java

@@ -1,38 +0,0 @@
-package com.stellvoy.user.domain.vo;
-
-import lombok.Data;
-
-import java.time.LocalDateTime;
-
-@Data
-//@ApiModel(description = "用户详情")
-public class UserDetailVO {
-//    @ApiModelProperty(value = "用户id", example = "1")
-    private Long id;
-//    @ApiModelProperty(value = "名字", example = "张三")
-    private String name;
-//    @ApiModelProperty(value = "头像", example = "default-icon.jpg")
-    private String icon;
-//    @ApiModelProperty(value = "手机号", example = "13800010004")
-    private String cellPhone;
-//    @ApiModelProperty(value = "用户名", example = "13800010004")
-    private String username;
-//    @ApiModelProperty(value = "邮箱")
-    private String email;
-//    @ApiModelProperty(value = "QQ号码")
-    private String qq;
-//    @ApiModelProperty(value = "个人介绍")
-    private String intro;
-//    @ApiModelProperty(value = "省")
-    private String province;
-//    @ApiModelProperty(value = "市")
-    private String city;
-//    @ApiModelProperty(value = "区")
-    private String district;
-//    @ApiModelProperty(value = "性别:0-男性,1-女性", example = "0")
-    private Integer gender;
-//    @ApiModelProperty(value = "注册时间", example = "2022-07-12")
-    private LocalDateTime createTime;
-//    @ApiModelProperty(value = "角色名称", example = "教师")
-    private String roleName;
-}

+ 0 - 23
gig/gig-user/src/main/java/com/stellvoy/user/mapper/UserDetailMapper.java

@@ -1,23 +0,0 @@
-package com.stellvoy.user.mapper;
-
-import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
-import com.stellvoy.user.domain.po.UserDetail;
-import org.apache.ibatis.annotations.Param;
-
-import java.util.List;
-
-/**
- * <p>
- * 教师详情表 Mapper 接口
- * </p>
- */
-public interface UserDetailMapper extends BaseMapper<UserDetail> {
-
-    UserDetail queryById(Long userId);
-
-    List<UserDetail> queryByIds(List<Long> ids);
-
-    Page<UserDetail> queryByPage(Page<UserDetail> p, @Param("ew") QueryWrapper<UserDetail> wrapper);
-}

+ 0 - 23
gig/gig-user/src/main/java/com/stellvoy/user/service/IUserDetailService.java

@@ -1,23 +0,0 @@
-package com.stellvoy.user.service;
-
-import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
-import com.baomidou.mybatisplus.extension.service.IService;
-import com.stellvoy.common.enums.UserType;
-import com.stellvoy.user.domain.po.UserDetail;
-import com.stellvoy.user.domain.query.UserPageQuery;
-
-import java.util.List;
-
-/**
- * <p>
- * 教师详情表 服务类
- * </p>
- */
-public interface IUserDetailService extends IService<UserDetail> {
-
-    UserDetail queryById(Long userId);
-
-    List<UserDetail> queryByIds(List<Long> ids);
-
-    Page<UserDetail> queryUserDetailByPage(UserPageQuery pageQuery, UserType type);
-}

+ 0 - 16
gig/gig-user/src/main/java/com/stellvoy/user/service/IUserService.java

@@ -2,11 +2,9 @@ package com.stellvoy.user.service;
 
 import com.baomidou.mybatisplus.extension.service.IService;
 import com.stellvoy.api.dto.user.LoginFormDTO;
-import com.stellvoy.api.dto.user.UserDTO;
 import com.stellvoy.common.domain.dto.LoginUserDTO;
 import com.stellvoy.user.domain.dto.*;
 import com.stellvoy.user.domain.po.User;
-import com.stellvoy.user.domain.vo.UserDetailVO;
 
 /**
  * <p>
@@ -16,20 +14,6 @@ import com.stellvoy.user.domain.vo.UserDetailVO;
 public interface IUserService extends IService<User> {
     LoginUserDTO queryUserDetail(LoginFormDTO loginDTO, boolean isStaff);
 
-    void resetPassword(Long userId);
-
-    UserDetailVO myInfo();
-
-    void addUserByPhone(User user, String code);
-
-    void updatePasswordByPhone(String cellPhone, String code, String password);
-
-    Long saveUser(UserDTO userDTO);
-
-    void updateUser(UserDTO userDTO);
-
-    void updateUserWithPassword(UserFormDTO userDTO);
-
     User phoneRegister(UserRegisterDTO dto);
 
     void verifyCode(VerifyCodeDTO dto, Long userId);

+ 0 - 53
gig/gig-user/src/main/java/com/stellvoy/user/service/impl/UserDetailServiceImpl.java

@@ -1,53 +0,0 @@
-package com.stellvoy.user.service.impl;
-
-import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
-import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-import com.stellvoy.common.enums.UserType;
-import com.stellvoy.common.utils.StringUtils;
-import com.stellvoy.user.domain.po.UserDetail;
-import com.stellvoy.user.domain.query.UserPageQuery;
-import com.stellvoy.user.mapper.UserDetailMapper;
-import com.stellvoy.user.service.IUserDetailService;
-import org.springframework.stereotype.Service;
-
-import java.util.List;
-
-/**
- * <p>
- * 教师详情表 服务实现类
- * </p>
- */
-@Service
-public class UserDetailServiceImpl extends ServiceImpl<UserDetailMapper, UserDetail> implements IUserDetailService {
-
-    @Override
-    public UserDetail queryById(Long userId) {
-        return getBaseMapper().queryById(userId);
-    }
-
-    @Override
-    public List<UserDetail> queryByIds(List<Long> ids) {
-        return getBaseMapper().queryByIds(ids);
-    }
-
-    @Override
-    public Page<UserDetail> queryUserDetailByPage(UserPageQuery query, UserType type) {
-        // 1.分页条件
-        Page<UserDetail> p = query.toMpPageDefaultSortByCreateTimeDesc();
-        // 2.搜索条件
-        Integer status = query.getStatus();
-        String name = query.getName();
-        String phone = query.getPhone();
-        QueryWrapper<UserDetail> wrapper = new QueryWrapper<>();
-        wrapper
-                .eq(type != null , "u.type", type)
-                .eq(status != null, "u.status", status)
-                .eq(StringUtils.isNotBlank(phone),"u.cell_phone", phone)
-                .like(StringUtils.isNotBlank(name), "ud.name", name);
-        // 3.查询
-        p = getBaseMapper().queryByPage(p, wrapper);
-        // 4.返回
-        return p;
-    }
-}

+ 38 - 172
gig/gig-user/src/main/java/com/stellvoy/user/service/impl/UserServiceImpl.java

@@ -4,27 +4,20 @@ import cn.hutool.core.util.StrUtil;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.stellvoy.api.client.auth.AuthClient;
 import com.stellvoy.api.client.task.TaskClient;
-import com.stellvoy.api.dto.auth.RoleDTO;
 import com.stellvoy.api.dto.task.NewTaskDTO;
 import com.stellvoy.api.dto.user.LoginFormDTO;
-import com.stellvoy.api.dto.user.UserDTO;
 import com.stellvoy.common.domain.dto.LoginUserDTO;
-import com.stellvoy.common.enums.UserType;
 import com.stellvoy.common.exceptions.BadRequestException;
 import com.stellvoy.common.exceptions.ForbiddenException;
-import com.stellvoy.common.exceptions.UnauthorizedException;
 import com.stellvoy.common.utils.AssertUtils;
 import com.stellvoy.common.utils.BeanUtils;
 import com.stellvoy.common.utils.StringUtils;
 import com.stellvoy.common.utils.UserContext;
 import com.stellvoy.user.domain.dto.*;
 import com.stellvoy.user.domain.po.User;
-import com.stellvoy.user.domain.po.UserDetail;
 import com.stellvoy.user.domain.po.UserTask;
-import com.stellvoy.user.domain.vo.UserDetailVO;
 import com.stellvoy.user.mapper.UserMapper;
 import com.stellvoy.user.service.ICodeService;
-import com.stellvoy.user.service.IUserDetailService;
 import com.stellvoy.user.service.IUserService;
 import com.stellvoy.user.service.UserTaskService;
 import com.stellvoy.user.utils.AliyunIdCardVerifier;
@@ -32,16 +25,15 @@ import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.data.redis.core.StringRedisTemplate;
 import org.springframework.security.crypto.password.PasswordEncoder;
 import org.springframework.stereotype.Service;
-import org.springframework.transaction.annotation.Transactional;
+
 
 import java.time.LocalDateTime;
-import java.time.Month;
+import java.util.ArrayList;
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
 import java.util.stream.Collectors;
 
-import static com.stellvoy.user.constants.UserConstants.*;
 import static com.stellvoy.user.constants.UserErrorInfo.Msg.*;
 
 
@@ -54,14 +46,8 @@ import static com.stellvoy.user.constants.UserErrorInfo.Msg.*;
 public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements IUserService {
 
     @Autowired
-    private PasswordEncoder passwordEncoder;
-    @Autowired
     private ICodeService codeService;
     @Autowired
-    private AuthClient authClient;
-    @Autowired
-    private IUserDetailService detailService;
-    @Autowired
     private AliyunIdCardVerifier aliyunIdCardVerifier;
     @Autowired
     private StringRedisTemplate stringRedisTemplate;
@@ -93,157 +79,6 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements IU
         return userDTO;
     }
 
-    @Override
-    public void resetPassword(Long userId) {
-        User user = new User();
-        user.setId(userId);
-        user.setPassword(passwordEncoder.encode(DEFAULT_PASSWORD));
-        AssertUtils.isTrue(updateById(user), USER_ID_NOT_EXISTS);
-    }
-
-    @Override
-    public UserDetailVO myInfo() {
-        // 1.获取登录用户id
-        Long userId = UserContext.getUser();
-        if (userId == null) {
-            return null;
-        }
-        // 2.查询用户
-        UserDetail userDetail = detailService.queryById(userId);
-        AssertUtils.isNotNull(userDetail, USER_ID_NOT_EXISTS);
-        // 3.封装vo
-        UserType type = userDetail.getType();
-        // 3.1.基本信息
-        UserDetailVO vo = BeanUtils.toBean(userDetail, UserDetailVO.class);
-        // 3.2.详情信息
-        switch (type) {
-            case STAFF:
-                RoleDTO roleDTO = authClient.queryRoleById(userDetail.getRoleId());
-                vo.setRoleName(roleDTO == null ? "" : roleDTO.getName());
-                break;
-            case STUDENT:
-                vo.setRoleName(STUDENT_ROLE_NAME);
-                break;
-            case TEACHER:
-                vo.setRoleName(TEACHER_ROLE_NAME);
-                break;
-            default:
-                break;
-        }
-        return vo;
-    }
-
-    @Override
-    public void addUserByPhone(User user, String code) {
-        // 1.验证码校验
-        codeService.verifyCode(user.getCellPhone(), code);
-        // 2.判断手机号是否存在
-        Long count = lambdaQuery().eq(User::getCellPhone, user.getCellPhone()).count();
-        if (count > 0) {
-            throw new BadRequestException(PHONE_ALREADY_EXISTS);
-        }
-        // 3.加密密码
-        user.setPassword(passwordEncoder.encode(user.getPassword()));
-        // 4.新增
-        user.setUsername(user.getCellPhone());
-        save(user);
-    }
-
-    @Override
-    public void updatePasswordByPhone(String cellPhone, String code, String password) {
-        // 1.验证码校验
-        codeService.verifyCode(cellPhone, code);
-        // 2.查询用户
-        User oldUser = lambdaQuery().eq(User::getCellPhone, cellPhone).one();
-        if (oldUser == null) {
-            // 手机号不存在
-            throw new BadRequestException(PHONE_NOT_EXISTS);
-        }
-        // 2.修改密码
-        User user = new User();
-        user.setId(user.getId());
-        user.setPassword(passwordEncoder.encode(password));
-        updateById(user);
-    }
-
-    public void updatePhoneById(Long id, String cellPhone) {
-        // 1.1.判断是否需要修改手机号
-        if (StringUtils.isNotBlank(cellPhone)) {
-            // 1.2.需要修改,封装数据
-            User user = new User();
-            user.setId(id);
-            user.setUsername(cellPhone);
-            user.setCellPhone(cellPhone);
-            // 1.3.修改
-            updateById(user);
-        }
-    }
-
-    @Override
-    @Transactional
-    public Long saveUser(UserDTO userDTO) {
-        // 1.保存用户基本信息
-        User user = new User();
-        user.setPassword(passwordEncoder.encode(DEFAULT_PASSWORD));
-        user.setCellPhone(userDTO.getCellPhone());
-        user.setUsername(userDTO.getCellPhone());
-        save(user);
-        // 2.新增详情
-        UserDetail detail = BeanUtils.toBean(userDTO, UserDetail.class);
-        detail.setId(user.getId());
-        detailService.save(detail);
-        return user.getId();
-    }
-
-    @Override
-    @Transactional
-    public void updateUser(UserDTO userDTO) {
-        // 1.如果传递了手机号,则修改手机号
-        String cellphone = userDTO.getCellPhone();
-        if(StringUtils.isNotBlank(cellphone)){
-            User user = new User();
-            user.setId(userDTO.getId());
-            user.setCellPhone(cellphone);
-            user.setUsername(cellphone);
-            updateById(user);
-        }
-        // 2.修改详情
-        UserDetail detail = BeanUtils.toBean(userDTO, UserDetail.class);
-        detail.setType(null);
-        detailService.updateById(detail);
-    }
-
-    @Override
-    public void updateUserWithPassword(UserFormDTO userDTO) {
-        // 1.尝试更新密码
-        String pw = userDTO.getPassword();
-        String oldPw = userDTO.getOldPassword();
-        if(StringUtils.isNotBlank(pw) && StringUtils.isNotBlank(pw)) {
-            Long userId = UserContext.getUser();
-            // 1.1.查询用户
-            User user = getById(userId);
-            // 1.2.校验
-            if (user == null) {
-                throw new UnauthorizedException(USER_ID_NOT_EXISTS);
-            }
-            // 1.3.校验密码
-            if (!passwordEncoder.matches(oldPw, user.getPassword())) {
-                // 密码不一致
-                throw new UnauthorizedException(INVALID_UN_OR_PW);
-            }
-            // 1.4.修改密码
-            user = new User();
-            user.setId(userId);
-            user.setPassword(passwordEncoder.encode(pw));
-            updateById(user);
-        }
-        // 2.更新用户详情
-        UserDetail detail = BeanUtils.toBean(userDTO, UserDetail.class);
-        detail.setRoleId(null);
-        detail.setType(null);
-        detailService.updateById(detail);
-    }
-
     /**
      * 手机号注册
      */
@@ -263,6 +98,8 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements IU
         user.setUpdateTime(LocalDateTime.now());
         user.setCreater(UserContext.getUser());
         user.setUpdater(UserContext.getUser());
+        user.setUsername(dto.getCellPhone());
+        user.setImage("https://suppliermanage.oss-cn-shanghai.aliyuncs.com/gig/img/woman.png");
         save(user);
         return user;
     }
@@ -279,12 +116,23 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements IU
         } else {
             throw new RuntimeException("身份证号码不能为空");
         }
+        int sex = 0;
+        String image = "https://suppliermanage.oss-cn-shanghai.aliyuncs.com/gig/img/woman.png";
+        if(!sex(dto.getIdentityCardId())){
+            sex = 1;
+            image = "https://suppliermanage.oss-cn-shanghai.aliyuncs.com/gig/img/man.png";
+        }
         lambdaUpdate()
                 .eq(User::getId, userId)
                 .set(User::getIdentityCardId, dto.getIdentityCardId())
+                .set(User::getSex, sex)
+                .set(User::getImage, image)
                 .update();
     }
-
+    private boolean sex(String getIdentityCardId) {
+        char[] charArray = getIdentityCardId.toCharArray();
+        return charArray[16] % 2 == 0;
+    }
     /**
      * 修改登录密码
      */
@@ -325,6 +173,12 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements IU
      */
     public UserTaskDTO getStats(Long userId) {
         List<UserTask> userTaskList = userTaskService.lambdaQuery().eq(UserTask::getUserId, userId).list();
+
+        // 检查 userTaskList 是否为空
+        if (userTaskList == null || userTaskList.isEmpty()) {
+            return new UserTaskDTO();
+        }
+
         UserTaskDTO userTaskDTO = new UserTaskDTO();
         userTaskDTO.setOngoingTasks(0);
         userTaskDTO.setSettledTasks(0);
@@ -358,13 +212,25 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements IU
                 .filter(userTask -> userTask.getTaskStatus() == 3)
                 .map(UserTask::getTaskId)
                 .collect(Collectors.toList());
+
+        // 检查 ids 是否为空
+        if (ids.isEmpty()) {
+            userTaskDTO.setTaskDetails(new ArrayList<>());
+            return userTaskDTO;
+        }
+
         List<NewTaskDTO> newTaskDTOS = taskClient.queryTaskById(ids);
-        List<TaskDetail> taskDetails = BeanUtils.copyList(newTaskDTOS, TaskDetail.class);
-        userTaskDTO.setTaskDetails(taskDetails);
-        return userTaskDTO;
-    }
 
+        // 检查 newTaskDTOS 是否为空
+        if (newTaskDTOS == null || newTaskDTOS.isEmpty()) {
+            userTaskDTO.setTaskDetails(new ArrayList<>());
+        } else {
+            List<TaskDetail> taskDetails = BeanUtils.copyList(newTaskDTOS, TaskDetail.class);
+            userTaskDTO.setTaskDetails(taskDetails);
+        }
 
+        return userTaskDTO;
+    }
 
     public User loginByPw(LoginFormDTO loginDTO) {
         // 1.数据校验

+ 2 - 2
gig/gig-user/src/main/resources/bootstrap-local.yml

@@ -1,11 +1,11 @@
 spring:
   cloud:
     nacos:
-      server-addr: 127.0.0.1:8848 # nacos注册中心
+      server-addr: 124.223.41.222:8848 # nacos注册中心
       discovery:
         namespace: 13a249cc-69c6-476e-a83f-3c884dcb5b97
         group: DEFAULT_GROUP
-        ip: 127.0.0.1
+        ip: 124.223.41.222
 logging:
   level:
     com.gig: debug

+ 10 - 0
gig/gig-user/src/main/resources/bootstrap-pro.yml

@@ -0,0 +1,10 @@
+spring:
+  application:
+    name: user-service
+  cloud:
+    nacos:
+      config:
+        refresh-enabled: true
+        username: nacos
+        password: LableX@nacos
+        server-addr: 124.223.41.222:8848

+ 0 - 11
gig/gig-user/src/main/resources/bootstrap-public.yml

@@ -1,11 +0,0 @@
-spring:
-  cloud:
-    nacos:
-      server-addr: 124.223.41.222:8848 # nacos注册中心
-      discovery:
-        namespace: 13a249cc-69c6-476e-a83f-3c884dcb5b97
-        group: DEFAULT_GROUP
-        ip: 127.0.0.1
-logging:
-  level:
-    com.gig: error

+ 12 - 11
gig/gig-user/src/main/resources/bootstrap.yaml

@@ -4,29 +4,30 @@ server:
     uri-encoding: UTF-8   #服务编码
 spring:
   profiles:
-    active: local
+    active: pro
   application:
     name: user-service
   cloud:
     nacos:
       config:
         file-extension: yaml
+        server-addr: 124.223.41.222:8848
+        namespace: cdf0ddb0-a036-40d4-ac50-f6a8692e12ce
+        group: DEFAULT_GROUP
         shared-configs: # 共享配置
-          - data-id: shared-spring.yaml # 共享spring配置
-            refresh: false
           - data-id: shared-redis.yaml # 共享redis配置
             refresh: false
-          - data-id: shared-mybatis.yaml # 共享mybatis配置
-            refresh: false
-          - data-id: shared-logs.yaml # 共享日志配置
-            refresh: false
-          - data-id: shared-feign.yaml # 共享feign配置
-            refresh: false
+      discovery:
+        server-addr: 124.223.41.222:8848
+        namespace: cdf0ddb0-a036-40d4-ac50-f6a8692e12ce
+        username: nacos
+        password: LableX@nacos
   datasource:
     driver-class-name: com.mysql.cj.jdbc.Driver
-    url: jdbc:mysql://127.0.0.1:3306/gig-user?useSSL=false&useUnicode=true&characterEncoding=UTF-8&autoReconnect=true&serverTimezone=Asia/Shanghai
+    url: jdbc:mysql://124.223.41.222:3306/gig-user?useSSL=false&serverTimezone=Asia/Shanghai
     username: root
-    password: 123123
+    password: MyStrongPassword123!
+
 gig:
   auth:
     resource:

+ 0 - 16
gig/gig-user/src/main/resources/mapper/TaskService.xml

@@ -1,16 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-<mapper namespace="com.stellvoy.user.mapper.UserMapper">
-
-    <!-- 通用查询映射结果 -->
-    <resultMap id="BaseResultMap" type="com.stellvoy.user.domain.po.User">
-        <id column="id" property="id" />
-        <result column="username" property="username" />
-        <result column="cell_phone" property="cellPhone" />
-        <result column="password" property="password" />
-        <result column="status" property="status" />
-        <result column="create_time" property="createTime" />
-        <result column="update_time" property="updateTime" />
-        <result column="type" property="type" />
-    </resultMap>
-</mapper>

+ 0 - 32
gig/gig-user/src/main/resources/mapper/UserDetailMapper.xml

@@ -1,32 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-<mapper namespace="com.stellvoy.user.mapper.UserDetailMapper">
-
-    <select id="queryById" resultType="com.stellvoy.user.domain.po.UserDetail">
-        SELECT u.cell_phone, u.status, u.create_time, u.update_time, u.creater, u.updater,
-               u.id, u.username, ud.type, ud.name, ud.gender, ud.icon, ud.email, ud.qq, ud.birthday,
-               ud.job, ud.province, ud.city, ud.district, ud.intro, ud.photo, ud.role_id
-        FROM `user` u
-                 LEFT JOIN user_detail ud ON u.id = ud.id
-        WHERE u.id = #{userId}
-    </select>
-    <select id="queryByIds" resultType="com.stellvoy.user.domain.po.UserDetail">
-        SELECT u.cell_phone, u.status, u.create_time, u.update_time, u.creater, u.updater,
-               u.id, u.username, ud.type, ud.name, ud.gender, ud.icon, ud.email, ud.qq, ud.birthday,
-               ud.job, ud.province, ud.city, ud.district, ud.intro, ud.photo, ud.role_id
-        FROM `user` u
-                 LEFT JOIN user_detail ud ON u.id = ud.id
-        WHERE u.id
-        <foreach collection="ids" separator="," item="id" open="in (" close=")">
-            #{id}
-        </foreach>
-    </select>
-    <select id="queryByPage" resultType="com.stellvoy.user.domain.po.UserDetail">
-        SELECT u.cell_phone, u.status, u.create_time, u.update_time, u.creater, u.updater,
-               u.id, u.username, ud.type, ud.name, ud.gender, ud.icon, ud.email, ud.qq, ud.birthday,
-               ud.job, ud.province, ud.city, ud.district, ud.intro, ud.photo, ud.role_id
-        FROM `user` u
-                 LEFT JOIN user_detail ud ON u.id = ud.id
-        ${ew.customSqlSegment}
-    </select>
-</mapper>