服务指令-指令库

This commit is contained in:
1378012178@qq.com 2025-08-04 14:47:00 +08:00
parent 4c9def0952
commit 5ba110afe5
21 changed files with 752 additions and 95 deletions

View File

@ -52,7 +52,7 @@ import org.apache.shiro.authz.annotation.RequiresPermissions;
public class SysConfigController extends JeecgController<SysConfig, ISysConfigService> {
@Autowired
private ISysConfigService sysConfigService;
/**
* 分页列表查询
*
@ -74,7 +74,7 @@ public class SysConfigController extends JeecgController<SysConfig, ISysConfigSe
IPage<SysConfig> pageList = sysConfigService.page(page, queryWrapper);
return Result.OK(pageList);
}
/**
* 添加
*
@ -89,7 +89,7 @@ public class SysConfigController extends JeecgController<SysConfig, ISysConfigSe
sysConfigService.save(sysConfig);
return Result.OK("添加成功!");
}
/**
* 编辑
*
@ -104,7 +104,7 @@ public class SysConfigController extends JeecgController<SysConfig, ISysConfigSe
sysConfigService.updateById(sysConfig);
return Result.OK("编辑成功!");
}
/**
* 通过id删除
*
@ -119,7 +119,7 @@ public class SysConfigController extends JeecgController<SysConfig, ISysConfigSe
sysConfigService.removeById(id);
return Result.OK("删除成功!");
}
/**
* 批量删除
*
@ -134,7 +134,7 @@ public class SysConfigController extends JeecgController<SysConfig, ISysConfigSe
this.sysConfigService.removeByIds(Arrays.asList(ids.split(",")));
return Result.OK("批量删除成功!");
}
/**
* 通过id查询
*
@ -177,4 +177,20 @@ public class SysConfigController extends JeecgController<SysConfig, ISysConfigSe
return super.importExcel(request, response, SysConfig.class);
}
/**
* 获取值
* @param key
* @return
*/
@ApiOperation(value="系统参数配置-通过key查询", notes="系统参数配置-通过key查询")
@GetMapping(value = "/queryByKey")
public Result<SysConfig> queryByKey(@RequestParam(name="key",required=true) String key) {
QueryWrapper<SysConfig> qw = new QueryWrapper<>();
qw.eq("config_key",key);
SysConfig sysConfig = sysConfigService.getOne(qw);
if(sysConfig==null) {
return Result.error("未找到对应数据");
}
return Result.OK(sysConfig);
}
}

View File

@ -8,6 +8,7 @@ import com.nu.modules.sysconfig.entity.SysConfig;
import com.nu.modules.sysconfig.service.ISysConfigService;
import com.nu.utils.RabbitMQUtil;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang.StringUtils;
import org.jeecg.common.system.api.ISysBaseAPI;
import org.springframework.amqp.core.ExchangeTypes;
import org.springframework.amqp.rabbit.annotation.Exchange;
@ -87,22 +88,26 @@ public class SysConfigMQListener {
BeanUtils.copyProperties(dto, config);
sysConfigService.save(config);
} catch (Exception e) {
if (StringUtils.isNotBlank(dto.getId())) {
StatusMQDto statusMQDto = new StatusMQDto();
statusMQDto.setStatus(MQStatus.PROCESS_FAILED.getCode());
statusMQDto.setMessage(e.getMessage());
statusMQDto.setPrimaryKey(dto.getId());
statusMQDto.setOrgCode(orgCode);
statusMQDto.setOrgName(orgName);
rabbitMQUtil.sendToExchange("hldy.sysconfig", "sysconfig.async.result", statusMQDto);
}
throw new RuntimeException(e);
}
if (StringUtils.isNotBlank(dto.getId())) {
StatusMQDto statusMQDto = new StatusMQDto();
statusMQDto.setStatus(MQStatus.PROCESS_FAILED.getCode());
statusMQDto.setMessage(e.getMessage());
statusMQDto.setStatus(MQStatus.SUCCESS.getCode());
statusMQDto.setMessage("数据同步成功!");
statusMQDto.setPrimaryKey(dto.getId());
statusMQDto.setOrgCode(orgCode);
statusMQDto.setOrgName(orgName);
rabbitMQUtil.sendToExchange("hldy.sysconfig", "sysconfig.async.result", statusMQDto);
throw new RuntimeException(e);
}
StatusMQDto statusMQDto = new StatusMQDto();
statusMQDto.setStatus(MQStatus.SUCCESS.getCode());
statusMQDto.setMessage("数据同步成功!");
statusMQDto.setPrimaryKey(dto.getId());
statusMQDto.setOrgCode(orgCode);
statusMQDto.setOrgName(orgName);
rabbitMQUtil.sendToExchange("hldy.sysconfig", "sysconfig.async.result", statusMQDto);
}

View File

@ -29,5 +29,7 @@ public interface IDirectiveBodyTagService extends IService<DirectiveBodyTag> {
List<DirectiveBodyTag> selectAll(String dataSourceCode, List<String> ids,List<String> excludeIds);
List<DirectiveBodyTag> selectAll(List<String> ids, List<String> excludeIds);
void insertAll(List<DirectiveBodyTag> bodyAll);
}

View File

