ab
2024-11-05 bead00668eebce8d39d027515d564376de2f5978
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
<?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.nova.sankuai.infra.mapper.CostConfigMapper">
 
    <select id="pageCostConfigList" resultType="com.nova.sankuai.domain.vo.CostConfigVo">
        SELECT
        id as id,
        channel_id as channelId,
        channel_name as channelName,
        channel_code as channelCode,
        default_flag as defaultFlag,
        relation_city as relationCity,
        relation_city_id as relationCityId,
        If(default_flag=1,'默认配置',relation_city_name) as relationCityName,
        uv_price as uvPrice,
        register_price as registerPrice,
        finished_price as finishedPrice
        from cost_config
        <where>
            is_delete = 0
            <if test="pageDto.channelCode!=null">
                and channel_code = #{pageDto.channelCode}
            </if>
            <if test="pageDto.relationCityId!=null and pageDto.relationCityId!=''">
                and relation_city_id = #{pageDto.relationCityId}
            </if>
        </where>
        order by channel_id
    </select>
 
    <update id="deleteCostConfig">
        update cost_config set is_delete = 1 where id = #{id}
    </update>
 
</mapper>