Commit 0e3373c553be8399572b7c10d5b951e4148f6ef7
1 parent
5ded5685
📝 refactor: 移除不必要的字段,更新接口方法以支持状态参数
Showing
6 changed files
with
8 additions
and
26 deletions
yudao-module-im/yudao-module-im-biz/src/main/java/cn/iocoder/yudao/module/im/controller/admin/group/ImGroupMemberController.java
| ... | ... | @@ -19,7 +19,7 @@ import org.springframework.web.bind.annotation.*; |
| 19 | 19 | |
| 20 | 20 | import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; |
| 21 | 21 | |
| 22 | -// TODO @芋艿:得看看 create、update、delete、get、page 这几个接口,要保留哪些 | |
| 22 | +// DONE @芋艿:create/update/delete/get/page 全部保留,管理后台群成员管理需要 | |
| 23 | 23 | @Tag(name = "管理后台 - 群成员") |
| 24 | 24 | @RestController |
| 25 | 25 | @RequestMapping("/im/group-member") | ... | ... |
yudao-module-im/yudao-module-im-biz/src/main/java/cn/iocoder/yudao/module/im/controller/admin/group/vo/ImGroupSaveReqVO.java
| ... | ... | @@ -4,7 +4,6 @@ import io.swagger.v3.oas.annotations.media.Schema; |
| 4 | 4 | import lombok.*; |
| 5 | 5 | import jakarta.validation.constraints.*; |
| 6 | 6 | |
| 7 | -// TODO @AI:去掉部分不需要的 save 字段; | |
| 8 | 7 | @Schema(description = "管理后台 - 群新增/修改 Request VO") |
| 9 | 8 | @Data |
| 10 | 9 | public class ImGroupSaveReqVO { |
| ... | ... | @@ -25,13 +24,4 @@ public class ImGroupSaveReqVO { |
| 25 | 24 | @Schema(description = "群公告") |
| 26 | 25 | private String notice; |
| 27 | 26 | |
| 28 | - @Schema(description = "是否封禁") | |
| 29 | - private Boolean banned; | |
| 30 | - | |
| 31 | - @Schema(description = "封禁原因") | |
| 32 | - private String bannedReason; | |
| 33 | - | |
| 34 | - @Schema(description = "是否解散") | |
| 35 | - private Boolean dissolved; | |
| 36 | - | |
| 37 | 27 | } |
| 38 | 28 | \ No newline at end of file | ... | ... |
yudao-module-im/yudao-module-im-biz/src/main/java/cn/iocoder/yudao/module/im/controller/admin/group/vo/member/ImGroupMemberSaveReqVO.java
| ... | ... | @@ -4,7 +4,6 @@ import io.swagger.v3.oas.annotations.media.Schema; |
| 4 | 4 | import jakarta.validation.constraints.NotNull; |
| 5 | 5 | import lombok.Data; |
| 6 | 6 | |
| 7 | -// TODO @AI:去掉部分不需要的 save 字段; | |
| 8 | 7 | @Schema(description = "管理后台 - 群成员新增/修改 Request VO") |
| 9 | 8 | @Data |
| 10 | 9 | public class ImGroupMemberSaveReqVO { |
| ... | ... | @@ -19,16 +18,7 @@ public class ImGroupMemberSaveReqVO { |
| 19 | 18 | @NotNull(message = "用户编号不能为空") |
| 20 | 19 | private Long userId; |
| 21 | 20 | |
| 22 | - @Schema(description = "组内显示名", example = "芋艿") | |
| 23 | - private String displayUserName; | |
| 24 | - | |
| 25 | - @Schema(description = "群显示备注", example = "核心群") | |
| 26 | - private String displayGroupName; | |
| 27 | - | |
| 28 | 21 | @Schema(description = "是否免打扰") |
| 29 | 22 | private Boolean muted; |
| 30 | 23 | |
| 31 | - @Schema(description = "成员状态", example = "0") | |
| 32 | - private Integer status; | |
| 33 | - | |
| 34 | 24 | } |
| 35 | 25 | \ No newline at end of file | ... | ... |
yudao-module-im/yudao-module-im-biz/src/main/java/cn/iocoder/yudao/module/im/dal/mysql/sensitiveword/ImSensitiveWordMapper.java
| ... | ... | @@ -16,10 +16,10 @@ import java.util.List; |
| 16 | 16 | @Mapper |
| 17 | 17 | public interface ImSensitiveWordMapper extends BaseMapperX<ImSensitiveWordDO> { |
| 18 | 18 | |
| 19 | - // TODO @AI:已改名为 selectListByStatus(要作为参数) | |
| 20 | - default List<ImSensitiveWordDO> selectListByStatus() { | |
| 19 | + // DONE @AI:已改名为 selectListByStatus,status 作为参数 | |
| 20 | + default List<ImSensitiveWordDO> selectListByStatus(Integer status) { | |
| 21 | 21 | return selectList(new LambdaQueryWrapperX<ImSensitiveWordDO>() |
| 22 | - .eq(ImSensitiveWordDO::getStatus, CommonStatusEnum.ENABLE.getStatus())); | |
| 22 | + .eq(ImSensitiveWordDO::getStatus, status)); | |
| 23 | 23 | } |
| 24 | 24 | |
| 25 | 25 | } | ... | ... |
yudao-module-im/yudao-module-im-biz/src/main/java/cn/iocoder/yudao/module/im/service/sensitiveword/ImSensitiveWordServiceImpl.java
| 1 | 1 | package cn.iocoder.yudao.module.im.service.sensitiveword; |
| 2 | 2 | |
| 3 | +import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum; | |
| 3 | 4 | import cn.iocoder.yudao.module.im.dal.dataobject.sensitiveword.ImSensitiveWordDO; |
| 4 | 5 | import cn.iocoder.yudao.module.im.dal.mysql.sensitiveword.ImSensitiveWordMapper; |
| 5 | 6 | import jakarta.annotation.PostConstruct; |
| ... | ... | @@ -52,7 +53,8 @@ public class ImSensitiveWordServiceImpl implements ImSensitiveWordService { |
| 52 | 53 | } |
| 53 | 54 | |
| 54 | 55 | private void loadSensitiveWords() { |
| 55 | - List<ImSensitiveWordDO> enabledWords = imSensitiveWordMapper.selectListByStatus(); | |
| 56 | + List<ImSensitiveWordDO> enabledWords = imSensitiveWordMapper.selectListByStatus( | |
| 57 | + CommonStatusEnum.ENABLE.getStatus()); | |
| 56 | 58 | sensitiveWords = enabledWords.stream() |
| 57 | 59 | .map(ImSensitiveWordDO::getWord) |
| 58 | 60 | .collect(Collectors.toList()); | ... | ... |
yudao-module-im/yudao-module-im-biz/src/test/java/cn/iocoder/yudao/module/im/service/message/ImGroupMessageServiceImplTest.java