新增长者标签查询暴露接口
This commit is contained in:
parent
1440b00930
commit
c3d58c46fa
|
|
@ -32,5 +32,11 @@
|
|||
<version>2.0.0</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.nursingunit.boot</groupId>
|
||||
<artifactId>nu-elder-local-api</artifactId>
|
||||
<version>2.0.0</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</project>
|
||||
|
|
|
|||
|
|
@ -0,0 +1,43 @@
|
|||
package com.nu.modules.elder.elderTag.api;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.baomidou.dynamic.datasource.toolkit.DynamicDataSourceContextHolder;
|
||||
import com.nu.modules.directive.api.DirectiveApi;
|
||||
import com.nu.modules.directive.entity.DirectiveExportApiEntity;
|
||||
import com.nu.modules.elder.api.ElderTagApi;
|
||||
import com.nu.modules.elder.entity.ElderTagExportApiEntity;
|
||||
import org.jeecg.common.api.vo.Result;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 长者标签 !【暴露】! 接口
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/api/services/elderTag")
|
||||
public class ElderTagExportApi {
|
||||
|
||||
@Autowired
|
||||
private ElderTagApi elderTagApi;
|
||||
|
||||
@GetMapping("/queryCompareElderTag")
|
||||
public Result<JSONObject> queryCompareElderTag(@RequestParam("orgCode") String orgCode) {
|
||||
//切换至业务数据源
|
||||
DynamicDataSourceContextHolder.push(orgCode);
|
||||
List<ElderTagExportApiEntity> list;
|
||||
try {
|
||||
list = elderTagApi.queryAllData();
|
||||
} finally {
|
||||
//关闭数据源切换
|
||||
DynamicDataSourceContextHolder.clear();
|
||||
}
|
||||
JSONObject resultData = new JSONObject();
|
||||
resultData.put("list", list);
|
||||
return Result.ok(resultData);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,53 @@
|
|||
package com.nu.modules.elder.elderTag.entity;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @Description: 长者标签
|
||||
* @Author: zmy
|
||||
* @Date: 2025-08-13
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Data
|
||||
public class ElderTagExportDto implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**id*/
|
||||
private String id;
|
||||
/**标签类型*/
|
||||
private String type;
|
||||
/**标签名称*/
|
||||
private String tagName;
|
||||
/**说明*/
|
||||
private String describ;
|
||||
/**价格*/
|
||||
private BigDecimal price;
|
||||
/**图标*/
|
||||
private String pic;
|
||||
/**图标md5值*/
|
||||
private String picMd5;
|
||||
/**排序*/
|
||||
private Integer sort;
|
||||
/**是否启用*/
|
||||
private String izEnabled;
|
||||
/**是否删除*/
|
||||
private String delFlag;
|
||||
/**创建人*/
|
||||
private String createBy;
|
||||
/**创建日期*/
|
||||
private Date createTime;
|
||||
/**更新人*/
|
||||
private String updateBy;
|
||||
/**更新日期*/
|
||||
private Date updateTime;
|
||||
/**所属机构*/
|
||||
private String sysOrgCode;
|
||||
/**需要排除的id */
|
||||
private String excludeIds;
|
||||
/**需要同步的id */
|
||||
private String SyncIds;
|
||||
}
|
||||
|
|
@ -127,6 +127,7 @@ public class ShiroConfig {
|
|||
filterChainDefinitionMap.put("/api/proxy/**", "anon");//代理请求
|
||||
filterChainDefinitionMap.put("/api/baseInfo/**", "anon");//获取系统中信息
|
||||
filterChainDefinitionMap.put("/api/services/directive/queryCompareDirectives", "anon");//服务指令暴露接口
|
||||
filterChainDefinitionMap.put("/api/services/elderTag/queryCompareElderTag", "anon");//长者标签暴露接口
|
||||
|
||||
|
||||
//update-begin--Author:scott Date:20221116 for:排除静态资源后缀
|
||||
|
|
|
|||
|
|
@ -0,0 +1,9 @@
|
|||
package com.nu.modules.elder.api;
|
||||
|
||||
import com.nu.modules.elder.entity.ElderTagExportApiEntity;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface ElderTagApi {
|
||||
List<ElderTagExportApiEntity> queryAllData();
|
||||
}
|
||||
|
|
@ -0,0 +1,62 @@
|
|||
package com.nu.modules.elder.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
import org.jeecg.common.aspect.annotation.Dict;
|
||||
import org.jeecgframework.poi.excel.annotation.Excel;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @Description: 长者标签
|
||||
* @Author: zmy
|
||||
* @Date: 2025-08-13
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Data
|
||||
public class ElderTagExportApiEntity implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**id*/
|
||||
private String id;
|
||||
/**标签类型*/
|
||||
private String type;
|
||||
/**标签名称*/
|
||||
private String tagName;
|
||||
/**说明*/
|
||||
private String describ;
|
||||
/**价格*/
|
||||
private BigDecimal price;
|
||||
/**图标*/
|
||||
private String pic;
|
||||
/**图标md5值*/
|
||||
private String picMd5;
|
||||
/**排序*/
|
||||
private Integer sort;
|
||||
/**是否启用*/
|
||||
private String izEnabled;
|
||||
/**是否删除*/
|
||||
private String delFlag;
|
||||
/**创建人*/
|
||||
private String createBy;
|
||||
/**创建日期*/
|
||||
private Date createTime;
|
||||
/**更新人*/
|
||||
private String updateBy;
|
||||
/**更新日期*/
|
||||
private Date updateTime;
|
||||
/**所属机构*/
|
||||
private String sysOrgCode;
|
||||
/**需要排除的id */
|
||||
private String excludeIds;
|
||||
/**需要同步的id */
|
||||
private String SyncIds;
|
||||
}
|
||||
|
|
@ -12,6 +12,8 @@ import com.nu.modules.async.entity.AsyncMain;
|
|||
import com.nu.modules.async.entity.AsyncStatus;
|
||||
import com.nu.modules.async.service.IAsyncMainService;
|
||||
import com.nu.modules.async.service.IAsyncStatusService;
|
||||
import com.nu.modules.elder.api.ElderTagApi;
|
||||
import com.nu.modules.elder.entity.ElderTagExportApiEntity;
|
||||
import com.nu.modules.eldertag.entity.ElderTag;
|
||||
import com.nu.modules.eldertag.mapper.ElderTagMapper;
|
||||
import com.nu.modules.eldertag.service.IElderTagService;
|
||||
|
|
@ -30,7 +32,7 @@ import java.util.List;
|
|||
* @Version: V1.0
|
||||
*/
|
||||
@Service
|
||||
public class ElderTagServiceImpl extends ServiceImpl<ElderTagMapper, ElderTag> implements IElderTagService {
|
||||
public class ElderTagServiceImpl extends ServiceImpl<ElderTagMapper, ElderTag> implements IElderTagService, ElderTagApi {
|
||||
|
||||
@Autowired
|
||||
private RabbitMQUtil rabbitMQUtil;
|
||||
|
|
@ -102,4 +104,11 @@ public class ElderTagServiceImpl extends ServiceImpl<ElderTagMapper, ElderTag> i
|
|||
});
|
||||
return elderMQDto;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ElderTagExportApiEntity> queryAllData() {
|
||||
List<ElderTag> list = baseMapper.selectList(null);
|
||||
List<ElderTagExportApiEntity> result = BeanUtil.copyToList(list, ElderTagExportApiEntity.class);
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue