吴羡
5 天以前 cde451468d868fc7d3044d915c5b71e7cb9cb203
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
<?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>