@ -68,6 +68,10 @@ public class DirectiveBodyTagServiceImpl extends ServiceImpl<DirectiveBodyTagMap
return baseMapper.selectAll(ids,excludeIds);
}
@Override
public List<DirectiveBodyTag> selectAll(List<String> ids, List<String> excludeIds) {
return baseMapper.selectAll(ids, excludeIds);
}
@Override
public void insertAll(List<DirectiveBodyTag> bodyAll) {
bodyAll.forEach(b -> {

View File

@ -29,5 +29,7 @@ public interface IDirectiveEmotionTagService extends IService<DirectiveEmotionTa
List<DirectiveEmotionTag> selectAll(String dataSourceCode, List<String> ids,List<String> excludeIds);
List<DirectiveEmotionTag> selectAll(List<String> ids, List<String> excludeIds);
void insertAll(List<DirectiveEmotionTag> emoRelations);
}

View File

@ -68,6 +68,10 @@ public class DirectiveEmotionTagServiceImpl extends ServiceImpl<DirectiveEmotion
return baseMapper.selectAll(ids, excludeIds);
}
@Override
public List<DirectiveEmotionTag> selectAll(List<String> ids, List<String> excludeIds) {
return baseMapper.selectAll(ids, excludeIds);
}
@Override
public void insertAll(List<DirectiveEmotionTag> emoRelations) {
emoRelations.forEach(e -> {

View File

@ -1,10 +1,15 @@
package com.nu.modules.servicedirective.controller;
import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.util.IdUtil;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.dynamic.datasource.annotation.DS;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.nu.dto.DirectiveAsyncMQDto;
import com.nu.dto.DirectiveMQDto;
import com.nu.enums.MQStatus;
import com.nu.modules.servicedirective.entity.ConfigServiceDirective;
import com.nu.modules.servicedirective.entity.TreeNode;
import com.nu.modules.servicedirective.service.IConfigServiceDirectiveService;
@ -20,6 +25,7 @@ import org.jeecg.common.system.api.ISysBaseAPI;
import org.jeecg.common.system.base.controller.JeecgController;
import org.jeecg.common.system.query.QueryGenerator;
import org.jeecg.common.system.query.QueryRuleEnum;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.servlet.ModelAndView;
@ -111,6 +117,94 @@ public class ConfigServiceDirectiveController extends JeecgController<ConfigServ
return Result.OK(list);
}
/**
* 分页列表查询-更换数据源
*
* @param configServiceDirective
* @param pageNo
* @param pageSize
* @param req
* @return
*/
//@AutoLog(value = "服务指令-分页列表查询")
@ApiOperation(value = "服务指令-分页列表查询", notes = "服务指令-分页列表查询")
@GetMapping(value = "/listByDS")
@DS("#dataSourceCode")
public Result<IPage<ConfigServiceDirective>> queryPageListByDS(@RequestParam(name = "dataSourceCode") String dataSourceCode, ConfigServiceDirective configServiceDirective, @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo, @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize, HttpServletRequest req) {
if (StringUtils.isBlank(dataSourceCode)) {
return Result.ok(new Page<ConfigServiceDirective>());
}
Map<String, QueryRuleEnum> customeRuleMap = new HashMap<>();
// 自定义多选的查询规则为LIKE_WITH_OR
customeRuleMap.put("categoryId", QueryRuleEnum.LIKE_WITH_OR);
customeRuleMap.put("typeId", QueryRuleEnum.LIKE_WITH_OR);
customeRuleMap.put("instructionTagId", QueryRuleEnum.LIKE_WITH_OR);
customeRuleMap.put("izReimbursement", QueryRuleEnum.LIKE_WITH_OR);
customeRuleMap.put("izPreferential", QueryRuleEnum.LIKE_WITH_OR);
customeRuleMap.put("chargingFrequency", QueryRuleEnum.LIKE_WITH_OR);
customeRuleMap.put("cycleType", QueryRuleEnum.LIKE_WITH_OR);
customeRuleMap.put("izEnabled", QueryRuleEnum.LIKE_WITH_OR);
QueryWrapper<ConfigServiceDirective> queryWrapper = QueryGenerator.initQueryWrapper(configServiceDirective, req.getParameterMap(), customeRuleMap);
queryWrapper.select("id");
//如果有服务指令需要提前查询下对应的服务指令id
List<ConfigServiceDirective> directiveIds = null;
if (StringUtils.isNotBlank(configServiceDirective.getBodyTags())) {
directiveIds = configServiceDirectiveService.queryDirectiveIdByBodyTagIds(configServiceDirective.getBodyTags());
if (directiveIds != null && !directiveIds.isEmpty()) {
queryWrapper.in("id", directiveIds.stream().map(ConfigServiceDirective::getId).collect(Collectors.toList()));
} else {
//体重标签下没有数据
queryWrapper.eq("id", "null");
}
}
if (StringUtils.isNotBlank(configServiceDirective.getEmotionTags())) {
directiveIds = configServiceDirectiveService.queryDirectiveIdByEmotionTagIds(configServiceDirective.getEmotionTags());
if (directiveIds != null && !directiveIds.isEmpty() && StringUtils.isNotBlank(configServiceDirective.getEmotionTags())) {
queryWrapper.in("id", directiveIds.stream().map(ConfigServiceDirective::getId).collect(Collectors.toList()));
} else {
//情绪标签下没有数据
queryWrapper.eq("id", "null");
}
}
//只查询已授权status = 0)
// if (StringUtils.isNotBlank(configServiceDirective.getStatus())) {
// queryWrapper.in("status", configServiceDirective.getStatus().split(","));
// } else {
// queryWrapper.in("status", new String[]{"0", "2"});
// }
if (StringUtils.isNotBlank(configServiceDirective.getExcludeIds())) {
queryWrapper.notIn("id", configServiceDirective.getExcludeIds().split(","));
}
Page<ConfigServiceDirective> page = new Page<ConfigServiceDirective>(pageNo, pageSize);
IPage<ConfigServiceDirective> list = configServiceDirectiveService.page(page, queryWrapper);
List<ConfigServiceDirective> pageList = service.pageList(configServiceDirective, list);
list.setRecords(pageList);
return Result.OK(list);
}
/**
* 查询目标平台已有指令
*
* @param dataSourceCode
* @return
*/
@GetMapping(value = "/idListByDS")
@DS("#dataSourceCode")
public Result<IPage<ConfigServiceDirective>> idListByDS(@RequestParam(name = "dataSourceCode") String dataSourceCode, ConfigServiceDirective configServiceDirective) {
if (StringUtils.isBlank(dataSourceCode)) {
return Result.ok(new Page<>());
}
QueryWrapper<ConfigServiceDirective> queryWrapper = new QueryWrapper<>();
queryWrapper.select("id");
if (StringUtils.isNotBlank(configServiceDirective.getExcludeIds())) {
queryWrapper.notIn("id", configServiceDirective.getExcludeIds().split(","));
}
Page<ConfigServiceDirective> page = new Page<>(1, -1);
IPage<ConfigServiceDirective> list = configServiceDirectiveService.page(page, queryWrapper);
return Result.OK(list);
}
/**
* 添加
*
@ -142,11 +236,11 @@ public class ConfigServiceDirectiveController extends JeecgController<ConfigServ
configServiceDirectiveService.removeEmotionTags(configServiceDirective);
}
//管理平台不存数据了这个需求不要了 同步给管理平台
//同步给管理平台
{
// DirectiveAsyncMQDto directiveAsyncMQDto = new DirectiveAsyncMQDto();
// BeanUtils.copyProperties(configServiceDirective, directiveAsyncMQDto);
// rabbitMQUtil.sendToExchange("hldy.directive", "hldy.directive.audit", directiveAsyncMQDto);
DirectiveAsyncMQDto directiveAsyncMQDto = new DirectiveAsyncMQDto();
BeanUtils.copyProperties(configServiceDirective, directiveAsyncMQDto);
rabbitMQUtil.sendToExchange("hldy.directive", "hldy.directive.newadd", directiveAsyncMQDto);
}
return Result.OK("添加成功!");
@ -179,9 +273,9 @@ public class ConfigServiceDirectiveController extends JeecgController<ConfigServ
//管理平台不存数据了这个需求不要了 如果是未授权 则同步给管理平台进行更新
// if ("1".equals(configServiceDirective.getStatus())) {
// DirectiveAsyncMQDto directiveAsyncMQDto = new DirectiveAsyncMQDto();
// BeanUtils.copyProperties(configServiceDirective, directiveAsyncMQDto);
// rabbitMQUtil.sendToExchange("hldy.directive", "hldy.directive.audit", directiveAsyncMQDto);
// DirectiveAsyncMQDto directiveAsyncMQDto = new DirectiveAsyncMQDto();
// BeanUtils.copyProperties(configServiceDirective, directiveAsyncMQDto);
// rabbitMQUtil.sendToExchange("hldy.directive", "hldy.directive.newadd", directiveAsyncMQDto);
// }
return Result.OK("编辑成功!");
@ -262,4 +356,36 @@ public class ConfigServiceDirectiveController extends JeecgController<ConfigServ
return super.importExcel(request, response, ConfigServiceDirective.class);
}
/**
* @param dataSourceCode 源数据机构编码
* @return
*/
@AutoLog(value = "服务指令-指令同步")
@ApiOperation(value = "服务指令-指令同步", notes = "服务指令-指令同步")
@PostMapping(value = "/syncDirective")
@DS("#sourceOrgCode")
public Result<Map> syncDirective(@RequestParam(name = "sourceOrgCode") String sourceOrgCode, @RequestBody ConfigServiceDirective dto) {
//处理接口地址
// String fullPath = "";
// if ("all".equals(dto.getSyncOption()) || "media".equals(dto.getSyncOption()) || StringUtils.isNotBlank(dto.getUpIds())) {
// JSONObject deptInfo = configServiceDirectiveService.getDeptInfo("master", dataSourceCode);
// String url = deptInfo.getString("url");
// String contextPath = deptInfo.getString("contextPath");
// String baseUrl = url.endsWith("/") ? url.substring(0, url.length() - 1) : url;
// String normalizedContextPath = contextPath.startsWith("/") ? contextPath : "/" + contextPath;
// normalizedContextPath = normalizedContextPath.endsWith("/")
// ? normalizedContextPath.substring(0, normalizedContextPath.length() - 1)
// : normalizedContextPath;
// //接口协议域名上下文路径
// fullPath = baseUrl + normalizedContextPath;
// }
//同步-新增服务指令
if (StringUtils.isNotBlank(dto.getSyncIds())) {
configServiceDirectiveService.syncDirective(sourceOrgCode, dto.getSyncIds());
}
//发送消息
return Result.ok();
}
}

View File

@ -19,151 +19,211 @@ import java.util.List;
/**
* @Description: 服务指令
* @Author: 张明远
* @Date: 2025-03-13
* @Date: 2025-03-13
* @Version: V1.0
*/
@Data
@TableName("nu_config_service_directive")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="nu_config_service_directive对象", description="服务指令")
@ApiModel(value = "nu_config_service_directive对象", description = "服务指令")
public class ConfigServiceDirective implements Serializable {
private static final long serialVersionUID = 1L;
/**id*/
@TableId(type = IdType.ASSIGN_ID)
/**
* id
*/
@TableId(type = IdType.ASSIGN_ID)
@ApiModelProperty(value = "id")
private java.lang.String id;
/**服务类别id*/
@Excel(name = "服务类别", width = 15)
/**
* 服务类别id
*/
@Excel(name = "服务类别", width = 15)
@ApiModelProperty(value = "服务类别")
@Dict(dicCode = "id" , dictTable = "nu_config_service_category" , dicText = "category_name")
@Dict(dicCode = "id", dictTable = "nu_config_service_category", dicText = "category_name")
private java.lang.String categoryId;
/**服务类型id*/
@Excel(name = "服务类型", width = 15)
/**
* 服务类型id
*/
@Excel(name = "服务类型", width = 15)
@ApiModelProperty(value = "服务类型")
@Dict(dicCode = "id" , dictTable = "nu_config_service_type" , dicText = "type_name")
@Dict(dicCode = "id", dictTable = "nu_config_service_type", dicText = "type_name")
private java.lang.String typeId;
/**分类标签*/
@Excel(name = "分类标签", width = 15)
/**
* 分类标签
*/
@Excel(name = "分类标签", width = 15)
@ApiModelProperty(value = "分类标签")
@Dict(dicCode = "id" , dictTable = "nu_config_service_instruction_tag" , dicText = "instruction_name")
@Dict(dicCode = "id", dictTable = "nu_config_service_instruction_tag", dicText = "instruction_name")
private java.lang.String instructionTagId;
/**服务指令名称*/
@Excel(name = "服务指令名称", width = 15)
/**
* 服务指令名称
*/
@Excel(name = "服务指令名称", width = 15)
@ApiModelProperty(value = "服务指令名称")
private java.lang.String directiveName;
/**收费价格*/
@Excel(name = "收费价格", width = 15)
/**
* 收费价格
*/
@Excel(name = "收费价格", width = 15)
@ApiModelProperty(value = "收费价格")
private java.math.BigDecimal tollPrice;
/**提成价格*/
@Excel(name = "提成价格", width = 15)
/**
* 提成价格
*/
@Excel(name = "提成价格", width = 15)
@ApiModelProperty(value = "提成价格")
private java.math.BigDecimal comPrice;
/**是否参与医保报销 0不报销 1报销*/
@Excel(name = "医保报销", width = 15)
/**
* 是否参与医保报销 0不报销 1报销
*/
@Excel(name = "医保报销", width = 15)
@ApiModelProperty(value = "医保报销")
@Dict(dicCode = "med_ins_reimb" )
@Dict(dicCode = "med_ins_reimb")
private java.lang.String izReimbursement;
/**是否参与机构优惠 0不参与 1参与*/
@Excel(name = "机构优惠", width = 15)
/**
* 是否参与机构优惠 0不参与 1参与
*/
@Excel(name = "机构优惠", width = 15)
@ApiModelProperty(value = "机构优惠")
@Dict(dicCode = "institutional_discount" )
@Dict(dicCode = "institutional_discount")
private java.lang.String izPreferential;
/**收费频次 1按次收费 2按天收费*/
@Excel(name = "收费频次", width = 15)
/**
* 收费频次 1按次收费 2按天收费
*/
@Excel(name = "收费频次", width = 15)
@ApiModelProperty(value = "收费频次")
@Dict(dicCode = "billing_frequency" )
@Dict(dicCode = "billing_frequency")
private java.lang.String chargingFrequency;
/**周期类型 1日常护理 2周期护理 3即时护理*/
@Excel(name = "周期类型", width = 15)
/**
* 周期类型 1日常护理 2周期护理 3即时护理
*/
@Excel(name = "周期类型", width = 15)
@ApiModelProperty(value = "周期类型")
@Dict(dicCode = "period_type" )
@Dict(dicCode = "period_type")
private java.lang.String cycleType;
/**排序*/
@Excel(name = "排序", width = 15)
/**
* 排序
*/
@Excel(name = "排序", width = 15)
@ApiModelProperty(value = "排序")
private java.lang.Integer sort;
/**服务描述*/
@Excel(name = "服务描述", width = 15)
/**
* 服务描述
*/
@Excel(name = "服务描述", width = 15)
@ApiModelProperty(value = "服务描述")
private java.lang.String serviceContent;
/**服务时长(分钟)*/
@Excel(name = "服务时长(分钟)", width = 15)
/**
* 服务时长分钟
*/
@Excel(name = "服务时长(分钟)", width = 15)
@ApiModelProperty(value = "服务时长(分钟)")
private java.lang.String serviceDuration;
/**指令状态*/
/**
* 指令状态
*/
@Excel(name = "指令状态", width = 15)
@ApiModelProperty(value = "指令状态")
@Dict(dicCode = "directive_status")
private java.lang.String status;
/**是否启用 0启用 1未启用*/
@Excel(name = "是否启用", width = 15)
/**
* 是否启用 0启用 1未启用
*/
@Excel(name = "是否启用", width = 15)
@ApiModelProperty(value = "是否启用")
@Dict(dicCode = "iz_enabled")
private java.lang.String izEnabled;
/**是否删除*/
@Excel(name = "是否删除", width = 15)
/**
* 是否删除
*/
@Excel(name = "是否删除", width = 15)
@ApiModelProperty(value = "是否删除")
@TableLogic
private java.lang.String delFlag;
/**创建人*/
/**
* 创建人
*/
@ApiModelProperty(value = "创建人")
private java.lang.String createBy;
/**创建日期*/
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
/**
* 创建日期
*/
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@ApiModelProperty(value = "创建日期")
private java.util.Date createTime;
/**更新人*/
/**
* 更新人
*/
@ApiModelProperty(value = "更新人")
private java.lang.String updateBy;
/**更新日期*/
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
/**
* 更新日期
*/
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@ApiModelProperty(value = "更新日期")
private java.util.Date updateTime;
/**所属部门*/
/**
* 所属部门
*/
@ApiModelProperty(value = "所属部门")
private java.lang.String sysOrgCode;
/**指令音频文件*/
/**
* 指令音频文件
*/
@ApiModelProperty(value = "指令音频文件")
private java.lang.String mp3File;
//语音文件是否变更
@TableField(exist = false)
private boolean mp3FileChanged;
/**指令视频文件*/
/**
* 指令视频文件
*/
@ApiModelProperty(value = "指令视频文件")
private java.lang.String mp4File;
//视频文件是否变更
@TableField(exist = false)
private boolean mp4FileChanged;
/**服务指令图片*/
/**
* 服务指令图片
*/
@ApiModelProperty(value = "服务指令图片")
private java.lang.String previewFile;
//服务指令图片是否变更
@TableField(exist = false)
private boolean previewFileChanged;
/**即时指令图标*/
/**
* 即时指令图标
*/
@ApiModelProperty(value = "即时指令图标")
private java.lang.String immediateFile;
/**指令音频文件md5*/
/**
* 指令音频文件md5
*/
@ApiModelProperty(value = "指令音频文件md5")
private java.lang.String mp3FileMd5;
/**指令视频文件md5*/
/**
* 指令视频文件md5
*/
@ApiModelProperty(value = "指令视频文件md5")
private java.lang.String mp4FileMd5;
/**服务指令图片md5*/
/**
* 服务指令图片md5
*/
@ApiModelProperty(value = "服务指令图片md5")
private java.lang.String previewFileMd5;
/**即时指令图标md5*/
/**
* 即时指令图标md5
*/
@ApiModelProperty(value = "即时指令图标md5")
private java.lang.String immediateFileMd5;
//即时指令图标是否变更
@TableField(exist = false)
@TableField(exist = false)
private boolean immediateFileChanged;
//合并单元格用类别合并的行数
@ -221,6 +281,9 @@ public class ConfigServiceDirective implements Serializable {
//护理分类名称
@TableField(exist = false)
private String instructionTagName;
@TableField(exist = false)
private String syncIds;
@TableField(exist = false)
private String excludeIds;//需要排除的ids
}

View File

@ -76,4 +76,6 @@ public interface ConfigServiceDirectiveMapper extends BaseMapper<ConfigServiceDi
List<ConfigServiceType> getUsedTypes();
List<DirectiveBodyTag> getBodyTagsByDirective(@Param("id") String directiveId);
List<DirectiveEmotionTag> getEmotionTagsByDirective(@Param("id") String directiveId);
List<ConfigServiceDirective> allData();
}

View File

@ -31,6 +31,10 @@
<result property="mp4File" column="mp4_file"/>
<result property="previewFile" column="preview_file"/>
<result property="immediateFile" column="immediate_file"/>
<result property="mp3FileMd5" column="mp3_file_md5"/>
<result property="mp4FileMd5" column="mp4_file_md5"/>
<result property="previewFileMd5" column="preview_file_md5"/>
<result property="immediateFileMd5" column="immediate_file_md5"/>
<collection property="bodyTagList" ofType="com.nu.modules.directivetag.body.entity.DirectiveBodyTag">
<id property="id" column="bodyTagId"/>
@ -72,6 +76,10 @@
c.mp4_file,
c.preview_file,
c.immediate_file,
c.mp3_file_md5,
c.mp4_file_md5,
c.preview_file_md5,
c.immediate_file_md5,
bodytag.id as bodyTagId,
bodytag.tag_name as bodyTagName,
emotag.id as emotionTagId,
@ -205,4 +213,7 @@
INNER JOIN nu_directive_emotion_tag det ON et.id = det.tag_id
WHERE det.directive_id = #{directiveId}
</select>
<select id="allData" resultType="com.nu.modules.servicedirective.entity.ConfigServiceDirective">
select id from nu_config_service_directive
</select>
</mapper>

View File

@ -3,6 +3,7 @@ package com.nu.modules.servicedirective.service;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import com.nu.dto.DirectiveAsyncMQDto;
import com.nu.dto.DirectiveMQDto;
import com.nu.modules.servicedirective.entity.ConfigServiceDirective;
import com.nu.modules.servicedirective.entity.TreeNode;
@ -64,4 +65,7 @@ public interface IConfigServiceDirectiveService extends IService<ConfigServiceDi
List<TreeNode> getTreeData();
List<ConfigServiceDirective> allData();
DirectiveMQDto syncDirective(String sourceOrgCode, String syncIds);
}

