新火炬后端单体项目初始化代码
zhangherong
2 天以前 1c38849eebe0179b7ebad1db30b3335a41cc47e9
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
<?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="org.jeecg.modules.andon.mapper.AndonButtonConfigMapper">
    <select id="getAndonButtonById" resultType="org.jeecg.modules.andon.entity.AndonButtonConfig">
        SELECT * FROM andon_button_config WHERE id = #{id} and del_flag = 0 and button_status = '启用'
    </select>
    <select id="queryUserAndonButtonList" resultType="org.jeecg.modules.andon.dto.AndonButtonDTO">
        select arc.id,
               abc.id as button_id,
               abc.button_name,
               abc.button_code,
               (select count(1)
                from andon_order ao
                where ao.button_id = arc.button_id
                  and ao.factory_id = arc.factory_id
                  and ao.order_status != '3') as blinking_flag,
            STUFF((SELECT ',' + CAST(ao.id AS VARCHAR)
            FROM andon_order ao
            WHERE ao.button_id = arc.button_id
            and ao.factory_id = arc.factory_id
            FOR XML PATH('')), 1, 1, '') as order_ids
        from andon_response_config arc
            left join andon_button_config abc
        on arc.button_id = abc.id
        where arc.factory_id=#{factoryId};
    </select>
</mapper>