Browse Source

feat:增加规格权益

wangchuanjin 3 years ago
parent
commit
0f38111149
1 changed files with 7 additions and 1 deletions
  1. 7 1
      public/entity/base_goods_spec.go

+ 7 - 1
public/entity/base_goods_spec.go

@@ -20,5 +20,11 @@ type base_goods_spec struct {
 //根据代码查找功能详情
 //根据代码查找功能详情
 func (b *base_goods_spec) FindById(id int64, appid, goodsCode string) *[]*base_goods_spec {
 func (b *base_goods_spec) FindById(id int64, appid, goodsCode string) *[]*base_goods_spec {
 	bgss := Mysql_BaseService.SelectBySql(`select * from base_goods_spec where id=? and appid=? and goods_code=? limit 1`, id, appid, goodsCode)
 	bgss := Mysql_BaseService.SelectBySql(`select * from base_goods_spec where id=? and appid=? and goods_code=? limit 1`, id, appid, goodsCode)
-	return JsonUnmarshal((*bgss)[0], &[]*base_goods_spec{}).(*[]*base_goods_spec)
+	list := JsonUnmarshal((*bgss)[0], &[]*base_goods_spec{}).(*[]*base_goods_spec)
+	if list != nil {
+		for _, v := range *list {
+			v.Base_goods_spec_powers = *Base_goods_spec_power.FindByGoodsCode(v.Id, v.Appid, goodsCode)
+		}
+	}
+	return list
 }
 }