View File

@ -1,5 +1,6 @@
package com.nu.modules.servicedirective.service.impl;
import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.util.IdUtil;
import com.baomidou.dynamic.datasource.annotation.DS;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
@ -7,7 +8,8 @@ import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.google.common.collect.Maps;
import com.nu.dto.DirectiveAsyncMQDto;
import com.nu.dto.*;
import com.nu.enums.MQStatus;
import com.nu.modules.directivetag.body.entity.DirectiveBodyTag;
import com.nu.modules.directivetag.body.service.IDirectiveBodyTagService;
import com.nu.modules.directivetag.emotion.entity.DirectiveEmotionTag;
@ -23,7 +25,9 @@ import com.nu.modules.servicedirective.service.IConfigServiceDirectiveService;
import com.nu.modules.servicetype.entity.ConfigServiceType;
import com.nu.modules.servicetype.service.IConfigServiceTypeService;
import com.nu.modules.sysconfig.ISysConfigApi;
import com.nu.mq.directive.listener.DirectiveMQListener;
import com.nu.utils.RabbitMQUtil;
import org.apache.commons.compress.utils.Lists;
import org.apache.commons.lang.StringUtils;
import org.jeecg.common.system.api.ISysBaseAPI;
import org.jeecg.common.system.vo.DictModel;
@ -72,6 +76,9 @@ public class ConfigServiceDirectiveServiceImpl extends ServiceImpl<ConfigService
@Lazy
@Autowired
private IDirectiveEmotionTagService emotionTagService;
@Lazy
@Autowired
private DirectiveMQListener directiveMQListener;
@Override
public List<ConfigServiceDirective> pageList(ConfigServiceDirective configServiceDirective, IPage<ConfigServiceDirective> list_) {
@ -497,4 +504,115 @@ public class ConfigServiceDirectiveServiceImpl extends ServiceImpl<ConfigService
}
return tree;
}
@Override
public List<ConfigServiceDirective> allData() {
return baseMapper.allData();
}
/**
* @param syncIds 需要同步的指令ID
*/
@Override
public DirectiveMQDto syncDirective(String sourceOrgCode,String syncIds) {
DirectiveMQDto directiveMQDto = new DirectiveMQDto();
List<ConfigServiceDirective> directives;
List<String> directiveIds = Arrays.asList(syncIds.split(","));
{
List<ConfigServiceDirective> param = Lists.newArrayList();
Arrays.stream(syncIds.split(",")).forEach(id -> {
ConfigServiceDirective configServiceDirective = new ConfigServiceDirective();
configServiceDirective.setId(id);
param.add(configServiceDirective);
});
directives = baseMapper.pageList(null, param);
if (directives != null && !directives.isEmpty()) {
directives.stream().forEach(record -> {
//清空指令资源字段的值
// if ("business".equals(syncOption)) {
// record.setPreviewFile(null);
// record.setImmediateFile(null);
// record.setMp3File(null);
// record.setMp4File(null);
// record.setServiceContent(null);
// record.setPreviewFileMd5(null);
// record.setImmediateFileMd5(null);
// record.setMp3FileMd5(null);
// record.setMp4FileMd5(null);
// }
List<DirectiveBodyTag> bodyTagList = record.getBodyTagList();
record.setBodyTags(bodyTagList.stream().map(DirectiveBodyTag::getId).collect(Collectors.joining(",")));
List<DirectiveEmotionTag> emotionTagList = record.getEmotionTagList();
record.setEmotionTags(emotionTagList.stream().map(DirectiveEmotionTag::getId).collect(Collectors.joining(",")));
});
}
directiveMQDto.setDirectiveList(BeanUtil.copyToList(directives, DirectiveAsyncMQDto.class));
// if ("all".equals(syncOption) || "media".equals(syncOption)) {
// directiveMQDto.setIzSyncMedia(true);
// directiveMQDto.getDirectiveList().stream().forEach(d -> {
// d.setApi(fullPath);
// });
// }
}
//分类标签
{
List<String> instructionTagIds = directives.stream().map(ConfigServiceDirective::getInstructionTagId).filter(instructionTagId -> instructionTagId != null && !instructionTagId.isEmpty()).distinct().collect(Collectors.toList());
if (!instructionTagIds.isEmpty()) {
QueryWrapper<InstructionTag> qw = new QueryWrapper<>();
qw.in("id", instructionTagIds);
List<InstructionTag> list = instructionTagService.list(qw);
directiveMQDto.setInstructionList(BeanUtil.copyToList(list, InstructionTagMQDto.class));
}
}
//服务类别
{
List<String> categoryIds = directives.stream().map(ConfigServiceDirective::getCategoryId).filter(categoryId -> categoryId != null && !categoryId.isEmpty()).distinct().collect(Collectors.toList());
if (!categoryIds.isEmpty()) {
QueryWrapper<ConfigServiceCategory> qw = new QueryWrapper<>();
qw.in("id", categoryIds);
List<ConfigServiceCategory> list = categoryService.list(qw);
directiveMQDto.setCategoryList(BeanUtil.copyToList(list, CategoryMQDto.class));
}
}
//服务类型
{
List<String> typeIds = directives.stream().map(ConfigServiceDirective::getTypeId).filter(typeId -> typeId != null && !typeId.isEmpty()).distinct().collect(Collectors.toList());
if (!typeIds.isEmpty()) {
QueryWrapper<ConfigServiceType> qw = new QueryWrapper<>();
qw.in("id", typeIds);
List<ConfigServiceType> list = typeService.list(qw);
directiveMQDto.setTypeList(BeanUtil.copyToList(list, DirectiveTypeMQDto.class));
}
}
//体型标签
{
directiveMQDto.setBodyTagList(BeanUtil.copyToList(bodyTagService.selectAll(directiveIds, null), BodyTagMQDto.class));
}
//情绪标签
{
directiveMQDto.setEmotionTagList(BeanUtil.copyToList(emotionTagService.selectAll(directiveIds, null), EmotionTagMQDto.class));
}
directiveMQListener.handleIncremental2("master",directiveMQDto);
String apiAddress = "";
//TODO 待调整
// if("101".equals(sourceOrgCode)){
// apiAddress = "http://localhost:8091/nursing-unit_101";
// }else if("102".equals(sourceOrgCode)){
// apiAddress = "http://localhost:8092/nursing-unit_102";
// }else if("103".equals(sourceOrgCode)){
// apiAddress = "http://localhost:8093/nursing-unit_103";
// }
if("101".equals(sourceOrgCode)){
apiAddress = "https://www.focusnu.com/nursingunit101";
}else if("102".equals(sourceOrgCode)){
apiAddress = "https://www.focusnu.com/nursingunit102";
}else if("103".equals(sourceOrgCode)){
apiAddress = "https://www.focusnu.com/nursingunit103";
}
directiveMQListener.handleCreateMedia2(directiveMQDto,apiAddress);
//给对应业务平台发送消息
return directiveMQDto;
}
}

