1、系统级别数据字典同步
2、调整业务系统mq监听的队列:根据机构动态生成队列名称、key名称并绑定交换机(解决队列名称写死,每次新增业务系统都需要修改问题)
This commit is contained in:
parent
67d83e35bf
commit
7bcd2fc403
|
@ -17,6 +17,11 @@
|
|||
<artifactId>nursing-unit-base-core</artifactId>
|
||||
<version>2.0.0</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.nursingunit.boot</groupId>
|
||||
<artifactId>nu-system-local-api</artifactId>
|
||||
<version>2.0.0</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
</project>
|
||||
|
|
|
@ -32,43 +32,6 @@ public class RabbitMQConfig {
|
|||
return new DirectExchange("hldy.fwzl");
|
||||
}
|
||||
|
||||
// 队列
|
||||
@Bean
|
||||
public Queue nu001FwzlAsyncQueue() {
|
||||
return new Queue("nu001.fwzl.async", true);
|
||||
}
|
||||
@Bean
|
||||
public Queue nu001FwzlStatusQueue() {
|
||||
return new Queue("nu001.fwzl.status", true);
|
||||
}
|
||||
@Bean
|
||||
public Queue nu002FwzlAsyncQueue() {
|
||||
return new Queue("nu002.fwzl.async", true);
|
||||
}
|
||||
@Bean
|
||||
public Queue nu002FwzlStatusQueue() {
|
||||
return new Queue("nu002.fwzl.status", true);
|
||||
}
|
||||
|
||||
@Bean
|
||||
public Binding binding1(Queue nu001FwzlAsyncQueue, DirectExchange fwzlExchange) {
|
||||
return BindingBuilder.bind(nu001FwzlAsyncQueue).to(fwzlExchange).with("nu001.fwzl.async");
|
||||
}
|
||||
@Bean
|
||||
public Binding binding2(Queue nu001FwzlStatusQueue, DirectExchange fwzlExchange) {
|
||||
return BindingBuilder.bind(nu001FwzlStatusQueue).to(fwzlExchange).with("nu001.fwzl.status");
|
||||
}
|
||||
@Bean
|
||||
public Binding binding3(Queue nu002FwzlAsyncQueue, DirectExchange fwzlExchange) {
|
||||
return BindingBuilder.bind(nu002FwzlAsyncQueue).to(fwzlExchange).with("nu002.fwzl.async");
|
||||
}
|
||||
@Bean
|
||||
public Binding binding4(Queue nu002FwzlStatusQueue, DirectExchange fwzlExchange) {
|
||||
return BindingBuilder.bind(nu002FwzlStatusQueue).to(fwzlExchange).with("nu002.fwzl.status");
|
||||
}
|
||||
|
||||
|
||||
|
||||
//注册
|
||||
@Bean
|
||||
public DirectExchange registerExchange() {
|
||||
|
|
|
@ -16,4 +16,6 @@ public class StatusMQDto {
|
|||
|
||||
private String dictId;
|
||||
private String orgCode;
|
||||
private String orgName;
|
||||
}
|
||||
|
||||
|
|
|
@ -2,6 +2,7 @@ package com.nu.modules.async.controller;
|
|||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
|
@ -17,6 +18,7 @@ import lombok.extern.slf4j.Slf4j;
|
|||
|
||||
import org.jeecg.common.system.base.controller.JeecgController;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.context.annotation.Lazy;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.servlet.ModelAndView;
|
||||
import io.swagger.annotations.Api;
|
||||
|
@ -35,6 +37,7 @@ import org.apache.shiro.authz.annotation.RequiresPermissions;
|
|||
@RequestMapping("/asyncmain/asyncMain")
|
||||
@Slf4j
|
||||
public class AsyncMainController extends JeecgController<AsyncMain, IAsyncMainService> {
|
||||
|
||||
@Autowired
|
||||
private IAsyncMainService asyncMainService;
|
||||
|
||||
|
@ -60,7 +63,7 @@ public class AsyncMainController extends JeecgController<AsyncMain, IAsyncMainSe
|
|||
IPage<AsyncMain> pageList = asyncMainService.page(page, queryWrapper);
|
||||
List<AsyncMain> records = pageList.getRecords();
|
||||
if (records != null && !records.isEmpty()) {
|
||||
records = asyncMainService.pageList(records);
|
||||
records = asyncMainService.pageList(records,asyncMain);
|
||||
pageList.setRecords(records);
|
||||
}
|
||||
return Result.OK(pageList);
|
||||
|
@ -168,4 +171,8 @@ public class AsyncMainController extends JeecgController<AsyncMain, IAsyncMainSe
|
|||
return super.importExcel(request, response, AsyncMain.class);
|
||||
}
|
||||
|
||||
@PostMapping("/listByType")
|
||||
public Result<Map<String,List<AsyncMain>>> listByType(@RequestBody AsyncMain am){
|
||||
return Result.OK(asyncMainService.listByType(am));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -43,6 +43,10 @@ public class AsyncMain implements Serializable {
|
|||
@Excel(name = "机构编码", width = 15)
|
||||
@ApiModelProperty(value = "机构编码")
|
||||
private java.lang.String orgCode;
|
||||
/**机构名称*/
|
||||
@Excel(name = "机构名称", width = 15)
|
||||
@ApiModelProperty(value = "机构名称")
|
||||
private java.lang.String orgName;
|
||||
/**类型(同步的是什么类型的数据)*/
|
||||
@Excel(name = "类型(同步的是什么类型的数据)", width = 15)
|
||||
@ApiModelProperty(value = "类型(同步的是什么类型的数据)")
|
||||
|
@ -67,4 +71,6 @@ public class AsyncMain implements Serializable {
|
|||
|
||||
@TableField(exist = false)
|
||||
private List<AsyncStatus> asyncStatusList;
|
||||
@TableField(exist = false)
|
||||
private List<String> ids;
|
||||
}
|
||||
|
|
|
@ -14,5 +14,5 @@ import java.util.List;
|
|||
*/
|
||||
public interface AsyncMainMapper extends BaseMapper<AsyncMain> {
|
||||
|
||||
List<AsyncMain> pageList(@Param("pojo") List<AsyncMain> records);
|
||||
List<AsyncMain> pageList(@Param("records") List<AsyncMain> records,@Param("dto") AsyncMain dto);
|
||||
}
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
<id property="id" column="id"/>
|
||||
<result property="primaryKey" column="primaryKey"/>
|
||||
<result property="orgCode" column="orgCode"/>
|
||||
<result property="orgName" column="orgName"/>
|
||||
<result property="type" column="type"/>
|
||||
<result property="descr" column="descr"/>
|
||||
<result property="createBy" column="createBy"/>
|
||||
|
@ -25,6 +26,7 @@
|
|||
f.id as id,
|
||||
f.primary_key as primaryKey,
|
||||
f.org_code as orgCode,
|
||||
f.org_name as orgName,
|
||||
f.type as type,
|
||||
f.descr as descr,
|
||||
f.create_by as createBy,
|
||||
|
@ -38,10 +40,16 @@
|
|||
from nu_async_main f
|
||||
left join nu_async_status z on f.id = z.pkid
|
||||
<where>
|
||||
<if test="records !=null and !records.isEmpty()">
|
||||
f.id in
|
||||
<foreach collection="pojo" item="am" separator="," open="(" close=")">
|
||||
<foreach collection="records" item="am" separator="," open="(" close=")">
|
||||
#{am.id}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="dto.primaryKey != '' and dto.primaryKey != null">
|
||||
and f.primary_key = #{dto.primaryKey}
|
||||
and f.status = '500'
|
||||
</if>
|
||||
</where>
|
||||
order by f.create_time desc,z.update_time desc
|
||||
</select>
|
||||
|
|
|
@ -4,6 +4,7 @@ import com.nu.modules.async.entity.AsyncMain;
|
|||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @Description: 数据同步主表
|
||||
|
@ -13,5 +14,7 @@ import java.util.List;
|
|||
*/
|
||||
public interface IAsyncMainService extends IService<AsyncMain> {
|
||||
|
||||
List<AsyncMain> pageList(List<AsyncMain> records);
|
||||
List<AsyncMain> pageList(List<AsyncMain> records, AsyncMain dto);
|
||||
|
||||
Map<String,List<AsyncMain>> listByType(AsyncMain am);
|
||||
}
|
||||
|
|
|
@ -1,13 +1,21 @@
|
|||
package com.nu.modules.async.service.impl;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.google.common.collect.Maps;
|
||||
import com.nu.enums.MQStatus;
|
||||
import com.nu.modules.async.entity.AsyncMain;
|
||||
import com.nu.modules.async.mapper.AsyncMainMapper;
|
||||
import com.nu.modules.async.service.IAsyncMainService;
|
||||
import org.apache.commons.compress.utils.Lists;
|
||||
import org.jeecg.common.system.api.ISysBaseAPI;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @Description: 数据同步主表
|
||||
|
@ -18,8 +26,48 @@ import java.util.List;
|
|||
@Service
|
||||
public class AsyncMainServiceImpl extends ServiceImpl<AsyncMainMapper, AsyncMain> implements IAsyncMainService {
|
||||
|
||||
@Autowired
|
||||
private ISysBaseAPI sysBaseAPI;
|
||||
|
||||
@Override
|
||||
public List<AsyncMain> pageList(List<AsyncMain> records) {
|
||||
return baseMapper.pageList(records);
|
||||
public List<AsyncMain> pageList(List<AsyncMain> records, AsyncMain dto) {
|
||||
return baseMapper.pageList(records, dto);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, List<AsyncMain>> listByType(AsyncMain am) {
|
||||
Map<String, List<AsyncMain>> result = Maps.newHashMap();
|
||||
List<AsyncMain> errorList = Lists.newArrayList();
|
||||
List<AsyncMain> processingList = Lists.newArrayList();
|
||||
List<AsyncMain> successList = Lists.newArrayList();
|
||||
|
||||
List<JSONObject> depts = sysBaseAPI.queryOpeDept();
|
||||
|
||||
QueryWrapper<AsyncMain> asyncMainQueryWrapper = new QueryWrapper<>();
|
||||
asyncMainQueryWrapper.eq("primary_key", am.getPrimaryKey());
|
||||
asyncMainQueryWrapper.orderByAsc("org_code");
|
||||
List<AsyncMain> asyncMains = baseMapper.selectList(asyncMainQueryWrapper);
|
||||
if (asyncMains != null && !asyncMains.isEmpty()) {
|
||||
asyncMains.stream().forEach(a -> {
|
||||
if ((MQStatus.SUCCESS.getCode() + "").equals(a.getStatus())) {
|
||||
successList.add(a);
|
||||
} else {
|
||||
errorList.add(a);
|
||||
}
|
||||
depts.removeIf(dept -> a.getOrgCode().equals(dept.getString("code")));
|
||||
});
|
||||
}
|
||||
depts.forEach(dept -> {
|
||||
AsyncMain asyncMain = new AsyncMain();
|
||||
asyncMain.setOrgCode(dept.getString("code"));
|
||||
asyncMain.setOrgName(dept.getString("name"));
|
||||
asyncMain.setDescr("同步中/待同步");
|
||||
processingList.add(asyncMain);
|
||||
});
|
||||
|
||||
result.put("errorList", errorList);
|
||||
result.put("processingList", processingList);
|
||||
result.put("successList", successList);
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -113,8 +113,9 @@ public class ConfigServiceDirectiveController extends JeecgController<ConfigServ
|
|||
*/
|
||||
@PostMapping("/async")
|
||||
public Result<String> async(@RequestBody DirectiveMQDto dto) {
|
||||
List<DictModel> dicts = sysBaseAPI.getDictItems("mq_org_queue");
|
||||
String queue = dicts.stream().filter(d -> d.getValue().equals(dto.getOrgCode())).findFirst().map(DictModel::getText).orElse(null);
|
||||
// List<DictModel> dicts = sysBaseAPI.getDictItems("mq_org_queue");
|
||||
// String queue = dicts.stream().filter(d -> d.getValue().equals(dto.getOrgCode())).findFirst().map(DictModel::getText).orElse(null);
|
||||
String queue = dto.getOrgCode() + ".fwzl.async";
|
||||
if (StringUtils.isNotBlank(queue)) {
|
||||
//先在数据同步表中插入数据
|
||||
AsyncMain asyncMain = new AsyncMain();
|
||||
|
@ -167,5 +168,4 @@ public class ConfigServiceDirectiveController extends JeecgController<ConfigServ
|
|||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -9,6 +9,10 @@ import com.nu.modules.async.service.IAsyncMainService;
|
|||
import com.nu.modules.async.service.IAsyncStatusService;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.compress.utils.Lists;
|
||||
import org.springframework.amqp.core.ExchangeTypes;
|
||||
import org.springframework.amqp.rabbit.annotation.Exchange;
|
||||
import org.springframework.amqp.rabbit.annotation.Queue;
|
||||
import org.springframework.amqp.rabbit.annotation.QueueBinding;
|
||||
import org.springframework.amqp.rabbit.annotation.RabbitListener;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
@ -24,16 +28,14 @@ public class DirectiveMQListener {
|
|||
@Autowired
|
||||
private IAsyncStatusService asyncStatusService;
|
||||
|
||||
@RabbitListener(queues = "nu001.fwzl.status", errorHandler = "directiveMQErrorHandler")
|
||||
public void handleNu001AsyncMessageStatus(StatusMQDto dto) {
|
||||
try {
|
||||
System.out.println("接收到了消息:" + dto.getStatus() + "消息体:" + dto.getMessage());
|
||||
} catch (Exception e) {
|
||||
System.out.println("异常了:" + e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
@RabbitListener(queues = "nu002.fwzl.status", errorHandler = "directiveMQErrorHandler")
|
||||
@RabbitListener(
|
||||
bindings = @QueueBinding(
|
||||
value = @Queue(name = "fwzl.async.result"),
|
||||
exchange = @Exchange(name = "hldy.fwzl", type = ExchangeTypes.DIRECT),
|
||||
key = "fwzl.async.result"
|
||||
),
|
||||
errorHandler = "directiveMQErrorHandler"
|
||||
)
|
||||
public void handleNu002AsyncMessageStatus(StatusMQDto dto) {
|
||||
LambdaQueryWrapper<AsyncStatus> qw = new LambdaQueryWrapper<>();
|
||||
qw.eq(AsyncStatus::getPkid, dto.getAsyncId());
|
||||
|
|
|
@ -544,4 +544,9 @@ public interface ISysBaseAPI extends CommonAPI {
|
|||
*/
|
||||
boolean dictTableWhiteListCheckByDict(String tableOrDictCode, String... fields);
|
||||
|
||||
/**
|
||||
* 查询各业务机构 编码、名称
|
||||
*
|
||||
*/
|
||||
List<JSONObject> queryOpeDept();
|
||||
}
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
package org.jeecg.modules.system.service.impl;
|
||||
|
||||
import cn.hutool.core.collection.ListUtil;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
|
@ -10,6 +11,9 @@ import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
|||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.google.common.base.Joiner;
|
||||
import com.google.common.collect.Maps;
|
||||
import org.apache.commons.compress.utils.Lists;
|
||||
import org.apache.commons.lang3.ArrayUtils;
|
||||
import org.jeecg.common.system.api.ISysBaseAPI;
|
||||
import org.jeecg.modules.message.entity.SysMessageTemplate;
|
||||
import org.jeecg.modules.message.handle.impl.DdSendMsgHandle;
|
||||
|
@ -83,7 +87,9 @@ import java.util.stream.Collectors;
|
|||
@Slf4j
|
||||
@Service
|
||||
public class SysBaseApiImpl implements ISysBaseAPI {
|
||||
/** 当前系统数据库类型 */
|
||||
/**
|
||||
* 当前系统数据库类型
|
||||
*/
|
||||
private static String DB_TYPE = "";
|
||||
|
||||
@Autowired
|
||||
|
@ -650,6 +656,7 @@ public class SysBaseApiImpl implements ISysBaseAPI {
|
|||
|
||||
/**
|
||||
* 获取数据库类型
|
||||
*
|
||||
* @param dataSource
|
||||
* @return
|
||||
* @throws SQLException
|
||||
|
@ -883,6 +890,7 @@ public class SysBaseApiImpl implements ISysBaseAPI {
|
|||
|
||||
/**
|
||||
* 推送签到人员信息
|
||||
*
|
||||
* @param userId
|
||||
*/
|
||||
@Override
|
||||
|
@ -959,6 +967,7 @@ public class SysBaseApiImpl implements ISysBaseAPI {
|
|||
/**
|
||||
* 判断用户的部门是否满足条件 -等于/不等于/在--中/不在--中/为空/不为空
|
||||
* QQYUN-5326【简流】获取组织人员 单/多 筛选条件 没有部门筛选
|
||||
*
|
||||
* @param departCondition
|
||||
* @param departIds
|
||||
* @return
|
||||
|
@ -1110,6 +1119,7 @@ public class SysBaseApiImpl implements ISysBaseAPI {
|
|||
|
||||
/**
|
||||
* 查询用户拥有的角色集合
|
||||
*
|
||||
* @param username
|
||||
* @return
|
||||
*/
|
||||
|
@ -1124,6 +1134,7 @@ public class SysBaseApiImpl implements ISysBaseAPI {
|
|||
|
||||
/**
|
||||
* 查询用户拥有的角色集合
|
||||
*
|
||||
* @param useId
|
||||
* @return
|
||||
*/
|
||||
|
@ -1137,6 +1148,7 @@ public class SysBaseApiImpl implements ISysBaseAPI {
|
|||
|
||||
/**
|
||||
* 查询用户拥有的权限集合
|
||||
*
|
||||
* @param userId
|
||||
* @return
|
||||
*/
|
||||
|
@ -1168,6 +1180,7 @@ public class SysBaseApiImpl implements ISysBaseAPI {
|
|||
|
||||
/**
|
||||
* 判断online菜单是否有权限
|
||||
*
|
||||
* @param onlineAuthDTO
|
||||
* @return
|
||||
*/
|
||||
|
@ -1209,6 +1222,7 @@ public class SysBaseApiImpl implements ISysBaseAPI {
|
|||
|
||||
/**
|
||||
* 查询用户拥有的角色集合 common api 里面的接口实现
|
||||
*
|
||||
* @param username
|
||||
* @return
|
||||
*/
|
||||
|
@ -1224,6 +1238,7 @@ public class SysBaseApiImpl implements ISysBaseAPI {
|
|||
|
||||
/**
|
||||
* 查询用户拥有的权限集合 common api 里面的接口实现
|
||||
*
|
||||
* @param userId
|
||||
* @return
|
||||
*/
|
||||
|
@ -1234,6 +1249,7 @@ public class SysBaseApiImpl implements ISysBaseAPI {
|
|||
|
||||
/**
|
||||
* 36根据多个用户账号(逗号分隔),查询返回多个用户信息
|
||||
*
|
||||
* @param usernames
|
||||
* @return
|
||||
*/
|
||||
|
@ -1253,6 +1269,7 @@ public class SysBaseApiImpl implements ISysBaseAPI {
|
|||
|
||||
/**
|
||||
* 37根据多个部门编码(逗号分隔),查询返回多个部门信息
|
||||
*
|
||||
* @param orgCodes
|
||||
* @return
|
||||
*/
|
||||
|
@ -1272,6 +1289,7 @@ public class SysBaseApiImpl implements ISysBaseAPI {
|
|||
|
||||
/**
|
||||
* 发消息
|
||||
*
|
||||
* @param fromUser
|
||||
* @param toUser
|
||||
* @param title
|
||||
|
@ -1318,6 +1336,7 @@ public class SysBaseApiImpl implements ISysBaseAPI {
|
|||
|
||||
/**
|
||||
* 发消息 带业务参数
|
||||
*
|
||||
* @param fromUser
|
||||
* @param toUser
|
||||
* @param title
|
||||
|
@ -1369,6 +1388,7 @@ public class SysBaseApiImpl implements ISysBaseAPI {
|
|||
|
||||
/**
|
||||
* 发送邮件消息
|
||||
*
|
||||
* @param email
|
||||
* @param title
|
||||
* @param content
|
||||
|
@ -1381,6 +1401,7 @@ public class SysBaseApiImpl implements ISysBaseAPI {
|
|||
|
||||
/**
|
||||
* 发送html模版邮件消息
|
||||
*
|
||||
* @param email
|
||||
* @param title
|
||||
* @param emailTemplateEnum
|
||||
|
@ -1417,6 +1438,7 @@ public class SysBaseApiImpl implements ISysBaseAPI {
|
|||
|
||||
/**
|
||||
* 获取公司下级部门和所有用户id信息
|
||||
*
|
||||
* @param orgCode
|
||||
* @return
|
||||
*/
|
||||
|
@ -1739,11 +1761,13 @@ public class SysBaseApiImpl implements ISysBaseAPI {
|
|||
}
|
||||
|
||||
//update-begin-author:taoyan date:2023-2-21 for: 解决参数顺序问题
|
||||
|
||||
/**
|
||||
* 获取带参数的报表地址,因为多个参数可能顺序会变,所以要将参数顺序重排,获取所有可能的地址集合
|
||||
* 如下:参数顺序调整使用in查询,就能查询出菜单数据
|
||||
* /online/cgreport/1624393012494286850?name=1&age=16
|
||||
* /online/cgreport/1624393012494286850?age=16&name=1
|
||||
*
|
||||
* @param path
|
||||
* @return
|
||||
*/
|
||||
|
@ -1772,6 +1796,7 @@ public class SysBaseApiImpl implements ISysBaseAPI {
|
|||
|
||||
/**
|
||||
* 获取数组元素的 不同排列 a(n,m)
|
||||
*
|
||||
* @param list
|
||||
* @return
|
||||
*/
|
||||
|
@ -1828,4 +1853,22 @@ public class SysBaseApiImpl implements ISysBaseAPI {
|
|||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<JSONObject> queryOpeDept() {
|
||||
QueryWrapper<SysDepart> qw = new QueryWrapper<>();
|
||||
qw.eq("org_category", "1");
|
||||
qw.eq("del_flag","0");
|
||||
List<SysDepart> list = sysDepartService.list(qw);
|
||||
List<JSONObject> result = Lists.newArrayList();
|
||||
if (list != null && !list.isEmpty()) {
|
||||
list.stream().forEach(d -> {
|
||||
Map<String, Object> map = Maps.newHashMap();
|
||||
map.put("code",d.getOrgCode());
|
||||
map.put("name",d.getDepartName());
|
||||
result.add(new JSONObject(map));
|
||||
});
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -75,6 +75,7 @@ public class SysDictServiceImpl extends ServiceImpl<SysDictMapper, SysDict> impl
|
|||
private DictQueryBlackListHandler dictQueryBlackListHandler;
|
||||
@Autowired
|
||||
private RabbitMQUtil rabbitMQUtil;
|
||||
@Lazy
|
||||
@Autowired
|
||||
private IAsyncMainService asyncMainService;
|
||||
|
||||
|
|
|
@ -21,6 +21,7 @@ public class DictMQListener {
|
|||
asyncMain.setPrimaryKey(dto.getDictId());
|
||||
asyncMain.setStatus(dto.getStatus()+"");
|
||||
asyncMain.setOrgCode(dto.getOrgCode());
|
||||
asyncMain.setOrgName(dto.getOrgName());
|
||||
asyncMain.setDescr(dto.getMessage());
|
||||
asyncMainService.save(asyncMain);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue