<?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.TIntegralGoodsMapper">
|
|
<!-- 通用查询映射结果 -->
|
<resultMap id="BaseResultMap" type="com.stylefeng.guns.modular.system.model.TIntegralGoods">
|
<id column="id" property="id" />
|
<result column="insertTime" property="insertTime" />
|
<result column="name" property="name" />
|
<result column="imgUrl" property="imgUrl" />
|
<result column="integral" property="integral" />
|
<result column="instructions" property="instructions" />
|
<result column="state" property="state" />
|
<result column="insertUserId" property="insertUserId" />
|
<result column="insertUserRole" property="insertUserRole" />
|
</resultMap>
|
|
<!-- 通用查询结果列 -->
|
<sql id="Base_Column_List">
|
id, insertTime, name, imgUrl, integral, instructions, state, insertUserId, insertUserRole
|
</sql>
|
|
<!--根据条件查询积分商品列表-->
|
<select id="getIntegralGoodsList" resultType="map" parameterType="com.baomidou.mybatisplus.plugins.Page">
|
SELECT * FROM t_integral_goods as o
|
<where>
|
o.state != 3
|
<if test="beginTime != null and beginTime != '' and endTime != null and endTime != ''">
|
AND (o.insertTime between CONCAT(#{beginTime},' 00:00:00') and CONCAT(#{endTime},' 23:59:59'))
|
</if>
|
<if test="name != null and name != ''">
|
and o.name LIKE CONCAT('%',#{name},'%')
|
</if>
|
<if test="state != null and state != ''">
|
and o.state = #{state}
|
</if>
|
</where>
|
order by o.id desc
|
</select>
|
|
</mapper>
|