评价管理

This commit is contained in:
sxu 2025-04-21 16:12:38 +08:00
parent 06a083c91a
commit d7314c40a5
2 changed files with 54 additions and 20 deletions

View File

@ -30,16 +30,33 @@ public class AllocCanteenEvaluate extends BaseEntity {
@ApiModelProperty(value = "人员ID")
private Long userId;
@ApiModelProperty(value = "人员昵称")
private String nickName;
/** 区域ID */
@Excel(name = "区域ID")
@ApiModelProperty(value = "区域ID")
private Long areaId;
@ApiModelProperty(value = "区域名称")
private Long areaName;
/** 食堂ID */
@Excel(name = "食堂ID")
@ApiModelProperty(value = "食堂ID")
private Long canteenId;
@ApiModelProperty(value = "食堂名称")
private Long canteenName;
/** 档口ID */
@Excel(name = "档口ID")
@ApiModelProperty(value = "档口ID")
private Long shopstallId;
@ApiModelProperty(value = "档口名称")
private Long shopstallName;
/** 评价日期 */
@ApiModelProperty(value = "评价日期")
@JsonFormat(pattern = "yyyy-MM-dd")

View File

@ -6,8 +6,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<resultMap type="com.bonus.canteen.core.alloc.domain.AllocCanteenEvaluate" id="AllocCanteenEvaluateResult">
<result property="evaluateId" column="evaluate_id" />
<result property="userId" column="user_id" />
<result property="nickName" column="nick_name" />
<result property="areaId" column="area_id" />
<result property="areaName" column="area_name" />
<result property="canteenId" column="canteen_id" />
<result property="canteenName" column="canteen_name" />
<result property="shopstallId" column="shopstall_id" />
<result property="shopstallName" column="stall_name" />
<result property="evaluateDate" column="evaluate_date" />
<result property="appearance" column="appearance" />
<result property="attitude" column="attitude" />
@ -30,42 +35,52 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</resultMap>
<sql id="selectAllocCanteenEvaluateVo">
select evaluate_id, user_id, canteen_id, shopstall_id, evaluate_date, appearance, attitude, taste, varieties, hygiene, price, weight, customize1, customize2, customize3, customize_text1, customize_text2, proposal, revision, create_by, create_time, update_by, update_time from alloc_canteen_evaluate
select ace.evaluate_id, ace.user_id, ace.area_id, ace.canteen_id, ace.shopstall_id, ace.evaluate_date, ace.appearance, ace.attitude, ace.taste,
ace.varieties, ace.hygiene, ace.price, ace.weight, ace.customize1, ace.customize2, ace.customize3, ace.customize_text1,
ace.customize_text2, ace.proposal, ace.revision, ace.create_by, ace.create_time, ace.update_by, ace.update_time,
su.nick_name, aa.area_name, ac.canteen_name, ast.stall_name
from alloc_canteen_evaluate ace
left join sys_user su on ace.user_id = su.user_id
left join alloc_area aa on ace.area_id = aa.area_id
left join alloc_canteen ac on ace.canteen_id = ac.canteen_id
left join alloc_stall ast on ace.shopstall_id = ast.stall_id
</sql>
<select id="selectAllocCanteenEvaluateList" parameterType="com.bonus.canteen.core.alloc.domain.AllocCanteenEvaluate" resultMap="AllocCanteenEvaluateResult">
<include refid="selectAllocCanteenEvaluateVo"/>
<where>
<if test="userId != null "> and user_id = #{userId}</if>
<if test="canteenId != null "> and canteen_id = #{canteenId}</if>
<if test="shopstallId != null "> and shopstall_id = #{shopstallId}</if>
<if test="evaluateDate != null "> and evaluate_date = #{evaluateDate}</if>
<if test="appearance != null "> and appearance = #{appearance}</if>
<if test="attitude != null "> and attitude = #{attitude}</if>
<if test="taste != null "> and taste = #{taste}</if>
<if test="varieties != null "> and varieties = #{varieties}</if>
<if test="hygiene != null "> and hygiene = #{hygiene}</if>
<if test="price != null "> and price = #{price}</if>
<if test="weight != null "> and weight = #{weight}</if>
<if test="customize1 != null "> and customize1 = #{customize1}</if>
<if test="customize2 != null "> and customize2 = #{customize2}</if>
<if test="customize3 != null "> and customize3 = #{customize3}</if>
<if test="customizeText1 != null and customizeText1 != ''"> and customize_text1 = #{customizeText1}</if>
<if test="customizeText2 != null and customizeText2 != ''"> and customize_text2 = #{customizeText2}</if>
<if test="proposal != null and proposal != ''"> and proposal = #{proposal}</if>
<if test="revision != null "> and revision = #{revision}</if>
<if test="userId != null "> and ace.user_id = #{userId}</if>
<if test="areaId != null "> and ace.area_id = #{areaId}</if>
<if test="canteenId != null "> and ace.canteen_id = #{canteenId}</if>
<if test="shopstallId != null "> and ace.shopstall_id = #{shopstallId}</if>
<if test="evaluateDate != null "> and ace.evaluate_date = #{evaluateDate}</if>
<if test="appearance != null "> and ace.appearance = #{appearance}</if>
<if test="attitude != null "> and ace.attitude = #{attitude}</if>
<if test="taste != null "> and ace.taste = #{taste}</if>
<if test="varieties != null "> and ace.varieties = #{varieties}</if>
<if test="hygiene != null "> and ace.hygiene = #{hygiene}</if>
<if test="price != null "> and ace.price = #{price}</if>
<if test="weight != null "> and ace.weight = #{weight}</if>
<if test="customize1 != null "> and ace.customize1 = #{customize1}</if>
<if test="customize2 != null "> and ace.customize2 = #{customize2}</if>
<if test="customize3 != null "> and ace.customize3 = #{customize3}</if>
<if test="customizeText1 != null and customizeText1 != ''"> and ace.customize_text1 = #{customizeText1}</if>
<if test="customizeText2 != null and customizeText2 != ''"> and ace.customize_text2 = #{customizeText2}</if>
<if test="proposal != null and proposal != ''"> and ace.proposal = #{proposal}</if>
<if test="revision != null "> and ace.revision = #{revision}</if>
</where>
</select>
<select id="selectAllocCanteenEvaluateByEvaluateId" parameterType="Long" resultMap="AllocCanteenEvaluateResult">
<include refid="selectAllocCanteenEvaluateVo"/>
where evaluate_id = #{evaluateId}
where ace.evaluate_id = #{evaluateId}
</select>
<insert id="insertAllocCanteenEvaluate" parameterType="com.bonus.canteen.core.alloc.domain.AllocCanteenEvaluate" useGeneratedKeys="true" keyProperty="evaluateId">
insert into alloc_canteen_evaluate
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="userId != null">user_id,</if>
<if test="areaId != null">area_id,</if>
<if test="canteenId != null">canteen_id,</if>
<if test="shopstallId != null">shopstall_id,</if>
<if test="evaluateDate != null">evaluate_date,</if>
@ -90,6 +105,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="userId != null">#{userId},</if>
<if test="areaId != null">#{areaId},</if>
<if test="canteenId != null">#{canteenId},</if>
<if test="shopstallId != null">#{shopstallId},</if>
<if test="evaluateDate != null">#{evaluateDate},</if>
@ -118,6 +134,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
update alloc_canteen_evaluate
<trim prefix="SET" suffixOverrides=",">
<if test="userId != null">user_id = #{userId},</if>
<if test="areaId != null">area_id = #{areaId},</if>
<if test="canteenId != null">canteen_id = #{canteenId},</if>
<if test="shopstallId != null">shopstall_id = #{shopstallId},</if>
<if test="evaluateDate != null">evaluate_date = #{evaluateDate},</if>