代码/restaurants/src/main/resources/mapper/CommentMapper.xml
(完整代码) 984B<?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.mall.mapper.CommentMapper">
<select id="getComment" resultType="string">
select
item_id
from comment
order by score
</select>
<resultMap id="TopType" type="HashMap">
<result column="question_type" property="typeName" />
<result column="type_count" property="typeCount" />
</resultMap>
<select id="countErrorQuestionLevel" resultMap="TopType">
select
count(*) value,
q.title as name
from
comment e
left join
item q
on e.item_id =q.id
GROUP BY
name
</select>
<select id="getCommentList" resultType="com.mall.vo.CommentVo">
SELECT
c.comment,
c.score,
u.uname,
i.title
FROM
COMMENT c
LEFT JOIN USER u ON c.user_id = u.id
LEFT JOIN item i ON c.item_id = i.id
</select>
</mapper>
24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明
AI 解读
登录后可用,每次 10 积分,解读结果公开显示在下面。
还没有人解读过这个文件。
