|
|
@@ -710,12 +710,13 @@ type Thjpurchasetradedetail struct {
|
|
|
|
|
|
PRESALESTATUS int32 `json:"presalestatus" xorm:"PRESALESTATUS"` // 预留状态 1:未开始 2:进行中 3:已结束 4:已关闭 5:处理中 6::处理失败 7:已完成
|
|
|
|
|
|
- FIRSTBUYUSERID int64 `json:"firstbuyuserid" xorm:"FIRSTBUYUSERID"` // 买方用户ID(预售摘牌人)
|
|
|
- AVAILABLETIME int32 `json:"availabletime" xorm:"AVAILABLETIME"` // 可用次数
|
|
|
- POINTPRICE float64 `json:"pointprice" xorm:"POINTPRICE"` // 已点价格
|
|
|
- POINTFLAG bool `json:"pointflag" xorm:"POINTFLAG"` // 是否已点价
|
|
|
- POINTINCOME float64 `json:"pointincome" xorm:"POINTINCOME"` // 点价总收益
|
|
|
- POINTTIMES int32 `json:"pointtimes" xorm:"POINTTIMES"` // 点价总次数
|
|
|
+ FIRSTBUYUSERID int64 `json:"firstbuyuserid" xorm:"FIRSTBUYUSERID"` // 买方用户ID(预售摘牌人)
|
|
|
+ AVAILABLETIME int32 `json:"availabletime" xorm:"AVAILABLETIME"` // 可用次数
|
|
|
+ POINTPRICE float64 `json:"pointprice" xorm:"POINTPRICE"` // 已点价格
|
|
|
+ POINTFLAG bool `json:"pointflag" xorm:"POINTFLAG"` // 是否已点价
|
|
|
+ POINTINCOME float64 `json:"pointincome" xorm:"POINTINCOME"` // 点价总收益
|
|
|
+ POINTTIMES int32 `json:"pointtimes" xorm:"POINTTIMES"` // 点价总次
|
|
|
+ TODAYPOINTINCOME float64 `json:"todaypointincome" xorm:"TODAYPOINTINCOME"` // 点价总收益
|
|
|
|
|
|
TYPE int `json:"-" xorm:"-" form:"type"` // 类型 - 0:未完成 1:已完成 2:可点订单 3:已点订单
|
|
|
|
|
|
@@ -786,7 +787,8 @@ func (r *Thjpurchasetradedetail) buildSql() string {
|
|
|
t.AVAILABLETIME,
|
|
|
t.POINTPRICE,
|
|
|
t.POINTFLAG,
|
|
|
- t.POINTINCOME
|
|
|
+ t.POINTINCOME,
|
|
|
+ t.TODAYPOINTINCOME
|
|
|
from THJ_PurchaseTradeDetail t
|
|
|
inner join WR_PresaleInfo pi
|
|
|
on t.presaleapplyid = pi.presaleapplyid
|
|
|
@@ -877,7 +879,8 @@ func (r *Thjpurchasetradedetail) buildSql2() string {
|
|
|
t.AVAILABLETIME,
|
|
|
t.POINTPRICE,
|
|
|
t.POINTFLAG,
|
|
|
- t.POINTINCOME
|
|
|
+ t.POINTINCOME,
|
|
|
+ t.TODAYPOINTINCOME
|
|
|
from THJ_PurchaseTradeDetail t
|
|
|
inner join WR_PresaleInfo pi
|
|
|
on t.presaleapplyid = pi.presaleapplyid
|
|
|
@@ -962,7 +965,8 @@ func (r *Thjpurchasetradedetail) buildSql3() string {
|
|
|
t.AVAILABLETIME,
|
|
|
t.POINTPRICE,
|
|
|
t.POINTFLAG,
|
|
|
- t.POINTINCOME
|
|
|
+ t.POINTINCOME,
|
|
|
+ t.TODAYPOINTINCOME
|
|
|
from THJ_PurchaseTradeDetail t
|
|
|
inner join WR_PresaleInfo pi
|
|
|
on t.presaleapplyid = pi.presaleapplyid
|
|
|
@@ -1050,7 +1054,8 @@ func (r *Thjpurchasetradedetail) buildSql4() string {
|
|
|
t.AVAILABLETIME,
|
|
|
t.POINTPRICE,
|
|
|
t.POINTFLAG,
|
|
|
- t.POINTINCOME
|
|
|
+ t.POINTINCOME,
|
|
|
+ t.TODAYPOINTINCOME
|
|
|
from THJ_PurchaseTradeDetail t
|
|
|
inner join WR_PresaleInfo pi
|
|
|
on t.presaleapplyid = pi.presaleapplyid
|
|
|
@@ -1934,8 +1939,8 @@ func (r *Spotgoodsprice) buildSql() string {
|
|
|
t.diffprice,
|
|
|
t.tradedate2,
|
|
|
case
|
|
|
- when substr(t.tradedate, 0, 6) - to_char(sysdate, 'yyyyMM') = 0 then 1
|
|
|
- else 0 end priceflag
|
|
|
+ when t.diffprice > 0 and t.tradedate2 in (select t.tradedate from marketrun t where t.marketid=0) then 1
|
|
|
+ else 0 end priceflag
|
|
|
from ERMCP_SpotGoodsPrice t
|
|
|
left join wrstandard wr
|
|
|
on t.wrstandardid = wr.wrstandardid
|