You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
75 lines
4.3 KiB
75 lines
4.3 KiB
<?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.qs.serve.modules.his.mapper.HisUserChannelPointMapper">
|
|
|
|
<resultMap id="hisUserChannelPointMap" type="com.qs.serve.modules.his.entity.HisUserChannelPoint" >
|
|
<result property="id" column="id"/>
|
|
<result property="userId" column="user_id"/>
|
|
<result property="pointId" column="point_id"/>
|
|
<result property="sourceType" column="source_type"/>
|
|
<result property="sourceIds" column="source_ids"/>
|
|
<result property="remark" column="remark"/>
|
|
<result property="createTime" column="create_time"/>
|
|
<result property="updateTime" column="update_time"/>
|
|
<result property="tenantId" column="tenant_id"/>
|
|
<result property="delFlag" column="del_flag"/>
|
|
<result property="createBy" column="create_by"/>
|
|
<result property="updateBy" column="update_by"/>
|
|
<result property="costFlag" column="cost_flag"/>
|
|
</resultMap>
|
|
|
|
<sql id="hisUserChannelPointSql">
|
|
his_user_channel_point.`id`,
|
|
his_user_channel_point.`user_id`,
|
|
his_user_channel_point.`point_id`,
|
|
his_user_channel_point.`source_type`,
|
|
his_user_channel_point.`source_ids`,
|
|
his_user_channel_point.`remark`,
|
|
his_user_channel_point.`create_time`,
|
|
his_user_channel_point.`update_time`,
|
|
his_user_channel_point.`tenant_id`,
|
|
his_user_channel_point.`del_flag`,
|
|
his_user_channel_point.`create_by`,
|
|
his_user_channel_point.`update_by`,
|
|
his_user_channel_point.`cost_flag` </sql>
|
|
|
|
<select id="selectHisUserChannelPointList" parameterType="com.qs.serve.modules.his.entity.HisUserChannelPoint" resultMap="hisUserChannelPointMap">
|
|
SELECT <include refid="hisUserChannelPointSql"/> FROM `his_user_channel_point` `his_user_channel_point`
|
|
<where>
|
|
and `his_user_channel_point`.`cost_flag` = 0
|
|
<if test="query.id != null"> and `his_user_channel_point`.`id` = #{query.id}</if>
|
|
<if test="query.userId != null and query.userId != ''"> and `his_user_channel_point`.`user_id` = #{query.userId}</if>
|
|
<if test="query.pointId != null"> and `his_user_channel_point`.`point_id` = #{query.pointId}</if>
|
|
<if test="query.sourceType != null"> and `his_user_channel_point`.`source_type` = #{query.sourceType}</if>
|
|
<if test="query.sourceIds != null and query.sourceIds != ''"> and `his_user_channel_point`.`source_ids` = #{query.sourceIds}</if>
|
|
<if test="query.remark != null and query.remark != ''"> and `his_user_channel_point`.`remark` = #{query.remark}</if>
|
|
<if test="query.createTime != null"> and `his_user_channel_point`.`create_time` = #{query.createTime}</if>
|
|
<if test="query.updateTime != null"> and `his_user_channel_point`.`update_time` = #{query.updateTime}</if>
|
|
<if test="query.tenantId != null and query.tenantId != ''"> and `his_user_channel_point`.`tenant_id` = #{query.tenantId}</if>
|
|
<if test="query.createBy != null and query.createBy != ''"> and `his_user_channel_point`.`create_by` = #{query.createBy}</if>
|
|
<if test="query.updateBy != null and query.updateBy != ''"> and `his_user_channel_point`.`update_by` = #{query.updateBy}</if>
|
|
<if test="query.costFlag != null"> and `his_user_channel_point`.`cost_flag` = #{query.costFlag}</if>
|
|
|
|
<if test="query.sourceIdsList!=null and query.sourceIdsList.size > 0">
|
|
and
|
|
<foreach collection="query.sourceIdsList" item="selectId" index="i" open="(" close=")" separator=",">
|
|
<if test="idx!=0">
|
|
or
|
|
</if>
|
|
`his_user_channel_point`.`source_ids` like concat(#{selectId},'_%')
|
|
</foreach>
|
|
</if>
|
|
<if test="query.userIdList!=null and query.userIdList.size > 0">
|
|
and `his_user_channel_point`.`user_id` in
|
|
<foreach collection="query.userIdList" item="selectId" index="i" open="(" close=")" separator=",">
|
|
#{selectId}
|
|
</foreach>
|
|
</if>
|
|
|
|
|
|
</where>
|
|
</select>
|
|
|
|
</mapper>
|
|
|