<?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>
|