zhou.xiaoning 3 年之前
父节点
当前提交
c90167bec3
共有 1 个文件被更改,包括 2 次插入1 次删除
  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)