View File

@ -2,6 +2,7 @@ package com.nu.mq.directive.listener;
import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.collection.ListUtil;
import com.baomidou.dynamic.datasource.annotation.DS;
import com.baomidou.dynamic.datasource.annotation.DSTransactional;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
@ -96,6 +97,13 @@ public class DirectiveMQListener {
statusMQDto.setAsyncId(dto.getAsyncId());
statusMQDto.setCode("data");
rabbitMQUtil.sendToExchange("hldy.fwzl", "fwzl.async.result", statusMQDto);
//这里就不会再执行文件的逻辑 要把文件按同步失败处理
StatusMQDto statusMQDtoFile = new StatusMQDto();
statusMQDtoFile.setStatus(MQStatus.PROCESS_FAILED.getCode());
statusMQDtoFile.setMessage("文件同步失败,不再处理资源");
statusMQDtoFile.setAsyncId(dto.getAsyncId());
statusMQDtoFile.setCode("file");
rabbitMQUtil.sendToExchange("hldy.fwzl", "fwzl.async.result", statusMQDtoFile);
throw new RuntimeException("数据同步失败");
}
//在这里返回数据成功和日志
@ -503,9 +511,7 @@ public class DirectiveMQListener {
private void handleIncremental(DirectiveMQDto dto) {
//增量传过来的是已勾选的全部数据需将重复部分去除
//先查出所有指令id 然后进行去重
QueryWrapper<ConfigServiceDirective> dtw = new QueryWrapper<>();
dtw.select("id");
List<ConfigServiceDirective> tempList = directiveService.list(dtw);
List<ConfigServiceDirective> tempList = directiveService.allData();
Set<String> existingIds = tempList.stream().map(ConfigServiceDirective::getId).map(String::valueOf).collect(Collectors.toSet());
String idStr = dto.getIdStr();
@ -638,7 +644,7 @@ public class DirectiveMQListener {
}
}
//分类标签
{
if (dto.getInstructionList() != null) {
//需要排除的分类标签id
List<String> existedIds = Lists.newArrayList();
if (dto.isIzInc()) {
@ -660,7 +666,7 @@ public class DirectiveMQListener {
}
}
//服务类别
{
if (dto.getCategoryList() != null) {
//需要排除的服务类别id
List<String> existedIds = Lists.newArrayList();
if (dto.isIzInc()) {
@ -682,7 +688,7 @@ public class DirectiveMQListener {
}
}
//服务类型
{
if (dto.getTypeList() != null) {
//需要排除的服务类型id
List<String> existedIds = Lists.newArrayList();
if (dto.isIzInc()) {
@ -832,4 +838,169 @@ public class DirectiveMQListener {
// throw new RuntimeException(e);
// }
// }
@DS("ds")
public void handleIncremental2(String ds, DirectiveMQDto dto) {
dto.setIzInc(true);
dto.setIdStr(dto.getDirectiveList().stream().map(d -> d.getId()).collect(Collectors.joining(",")));
//增量传过来的是已勾选的全部数据需将重复部分去除
//先查出所有指令id 然后进行去重
List<ConfigServiceDirective> tempList = directiveService.allData();
Set<String> existingIds = tempList.stream().map(ConfigServiceDirective::getId).map(String::valueOf).collect(Collectors.toSet());
String idStr = dto.getIdStr();
List<String> inputIds = Arrays.asList(idStr.split(","));
List<String> uniqueIds = inputIds.stream().filter(id -> !existingIds.contains(id)).collect(Collectors.toList());
dto.setIdList(uniqueIds);
handleData(dto);
}
@DS("master")
public void handleCreateMedia2(DirectiveMQDto mqDto,String apiAddress) {
try {
mqDto.getDirectiveList().stream().forEach(dto -> {
//查询现有服务指令
QueryWrapper<ConfigServiceDirective> qw = new QueryWrapper<>();
qw.eq("id", dto.getId());
ConfigServiceDirective currentDirective = directiveService.getOne(qw);
//更新服务指令媒体资源字段
ConfigServiceDirective configServiceDirective = new ConfigServiceDirective();
configServiceDirective.setId(dto.getId());
configServiceDirective.setServiceContent(dto.getServiceContent());//服务指令说明
//拉取媒体资源至本地目录
{
//接口协议域名+上下文访问路径
String baseUrl = apiAddress;
//处理服务指令图片
if (!dto.getPreviewFileMd5().equals(currentDirective.getPreviewFileMd5())) {
String previewFile = dto.getPreviewFile();
if (StringUtils.isNotBlank(previewFile)) {
String url = baseUrl + "/sys/common/open/static/" + URLEncoder.encode(previewFile, StandardCharsets.UTF_8).replace("%2F", "/") + "?name=" + SafetyUtil.getSecureKey();
if (upLoadPath.endsWith("/") || upLoadPath.endsWith("\\")) {
upLoadPath = upLoadPath.substring(0, upLoadPath.length() - 1);
}
String filePath = previewFile.substring(0, previewFile.lastIndexOf("/"));
String fileName = previewFile.substring(previewFile.lastIndexOf("/") + 1);
if (filePath.startsWith("/") || filePath.startsWith("\\")) {
filePath = filePath.substring(1);
}
try {
FileDownloader.downloadFile(url, upLoadPath + File.separator + filePath, fileName);
configServiceDirective.setPreviewFile(dto.getPreviewFile());//服务指令图片
configServiceDirective.setPreviewFileMd5(dto.getPreviewFileMd5());
} catch (Exception e) {
e.printStackTrace();
MediaAsyncErrorLog mediaAsyncErrorLog = new MediaAsyncErrorLog();
mediaAsyncErrorLog.setMediaid(previewFile);
mediaAsyncErrorLogService.save(mediaAsyncErrorLog);
throw new RuntimeException("服务指令图片文件拉取错误,指令id" + currentDirective.getId());
}
}
}
//处理即时指令图标
if (!dto.getImmediateFileMd5().equals(currentDirective.getImmediateFileMd5())) {
String immediateFile = dto.getImmediateFile();
if (StringUtils.isNotBlank(immediateFile)) {
String url = baseUrl + "/sys/common/open/static/" + URLEncoder.encode(immediateFile, StandardCharsets.UTF_8).replace("%2F", "/") + "?name=" + SafetyUtil.getSecureKey();
if (upLoadPath.endsWith("/") || upLoadPath.endsWith("\\")) {
upLoadPath = upLoadPath.substring(0, upLoadPath.length() - 1);
}
String filePath = immediateFile.substring(0, immediateFile.lastIndexOf("/"));
String fileName = immediateFile.substring(immediateFile.lastIndexOf("/") + 1);
if (filePath.startsWith("/") || filePath.startsWith("\\")) {
filePath = filePath.substring(1);
}
try {
FileDownloader.downloadFile(url, upLoadPath + File.separator + filePath, fileName);
configServiceDirective.setImmediateFile(dto.getImmediateFile());//即时指令图标
configServiceDirective.setImmediateFileMd5(dto.getImmediateFileMd5());
} catch (Exception e) {
MediaAsyncErrorLog mediaAsyncErrorLog = new MediaAsyncErrorLog();
mediaAsyncErrorLog.setMediaid(immediateFile);
mediaAsyncErrorLogService.save(mediaAsyncErrorLog);
e.printStackTrace();
throw new RuntimeException("即时指令图标文件拉取错误,指令id" + currentDirective.getId());
}
}
}
//处理指令音频文件
if (!dto.getMp3FileMd5().equals(currentDirective.getMp3FileMd5())) {
String mp3File = dto.getMp3File();
if (StringUtils.isNotBlank(mp3File)) {
String url = baseUrl + "/sys/common/open/static/" + URLEncoder.encode(mp3File, StandardCharsets.UTF_8).replace("%2F", "/") + "?name=" + SafetyUtil.getSecureKey();
if (upLoadPath.endsWith("/") || upLoadPath.endsWith("\\")) {
upLoadPath = upLoadPath.substring(0, upLoadPath.length() - 1);
}
String filePath = mp3File.substring(0, mp3File.lastIndexOf("/"));
String fileName = mp3File.substring(mp3File.lastIndexOf("/") + 1);
if (filePath.startsWith("/") || filePath.startsWith("\\")) {
filePath = filePath.substring(1);
}
try {
FileDownloader.downloadFile(url, upLoadPath + File.separator + filePath, fileName);
configServiceDirective.setMp3File(dto.getMp3File());//指令音频文件
configServiceDirective.setMp3FileMd5(dto.getMp3FileMd5());
} catch (Exception e) {
MediaAsyncErrorLog mediaAsyncErrorLog = new MediaAsyncErrorLog();
mediaAsyncErrorLog.setMediaid(mp3File);
mediaAsyncErrorLogService.save(mediaAsyncErrorLog);
e.printStackTrace();
throw new RuntimeException("指令音频文件拉取错误,指令id" + currentDirective.getId());
}
}
}
//处理指令视频文件
if (!dto.getMp4FileMd5().equals(currentDirective.getMp4FileMd5())) {
String mp4File = dto.getMp4File();
if (StringUtils.isNotBlank(mp4File)) {
String url = baseUrl + "/sys/common/open/static/" + URLEncoder.encode(mp4File, StandardCharsets.UTF_8).replace("%2F", "/") + "?name=" + SafetyUtil.getSecureKey();
if (upLoadPath.endsWith("/") || upLoadPath.endsWith("\\")) {
upLoadPath = upLoadPath.substring(0, upLoadPath.length() - 1);
}
String filePath = mp4File.substring(0, mp4File.lastIndexOf("/"));
String fileName = mp4File.substring(mp4File.lastIndexOf("/") + 1);
if (filePath.startsWith("/") || filePath.startsWith("\\")) {
filePath = filePath.substring(1);
}
try {
FileDownloader.downloadFile(url, upLoadPath + File.separator + filePath, fileName);
configServiceDirective.setMp4File(dto.getMp4File());//指令视频文件
configServiceDirective.setMp4FileMd5(dto.getMp4FileMd5());
} catch (Exception e) {
MediaAsyncErrorLog mediaAsyncErrorLog = new MediaAsyncErrorLog();
mediaAsyncErrorLog.setMediaid(mp4File);
mediaAsyncErrorLogService.save(mediaAsyncErrorLog);
e.printStackTrace();
throw new RuntimeException("指令视频文件拉取错误,指令id" + currentDirective.getId());
}
}
}
directiveService.updateById(configServiceDirective);
}
});
//在这里返回数据成功和日志
StatusMQDto statusMQDto = new StatusMQDto();
statusMQDto.setStatus(MQStatus.SUCCESS.getCode());
statusMQDto.setMessage("文件同步成功!");
statusMQDto.setAsyncId(mqDto.getAsyncId());
statusMQDto.setCode("file");
rabbitMQUtil.sendToExchange("hldy.fwzl", "fwzl.async.result", statusMQDto);
} catch (Exception e) {
e.printStackTrace();
//返回错误日志
StatusMQDto statusMQDto = new StatusMQDto();
statusMQDto.setStatus(MQStatus.PROCESS_FAILED.getCode());
statusMQDto.setMessage(e.getMessage());
statusMQDto.setAsyncId(mqDto.getAsyncId());
statusMQDto.setCode("file");
rabbitMQUtil.sendToExchange("hldy.fwzl", "fwzl.async.result", statusMQDto);
}
}
}

View File

@ -37,13 +37,15 @@ public class SystemApiController {
/**
* 通过用户账号查询部门集合
*
* @param username
* @return 部门 id
*/
@GetMapping("/getOrgName")
Result<Map<String,String>> getOrgName() {
@GetMapping("/getOrgInfo")
Result<Map<String,String>> getOrgInfo() {
JSONObject deptInfo = sysBaseApi.getDeptInfo();
Map<String,String> result = Maps.newHashMap();
result.put("orgName",sysBaseApi.getOrgName());
result.put("orgCode",deptInfo.getString("code"));
result.put("orgName",deptInfo.getString("name"));
result.put("url",deptInfo.getString("url"));
return Result.ok(result);
}

View File

@ -3,6 +3,7 @@ package org.jeecg.modules.system.controller;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.dynamic.datasource.annotation.DS;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
@ -38,6 +39,7 @@ import org.jeecgframework.poi.excel.def.NormalExcelConstants;
import org.jeecgframework.poi.excel.entity.ExportParams;
import org.jeecgframework.poi.excel.entity.ImportParams;
import org.jeecgframework.poi.excel.view.JeecgEntityExcelView;
import org.jetbrains.annotations.NotNull;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cache.annotation.CacheEvict;
@ -202,6 +204,40 @@ public class SysDictController {
return result;
}
/**
* 获取字典数据 接口签名验证
* @param dictCode 字典code
* @param dictCode 表名,文本字段,code字段 | 举例sys_user,realname,id
* @param orgCode 机构编码
* @return
*/
@RequestMapping(value = "/getDictItems/{dictCode}/{orgCode}", method = RequestMethod.GET)
@DS("#orgCode")
public Result<List<DictModel>> getDictItems(@PathVariable("dictCode") String dictCode,@PathVariable("orgCode") String orgCode, @RequestParam(value = "sign",required = false) String sign,HttpServletRequest request) {
return getListResult(dictCode);
}
@NotNull
private Result<List<DictModel>> getListResult(String dictCode) {
log.info(" dictCode : "+ dictCode);
Result<List<DictModel>> result = new Result<List<DictModel>>();
try {
List<DictModel> ls = sysDictService.getDictItems(dictCode);
if (ls == null) {
result.error500("字典Code格式不正确");
return result;
}
result.setSuccess(true);
result.setResult(ls);
log.debug(result.toString());
} catch (Exception e) {
log.error(e.getMessage(), e);
result.error500("操作失败");
return result;
}
return result;
}
/**
* 接口签名验证
* JSearchSelectTag下拉搜索组件专用接口

View File

@ -197,6 +197,21 @@ spring:
username: nu_ro
password: nu_ro
driver-class-name: com.mysql.cj.jdbc.Driver
101:
url: jdbc:mysql://192.168.2.199:3306/nursing_unit_001?characterEncoding=UTF-8&useUnicode=true&useSSL=false
username: nu001
password: nu001
driver-class-name: com.mysql.cj.jdbc.Driver
102:
url: jdbc:mysql://192.168.2.199:3306/nursing_unit_002?characterEncoding=UTF-8&useUnicode=true&useSSL=true&requireSSL=true&verifyServerCertificate=false&allowPublicKeyRetrieval=true
username: nu002
password: nu002
driver-class-name: com.mysql.cj.jdbc.Driver
103:
url: jdbc:mysql://192.168.2.199:3306/nursing_unit_003?characterEncoding=UTF-8&useUnicode=true&useSSL=true&requireSSL=true&verifyServerCertificate=false&allowPublicKeyRetrieval=true
username: nu003
password: nu003
driver-class-name: com.mysql.cj.jdbc.Driver
#redis 配置
redis:
database: 0

View File

@ -197,6 +197,21 @@ spring:
username: nu_ro
password: nu_ro
driver-class-name: com.mysql.cj.jdbc.Driver
101:
url: jdbc:mysql://192.168.2.199:3306/nursing_unit_001?characterEncoding=UTF-8&useUnicode=true&useSSL=false
username: nu001
password: nu001
driver-class-name: com.mysql.cj.jdbc.Driver
102:
url: jdbc:mysql://192.168.2.199:3306/nursing_unit_002?characterEncoding=UTF-8&useUnicode=true&useSSL=true&requireSSL=true&verifyServerCertificate=false&allowPublicKeyRetrieval=true
username: nu002
password: nu002
driver-class-name: com.mysql.cj.jdbc.Driver
103:
url: jdbc:mysql://192.168.2.199:3306/nursing_unit_003?characterEncoding=UTF-8&useUnicode=true&useSSL=true&requireSSL=true&verifyServerCertificate=false&allowPublicKeyRetrieval=true
username: nu003
password: nu003
driver-class-name: com.mysql.cj.jdbc.Driver
#redis 配置
redis:
database: 0

View File

@ -191,6 +191,22 @@ spring:
username: nu_sys
password: nu_sys
driver-class-name: com.mysql.cj.jdbc.Driver
101:
url: jdbc:mysql://192.168.2.199:3306/nursing_unit_001?characterEncoding=UTF-8&useUnicode=true&useSSL=false
username: nu001
password: nu001
driver-class-name: com.mysql.cj.jdbc.Driver
102:
url: jdbc:mysql://192.168.2.199:3306/nursing_unit_002?characterEncoding=UTF-8&useUnicode=true&useSSL=true&requireSSL=true&verifyServerCertificate=false&allowPublicKeyRetrieval=true
username: nu002
password: nu002
driver-class-name: com.mysql.cj.jdbc.Driver
103:
url: jdbc:mysql://192.168.2.199:3306/nursing_unit_003?characterEncoding=UTF-8&useUnicode=true&useSSL=true&requireSSL=true&verifyServerCertificate=false&allowPublicKeyRetrieval=true
username: nu003
password: nu003
driver-class-name: com.mysql.cj.jdbc.Driver
#redis 配置
redis:
database: 0

View File

@ -191,6 +191,21 @@ spring:
username: fw8864sshdang
password: uGDBkM25I6nZCNM2
driver-class-name: com.mysql.cj.jdbc.Driver
101:
url: jdbc:mysql://mysql8-prod:3306/nursing_unit_001?characterEncoding=UTF-8&useUnicode=true&useSSL=false&tinyInt1isBit=false&allowPublicKeyRetrieval=true&serverTimezone=Asia/Shanghai
username: fw8864sshdang
password: uGDBkM25I6nZCNM2
driver-class-name: com.mysql.cj.jdbc.Driver
102:
url: jdbc:mysql://mysql8-prod:3306/nursing_unit_002?characterEncoding=UTF-8&useUnicode=true&useSSL=false&tinyInt1isBit=false&allowPublicKeyRetrieval=true&serverTimezone=Asia/Shanghai
username: fw8864sshdang
password: uGDBkM25I6nZCNM2
driver-class-name: com.mysql.cj.jdbc.Driver
103:
url: jdbc:mysql://mysql8-prod:3306/nursing_unit_003?characterEncoding=UTF-8&useUnicode=true&useSSL=false&tinyInt1isBit=false&allowPublicKeyRetrieval=true&serverTimezone=Asia/Shanghai
username: fw8864sshdang
password: uGDBkM25I6nZCNM2
driver-class-name: com.mysql.cj.jdbc.Driver
# 多数据源配置-试验田 TODO 需要创建对应只读账号 不同服务器间需要更改ip端口 另外注意是否采用了VPC
# nuro:
# url: jdbc:mysql://mysql8-prod:3306/nursing_unit?characterEncoding=UTF-8&useUnicode=true&useSSL=false&tinyInt1isBit=false&allowPublicKeyRetrieval=true&serverTimezone=Asia/Shanghai

View File

@ -197,6 +197,21 @@ spring:
username: fw8864sshdang
password: uGDBkM25I6nZCNM2
driver-class-name: com.mysql.cj.jdbc.Driver
101:
url: jdbc:mysql://mysql8-prod:3306/nursing_unit_001?characterEncoding=UTF-8&useUnicode=true&useSSL=false&tinyInt1isBit=false&allowPublicKeyRetrieval=true&serverTimezone=Asia/Shanghai
username: fw8864sshdang
password: uGDBkM25I6nZCNM2
driver-class-name: com.mysql.cj.jdbc.Driver
102:
url: jdbc:mysql://mysql8-prod:3306/nursing_unit_002?characterEncoding=UTF-8&useUnicode=true&useSSL=false&tinyInt1isBit=false&allowPublicKeyRetrieval=true&serverTimezone=Asia/Shanghai
username: fw8864sshdang
password: uGDBkM25I6nZCNM2
driver-class-name: com.mysql.cj.jdbc.Driver
103:
url: jdbc:mysql://mysql8-prod:3306/nursing_unit_003?characterEncoding=UTF-8&useUnicode=true&useSSL=false&tinyInt1isBit=false&allowPublicKeyRetrieval=true&serverTimezone=Asia/Shanghai
username: fw8864sshdang
password: uGDBkM25I6nZCNM2
driver-class-name: com.mysql.cj.jdbc.Driver
#redis 配置
redis:
database: 0

View File

@ -197,6 +197,21 @@ spring:
username: fw8864sshdang
password: uGDBkM25I6nZCNM2
driver-class-name: com.mysql.cj.jdbc.Driver
101:
url: jdbc:mysql://mysql8-prod:3306/nursing_unit_001?characterEncoding=UTF-8&useUnicode=true&useSSL=false&tinyInt1isBit=false&allowPublicKeyRetrieval=true&serverTimezone=Asia/Shanghai
username: fw8864sshdang
password: uGDBkM25I6nZCNM2
driver-class-name: com.mysql.cj.jdbc.Driver
102:
url: jdbc:mysql://mysql8-prod:3306/nursing_unit_002?characterEncoding=UTF-8&useUnicode=true&useSSL=false&tinyInt1isBit=false&allowPublicKeyRetrieval=true&serverTimezone=Asia/Shanghai
username: fw8864sshdang
password: uGDBkM25I6nZCNM2
driver-class-name: com.mysql.cj.jdbc.Driver
103:
url: jdbc:mysql://mysql8-prod:3306/nursing_unit_003?characterEncoding=UTF-8&useUnicode=true&useSSL=false&tinyInt1isBit=false&allowPublicKeyRetrieval=true&serverTimezone=Asia/Shanghai
username: fw8864sshdang
password: uGDBkM25I6nZCNM2
driver-class-name: com.mysql.cj.jdbc.Driver
#redis 配置
redis:
database: 0