xuhy
10 天以前 508f3e225df87e0da974424981e7782fc5ce875c
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.ruoyi.system.mapper.TFoundationPersonMapper">
 
    <!-- 通用查询映射结果 -->
    <resultMap id="BaseResultMap" type="com.ruoyi.system.domain.TFoundationPerson">
        <id column="id" property="id" />
        <result column="mealCount" property="mealCount" />
        <result column="createTime" property="createTime" />
        <result column="shopId" property="shopId" />
        <result column="mealType" property="mealType" />
    </resultMap>
 
    <!-- 通用查询结果列 -->
    <sql id="Base_Column_List">
        id, mealCount,createTime,shopId
    </sql>
    <select id="getList" resultType="com.ruoyi.system.vo.TFoundationPersonVO">
        select
            tfp.id, tfp.mealCount,tfp.createTime,tfp.shopId,tfp.mealType,ts.shopName
        from t_foundation_person tfp
        left join t_shop ts on ts.id = tfp.shopId
        <where>
            <if test="query.shopName != null and query.shopName != ''">
                and ts.shopName like concat('%', #{query.shopName}, '%')
            </if>
        </where>
        ORDER BY tfp.createTime DESC
    </select>
    <select id="getSetList" resultType="com.ruoyi.system.vo.TFoundationPersonVO">
        select
        tfp.id, tfp.mealCount,tfp.createTime,tfp.shopId,tfp.mealType
        from t_foundation_person tfp
        ORDER BY tfp.createTime DESC
    </select>
 
</mapper>