| eladmin-master/eladmin-system/pom.xml | ●●●●● patch | view | raw | blame | history | |
| eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/business/rabbit/BusinessExpenseRabbit.java | ●●●●● patch | view | raw | blame | history | |
| eladmin-master/eladmin-system/src/main/resources/config/application-dev.yml | ●●●●● patch | view | raw | blame | history | |
| eladmin-master/eladmin-system/src/main/resources/config/application-prod.yml | ●●●●● patch | view | raw | blame | history | |
| eladmin-web-master/src/views/business/expenseFlowable/report.vue | ●●●●● patch | view | raw | blame | history |
eladmin-master/eladmin-system/pom.xml
@@ -96,6 +96,12 @@ <artifactId>yauaa</artifactId> <version>5.23</version> </dependency> <!-- 消息队列 --> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-amqp</artifactId> </dependency> </dependencies> <!-- 打包 --> eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/business/rabbit/BusinessExpenseRabbit.java
New file @@ -0,0 +1,27 @@ package me.zhengjie.modules.business.rabbit; import com.alibaba.fastjson.JSON; import me.zhengjie.modules.business.service.BusinessExpenseService; import me.zhengjie.modules.business.service.dto.BusinessExpenseDto; import org.springframework.amqp.rabbit.annotation.RabbitHandler; import org.springframework.amqp.rabbit.annotation.RabbitListener; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Component; import java.util.Map; @Component @RabbitListener(queues = "business.businessExpenseApply") public class BusinessExpenseRabbit { @Autowired private BusinessExpenseService businessExpenseService; @RabbitHandler public void process(Map<String, Object> message) { // Map 转 实体类 BusinessExpenseDto businessExpenseDto = JSON.parseObject(JSON.toJSONString(message), BusinessExpenseDto.class); // 新增 businessExpenseService.create(businessExpenseDto); } } eladmin-master/eladmin-system/src/main/resources/config/application-dev.yml
@@ -48,6 +48,14 @@ wall: config: multi-statement-allow: true # 配置消息队列 rabbitmq: host: 114.116.101.63 port: 31444 username: admin password: 7658757a@ # 虚拟host 可以不设置,使用server默认host virtual-host: / # 登录相关配置 login: eladmin-master/eladmin-system/src/main/resources/config/application-prod.yml
@@ -50,6 +50,14 @@ wall: config: multi-statement-allow: true # 配置消息队列 rabbitmq: host: 114.116.101.63 port: 31444 username: admin password: 7658757a@ # 虚拟host 可以不设置,使用server默认host virtual-host: / # 登录相关配置 login: eladmin-web-master/src/views/business/expenseFlowable/report.vue
@@ -231,6 +231,14 @@ 'baseApi' ]) }, created() { this.crud.optShow = { add: true, edit: false, del: false, download: false } }, methods: { // 钩子:在获取表格数据之前执行,false 则代表不获取数据 [CRUD.HOOK.beforeRefresh]() {