1. 统一包名修改
This commit is contained in:
19
zt-module-system/zt-module-system-server/Dockerfile
Normal file
19
zt-module-system/zt-module-system-server/Dockerfile
Normal file
@@ -0,0 +1,19 @@
|
||||
## AdoptOpenJDK 停止发布 OpenJDK 二进制,而 Eclipse Temurin 是它的延伸,提供更好的稳定性
|
||||
|
||||
FROM 172.16.46.66:10043/base-service/eclipse-temurin:21-jre
|
||||
|
||||
## 创建目录,并使用它作为工作目录
|
||||
RUN mkdir -p /cloud-module-system-server
|
||||
WORKDIR /cloud-module-system-server
|
||||
## 将后端项目的 Jar 文件,复制到镜像中
|
||||
COPY ./target/cloud-module-system-server.jar app.jar
|
||||
|
||||
## 设置 TZ 时区
|
||||
## 设置 JAVA_OPTS 环境变量,可通过 docker run -e "JAVA_OPTS=" 进行覆盖
|
||||
ENV TZ=Asia/Shanghai JAVA_OPTS="-Xms512m -Xmx512m"
|
||||
|
||||
## 暴露后端项目的 48080 端口
|
||||
EXPOSE 48081
|
||||
|
||||
## 启动后端项目
|
||||
CMD java ${JAVA_OPTS} -Djava.security.egd=file:/dev/./urandom -jar app.jar
|
||||
193
zt-module-system/zt-module-system-server/pom.xml
Normal file
193
zt-module-system/zt-module-system-server/pom.xml
Normal file
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,30 @@
|
||||
package com.zt.plat.module.system;
|
||||
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
|
||||
/**
|
||||
* 项目的启动类
|
||||
*
|
||||
* 如果你碰到启动的问题,请认真阅读 http://172.16.46.63:30888/quick-start/ 文章
|
||||
* 如果你碰到启动的问题,请认真阅读 http://172.16.46.63:30888/quick-start/ 文章
|
||||
* 如果你碰到启动的问题,请认真阅读 http://172.16.46.63:30888/quick-start/ 文章
|
||||
*
|
||||
* @author ZT
|
||||
*/
|
||||
@SpringBootApplication
|
||||
public class SystemServerApplication {
|
||||
|
||||
public static void main(String[] args) {
|
||||
// 如果你碰到启动的问题,请认真阅读 http://172.16.46.63:30888/quick-start/ 文章
|
||||
// 如果你碰到 启动的问题,请认真阅读 http://172.16.46.63:30888/quick-start/ 文章
|
||||
// 如果你碰到启动的问题,请认真阅读 http://172.16.46.63:30888/quick-start/ 文章
|
||||
|
||||
SpringApplication.run(SystemServerApplication.class, args);
|
||||
|
||||
// 如果你碰到启动的问题,请认真阅读 http://172.16.46.63:30888/quick-start/ 文章
|
||||
// 如果你碰到启动的问题,请认真阅读 http://172.16.46.63:30888/quick-start/ 文章
|
||||
// 如果你碰到启动的问题,请认真阅读 http://172.16.46.63:30888/quick-start/ 文章
|
||||
}
|
||||
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,75 @@
|
||||
package com.zt.plat.module.system.api.dept;
|
||||
|
||||
import com.zt.plat.framework.common.enums.CommonStatusEnum;
|
||||
import com.zt.plat.framework.common.pojo.CommonResult;
|
||||
import com.zt.plat.framework.common.util.object.BeanUtils;
|
||||
import com.zt.plat.module.system.api.dept.dto.PostRespDTO;
|
||||
import com.zt.plat.module.system.api.dept.dto.PostSaveReqDTO;
|
||||
import com.zt.plat.module.system.api.dept.dto.PostSimpleRespDTO;
|
||||
import com.zt.plat.module.system.controller.admin.dept.vo.post.PostSaveReqVO;
|
||||
import com.zt.plat.module.system.dal.dataobject.dept.PostDO;
|
||||
import com.zt.plat.module.system.service.dept.PostService;
|
||||
import jakarta.annotation.Resource;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
import java.util.Comparator;
|
||||
import java.util.List;
|
||||
|
||||
import static com.zt.plat.framework.common.pojo.CommonResult.success;
|
||||
|
||||
@RestController // 提供 RESTful API 接口,给 Feign 调用
|
||||
@Validated
|
||||
public class PostApiImpl implements PostApi {
|
||||
|
||||
@Resource
|
||||
private PostService postService;
|
||||
|
||||
@Override
|
||||
public CommonResult<Long> createPost(PostSaveReqDTO createReqVO) {
|
||||
PostSaveReqVO reqVO = BeanUtils.toBean(createReqVO, PostSaveReqVO.class);
|
||||
Long postId = postService.createPost(reqVO);
|
||||
return success(postId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public CommonResult<Boolean> updatePost(PostSaveReqDTO updateReqVO) {
|
||||
PostSaveReqVO reqVO = BeanUtils.toBean(updateReqVO, PostSaveReqVO.class);
|
||||
postService.updatePost(reqVO);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@Override
|
||||
public CommonResult<Boolean> deletePost(Long id) {
|
||||
postService.deletePost(id);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@Override
|
||||
public CommonResult<PostRespDTO> getPost(Long id) {
|
||||
PostDO post = postService.getPost(id);
|
||||
return success(BeanUtils.toBean(post, PostRespDTO.class));
|
||||
}
|
||||
|
||||
@Override
|
||||
public CommonResult<List<PostSimpleRespDTO>> getSimplePostList() {
|
||||
List<PostDO> posts = postService.getPostList(null, Collections.singleton(CommonStatusEnum.ENABLE.getStatus()));
|
||||
posts.sort(Comparator.comparing(PostDO::getSort));
|
||||
return success(BeanUtils.toBean(posts, PostSimpleRespDTO.class));
|
||||
}
|
||||
|
||||
@Override
|
||||
public CommonResult<Boolean> validPostList(Collection<Long> ids) {
|
||||
postService.validatePostList(ids);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@Override
|
||||
public CommonResult<List<PostRespDTO>> getPostList(Collection<Long> ids) {
|
||||
List<PostDO> list = postService.getPostList(ids);
|
||||
return success(BeanUtils.toBean(list, PostRespDTO.class));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,76 @@
|
||||
package com.zt.plat.module.system.api.dict;
|
||||
|
||||
import com.zt.plat.framework.common.biz.system.dict.dto.DictDataRespDTO;
|
||||
import com.zt.plat.framework.common.enums.CommonStatusEnum;
|
||||
import com.zt.plat.framework.common.pojo.CommonResult;
|
||||
import com.zt.plat.framework.common.util.object.BeanUtils;
|
||||
import com.zt.plat.module.system.api.dict.dto.DictDataDetailRespDTO;
|
||||
import com.zt.plat.module.system.api.dict.dto.DictDataSaveReqDTO;
|
||||
import com.zt.plat.module.system.api.dict.dto.DictDataSimpleRespDTO;
|
||||
import com.zt.plat.module.system.controller.admin.dict.vo.data.DictDataSaveReqVO;
|
||||
import com.zt.plat.module.system.dal.dataobject.dict.DictDataDO;
|
||||
import com.zt.plat.module.system.service.dict.DictDataService;
|
||||
import jakarta.annotation.Resource;
|
||||
import org.springframework.context.annotation.Primary;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
import static com.zt.plat.framework.common.pojo.CommonResult.success;
|
||||
|
||||
@RestController // 提供 RESTful API 接口,给 Feign 调用
|
||||
@Validated
|
||||
@Primary // 由于 DictDataCommonApi 的存在,必须声明为 @Primary Bean
|
||||
public class DictDataApiImpl implements DictDataApi {
|
||||
|
||||
@Resource
|
||||
private DictDataService dictDataService;
|
||||
|
||||
@Override
|
||||
public CommonResult<Long> createDictData(DictDataSaveReqDTO createReqVO) {
|
||||
DictDataSaveReqVO reqVO = BeanUtils.toBean(createReqVO, DictDataSaveReqVO.class);
|
||||
Long dictDataId = dictDataService.createDictData(reqVO);
|
||||
return success(dictDataId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public CommonResult<Boolean> updateDictData(DictDataSaveReqDTO updateReqVO) {
|
||||
DictDataSaveReqVO reqVO = BeanUtils.toBean(updateReqVO, DictDataSaveReqVO.class);
|
||||
dictDataService.updateDictData(reqVO);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@Override
|
||||
public CommonResult<Boolean> deleteDictData(Long id) {
|
||||
dictDataService.deleteDictData(id);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@Override
|
||||
public CommonResult<List<DictDataSimpleRespDTO>> getSimpleDictDataList() {
|
||||
List<DictDataDO> list = dictDataService.getDictDataList(
|
||||
CommonStatusEnum.ENABLE.getStatus(), null);
|
||||
return success(BeanUtils.toBean(list, DictDataSimpleRespDTO.class));
|
||||
}
|
||||
|
||||
@Override
|
||||
public CommonResult<DictDataDetailRespDTO> getDictData(Long id) {
|
||||
DictDataDO dictData = dictDataService.getDictData(id);
|
||||
return success(BeanUtils.toBean(dictData, DictDataDetailRespDTO.class));
|
||||
}
|
||||
|
||||
@Override
|
||||
public CommonResult<Boolean> validateDictDataList(String dictType, Collection<String> values) {
|
||||
dictDataService.validateDictDataList(dictType, values);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@Override
|
||||
public CommonResult<List<DictDataRespDTO>> getDictDataList(String dictType) {
|
||||
List<DictDataDO> list = dictDataService.getDictDataListByDictType(dictType);
|
||||
return success(BeanUtils.toBean(list, DictDataRespDTO.class));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
package com.zt.plat.module.system.api.logger;
|
||||
|
||||
import com.zt.plat.framework.common.pojo.CommonResult;
|
||||
import com.zt.plat.module.system.api.logger.dto.LoginLogCreateReqDTO;
|
||||
import com.zt.plat.module.system.service.logger.LoginLogService;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import jakarta.annotation.Resource;
|
||||
|
||||
import static com.zt.plat.framework.common.pojo.CommonResult.success;
|
||||
|
||||
@RestController // 提供 RESTful API 接口,给 Feign 调用
|
||||
@Validated
|
||||
public class LoginLogApiImpl implements LoginLogApi {
|
||||
|
||||
@Resource
|
||||
private LoginLogService loginLogService;
|
||||
|
||||
@Override
|
||||
public CommonResult<Boolean> createLoginLog(LoginLogCreateReqDTO reqDTO) {
|
||||
loginLogService.createLoginLog(reqDTO);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
package com.zt.plat.module.system.api.logger;
|
||||
|
||||
import com.zt.plat.framework.common.pojo.CommonResult;
|
||||
import com.zt.plat.framework.common.pojo.PageResult;
|
||||
import com.zt.plat.framework.common.util.object.BeanUtils;
|
||||
import com.zt.plat.framework.common.biz.system.logger.dto.OperateLogCreateReqDTO;
|
||||
import com.zt.plat.module.system.api.logger.dto.OperateLogPageReqDTO;
|
||||
import com.zt.plat.module.system.api.logger.dto.OperateLogRespDTO;
|
||||
import com.zt.plat.module.system.dal.dataobject.logger.OperateLogDO;
|
||||
import com.zt.plat.module.system.service.logger.OperateLogService;
|
||||
import jakarta.annotation.Resource;
|
||||
import org.springframework.context.annotation.Primary;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import static com.zt.plat.framework.common.pojo.CommonResult.success;
|
||||
|
||||
@RestController // 提供 RESTful API 接口,给 Feign 调用
|
||||
@Validated
|
||||
@Primary // 由于 OperateLogCommonApi 的存在,必须声明为 @Primary Bean
|
||||
public class OperateLogApiImpl implements OperateLogApi {
|
||||
|
||||
@Resource
|
||||
private OperateLogService operateLogService;
|
||||
|
||||
@Override
|
||||
public CommonResult<Boolean> createOperateLog(OperateLogCreateReqDTO createReqDTO) {
|
||||
operateLogService.createOperateLog(createReqDTO);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@Override
|
||||
public CommonResult<PageResult<OperateLogRespDTO>> getOperateLogPage(OperateLogPageReqDTO pageReqDTO) {
|
||||
PageResult<OperateLogDO> operateLogPage = operateLogService.getOperateLogPage(pageReqDTO);
|
||||
return success(BeanUtils.toBean(operateLogPage, OperateLogRespDTO.class));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
package com.zt.plat.module.system.api.mail;
|
||||
|
||||
import com.zt.plat.framework.common.pojo.CommonResult;
|
||||
import com.zt.plat.module.system.api.mail.dto.MailSendSingleToUserReqDTO;
|
||||
import com.zt.plat.module.system.service.mail.MailSendService;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import jakarta.annotation.Resource;
|
||||
|
||||
import static com.zt.plat.framework.common.pojo.CommonResult.success;
|
||||
|
||||
@RestController // 提供 RESTful API 接口,给 Feign 调用
|
||||
@Validated
|
||||
public class MailSendApiImpl implements MailSendApi {
|
||||
|
||||
@Resource
|
||||
private MailSendService mailSendService;
|
||||
|
||||
@Override
|
||||
public CommonResult<Long> sendSingleMailToAdmin(MailSendSingleToUserReqDTO reqDTO) {
|
||||
return success(mailSendService.sendSingleMailToAdmin(reqDTO.getMail(), reqDTO.getUserId(),
|
||||
reqDTO.getTemplateCode(), reqDTO.getTemplateParams()));
|
||||
}
|
||||
|
||||
@Override
|
||||
public CommonResult<Long> sendSingleMailToMember(MailSendSingleToUserReqDTO reqDTO) {
|
||||
return success(mailSendService.sendSingleMailToMember(reqDTO.getMail(), reqDTO.getUserId(),
|
||||
reqDTO.getTemplateCode(), reqDTO.getTemplateParams()));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
package com.zt.plat.module.system.api.notify;
|
||||
|
||||
import com.zt.plat.framework.common.pojo.CommonResult;
|
||||
import com.zt.plat.module.system.api.notify.dto.NotifySendSingleToUserReqDTO;
|
||||
import com.zt.plat.module.system.service.notify.NotifySendService;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import jakarta.annotation.Resource;
|
||||
|
||||
import static com.zt.plat.framework.common.pojo.CommonResult.success;
|
||||
|
||||
@RestController // 提供 RESTful API 接口,给 Feign 调用
|
||||
@Validated
|
||||
public class NotifyMessageSendApiImpl implements NotifyMessageSendApi {
|
||||
|
||||
@Resource
|
||||
private NotifySendService notifySendService;
|
||||
|
||||
@Override
|
||||
public CommonResult<Long> sendSingleMessageToAdmin(NotifySendSingleToUserReqDTO reqDTO) {
|
||||
return success(notifySendService.sendSingleNotifyToAdmin(reqDTO.getUserId(),
|
||||
reqDTO.getTemplateCode(), reqDTO.getTemplateParams()));
|
||||
}
|
||||
|
||||
@Override
|
||||
public CommonResult<Long> sendSingleMessageToMember(NotifySendSingleToUserReqDTO reqDTO) {
|
||||
return success(notifySendService.sendSingleNotifyToMember(reqDTO.getUserId(),
|
||||
reqDTO.getTemplateCode(), reqDTO.getTemplateParams()));
|
||||
}
|
||||
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user