RuoYi/ruoyi-vip/src/main/resources/mapper/vip/VipUserOrdersMapper.xml

42 lines
2.2 KiB
XML
Raw Normal View History

2019-01-25 14:05:28 +08:00
<?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.vip.mapper.VipUserOrdersMapper">
<resultMap type="VipUserOrders" id="VipUserOrdersResult">
<result property="id" column="id" />
<result property="vipUserId" column="vip_user_id" />
<result property="trainCourseId" column="train_course_id" />
<result property="price" column="price" />
<result property="createBy" column="create_by" />
<result property="createDate" column="create_date" />
<result property="updateBy" column="update_by" />
<result property="updateDate" column="update_date" />
<result property="remarks" column="remarks" />
<result property="delFlag" column="del_flag" />
</resultMap>
<sql id="selectVipUserOrdersVo">
id, vip_user_id, train_course_id, price, create_by, create_date, update_by, update_date, remarks, del_flag </sql>
<select id="selectVipUserOrdersList" parameterType="VipUserOrders" resultMap="VipUserOrdersResult">
select
<include refid="selectVipUserOrdersVo"/>
from vip_user_orders
<where>
<if test="id != null and id != '' "> and id = #{id}</if>
<if test="vipUserId != null "> and vip_user_id = #{vipUserId}</if>
<if test="trainCourseId != null "> and train_course_id = #{trainCourseId}</if>
<if test="price != null "> and price = #{price}</if>
<if test="createBy != null and createBy != '' "> and create_by = #{createBy}</if>
<if test="createDate != null "> and create_date = #{createDate}</if>
<if test="updateBy != null and updateBy != '' "> and update_by = #{updateBy}</if>
<if test="updateDate != null "> and update_date = #{updateDate}</if>
<if test="remarks != null and remarks != '' "> and remarks = #{remarks}</if>
<if test="delFlag != null and delFlag != '' "> and del_flag = #{delFlag}</if>
</where>
</select>
</mapper>