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.

125 lines
8.5 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.goods.mapper.GoodsFeedbackMapper">
<resultMap id="goodsFeedbackMap" type="com.qs.serve.modules.goods.entity.vo.GoodsFeedbackVo" >
<result property="id" column="id"/>
<result property="spuIds" column="spu_ids" typeHandler="com.qs.serve.common.framework.mybatis.handler.meta.SplitStringTypeHandler"/>
<result property="skuIds" column="sku_ids" typeHandler="com.qs.serve.common.framework.mybatis.handler.meta.SplitStringTypeHandler"/>
<result property="imgUrls" column="img_urls" typeHandler="com.qs.serve.common.framework.mybatis.handler.meta.SplitStringTypeHandler"/>
<result property="feedbackTypeId" column="feedback_type_id"/>
<result property="feedbackTypeNames" column="feedback_type_names" typeHandler="com.qs.serve.common.framework.mybatis.handler.meta.SplitStringTypeHandler"/>
<result property="feedbackText" column="feedback_text"/>
<result property="userId" column="user_id"/>
<result property="userCode" column="user_code"/>
<result property="userName" column="user_name"/>
<result property="goodsCheckerId" column="goods_checker_id"/>
<result property="goodsChecker" column="goods_checker"/>
<result property="goodsCheckRemark" column="goods_check_remark"/>
<result property="goodsCheckTime" column="goods_check_time"/>
<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="extProvince" column="ext_province"/>
<result property="extCity" column="ext_city"/>
<result property="extRegionArea" column="ext_region_area"/>
<result property="extTownship" column="ext_township"/>
<result property="extStreet" column="ext_street"/>
<result property="extStreetNumber" column="ext_street_number"/>
<result property="localX" column="local_x"/>
<result property="localY" column="local_y"/>
<result property="address" column="address"/>
</resultMap>
<sql id="goodsFeedbackSql">
goods_feedback.`id`,
goods_feedback.`spu_ids`,
goods_feedback.`sku_ids`,
goods_feedback.`img_urls`,
goods_feedback.`feedback_type_id`,
goods_feedback.`feedback_type_names`,
goods_feedback.`feedback_text`,
goods_feedback.`user_id`,
goods_feedback.`user_code`,
goods_feedback.`user_name`,
goods_feedback.`goods_checker_id`,
goods_feedback.`goods_checker`,
goods_feedback.`goods_check_remark`,
goods_feedback.`goods_check_time`,
goods_feedback.`remark`,
goods_feedback.`create_time`,
goods_feedback.`update_time`,
goods_feedback.`tenant_id`,
goods_feedback.`del_flag`,
goods_feedback.`create_by`,
goods_feedback.`update_by`,
goods_feedback.`ext_province`,
goods_feedback.`ext_city`,
goods_feedback.`ext_region_area`,
goods_feedback.`ext_township`,
goods_feedback.`ext_street`,
goods_feedback.`ext_street_number`,
goods_feedback.`local_x`,
goods_feedback.`local_y`,
goods_feedback.`address` </sql>
<select id="selectGoodsFeedbackList" parameterType="com.qs.serve.modules.goods.entity.GoodsFeedback" resultMap="goodsFeedbackMap">
SELECT <include refid="goodsFeedbackSql"/> FROM `goods_feedback` `goods_feedback`
<where>
and goods_feedback.del_flag = 0
<if test="query.id != null"> and `goods_feedback`.`id` = #{query.id}</if>
<if test="query.spuIds != null and query.spuIds != ''"> and `goods_feedback`.`spu_ids` = #{query.spuIds}</if>
<if test="query.skuIds != null and query.skuIds != ''"> and `goods_feedback`.`sku_ids` = #{query.skuIds}</if>
<if test="query.feedbackTypeId != null and query.feedbackTypeId != ''"> and `goods_feedback`.`feedback_type_id` = #{query.feedbackTypeId}</if>
<if test="query.feedbackText != null and query.feedbackText != ''"> and `goods_feedback`.`feedback_text` like concat('%',#{query.feedbackText},'%') </if>
<if test="query.userId != null and query.userId != ''"> and `goods_feedback`.`user_id` = #{query.userId}</if>
<if test="query.userCode != null and query.userCode != ''"> and `goods_feedback`.`user_code` like concat('%',#{query.userCode},'%') </if>
<if test="query.userName != null and query.userName != ''"> and `goods_feedback`.`user_name` like concat('%',#{query.userName},'%') </if>
<if test="query.goodsCheckerId != null and query.goodsCheckerId != ''"> and `goods_feedback`.`goods_checker_id` = #{query.goodsCheckerId}</if>
<if test="query.goodsChecker != null and query.goodsChecker != ''"> and `goods_feedback`.`goods_checker` = #{query.goodsChecker}</if>
<if test="query.goodsCheckRemark != null and query.goodsCheckRemark != ''"> and `goods_feedback`.`goods_check_remark` = #{query.goodsCheckRemark}</if>
<if test="query.goodsCheckTime != null"> and `goods_feedback`.`goods_check_time` = #{query.goodsCheckTime}</if>
<if test="query.remark != null and query.remark != ''"> and `goods_feedback`.`remark` = #{query.remark}</if>
<if test="query.createTime != null"> and `goods_feedback`.`create_time` = #{query.createTime}</if>
<if test="query.updateTime != null"> and `goods_feedback`.`update_time` = #{query.updateTime}</if>
<if test="query.tenantId != null and query.tenantId != ''"> and `goods_feedback`.`tenant_id` = #{query.tenantId}</if>
<if test="query.delFlag != null and query.delFlag != ''"> and `goods_feedback`.`del_flag` = #{query.delFlag}</if>
<if test="query.createBy != null and query.createBy != ''"> and `goods_feedback`.`create_by` = #{query.createBy}</if>
<if test="query.updateBy != null and query.updateBy != ''"> and `goods_feedback`.`update_by` = #{query.updateBy}</if>
<if test="query.extProvince != null and query.extProvince != ''"> and `goods_feedback`.`ext_province` = #{query.extProvince}</if>
<if test="query.extCity != null and query.extCity != ''"> and `goods_feedback`.`ext_city` = #{query.extCity}</if>
<if test="query.extRegionArea != null and query.extRegionArea != ''"> and `goods_feedback`.`ext_region_area` = #{query.extRegionArea}</if>
<if test="query.extTownship != null and query.extTownship != ''"> and `goods_feedback`.`ext_township` = #{query.extTownship}</if>
<if test="query.extStreet != null and query.extStreet != ''"> and `goods_feedback`.`ext_street` = #{query.extStreet}</if>
<if test="query.extStreetNumber != null and query.extStreetNumber != ''"> and `goods_feedback`.`ext_street_number` = #{query.extStreetNumber}</if>
<if test="query.localX != null and query.localX != ''"> and `goods_feedback`.`local_x` = #{query.localX}</if>
<if test="query.localY != null and query.localY != ''"> and `goods_feedback`.`local_y` = #{query.localY}</if>
<if test="query.address != null and query.address != ''"> and `goods_feedback`.`address` = #{query.address}</if>
<if test="query.selectUserIds!=null and query.selectUserIds.size > 0">
and goods_feedback.user_id in
<foreach collection="query.selectUserIds" item ="selectId" index="i" open="(" close=")" separator=",">
#{selectId}
</foreach>
</if>
<if test="query.selectTypesIds!=null and query.selectTypesIds.size > 0">
and goods_feedback.feedback_type_id in
<foreach collection="query.selectTypesIds" item ="selectId" index="i" open="(" close=")" separator=",">
#{selectId}
</foreach>
</if>
<if test="query.queryTypeName != null and query.queryTypeName != ''">
and FIND_IN_SET(#{query.queryTypeName},`goods_feedback`.`feedback_type_names`)
</if>
</where>
order by goods_feedback.id desc
</select>
</mapper>