<?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.dsh.course.mapper.EvaluationMapper">
|
|
<select id="listAll" resultType="com.dsh.guns.modular.system.model.TEvaluationListVo">
|
select t1.id,t1.appUserId,t1.score,t1.insertTime time,
|
t2.name shopName,t2.province pName,t2.city cName
|
from t_store_evaluation t1 left join t_store t2 on t1.storeId =t2.id
|
where t1.state !=3
|
<if test="provinceCode!=null and provinceCode !=''">
|
and t2.provinceCode =#{provinceCode}
|
</if>
|
<if test="cityCode!=null and cityCode !=''">
|
and t2.cityCode =#{cityCode}
|
</if>
|
<if test="shopName!=null and shopName !=''">
|
and t2.name like concat("%",#{shopName},"%")
|
</if>
|
<if test="name!=null and name !=''">
|
and t2.name like concat("%",#{name},"%")
|
</if>
|
<if test="operatorId != null and operatorId.size()>0">
|
AND t1.storeId IN
|
<foreach collection="operatorId" separator="," item="id" open="(" close=")">
|
#{id}
|
</foreach>
|
</if>
|
</select>
|
<select id="info" resultType="com.dsh.guns.modular.system.model.TEvaluationListVo">
|
select t1.id,t1.appUserId,t1.score,t1.insertTime time,t1.imgs,t1.content,t2.name shopName,t2.province pName,t2.city cName from t_store_evaluation t1 left join t_store t2 on t1.storeId =t2.id
|
where t1.id =#{id}
|
</select>
|
</mapper>
|