⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 goodsdaoimpl.java~2~

📁 电子商务系统 系统主要分为前台和后台。前台包括产品的展示及会员购物等模块
💻 JAVA~2~
字号:
package com.wgh.dao;

import commerce.goods;
import com.wgh.DB.chStr;
import com.wgh.DB.connDB;

public class GoodsDaoImpl implements GoodsDao {
  connDB conn=new connDB();
  public int insert(goods g) {
    chStr chStr = new chStr();
    int ret = -1;
    try {
      String sql = "Insert into tb_goods (TypeID,GoodsName,Introduce,Pirce,nowPirce,picture,newgoods,sale) values(" +
          g.getTypeID() + ",'" + chStr.chStr(g.getGoodsName()) +
          "','" + chStr.chStr(m.getPwd()) +
          "','" + chStr.chStr(m.getCity()) + "','" + chStr.chStr(m.getAddress()) +
          "','" +
          chStr.chStr(m.getPostcode()) +
          "','" + chStr.chStr(m.getCardno()) + "','" +
          chStr.chStr(m.getCardtype()) + "','" + chStr.chStr(m.getTel()) +
          "','" + chStr.chStr(m.getEmail()) + "')";
      ret = conn.executeUpdate(sql);
    }
    catch (Exception e) {
      ret = 0;
    }
    conn.close();
    return ret;
  }


  public int update(goods g) {
    return 0;
  }

  public int delete(goods g) {
    return 0;
  }

}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -