|
|
@@ -120,8 +120,9 @@ func QueryDeliveryRelation(c *gin.Context) {
|
|
|
if req.DeliveryGoodsID > 0 {
|
|
|
sql += fmt.Sprintf(` and t.DeliveryGoodsID = %d`, req.DeliveryGoodsID)
|
|
|
}
|
|
|
+ // FIXME: 之前写成了 and t.MarketID = %d ,但返回时err == nil ,需要判断原因
|
|
|
if req.MarketID > 0 {
|
|
|
- sql += fmt.Sprintf(` and t.MarketID = %d`, req.MarketID)
|
|
|
+ sql += fmt.Sprintf(` and g.MarketID = %d`, req.MarketID)
|
|
|
}
|
|
|
if err := engine.SQL(sql).Find(&datas); err != nil {
|
|
|
// 查询失败
|