# eshoooop **Repository Path**: ftf1218/eshoooop ## Basic Information - **Project Name**: eshoooop - **Description**: No description available - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2025-06-03 - **Last Updated**: 2025-06-03 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # eshoooop 产品介绍 Pass服务系统(后端) #### 软件架构 软件架构说明 | 模块名称 | 发行版本 | 功能描述 | 时间 | 端口号 | swagger访问地址 | |-------------------------|----------------|---------|------------|------|-----------------------------| | eshoooop-common | 1.0.0-SNAPSHOT | 项目工具 | 2023.02.15 | | | | eshoooop-gateway | 1.0.0-SNAPSHOT | 网关中心 | 2023.02.15 | 7013 | | | eshoooop-oauth | 1.0.0-SNAPSHOT | 认证中心 | 2023.02.15 | 7014 | | | eshoooop-base | 1.0.0-SNAPSHOT | 基础信息 | 2023.02.15 | 7015 | 39.108.131.152:7015/doc.html | | eshoooop-client | 1.0.0-SNAPSHOT | 客户端后台 | 2023.02.15 | 7002 | | | eshoooop-extension | 1.0.0-SNAPSHOT | 三方资源 | 2023.02.15 | 7003 | | | eshoooop-busi-finance | 1.0.0-SNAPSHOT | 业务-财务模块 | 2023.02.15 | 7004 | | | eshoooop-busi-goods | 1.0.0-SNAPSHOT | 业务-商品模块 | 2023.02.15 | 7006 | | | eshoooop-busi-logistics | 1.0.0-SNAPSHOT | 业务-物流模块 | 2023.02.15 | 7007 | 39.108.131.152:7007/doc.html | | eshoooop-busi-mall | 1.0.0-SNAPSHOT | 业务-商城模块 | 2023.02.15 | 7008 | 39.108.131.152:7008/doc.html | | eshoooop-busi-order | 1.0.0-SNAPSHOT | 业务-订单模块 | 2023.02.15 | 7009 | | | eshoooop-busi-shops | 1.0.0-SNAPSHOT | 业务-店铺模块 | 2023.02.15 | 7010 | | | eshoooop-busi-storage | 1.0.0-SNAPSHOT | 业务-仓储模块 | 2023.02.15 | 7011 | | | eshoooop-busi-user | 1.0.0-SNAPSHOT | 业务-用户模块 | 2023.02.15 | 7012 | | #### 安装教程 1. xxxx 2. xxxx 3. xxxx #### 使用说明 ``` 宝塔面板 内网地址: http://192.168.31.27:34460/863c323d 外网地址: http://39.108.131.152:34460/863c323d 内网端口:34460 外网端口:34460 账号:0s5upa0d 密码:eeb6cea0 Nacos 内网地址:http://192.168.31.27:8848/nacos/ 外网地址:http://39.108.131.152:8850/nacos 内网端口:8848 外网端口:8848 账号:nacos 密码:Abc123321++ 后续迁移配置中心 MySql 内网地址:192.168.31.27 外网地址(有效期2024-07-31):39.108.131.152 内网端口:3306 外网端口:3308 账号:root 密码:Abc123321++ MongoDB 内网地址:192.168.31.27 外网地址(有效期2024-07-31):39.108.131.152 内网端口:27017 外网端口:27018 账号:root 密码:eYGLh7Pmt6awk9Cn Redis 内网地址:192.168.31.27 外网地址(有效期2024-07-31):39.108.131.152 内网端口:6379 外网端口:6379 账号:不需要 密码:Abc123321++ RocketMQ控制台 内网地址:http://192.168.31.27:8080 外网地址(有效期2024-07-31):http://39.108.131.152:8081 内网端口:8080 外网端口:8081 ``` ##### 对象或集合字段校验 ``` 工具类:SmfValidationUtil 在业务层验证的代码中注入:SmfValidationUtil 类 smfValidationUtil.validate(tmsTrackTaskParam); 实体类: @Data @ToString @Accessors(chain = true) public class TmsTrackTaskParam { @NotNull(message = "distributionTypeEnum is not null") private DistributionTypeEnum distributionTypeEnum; private CombinationModeEnum combinationModeEnum; @Valid private TmsTrackSectionInfoDTO tmsTrackSectionInfoDTO; } ``` ##### 静态工具获取某个spring对象 ``` 工具类:ObtainApplicationContextBeanUtil ``` ##### 手动控制事务 ``` 工具类:注入 SmfManualTransactionUtil ``` ##### 流水号生成器 ``` 工具类:注入 SmfSequenceNoService 调用方法:generateSequenceNo(String head, int len) head --- 头信息 len --- 流水长度 ``` ##### 状态机的使用 ``` 1、构建状态枚举 public enum TrackTaskStatusEnum { // 任务单状态(待执行 WAIT_EXECUTE、待配载 WAIT_LOAD、待下发 WAIT_LSSUED) WAIT_EXECUTE("待执行"), WAIT_LOAD("待配载"); ...... } 2、构建事件枚举 public enum TmsBusinessEventEnum { // 订单 CREATE_TASK(10, "创建计划", "taskOrderBusinessCreate"), REVOKE_PLAN(30, "撤回计划", ""); ...... } 3、创建状态机所属key枚举 public enum TmsStatusMachineKeyEnum { TMS_TASK_ORDER("订单"); ...... } 4、配置事件对应的触发状态变更规则 @Configuration @AutoConfigureAfter(value = {StatusMachineCacheCenter.class}) public class TmsTaskOrderMachineConfig extends StateMachineConfigurerAdapter { @Override public void configure(StatusMachineBuild statusMachineBuild) throws Exception { statusMachineBuild .withStatus() .target(TrackTaskStatusEnum.WAIT_EXECUTE).event(TmsBusinessEventEnum.CREATE_TASK) .set(TmsStatusMachineKeyEnum.TMS_TASK_ORDER) .withStatus() .source(TrackTaskStatusEnum.WAIT_LOAD).target(TrackTaskStatusEnum.WAIT_EXECUTE).event(TmsBusinessEventEnum.REVOKE_PLAN) .set(TmsStatusMachineKeyEnum.TMS_TASK_ORDER); } } 5、在需要获取变更状态的地方注入:StatusMachineTrigger 调用方法获取事件触发的目标状态 6、导入导出工具类示例(实体上使用easy-excel注解) 导入 @PostMapping("/importCopyWriter") @ApiOperation(value = "关系管理 - 导入文案信息") public ResultEntity importCopyWriter(ImportCopyWriterVO importCopyWriterVO) { try { List objects = EasyExcelUtil.resolutionData(importCopyWriterVO.getFile(), AlphaTitleInfoVO.class); AlphaTitleInfo titleInfo = new AlphaTitleInfo(); titleInfo.setDaoId(importCopyWriterVO.getDaoId()); titleInfo.setTitleName(importCopyWriterVO.getTitleName()); return daoAdminService.importCopyWriter(titleInfo, objects); } catch (IOException e) { e.printStackTrace(); } return ResultEntity.errorMsg("导入失败"); } 导出 @PostMapping("/exportRevenue") @ApiOperation(value = "数据分析 - 导出营收数据") public void exportRevenue(@RequestBody RevenueSelectVO revenueSelectVO, HttpServletResponse response) { try { List consumeInfoList = censusInfoService.selectRevenue(revenueSelectVO); EasyExcelUtil.export(response, "营收数据", "营收数据", consumeInfoList, RevenueTotalVO.class); } catch (IOException e) { e.printStackTrace(); } } ``` #### 公共字段自动填充注解 ``` /** * 租户id */ @TableField(fill = FieldFill.INSERT) private Long companyId; /** * 修改时间 */ @TableField(fill = FieldFill.INSERT_UPDATE) private Date modifyTime; /** * 新增时间 */ @TableField(fill = FieldFill.INSERT) private Date createTime; /** * 修改用户 */ @TableField(fill = FieldFill.INSERT_UPDATE) private Long modifyUserId; /** * 新增用户 */ @TableField(fill = FieldFill.INSERT) private Long createUserId; /** * 是否逻辑删除(0 有效,1 失效) */ @TableLogic @TableField(value = "is_valid",fill = FieldFill.INSERT) private Integer isValid; ``` #### 参与贡献 1. Fork 本仓库 2. 新建 Feat_xxx 分支 3. 提交代码 4. 新建 Pull Request #### 特技 1. 使用 Readme\_XXX.md 来支持不同的语言,例如 Readme\_en.md, Readme\_zh.md 2. Gitee 官方博客 [blog.gitee.com](https://blog.gitee.com) 3. 你可以 [https://gitee.com/explore](https://gitee.com/explore) 这个地址来了解 Gitee 上的优秀开源项目 4. [GVP](https://gitee.com/gvp) 全称是 Gitee 最有价值开源项目,是综合评定出的优秀开源项目 5. Gitee 官方提供的使用手册 [https://gitee.com/help](https://gitee.com/help) 6. Gitee 封面人物是一档用来展示 Gitee 会员风采的栏目 [https://gitee.com/gitee-stars/](https://gitee.com/gitee-stars/)