|
|
@@ -2,6 +2,8 @@ package implement |
|
|
|
|
|
|
|
import ( |
|
|
|
"code.fnuoos.com/go_rely_warehouse/zyos_model.git/src/dao" |
|
|
|
"code.fnuoos.com/go_rely_warehouse/zyos_model.git/src/models" |
|
|
|
zhios_order_relate_logx "code.fnuoos.com/go_rely_warehouse/zyos_model.git/utils/logx" |
|
|
|
"xorm.io/xorm" |
|
|
|
) |
|
|
|
|
|
|
@@ -12,3 +14,17 @@ type SuperCloudIssuanceGoodsDb struct { |
|
|
|
func NewSuperCloudIssuanceGoodsDb(engine *xorm.Engine) dao.SuperCloudIssuanceGoodsDao { |
|
|
|
return &SuperCloudIssuanceGoodsDb{Db: engine} |
|
|
|
} |
|
|
|
func (h SuperCloudIssuanceGoodsDb) FindSuperCloudIssuanceGoods(id string, cid, start, limit int) (mm *[]models.SuperCloudIssuanceGoods, err error) { |
|
|
|
var m []models.SuperCloudIssuanceGoods |
|
|
|
sess := h.Db.Where("1=1") |
|
|
|
if cid > 0 { |
|
|
|
sess.And("cloud_issuance_category_id=?", cid) |
|
|
|
} |
|
|
|
if id != "" { |
|
|
|
sess.And("id=?", id) |
|
|
|
} |
|
|
|
if err := sess.Limit(limit, start).OrderBy("create_at desc,id desc").Find(&m); err != nil { |
|
|
|
return nil, zhios_order_relate_logx.Error(err) |
|
|
|
} |
|
|
|
return &m, nil |
|
|
|
} |