weixin_46822367
爱打羽球的码猿
2021-05-30 17:18
采纳率: 87.5%
浏览 19

关于Mybatis的错误

这是什么错误

Dao层

代码如下

package com.soft.dao;

import com.soft.entity.Goods;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import java.util.List;

public interface GoodsMapper {

    @Select("select * from goods")
    List<Goods> getAllGoods();

    @Insert("insert into goods (goods_name,goods_price,goods_introduce,goods_date,goods_img,goods_type,)" +
            "values (#{goodsName},#{goodsPrice},#{goodsIntroduce},#{goodsDate},#{goodsImg},#{goodsType})")
    int addGoods( Goods goods);

    @Update("update goods " +
            "set goods_name = #{goodsName},goods_price= #{goodsPrice},goods_introduce = #{goodsIntroduce}," +
            "goods_date= #{goodsDate},goods_img =#{goodsImg},goods_type = #{goodsType}," +
            "where goods_id = #{goodsId}")
    int updateGoods(Goods goods);



}

若要看更多细节去下面这个提问里:

https://ask.csdn.net/questions/7438763?answer=53412156&spm=1005.2026.3001.5622

  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 邀请回答

1条回答 默认 最新

  • weixin_46822367
    爱打羽球的码猿 2021-06-03 10:20
    已采纳

     

    已解决

    点赞 评论

相关推荐