zhou.xiaoning %!s(int64=3) %!d(string=hai) anos
pai
achega
c90167bec3
Modificáronse 1 ficheiros con 2 adicións e 1 borrados
  1. 2 1
      models/ermcp8.go

+ 2 - 1
models/ermcp8.go

@@ -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)