parent
46dbe23312
commit
b149d64b61
@ -0,0 +1,32 @@
|
|||||||
|
package com.example.demo.Dao;
|
||||||
|
|
||||||
|
import com.example.demo.bean.product;
|
||||||
|
import org.apache.ibatis.annotations.*;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@Mapper
|
||||||
|
public interface productMapper {
|
||||||
|
@Select("select * from product where productNum = #{productNum}")
|
||||||
|
public product selectProductByProductNum(String productNum);
|
||||||
|
|
||||||
|
@Select("select * from product where productName = #{productName}")
|
||||||
|
public product selectProductByProductName(String productName);
|
||||||
|
|
||||||
|
@Select("select * from product")
|
||||||
|
public List<product> select();
|
||||||
|
|
||||||
|
@Insert("insert into product(productNum, productName, category, intrate, " +
|
||||||
|
"bankNum, productDescription, pictureAddress)" +
|
||||||
|
" values (#{productNum},#{productName},#{category},#{intrate},#{bankNum}," +
|
||||||
|
"#{productDescription},#{pictureAddress})")
|
||||||
|
public void addProduct(product products);
|
||||||
|
|
||||||
|
@Update("update product set productNum=#{productNum},productName=#{productName}" +
|
||||||
|
",category=#{category},intrate=#{intrate},bankNum=#{bankNum}," +
|
||||||
|
"productDescription=#{productDescription},pictureAddress=#{pictureAddress}")
|
||||||
|
public void updateAudio(product products);
|
||||||
|
|
||||||
|
@Delete("delete from product where productNum=#{productNum}")
|
||||||
|
public void deleteAudio(String productNum);
|
||||||
|
}
|
@ -0,0 +1,68 @@
|
|||||||
|
package com.example.demo.bean;
|
||||||
|
|
||||||
|
import javax.persistence.Entity;
|
||||||
|
import javax.persistence.GeneratedValue;
|
||||||
|
import javax.persistence.GenerationType;
|
||||||
|
import javax.persistence.Id;
|
||||||
|
|
||||||
|
@Entity
|
||||||
|
public class transaction {
|
||||||
|
@Id
|
||||||
|
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||||
|
private String transaction;
|
||||||
|
private String payer;
|
||||||
|
private String payee;
|
||||||
|
private float transactionTime;
|
||||||
|
private float transactionAmount;
|
||||||
|
private String note;
|
||||||
|
|
||||||
|
public transaction(){};
|
||||||
|
|
||||||
|
public String getNote() {
|
||||||
|
return note;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setNote(String note) {
|
||||||
|
this.note = note;
|
||||||
|
}
|
||||||
|
|
||||||
|
public float getTransactionAmount() {
|
||||||
|
return transactionAmount;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTransactionAmount(float transactionAmount) {
|
||||||
|
this.transactionAmount = transactionAmount;
|
||||||
|
}
|
||||||
|
|
||||||
|
public float getTransactionTime() {
|
||||||
|
return transactionTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTransactionTime(float transactionTime) {
|
||||||
|
this.transactionTime = transactionTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getPayee() {
|
||||||
|
return payee;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPayee(String payee) {
|
||||||
|
this.payee = payee;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getPayer() {
|
||||||
|
return payer;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPayer(String payer) {
|
||||||
|
this.payer = payer;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getTransaction() {
|
||||||
|
return transaction;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTransaction(String transaction) {
|
||||||
|
this.transaction = transaction;
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in new issue