44323
2024-04-23 16b704d18a875d1fb63827aaa507790ba2bef5be
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
41
42
<?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.stylefeng.guns.modular.system.dao.PackageMapper">
 
    <!-- 通用查询映射结果 -->
    <resultMap id="BaseResultMap" type="com.stylefeng.guns.modular.system.model.Package">
        <id column="id" property="id" />
        <result column="positions" property="positions" />
        <result column="amount" property="amount" />
        <result column="price" property="price" />
    </resultMap>
 
    <!-- 通用查询结果列 -->
    <sql id="Base_Column_List">
        id, positions, amount, price
    </sql>
    <select id="packageList" resultType="com.stylefeng.guns.modular.system.vo.PackageVO">
        select t1.* from
        t_package t1
        where 1=1
        <if test="req.name!=null">
            and t1.name = #{req.name}
        </if>
         <if test="req.state!=null">
            and t1.state = #{req.state}
        </if>
        and t1.state!=3
        order by t1.id desc
    </select>
    <select id="selectPosition" resultType="com.stylefeng.guns.modular.system.vo.FitnessPositionVO">
        select t1.*,t2.name as typeName
        from t_fitness_position t1
        left join t_fitness_type t2 on t1.typeId = t2.id
        where 1=1
        <if test="req.typeId!=null">
            and t1.typeId = #{req.typeId}
        </if>
        and t1.isDelete = 0
        and t2.isDelete = 0
    </select>
 
</mapper>