|
|
@@ -1781,6 +1781,7 @@ func (r *Ermcp2stockspotchangelog) buildSql() string {
|
|
|
// WHERE wrc.middlegoodsid = %v)
|
|
|
// `
|
|
|
sqlId.FormatParam(r.USERID, r.MIDDLEGOODSID)
|
|
|
+ sqlId.OrderBy("CREATETIME")
|
|
|
|
|
|
return sqlId.String()
|
|
|
}
|
|
|
@@ -1941,7 +1942,7 @@ func (r *Patradelinkdetail) buildSql() string {
|
|
|
LEFT JOIN TAACCOUNT ta on ta.accountid = p.ACCOUNTID
|
|
|
LEFT JOIN USERACCOUNT u on u.userid = ta.relateduserid
|
|
|
LEFT JOIN GOODS g ON g.goodsid = t.goodsid
|
|
|
- WHERE t.areauserid = %v AND t.middlegoodsid = %v
|
|
|
+ WHERE (t.relatedmode in (1,2) and t.linkstatus = 1) AND t.areauserid = %v AND t.middlegoodsid = %v
|
|
|
`
|
|
|
sqlId.FormatParam(r.USERID, r.MIDDLEGOODSID)
|
|
|
|