java毕业设计基于springboot mybatis在线鲜花交易商城源码

本商城网站采用B/S结构,web开发,用户自己在浏览器中输入网址来浏览网页中的信息。 采用mysql数据库来存储所有动态数据,本网站从技术方向来说,分为前端页面和后台逻辑开发,页面设计使用HTML+js+jquery技术,后台使用springboot+mybatis。将IDEA作为编译环境,Java作为本网站的开发语言来设计开发。

表3-1 角色分析表

序号

角色

职责描述

1

管理员

登录

用戶管理

鲜花管理

订单管理

序号

角色

职责描述

1

管理员

鲜花分类管理

轮播图管理

退出登陆

2

用户

用户登录注册

鲜花购买

购物车

个人中心

退出

<?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="flowershop.mall.dao.CommentMapper">
  <resultMap id="BaseResultMap" type="flowershop.mall.entity.Comment">

    <id column="id" jdbcType="INTEGER" property="id" />
    <result column="order_no" jdbcType="VARCHAR" property="orderNo" />
    <result column="nick_name" jdbcType="VARCHAR" property="nickName" />
    <result column="goods_name" jdbcType="VARCHAR" property="goodsName" />
    <result column="content" jdbcType="VARCHAR" property="content" />
    <result column="state" jdbcType="INTEGER" property="state" />
    <result column="goods_id" jdbcType="INTEGER" property="goodsId" />
    <result column="remark1" jdbcType="VARCHAR" property="remark1" />
    <result column="remark2" jdbcType="VARCHAR" property="remark2" />
    <result column="create_time" jdbcType="VARCHAR" property="createTime" />
    <result column="end_time" jdbcType="VARCHAR" property="endTime" />
  </resultMap>

  
  <sql id="Base_Column_List">
    id,order_no, nick_name, goods_name, content, state,remark1,remark2,goods_id,create_time,end_time
  </sql>


  <select id="selectCommentByGoodsId" parameterType="java.lang.Integer" resultMap="BaseResultMap">
    select
    <include refid="Base_Column_List" />
    from comment
    where goods_id = #{goodsId,jdbcType=INTEGER}
    order by  create_time desc
  </select>

  <select id="deleteComment" parameterType="java.lang.Integer" resultType="java.lang.Integer">
    delete from comment
    where id = #{id,jdbcType=INTEGER}
  </select>

  <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
    select
    <include refid="Base_Column_List" />
    from comment
    where id = #{id,jdbcType=INTEGER}
  </select>


  <select id="selectByorderNo" parameterType="java.lang.String" resultMap="BaseResultMap">
    select
    <include refid="Base_Column_List" />
    from comment
    where order_no = #{orderNo,jdbcType=VARCHAR}
  </select>


  <insert id="insert" parameterType="flowershop.mall.entity.Comment">
    insert into comment (order_no, nick_name, goods_name,
      content, state,remark1,remark2,goods_id,create_time,end_time)
    values (#{orderNo,jdbcType=VARCHAR}, #{nickName,jdbcType=VARCHAR}, #{goodsName,jdbcType=VARCHAR},
      #{content,jdbcType=VARCHAR}, 0,#{remark1,jdbcType=VARCHAR},#{remark2,jdbcType=VARCHAR},#{goodsId,jdbcType=INTEGER},#{createTime,jdbcType=VARCHAR},#{endTime,jdbcType=VARCHAR})
  </insert>
  

  <update id="updateByRemark" parameterType="flowershop.mall.entity.Comment">
    update comment
    set remark1 = #{remark1,jdbcType=VARCHAR},
    end_time = #{endTime,jdbcType=VARCHAR},
    state=1
    where id = #{id,jdbcType=INTEGER}
  </update>


  <select id="findCommentList" parameterType="Map" resultMap="BaseResultMap">
    select
    <include refid="Base_Column_List"/>
    from comment
    order by create_time desc
    <if test="start!=null and limit!=null">
      limit #{start},#{limit}
    </if>
  </select>

  <select id="getTotalComment" parameterType="Map" resultType="int">
    select count(*) from comment
  </select>


  
</mapper>

  • 0
    点赞
  • 4
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

程序猿毕业分享网

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值