Commit 31e98625 by 冯之健

接口修改

parent a38e9ea1
Pipeline #2071 failed with stages
in 0 seconds
...@@ -13,6 +13,7 @@ import cn.hutool.core.convert.Convert; ...@@ -13,6 +13,7 @@ import cn.hutool.core.convert.Convert;
import cn.hutool.core.date.DateTime; import cn.hutool.core.date.DateTime;
import cn.hutool.core.date.DateUnit; import cn.hutool.core.date.DateUnit;
import cn.hutool.core.date.DateUtil; import cn.hutool.core.date.DateUtil;
import cn.hutool.core.lang.Editor;
import cn.hutool.core.map.MapUtil; import cn.hutool.core.map.MapUtil;
import cn.hutool.core.util.ArrayUtil; import cn.hutool.core.util.ArrayUtil;
import cn.hutool.core.util.StrUtil; import cn.hutool.core.util.StrUtil;
...@@ -31,11 +32,15 @@ import com.link.common.utils.Result; ...@@ -31,11 +32,15 @@ import com.link.common.utils.Result;
import com.link.dto.AgentnodeDTO; import com.link.dto.AgentnodeDTO;
import com.link.dto.BdajobConfigDTO; import com.link.dto.BdajobConfigDTO;
import com.link.dto.BdajobDTO; import com.link.dto.BdajobDTO;
import com.link.dto.IndiceDTO;
import com.link.dto.IndiceDataDTO;
import com.link.dto.OoziejobresultDTO; import com.link.dto.OoziejobresultDTO;
import com.link.entity.UserEntity; import com.link.entity.UserEntity;
import com.link.service.AgentnodeService; import com.link.service.AgentnodeService;
import com.link.service.BdajobConfigService; import com.link.service.BdajobConfigService;
import com.link.service.BdajobService; import com.link.service.BdajobService;
import com.link.service.IndiceDataService;
import com.link.service.IndiceService;
import com.link.service.OoziejobresultService; import com.link.service.OoziejobresultService;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam; import io.swagger.annotations.ApiImplicitParam;
...@@ -80,6 +85,10 @@ public class ApiController { ...@@ -80,6 +85,10 @@ public class ApiController {
private OoziejobresultService ooziejobresultService; private OoziejobresultService ooziejobresultService;
@Autowired @Autowired
private BdajobConfigService bdajobConfigService; private BdajobConfigService bdajobConfigService;
@Autowired
private IndiceService indiceService;
@Autowired
private IndiceDataService indiceDataService;
@Login @Login
@GetMapping("getAgentnode") @GetMapping("getAgentnode")
...@@ -118,6 +127,7 @@ public class ApiController { ...@@ -118,6 +127,7 @@ public class ApiController {
return new Result<PageData<BdajobDTO>>().ok(page); return new Result<PageData<BdajobDTO>>().ok(page);
} }
/*
@Login @Login
@GetMapping("getBdajobConfig") @GetMapping("getBdajobConfig")
@ApiOperation("获取指标") @ApiOperation("获取指标")
...@@ -134,10 +144,12 @@ public class ApiController { ...@@ -134,10 +144,12 @@ public class ApiController {
@GetMapping("getBusinessIndiceByCycle") @GetMapping("getBusinessIndiceByCycle")
@ApiOperation("获取结果") @ApiOperation("获取结果")
@ApiImplicitParams({ @ApiImplicitParams({
/*@ApiImplicitParam(name = Constant.PAGE, value = "当前页码,从1开始", paramType = "query", dataType = "int"), */
/*@ApiImplicitParam(name = Constant.PAGE, value = "当前页码,从1开始", paramType = "query", dataType = "int"),
@ApiImplicitParam(name = Constant.LIMIT, value = "每页显示记录数", paramType = "query", dataType = "int"), @ApiImplicitParam(name = Constant.LIMIT, value = "每页显示记录数", paramType = "query", dataType = "int"),
@ApiImplicitParam(name = Constant.ORDER_FIELD, value = "排序字段", paramType = "query", dataType = "String"), @ApiImplicitParam(name = Constant.ORDER_FIELD, value = "排序字段", paramType = "query", dataType = "String"),
@ApiImplicitParam(name = Constant.ORDER, value = "排序方式,可选值(asc、desc)", paramType = "query", dataType = "String"),*/ @ApiImplicitParam(name = Constant.ORDER, value = "排序方式,可选值(asc、desc)", paramType = "query", dataType = "String"),*//*
@ApiImplicitParam(name = "node", value = "下沉节点编码,如果多个,须以“,”隔开,如果为空,则默认获取所有节点指标数据,下沉节点编码参见附件《各省下沉计算节点代码表》", paramType = "query", dataType = "String"), @ApiImplicitParam(name = "node", value = "下沉节点编码,如果多个,须以“,”隔开,如果为空,则默认获取所有节点指标数据,下沉节点编码参见附件《各省下沉计算节点代码表》", paramType = "query", dataType = "String"),
@ApiImplicitParam(name = "type", value = "周期类型:1-年,2-季度,3-月度,4-周,5-日,6-小时", paramType = "query", dataType = "int", required = true), @ApiImplicitParam(name = "type", value = "周期类型:1-年,2-季度,3-月度,4-周,5-日,6-小时", paramType = "query", dataType = "int", required = true),
@ApiImplicitParam(name = "cycle", value = "周期值,根据周期类型,周期值格式也不同,具体要求如下:" + @ApiImplicitParam(name = "cycle", value = "周期值,根据周期类型,周期值格式也不同,具体要求如下:" +
...@@ -327,5 +339,188 @@ public class ApiController { ...@@ -327,5 +339,188 @@ public class ApiController {
return new Result<Map<String, Object>>().ok(resultMap); return new Result<Map<String, Object>>().ok(resultMap);
} }
*/
@Login
@GetMapping("getBdajobConfig")
@ApiOperation("获取指标")
@ApiImplicitParams({
@ApiImplicitParam(name = Constant.PAGE, value = "当前页码,从1开始", paramType = "query", dataType = "int"),
@ApiImplicitParam(name = Constant.LIMIT, value = "每页显示记录数", paramType = "query", dataType = "int"),
@ApiImplicitParam(name = Constant.ORDER_FIELD, value = "排序字段", paramType = "query", dataType = "String"),
@ApiImplicitParam(name = Constant.ORDER, value = "排序方式,可选值(asc、desc)", paramType = "query", dataType = "String"),
@ApiImplicitParam(name = "indice", value = "指标编码", paramType = "query", dataType = "String"),
@ApiImplicitParam(name = "indiceName", value = "指标名称", paramType = "query", dataType = "String"),
@ApiImplicitParam(name = "indiceDesc", value = "指标描述", paramType = "query", dataType = "String"),
@ApiImplicitParam(name = "type", value = "指标类型", paramType = "query", dataType = "String")
})
public Result<PageData<IndiceDTO>> getBdajobConfig(@ApiIgnore @RequestParam Map<String, Object> params) {
params = MapUtil.filter(params, new Editor<Map.Entry<String, Object>>() {
@Override
public Map.Entry<String, Object> edit(Map.Entry<String, Object> stringObjectEntry) {
if(Objects.equals(stringObjectEntry.getValue(),"null")){
return null;
}else{
return stringObjectEntry;
}
}
});
PageData<IndiceDTO> page = indiceService.page(params);
return new Result<PageData<IndiceDTO>>().ok(page);
}
@Login
@GetMapping("getBusinessIndiceByCycle")
@ApiOperation("获取结果")
@ApiImplicitParams({
@ApiImplicitParam(name = "node", value = "下沉节点编码,如果多个,须以“,”隔开,如果为空,则默认获取所有节点指标数据,下沉节点编码参见附件《各省下沉计算节点代码表》", paramType = "query", dataType = "String"),
@ApiImplicitParam(name = "type", value = "周期类型:1-年,2-季度,3-月度,4-周,5-日,6-小时", paramType = "query", dataType = "int", required = true),
@ApiImplicitParam(name = "cycle", value = "周期值,根据周期类型,周期值格式也不同,具体要求如下:" +
"① 年,4位年度值,如2020;" +
"② 季度,4位年度值+2位季度序号(01-04),如202001;" +
"③ 月度,4位年度值+2位月度值(01-12),如202001;" +
"④ 周,4位年度值+2位周序号(01-52),如202016;" +
"⑤ 日,4位年度值+2位月度值+2位日数值,如20200101;" +
"⑥ 小时,4位年度值+2位月度值+2位日数值+2位小时数,如2020010112", paramType = "query", dataType = "String", required = true),
@ApiImplicitParam(name = "indice", value = "指标编码,如果有多个指标,须以“,”隔开,下沉计算项目组将定期发布《下沉计算指标编码表》", paramType = "query", dataType = "String", required = true)
})
public Result<Map<String, Object>> getOoziejobresult(@ApiIgnore @RequestParam Map<String, Object> params) {
params = MapUtil.filter(params, new Editor<Map.Entry<String, Object>>() {
@Override
public Map.Entry<String, Object> edit(Map.Entry<String, Object> stringObjectEntry) {
if(Objects.equals(stringObjectEntry.getValue(),"null")){
return null;
}else{
return stringObjectEntry;
}
}
});
Integer type = Convert.toInt(params.get("type"));
if (type == null) {
throw new RenException("周期类型不能为空");
}
String cycle = Convert.toStr(params.get("cycle"));
if (StrUtil.isBlank(cycle)) {
throw new RenException("周期值不能为空");
}
String indice = Convert.toStr(params.get("indice"));
if (StrUtil.isBlank(indice)) {
throw new RenException("指标不能为空");
}
//处理时间
Date beginTime = null;
Date endTime = null;
if (Objects.equals(type, 1)) {
DateTime date = DateUtil.parse(cycle, "yyyy");
beginTime = DateUtil.beginOfYear(date);
endTime = DateUtil.endOfYear(date);
} else if (Objects.equals(type, 2)) {
if (StrUtil.length(cycle) >= 6) {
DateTime dateTime = DateUtil.parse(StrUtil.sub(cycle, 0, 4), "yyyy");
Integer quarter = Convert.toInt(StrUtil.sub(cycle, 4, 6));
if (dateTime != null && quarter != null) {
DateTime date = DateUtil.offsetMonth(dateTime, 3 * (quarter - 1));
beginTime = DateUtil.beginOfQuarter(date);
endTime = DateUtil.endOfQuarter(date);
}
}
} else if (Objects.equals(type, 3)) {
DateTime date = DateUtil.parse(cycle, "yyyyMM");
beginTime = DateUtil.beginOfMonth(date);
endTime = DateUtil.endOfMonth(date);
} else if (Objects.equals(type, 4)) {
if (StrUtil.length(cycle) >= 6) {
DateTime dateTime = DateUtil.parse(StrUtil.sub(cycle, 0, 4), "yyyy");
Integer week = Convert.toInt(StrUtil.sub(cycle, 4, 6));
if (dateTime != null && week != null) {
DateTime date = DateUtil.offsetWeek(dateTime, week - 1);
beginTime = DateUtil.beginOfWeek(date);
endTime = DateUtil.endOfWeek(date);
}
}
} else if (Objects.equals(type, 5)) {
DateTime date = DateUtil.parse(cycle, "yyyyMMdd");
beginTime = DateUtil.beginOfDay(date);
endTime = DateUtil.endOfDay(date);
} else if (Objects.equals(type, 6)) {
DateTime date = DateUtil.parse(cycle, "yyyyMMddHH");
beginTime = date;
endTime = DateUtil.offsetSecond(DateUtil.offsetHour(date, 1), -1);
}
if (beginTime == null || endTime == null) {
throw new RenException("时间解析失败");
}
Map<String, Object> paramsMap = new HashMap<>();
//获取所有节点
paramsMap.clear();
paramsMap.put("nodeIds", Convert.toStr(params.get("node")));
List<AgentnodeDTO> agentnodeDtoList = agentnodeService.list(paramsMap);
//根据指标编码获取指标
paramsMap.clear();
paramsMap.put("indices", Convert.toStr(params.get("indice")));
List<IndiceDTO> indiceDTOList = indiceService.list(paramsMap);
//获取结果
paramsMap.clear();
paramsMap.put("nodeIds", Convert.toStr(params.get("node")));
paramsMap.put("indiceIds", StrUtil.join(",",indiceDTOList.stream().map(IndiceDTO::getId).collect(Collectors.toList())));
paramsMap.put("beginTime", DateUtil.format(beginTime, "yyyy-MM-dd HH:mm:ss"));
paramsMap.put("endTime", DateUtil.format(endTime, "yyyy-MM-dd HH:mm:ss"));
paramsMap.put("orderBy", "t.create_time asc");
List<IndiceDataDTO> indiceDataDTOList =indiceDataService.getJoinList(paramsMap);
LinkedHashMap<String, LinkedHashMap<String, ArrayList<Object>>> resultLinkedHashMap = new LinkedHashMap<>();
for(IndiceDataDTO indiceDataDTO:indiceDataDTOList){
LinkedHashMap<String, ArrayList<Object>> stringArrayListLinkedHashMap = resultLinkedHashMap.get(Convert.toStr(indiceDataDTO.getIndiceId()));
if(stringArrayListLinkedHashMap == null){
stringArrayListLinkedHashMap = new LinkedHashMap<>();
resultLinkedHashMap.put(Convert.toStr(indiceDataDTO.getIndiceId()),stringArrayListLinkedHashMap);
}
ArrayList<Object> objects = stringArrayListLinkedHashMap.get(Convert.toStr(indiceDataDTO.getNodeId()));
if(objects == null){
objects = new ArrayList<>();
stringArrayListLinkedHashMap.put(Convert.toStr(indiceDataDTO.getNodeId()),objects);
}
objects.add(indiceDataDTO.getResultData());
}
//按格式封装数据
Map<String, Object> resultMap = new HashMap<>();
resultMap.put("type", params.get("type"));
resultMap.put("cycle", params.get("cycle"));
resultMap.put("total", indiceDTOList.size());
List<Object> indiceList = new ArrayList<>();
resultMap.put("list", indiceList);
for(IndiceDTO indiceDTO:indiceDTOList){
Map<String,Object> indiceMap = new HashMap<>();
indiceList.add(indiceMap);
indiceMap.put("indice",indiceDTO.getIndice());
indiceMap.put("total",agentnodeDtoList.size());
List<Map<String,Object>> nodeList = new ArrayList<>();
indiceMap.put("list",nodeList);
LinkedHashMap<String, ArrayList<Object>> stringArrayListLinkedHashMap = resultLinkedHashMap.get(Convert.toStr(indiceDTO.getId()));
for(AgentnodeDTO agentnodeDTO:agentnodeDtoList){
Map<String,Object> nodeMap = new HashMap<>();
nodeMap.put("node",agentnodeDTO.getId());
if(MapUtil.isNotEmpty(stringArrayListLinkedHashMap) && CollUtil.isNotEmpty(stringArrayListLinkedHashMap.get(Convert.toStr(agentnodeDTO.getId())))){
nodeMap.put("value",stringArrayListLinkedHashMap.get(Convert.toStr(agentnodeDTO.getId())));
}else{
nodeMap.put("value",new ArrayList<>());
}
nodeList.add(nodeMap);
}
}
return new Result<Map<String, Object>>().ok(resultMap);
}
} }
\ No newline at end of file
package com.link.dao;
import com.link.common.dao.BaseDao;
import com.link.entity.IndiceEntity;
import com.link.entity.IndiceEntity;
import org.apache.ibatis.annotations.Mapper;
/**
* 指标集合表
*
* @author Mr.Feng zhijian.feng@hrtuoyu.com
* @since 1.0.0 2020-05-15
*/
@Mapper
public interface IndiceDao extends BaseDao<IndiceEntity> {
}
\ No newline at end of file
package com.link.dao;
import com.link.common.dao.BaseDao;
import com.link.dto.IndiceDataDTO;
import com.link.entity.IndiceDataEntity;
import org.apache.ibatis.annotations.Mapper;
import java.util.List;
import java.util.Map;
/**
* 指标数据表
*
* @author Mr.Feng zhijian.feng@hrtuoyu.com
* @since 1.0.0 2020-05-15
*/
@Mapper
public interface IndiceDataDao extends BaseDao<IndiceDataEntity> {
List<IndiceDataEntity> getJoinList(Map<String, Object> paramsMap);
}
\ No newline at end of file
package com.link.dto;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;
/**
* 指标集合表
*
* @author Mr.Feng zhijian.feng@hrtuoyu.com
* @since 1.0.0 2020-05-15
*/
@Data
@ApiModel(value = "指标集合表")
public class IndiceDTO implements Serializable {
private static final long serialVersionUID = 1L;
@ApiModelProperty(value = "id")
private Long id;
@ApiModelProperty(value = "应用id")
private String jobId;
@ApiModelProperty(value = "指标编码")
private String indice;
@ApiModelProperty(value = "指标名称")
private String indiceName;
@ApiModelProperty(value = "指标解释")
private String indiceDesc;
@ApiModelProperty(value = "所属分类")
private String type;
@ApiModelProperty(value = "创建时间")
private Date createTime;
}
\ No newline at end of file
package com.link.dto;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;
/**
* 指标数据表
*
* @author Mr.Feng zhijian.feng@hrtuoyu.com
* @since 1.0.0 2020-05-15
*/
@Data
@ApiModel(value = "指标数据表")
public class IndiceDataDTO implements Serializable {
private static final long serialVersionUID = 1L;
@ApiModelProperty(value = "id")
private Long id;
@ApiModelProperty(value = "节点id")
private Long nodeId;
@ApiModelProperty(value = "单次任务id")
private String oozieJobId;
@ApiModelProperty(value = "指标id")
private Long indiceId;
@ApiModelProperty(value = "周期参数")
private String cycleIndex;
@ApiModelProperty(value = "周期类型")
private String cycleType;
@ApiModelProperty(value = "结果数据")
private String resultData;
@ApiModelProperty(value = "创建时间")
private Date createTime;
}
\ No newline at end of file
package com.link.entity;
import com.baomidou.mybatisplus.annotation.TableName;
import com.link.common.entity.BaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.util.Date;
/**
* 指标数据表
*
* @author Mr.Feng zhijian.feng@hrtuoyu.com
* @since 1.0.0 2020-05-15
*/
@Data
@EqualsAndHashCode(callSuper=false)
@TableName("indice_data")
public class IndiceDataEntity{
private static final long serialVersionUID = 1L;
/**
* id
*/
private Long id;
/**
* 节点id
*/
private Long nodeId;
/**
* 单次任务id
*/
private String oozieJobId;
/**
* 指标id
*/
private Long indiceId;
/**
* 周期参数
*/
private String cycleIndex;
/**
* 周期类型
*/
private String cycleType;
/**
* 结果数据
*/
private String resultData;
/**
* 创建时间
*/
private Date createTime;
}
\ No newline at end of file
package com.link.entity;
import com.baomidou.mybatisplus.annotation.TableName;
import com.link.common.entity.BaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.util.Date;
/**
* 指标集合表
*
* @author Mr.Feng zhijian.feng@hrtuoyu.com
* @since 1.0.0 2020-05-15
*/
@Data
@EqualsAndHashCode(callSuper=false)
@TableName("indice")
public class IndiceEntity{
private static final long serialVersionUID = 1L;
/**
* id
*/
private Long id;
/**
* 应用id
*/
private String jobId;
/**
* 指标编码
*/
private String indice;
/**
* 指标名称
*/
private String indiceName;
/**
* 指标解释
*/
private String indiceDesc;
/**
* 所属分类
*/
private String type;
/**
* 创建时间
*/
private Date createTime;
}
\ No newline at end of file
package com.link.service;
import com.link.common.service.CrudService;
import com.link.dto.IndiceDataDTO;
import com.link.entity.IndiceDataEntity;
import com.link.dto.IndiceDataDTO;
import com.link.entity.IndiceDataEntity;
import java.util.List;
import java.util.Map;
/**
* 指标数据表
*
* @author Mr.Feng zhijian.feng@hrtuoyu.com
* @since 1.0.0 2020-05-15
*/
public interface IndiceDataService extends CrudService<IndiceDataEntity, IndiceDataDTO> {
List<IndiceDataDTO> getJoinList(Map<String, Object> paramsMap);
}
\ No newline at end of file
package com.link.service;
import com.link.common.service.CrudService;
import com.link.dto.IndiceDTO;
import com.link.entity.IndiceEntity;
import com.link.dto.IndiceDTO;
import com.link.entity.IndiceEntity;
/**
* 指标集合表
*
* @author Mr.Feng zhijian.feng@hrtuoyu.com
* @since 1.0.0 2020-05-15
*/
public interface IndiceService extends CrudService<IndiceEntity, IndiceDTO> {
}
\ No newline at end of file
package com.link.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.link.common.service.impl.CrudServiceImpl;
import com.link.common.utils.ConvertUtils;
import com.link.dao.IndiceDataDao;
import com.link.dto.IndiceDataDTO;
import com.link.entity.IndiceDataEntity;
import com.link.dao.IndiceDataDao;
import com.link.dto.IndiceDataDTO;
import com.link.entity.IndiceDataEntity;
import com.link.entity.IndiceEntity;
import com.link.service.IndiceDataService;
import com.link.service.IndiceDataService;
import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Service;
import java.util.List;
import java.util.Map;
/**
* 指标数据表
*
* @author Mr.Feng zhijian.feng@hrtuoyu.com
* @since 1.0.0 2020-05-15
*/
@Service
public class IndiceDataServiceImpl extends CrudServiceImpl<IndiceDataDao, IndiceDataEntity, IndiceDataDTO> implements IndiceDataService {
@Override
public QueryWrapper<IndiceDataEntity> getWrapper(Map<String, Object> params){
String id = (String)params.get("id");
QueryWrapper<IndiceDataEntity> wrapper = new QueryWrapper<>();
wrapper.eq(StringUtils.isNotBlank(id), "id", id);
return wrapper;
}
@Override
public List<IndiceDataDTO> getJoinList(Map<String, Object> paramsMap) {
return ConvertUtils.sourceToTarget(baseDao.getJoinList(paramsMap), IndiceDataDTO.class);
}
}
\ No newline at end of file
package com.link.service.impl;
import cn.hutool.core.convert.Convert;
import cn.hutool.core.util.ArrayUtil;
import cn.hutool.core.util.StrUtil;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.link.common.service.impl.CrudServiceImpl;
import com.link.dao.IndiceDao;
import com.link.dto.IndiceDTO;
import com.link.entity.IndiceEntity;
import com.link.dao.IndiceDao;
import com.link.dto.IndiceDTO;
import com.link.entity.IndiceEntity;
import com.link.service.IndiceService;
import com.link.service.IndiceService;
import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Service;
import java.util.Map;
/**
* 指标集合表
*
* @author Mr.Feng zhijian.feng@hrtuoyu.com
* @since 1.0.0 2020-05-15
*/
@Service
public class IndiceServiceImpl extends CrudServiceImpl<IndiceDao, IndiceEntity, IndiceDTO> implements IndiceService {
@Override
public QueryWrapper<IndiceEntity> getWrapper(Map<String, Object> params){
String id = (String)params.get("id");
String indice = (String)params.get("indice");
String indiceName = (String)params.get("indiceName");
String indiceDesc = (String)params.get("indiceDesc");
String type = (String)params.get("type");
String[] indiceArr = (String[])params.get("indiceArr");
String indices = Convert.toStr(params.get("indices"));
QueryWrapper<IndiceEntity> wrapper = new QueryWrapper<>();
wrapper.eq(StringUtils.isNotBlank(id), "id", id);
wrapper.eq(StringUtils.isNotBlank(indice), "indice", indice);
wrapper.eq(StringUtils.isNotBlank(indiceName), "indice_name", indiceName);
wrapper.eq(StringUtils.isNotBlank(indiceDesc), "indice_desc", indiceDesc);
wrapper.eq(StringUtils.isNotBlank(type), "type", type);
if(ArrayUtil.isNotEmpty(indiceArr)){
wrapper.in("indice",indiceArr);
}
wrapper.inSql(StrUtil.isNotBlank(indices),"indice",indices);
return wrapper;
}
}
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.link.dao.IndiceDao">
</mapper>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.link.dao.IndiceDataDao">
<select id="getJoinList" resultType="com.link.entity.IndiceDataEntity">
select t.*
from indice_data t
<where>
<if test="nodeId != null and nodeId != ''">
and t.node_id = #{nodeId}
</if>
<if test="indiceIds != null and indiceIds != ''">
and t.indice_id in (${indiceIds})
</if>
<if test="beginTime != null and beginTime != ''">
and t.create_time &gt;= #{beginTime}
</if>
<if test="endTime != null and endTime != ''">
and t.create_time &lt;= #{endTime}
</if>
<if test="nodeIds != null and nodeIds != ''">
and t.node_id in (${nodeIds})
</if>
</where>
<if test="orderBy != null and orderBy != ''">
order by ${orderBy}
</if>
</select>
</mapper>
\ No newline at end of file
...@@ -45,7 +45,7 @@ ...@@ -45,7 +45,7 @@
<hutool.version>5.1.2</hutool.version> <hutool.version>5.1.2</hutool.version>
<gson.version>2.8.6</gson.version> <gson.version>2.8.6</gson.version>
<jsoup.version>1.11.3</jsoup.version> <jsoup.version>1.11.3</jsoup.version>
<knife4j.version>2.0.2</knife4j.version> <knife4j.version>2.0.1</knife4j.version>
<lombok.version>1.18.4</lombok.version> <lombok.version>1.18.4</lombok.version>
<docker.plugin.version>1.1.1</docker.plugin.version> <docker.plugin.version>1.1.1</docker.plugin.version>
</properties> </properties>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment