@Table("product_order")
public class ProductOrderBean {
@Id(auto=false)
private int id;
@Column("pro_id")
private int proID;
@Column("types")
private int types;
@Prev(@SQL(value = "SELECT count(1) + 1 as cnt FROM product_order WHERE types=@types"))
@Column
private int orders;
@Column
private int del;
}
5 回复
试了一下,并没有问题
17:46:56.136 DEBUG (NutDaoExecutor.java:388) printSQL - SELECT count(1) + 1 as cnt FROM product_order WHERE types=?
| 1 |
|---|
| 0 |
For example:> "SELECT count(1) + 1 as cnt FROM product_order WHERE types=0"
17:46:56.137 DEBUG (DaoTimeInterceptor.java:28) filter - time=1ms, sql=SELECT count(1) + 1 as cnt FROM product_order WHERE types=0
17:46:56.139 DEBUG (NutDaoExecutor.java:388) printSQL - INSERT INTO product_order(id,pro_id,types,orders,del) VALUES(?,?,?,?,?)
| 1 | 2 | 3 | 4 | 5 |
|-----------|---|---|---|---|
| 981899008 | 0 | 0 | 2 | 0 |
For example:> "INSERT INTO product_order(id,pro_id,types,orders,del) VALUES(981899008,0,0,2,0) "
17:46:56.141 DEBUG (DaoTimeInterceptor.java:28) filter - time=2ms, sql=INSERT INTO product_order(id,pro_id,types,orders,del) VALUES(981899008,0,0,2,0)
添加回复
请先登陆