<?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.ruoyi.production.mapper.ProductionTeamMapper">
|
|
<select id="pageProductionTeam" resultType="com.ruoyi.production.dto.ProductionTeamDto">
|
select t.*, w.name as workshop_name
|
from production_team t
|
left join workshop w on t.workshop_id = w.id
|
<where>
|
<if test="c.teamName != null and c.teamName != ''">
|
and t.team_name like concat('%',#{c.teamName},'%')
|
</if>
|
<if test="c.workshopId != null">
|
and t.workshop_id = #{c.workshopId}
|
</if>
|
<if test="c.status != null">
|
and t.status = #{c.status}
|
</if>
|
</where>
|
order by t.id desc
|
</select>
|
|
<select id="listProductionTeamDto" resultType="com.ruoyi.production.dto.ProductionTeamDto">
|
select t.*, w.name as workshop_name
|
from production_team t
|
left join workshop w on t.workshop_id = w.id
|
<where>
|
<if test="workshopId != null">
|
and t.workshop_id = #{workshopId}
|
</if>
|
</where>
|
order by t.id asc
|
</select>
|
</mapper>
|