|
|
@@ -3349,21 +3349,23 @@ func (r *WrTradeOrderDetail) calc() {
|
|
|
}
|
|
|
|
|
|
func (r *WrTradeOrderDetail) buildSql() string {
|
|
|
- var sqlId utils.SQLVal = "select to_char(t.orderid) orderid," +
|
|
|
- " t.buyorsell," +
|
|
|
- " t.goodsid," +
|
|
|
- " t.orderprice," +
|
|
|
- " t.orderqty - t.tradeqty orderqty," +
|
|
|
- " u.userid," +
|
|
|
- " u.accountname username," +
|
|
|
- " t.orderstatus" +
|
|
|
- " from trade_orderdetail t" +
|
|
|
- " left join taaccount ta" +
|
|
|
- " on t.accountid = ta.accountid" +
|
|
|
- " left join useraccount u" +
|
|
|
- " on ta.relateduserid = u.userid" +
|
|
|
- " where 1 = 1" +
|
|
|
- " and t.orderstatus in(3,7,12)"
|
|
|
+ var sqlId utils.SQLVal = `
|
|
|
+ select to_char(t.orderid) orderid,
|
|
|
+ t.buyorsell,
|
|
|
+ t.goodsid,
|
|
|
+ t.orderprice,
|
|
|
+ t.orderqty - t.tradeqty orderqty,
|
|
|
+ u.userid,
|
|
|
+ u.accountname username,
|
|
|
+ t.orderstatus
|
|
|
+ from trade_orderdetail t
|
|
|
+ left join taaccount ta
|
|
|
+ on t.accountid = ta.accountid
|
|
|
+ left join useraccount u
|
|
|
+ on ta.relateduserid = u.userid
|
|
|
+ where 1 = 1
|
|
|
+ and t.orderstatus in(3,7,12)
|
|
|
+ and (t.OPERATETYPE <> 26 and t.OPERATETYPE <> 15) `
|
|
|
sqlId.And("t.GOODSID", r.GOODSID)
|
|
|
sqlId.And("t.BUYORSELL", r.BUYORSELL)
|
|
|
|