Commit 195d7af2 by zhangkb

添加根据基础项id list获取基础项信息

parent 796d700b
......@@ -72,6 +72,12 @@ public class IndicatorsDefCtrl {
return baseIndDefService.getById(indId);
}
@ApiOperation(value = "根据id List查询基础指标详情List", notes = "根据id List查询基础指标详情List")
@PostMapping(value = "/getBaseIndByIdList")
public List<BaseIndDef> getBaseIndByIdList(@RequestParam List<String> indIds) throws Exception{
return baseIndDefService.getByIdList(indIds);
}
@ApiOperation(value = "根据关键字查询基础指标", notes = "根据关键字查询基础指标")
@PostMapping(value = "/getByPageAndKeyword")
public Map<String,Object> getByPageAndKeyword(@RequestParam Integer catalogId,
......
......@@ -20,4 +20,6 @@ public interface BaseIndDefMapper extends BaseMapper<BaseIndDef>{
public String getMaxIndId(@Param("code")String code,@Param("length")int length);
public List<BaseIndDef> getByIndFormatLike(@Param("indId")String indId);
public List<BaseIndDef> getByIdIn(@Param("indIds") List<String> indIds);
}
......@@ -70,9 +70,11 @@ public class BaseIndDefService {
}
public BaseIndDef getById(String indId) throws Exception{
BaseIndDef baseIndDef = new BaseIndDef();
baseIndDef.setIndId(indId);
return baseIndDefMapper.selectOne(baseIndDef);
return baseIndDefMapper.selectByPrimaryKey(indId);
}
public List<BaseIndDef> getByIdList(List<String> indIds){
return baseIndDefMapper.getByIdIn(indIds);
}
public String delete(List<String> indIds) throws Exception{
......
......@@ -46,4 +46,13 @@
from base_ind_def
where ind_format like #{indId}
</select>
<select id="getByIdIn" resultType="com.keymobile.indicators.model.entity.indicators.BaseIndDef" >
select *
from base_ind_def
where ind_id in
<foreach item="id" collection="indIds" open="(" close=")" separator=",">
#{id}
</foreach>
</select>
</mapper>
\ No newline at end of file
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