chenxiaofei 7 цаг өмнө
parent
commit
a446632ba2

+ 5 - 0
sckw-modules/sckw-system/src/main/java/com/sckw/system/model/vo/res/LoginResVo.java

@@ -54,6 +54,11 @@ public class LoginResVo implements Serializable {
     @Schema(description = "头像URL", example = "https://example.com/avatar.jpg")
     private String photo;
 
+    /**
+     * 角色ID
+     */
+    @Schema(description = "角色ID", example = "1")
+    private Long roleId;
     /**
      * 角色名称
      */

+ 0 - 1
sckw-modules/sckw-system/src/main/java/com/sckw/system/model/vo/res/MaterialsResVo.java

@@ -29,7 +29,6 @@ public class MaterialsResVo implements Serializable {
     /**
      * 雪花ID
      */
-    @JsonSerialize(using = LongToStringUtils.class)
     @Schema(description = "雪花ID")
     private Long id;
 

+ 9 - 5
sckw-modules/sckw-system/src/main/java/com/sckw/system/model/vo/res/SysArticlesResVo.java

@@ -1,8 +1,10 @@
 package com.sckw.system.model.vo.res;
 
+import com.baomidou.mybatisplus.annotation.TableId;
 import com.fasterxml.jackson.annotation.JsonFormat;
 import com.fasterxml.jackson.databind.annotation.JsonSerialize;
 import com.sckw.core.utils.LongToStringUtils;
+import io.swagger.v3.oas.annotations.media.Schema;
 import lombok.AllArgsConstructor;
 import lombok.Builder;
 import lombok.Data;
@@ -21,6 +23,7 @@ import java.util.Date;
 @Builder
 @AllArgsConstructor
 @NoArgsConstructor
+@Schema(description = "系统内容配置返回对象")
 public class SysArticlesResVo implements Serializable {
 
     @Serial
@@ -29,37 +32,38 @@ public class SysArticlesResVo implements Serializable {
     /**
      * 雪花ID
      */
+    @Schema(description = "雪花ID", example = "1234567890123456789")
     private Long id;
 
     /**
      * 条款唯一标识 (如: REG_AGREEMENT, PRIVACY_POLICY)
      */
+    @Schema(description = "条款唯一标识,例如: REG_AGREEMENT、PRIVACY_POLICY", example = "REG_AGREEMENT")
     private String articleKey;
 
     /**
      * 条款标题
      */
+    @Schema(description = "条款标题", example = "用户注册协议")
     private String title;
 
     /**
      * 条款详细内容 (富文本/HTML)
      */
+    @Schema(description = "条款详细内容,富文本或HTML格式")
     private String content;
 
     /**
      * 版本号
      */
+    @Schema(description = "版本号", example = "v1.0")
     private String version;
 
     /**
      * 更新时间
      */
     @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+    @Schema(description = "更新时间,格式:yyyy-MM-dd HH:mm:ss", example = "2026-01-07 12:34:56")
     private Date updatedAt;
 
 }
-
-
-
-
-

+ 2 - 6
sckw-modules/sckw-system/src/main/java/com/sckw/system/service/KwsUserService.java

@@ -919,15 +919,10 @@ public class KwsUserService {
         if (Objects.isNull(kwsUser)) {
             throw new SystemException(HttpStatus.QUERY_FAIL_CODE, "账号不存在");
         }
-
-        // 2. 检查用户状态
-        if (kwsUser.getDelFlag() != Global.NO) {
-            throw new SystemException(HttpStatus.QUERY_FAIL_CODE, "账号已删除");
-        }
         if (kwsUser.getStatus() != null && kwsUser.getStatus() == Global.YES) {
             throw new SystemException(HttpStatus.CODE_10301, "账号已被锁定");
         }
-
+        password= PasswordUtils.md5(password);
         // 3. 校验密码
         checkPassword(account, password, kwsUser.getPassword(), kwsUser.getSalt());
 
@@ -975,6 +970,7 @@ public class KwsUserService {
                 .account(kwsUser.getAccount())
                 .phone(kwsUser.getPhone())
                 .photo(kwsUser.getPhoto())
+                .roleId(roleId)
                 .roleName(roleName)
                 .systemType(kwsUser.getSystemType())
                 .build();