huangjiajun pirms 6 dienas
vecāks
revīzija
dd3d8b847a
6 mainītis faili ar 24 papildinājumiem un 7 dzēšanām
  1. +2
    -1
      app/svc/svc_cate.go
  2. +2
    -1
      app/svc/svc_goods.go
  3. +2
    -1
      app/svc/svc_order.go
  4. +1
    -1
      app/svc/svc_pay_community_team.go
  5. +1
    -1
      app/svc/svc_pay_community_team_pay.go
  6. +16
    -2
      app/svc/svc_store.go

+ 2
- 1
app/svc/svc_cate.go Parādīt failu

@@ -8,7 +8,8 @@ import (
)

func Cate(c *gin.Context) {
storeId := c.GetHeader("store_id")
storeId := GetStoreId(c)

if storeId == "" {
storeId = "0"
}


+ 2
- 1
app/svc/svc_goods.go Parādīt failu

@@ -14,7 +14,8 @@ func Goods(c *gin.Context) {
e.OutErr(c, e.ERR_INVALID_ARGS, err)
return
}
storeId := c.GetHeader("store_id")
storeId := GetStoreId(c)

arg["store_type"] = "0"
if utils.StrToInt(storeId) > 0 {
arg["uid"] = storeId


+ 2
- 1
app/svc/svc_order.go Parādīt failu

@@ -235,7 +235,8 @@ func OrderCoupon(c *gin.Context) {
}
func CommCoupon(c *gin.Context, totalPrice string) map[string]interface{} {
couponList := make([]md.CouponList, 0)
storeId := c.GetHeader("store_id")
storeId := GetStoreId(c)

if utils.StrToInt(storeId) > 0 {
storeData := db.GetStoreIdEg(MasterDb(c), storeId)
if storeData != nil && storeData.StoreType > 0 {


+ 1
- 1
app/svc/svc_pay_community_team.go Parādīt failu

@@ -59,7 +59,7 @@ func WxPayCommunityTeam(c *gin.Context) (interface{}, error) {
params := map[string]string{
"subject": "小店下单",
"amount": wxMoneyMulHundred(ord.Amount),
"order_type": md.AggregationRecharge,
"order_type": md.CommunityTeam,
"ord_id": utils.AnyToString(ord.Oid),
"pay_wx_mch_id": SysCfgGet(c, "pay_wx_mch_id"),
"pay_wx_api_key": SysCfgGet(c, "pay_wx_api_key"),


+ 1
- 1
app/svc/svc_pay_community_team_pay.go Parādīt failu

@@ -56,7 +56,7 @@ func WxPayCommunityTeamPay(c *gin.Context) (interface{}, error) {
params := map[string]string{
"subject": "收款码收款",
"amount": wxMoneyMulHundred(ord.Amount),
"order_type": md.AggregationRecharge,
"order_type": md.CommunityTeamPay,
"ord_id": utils.AnyToString(ord.Oid),
"pay_wx_mch_id": SysCfgGet(c, "pay_wx_mch_id"),
"pay_wx_api_key": SysCfgGet(c, "pay_wx_api_key"),


+ 16
- 2
app/svc/svc_store.go Parādīt failu

@@ -388,7 +388,8 @@ func StoreLike(c *gin.Context) {
return
}
arg["store_type"] = "0"
storeId := c.GetHeader("store_id")
storeId := GetStoreId(c)

if utils.StrToInt(storeId) > 0 {
arg["store_id"] = storeId
storeData := db.GetStoreIdEg(MasterDb(c), storeId)
@@ -438,6 +439,19 @@ func StoreLike(c *gin.Context) {
e.OutSuc(c, storeList, nil)
return
}
func GetStoreId(c *gin.Context) string {
storeId := c.GetHeader("store_id")
if utils.StrToInt(storeId) == 0 {
storeId = c.GetHeader("storeId")
}
if utils.StrToInt(storeId) == 0 {
storeId = c.GetHeader("storeid")
}
if utils.StrToInt(storeId) == 0 {
storeId = c.GetHeader("StoreId")
}
return storeId
}
func Store(c *gin.Context) {
var arg map[string]string
if err := c.ShouldBindJSON(&arg); err != nil {
@@ -445,7 +459,7 @@ func Store(c *gin.Context) {
return
}
arg["store_type"] = "0"
storeId := c.GetHeader("store_id")
storeId := GetStoreId(c)
if utils.StrToInt(storeId) > 0 {
arg["store_id"] = storeId
storeData := db.GetStoreIdEg(MasterDb(c), storeId)


Notiek ielāde…
Atcelt
Saglabāt