liujie
2 天以前 67d06a785d5fc4524639ace27651c01ff05a4b58
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
35
36
37
38
39
40
<?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.other.mapper.TScreenContentMapper">
    <update id="carportData">
        update t_screen_carport
        set
            parking_place = #{parkingPlace},
            remain_place = #{remainPlace}
        where
            id =1
    </update>
 
    <select id="getCarDisCharge" resultType="java.math.BigDecimal">
        select
            sum(car_discharge)
        FROM t_screen_content
        WHERE
             site_id in
        <foreach item="item" index="index" collection="siteIds" open="(" separator="," close=")">
            #{item}
        </foreach>
    </select>
    <select id="getGreenElectricity" resultType="java.math.BigDecimal">
        select
        sum(green_electricity)
        FROM t_screen_content
        WHERE
        site_id in
        <foreach item="item" index="index" collection="siteIds" open="(" separator="," close=")">
            #{item}
        </foreach>
    </select>
    <select id="getCarportData" resultType="java.util.HashMap">
        select
            parking_place as parkingPlace,
            remain_place as remainPlace
        from
            t_screen_carport where id =1
    </select>
</mapper>