ADD file via upload

main
pjhmizn49 1 year ago
parent 4ff76b0711
commit ed5baeb395

@ -0,0 +1,18 @@
<?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.example.flower.mapper.CommentMapper">
<select id="commentList" resultType="com.example.flower.entity.Comment">
select *
from flower.comment
where flower_id=#{flower_id}
order by comment_id desc
</select>
<insert id="commentAdd" useGeneratedKeys="true" keyProperty="comment_id" parameterType="com.example.flower.entity.Comment">
insert into flower.comment(flower_id, user_id, comment_content, comment_time)
value (#{flower_id},#{user_id},#{comment_content},#{comment_time})
</insert>
<select id="findAllComment" resultType="com.example.flower.entity.Comment">
select *
from flower.comment
</select>
</mapper>
Loading…
Cancel
Save