This commit is contained in:
DirectionOfMind 2021-01-21 12:02:33 +08:00
parent 3e394411ff
commit b57fcd6943
2 changed files with 15 additions and 6 deletions

View File

@ -37,4 +37,9 @@ public class IndicatorLibraryDto {
//排序
@ApiModelProperty(value = "排序", name = "sort")
private Integer sort;
@ApiModelProperty(value = "类型名称", name = "typeName")
private String typeName;
}

View File

@ -92,18 +92,22 @@
</update>
<select id="selectIndicatorLibrarysByReq" resultType="com.lz.modules.performance.dto.IndicatorLibraryDto">
select id ,name,type,indicator_type, weight, key_result, sort from lz_indicator_library
where is_delete = 0
select l.id id,l.name name,l.type type,weight, key_result,l.sort,t.name typeName
from lz_indicator_library l
LEFT JOIN lz_indicator_type t
on l.type = t.id
where l.is_delete = 0 and t.is_delete = 0
<if test="req.name!=null and req.name!=''">
and name LIKE CONCAT('%',#{req.name},'%')
and l.name LIKE CONCAT('%',#{req.name},'%')
</if>
<if test="req.indicatorType!=null">
and indicator_type = #{req.indicatorType}
and l.indicator_type = #{req.indicatorType}
</if>
<if test="req.type!=null and req.type!=0">
and type = #{req.type}
and l.type = #{req.type}
</if>
order by sort
order by l.sort
</select>
<update id="deleteIndicatorLibrarysByIds">