浏览代码

update 供应链加入商品库

three
DengBiao 10 个月前
父节点
当前提交
e320236367
共有 2 个文件被更改,包括 65 次插入65 次删除
  1. +51
    -51
      consume/init.go
  2. +14
    -14
      consume/supply_cloud_chain_fenxiao_new_change.go

+ 51
- 51
consume/init.go 查看文件

@@ -17,59 +17,59 @@ func Init() {

// 增加消费任务队列
func initConsumes() {
jobs[consumeMd.ZhiosUserUpLvFunName] = ZhiosUserUpLv
jobs[consumeMd.CanalGuideOrderByUserUpLvConsume] = CanalGuideOrderByUserUpLvConsume
jobs[consumeMd.ZhiosOrderFreeFunName] = ZhiosOrderFree
jobs[consumeMd.ZhiosOrderTotalFunName] = ZhiosOrderTotal
jobs[consumeMd.ZhiosOrderTotalSecondFunName] = ZhiosOrderTotalSecond
//jobs[consumeMd.ZhiosUserUpLvFunName] = ZhiosUserUpLv
//jobs[consumeMd.CanalGuideOrderByUserUpLvConsume] = CanalGuideOrderByUserUpLvConsume
//jobs[consumeMd.ZhiosOrderFreeFunName] = ZhiosOrderFree
//jobs[consumeMd.ZhiosOrderTotalFunName] = ZhiosOrderTotal
//jobs[consumeMd.ZhiosOrderTotalSecondFunName] = ZhiosOrderTotalSecond
////
//jobs[consumeMd.ZhiosOrderSettleTotalFunName] = ZhiosSettleTotal
//jobs[consumeMd.ZhiosOrderHjyFunName] = ZhiosOrderHjy
//jobs[consumeMd.ZhiosOrderBuckleFunName] = ZhiosOrderBuckle
////
//jobs[consumeMd.ZhiosSupplierAfterOrderFunName] = ZhiosSupplierAfterOrder
//jobs[consumeMd.ZhiosGuideStoreOrderFunName] = ZhiosGuideStoreOrder
//
jobs[consumeMd.ZhiosOrderSettleTotalFunName] = ZhiosSettleTotal
jobs[consumeMd.ZhiosOrderHjyFunName] = ZhiosOrderHjy
jobs[consumeMd.ZhiosOrderBuckleFunName] = ZhiosOrderBuckle
////jobs[consumeMd.ZhiosAppreciationDevFunName] = ZhiosAppreciation
//
jobs[consumeMd.ZhiosSupplierAfterOrderFunName] = ZhiosSupplierAfterOrder
jobs[consumeMd.ZhiosGuideStoreOrderFunName] = ZhiosGuideStoreOrder

//jobs[consumeMd.ZhiosAppreciationDevFunName] = ZhiosAppreciation

jobs[consumeMd.ZhiosAppreciationFunName] = ZhiosAppreciation
jobs[consumeMd.ZhiosValidUserFunName] = ZhiosValidUser

//jobs[consumeMd.ZhiosAcquisitionConditionDevFunName] = ZhiosAcquisitionCondition

jobs[consumeMd.ZhiosAcquisitionConditionFunName] = ZhiosAcquisitionCondition
jobs[consumeMd.CanalOrderConsumeFunName] = CanalOrderConsume
jobs[consumeMd.CanalGuideOrderConsumeFunName] = CanalGuideOrderConsume
jobs[consumeMd.ZhiOsUserVisitIpAddressConsumeFunName] = ZhiOsUserVisitIpAddressConsume

jobs[consumeMd.DouShenUserRegisterConsumeForOfficialFunName] = DouShenUserRegisterConsumeForOfficial
jobs[consumeMd.DouShenUserRegisterConsumeForOperationCenterFunName] = DouShenUserRegisterConsumeForOperationCenter
jobs[consumeMd.DouShenUserRegisterConsumeForMyRecommenderFunName] = DouShenUserRegisterConsumeForMyRecommender
jobs[consumeMd.DouShenUserRegisterConsumeForMyFansFunName] = DouShenUserRegisterConsumeForMyFans
jobs[consumeMd.DouShenUserRegisterConsumeForUserRegisterUpLvFunName] = DouShenUserRegisterConsumeForUserRegisterUpLv

jobs[consumeMd.ZhiosFastReturnOrderPayFunName] = ZhiosFastReturnOrderPay
jobs[consumeMd.ZhiosFastReturnOrderSuccessFunName] = ZhiosFastReturnOrderSuccess
jobs[consumeMd.ZhiosFastReturnOrderRefundFunName] = ZhiosFastReturnOrderRefund
jobs[consumeMd.ZhiosFastReturnOrderRefundSecondFunName] = ZhiosFastReturnOrderRefundSecond

//jobs[consumeMd.CanalMallOrdForYouMiShangFunName] = CanalMallOrdForYouMiShang
jobs[consumeMd.YoumishangExchangeStoreFunName] = YoumishangExchangeStore

jobs[consumeMd.ZhiosRechargeOrderFailFunName] = ZhiosRechargeOrderFail

jobs[consumeMd.CloudIssuanceAsyncMLoginFunName] = CloudIssuanceAsyncMLoginConsume
jobs[consumeMd.ZhiosTikTokUpdateFunName] = ZhiosTikTokUpdate
jobs[consumeMd.ZhiosTikTokAllUpdateFunName] = ZhiosTikTokAllUpdate

jobs[consumeMd.ZhiosCapitalPoolOrderTotalFunName] = ZhiosCapitalPoolOrderTotal
jobs[consumeMd.ZhiosExpressOrderFail] = ZhiosExpressOrderFail
jobs[consumeMd.ZhiosWithdrawReward] = ZhiosWithdrawReward

//jobs[consumeMd.ZhiosRechargeOrderFailDevFunName] = ZhiosRechargeOrderFailDev

jobs[consumeMd.CloudIssuanceMsgCallBackFunName] = CloudIssuanceMsgCallBackConsume
//jobs[consumeMd.SupplyCloudChainFenxiaoNewChangeFunName] = SupplyCloudChainFenxiaoNewChangeConsume
//jobs[consumeMd.ZhiosAppreciationFunName] = ZhiosAppreciation
//jobs[consumeMd.ZhiosValidUserFunName] = ZhiosValidUser
//
////jobs[consumeMd.ZhiosAcquisitionConditionDevFunName] = ZhiosAcquisitionCondition
//
//jobs[consumeMd.ZhiosAcquisitionConditionFunName] = ZhiosAcquisitionCondition
//jobs[consumeMd.CanalOrderConsumeFunName] = CanalOrderConsume
//jobs[consumeMd.CanalGuideOrderConsumeFunName] = CanalGuideOrderConsume
//jobs[consumeMd.ZhiOsUserVisitIpAddressConsumeFunName] = ZhiOsUserVisitIpAddressConsume
//
//jobs[consumeMd.DouShenUserRegisterConsumeForOfficialFunName] = DouShenUserRegisterConsumeForOfficial
//jobs[consumeMd.DouShenUserRegisterConsumeForOperationCenterFunName] = DouShenUserRegisterConsumeForOperationCenter
//jobs[consumeMd.DouShenUserRegisterConsumeForMyRecommenderFunName] = DouShenUserRegisterConsumeForMyRecommender
//jobs[consumeMd.DouShenUserRegisterConsumeForMyFansFunName] = DouShenUserRegisterConsumeForMyFans
//jobs[consumeMd.DouShenUserRegisterConsumeForUserRegisterUpLvFunName] = DouShenUserRegisterConsumeForUserRegisterUpLv
//
//jobs[consumeMd.ZhiosFastReturnOrderPayFunName] = ZhiosFastReturnOrderPay
//jobs[consumeMd.ZhiosFastReturnOrderSuccessFunName] = ZhiosFastReturnOrderSuccess
//jobs[consumeMd.ZhiosFastReturnOrderRefundFunName] = ZhiosFastReturnOrderRefund
//jobs[consumeMd.ZhiosFastReturnOrderRefundSecondFunName] = ZhiosFastReturnOrderRefundSecond
//
////jobs[consumeMd.CanalMallOrdForYouMiShangFunName] = CanalMallOrdForYouMiShang
//jobs[consumeMd.YoumishangExchangeStoreFunName] = YoumishangExchangeStore
//
//jobs[consumeMd.ZhiosRechargeOrderFailFunName] = ZhiosRechargeOrderFail
//
//jobs[consumeMd.CloudIssuanceAsyncMLoginFunName] = CloudIssuanceAsyncMLoginConsume
//jobs[consumeMd.ZhiosTikTokUpdateFunName] = ZhiosTikTokUpdate
//jobs[consumeMd.ZhiosTikTokAllUpdateFunName] = ZhiosTikTokAllUpdate
//
//jobs[consumeMd.ZhiosCapitalPoolOrderTotalFunName] = ZhiosCapitalPoolOrderTotal
//jobs[consumeMd.ZhiosExpressOrderFail] = ZhiosExpressOrderFail
//jobs[consumeMd.ZhiosWithdrawReward] = ZhiosWithdrawReward
//
////jobs[consumeMd.ZhiosRechargeOrderFailDevFunName] = ZhiosRechargeOrderFailDev
//
//jobs[consumeMd.CloudIssuanceMsgCallBackFunName] = CloudIssuanceMsgCallBackConsume
jobs[consumeMd.SupplyCloudChainFenxiaoNewChangeFunName] = SupplyCloudChainFenxiaoNewChangeConsume

}



+ 14
- 14
consume/supply_cloud_chain_fenxiao_new_change.go 查看文件

@@ -72,20 +72,20 @@ func SupplyCloudChainFenxiaoNewChangeConsume(queue md.MqQueue) {
basicSetting, _ := svc.GetSupplyBasicSetting(c)
if basicSetting == nil {
fmt.Println("!!!!!功能开发中!!!!!")
return
continue
}
if basicSetting.AliCloudChainFenXiaoAppkey == "" || basicSetting.AliCloudChainFenXiaoAppsecret == "" || basicSetting.AliCloudChainFenXiaoAccesstoken == "" {
fmt.Println("!!!!!必要参数没有填写,功能已暂停!!!!!")
return
continue
}
get, systemMerchant, err1 := db.GetSystemMerchant(svc2.MasterDb(c))
if err1 != nil {
fmt.Println(err1.Error(), "!!!!!!!!!!!!!!!!!!!!")
return
continue
}
if !get {
fmt.Println("!!!!!请先去设置官方商家信息!!!!!")
return
continue
}
ids := RemoveRepeatedElement(t.Ids)

@@ -97,27 +97,27 @@ func SupplyCloudChainFenxiaoNewChangeConsume(queue md.MqQueue) {
result, ok := goodsFrom1688s["result"].(map[string]interface{})
if !ok {
fmt.Println("错误的数据", "!!!!!!!!!!!!!!!!!!!!")
return
continue
}
if message, ok := result["message"]; ok {
fmt.Println("!!!!!", message)
return
continue
}
resultList, ok := result["result"].([]interface{})
if !ok {
fmt.Println("!!!!!!错误的数据2!!!!!!!!!")
return
continue
}
if len(resultList) == 0 {
fmt.Println("!!!!!!错误的数据3!!!!!!!!!")
return
continue
}
var cloudChainGoods = map[string]map[string]interface{}{}
for _, v := range resultList {
tmp, ok1 := v.(map[string]interface{})
if !ok1 {
fmt.Println("!!!!!!错误的数据3-1!!!!!!!!!")
return
continue
}
productInfo, ok1 := tmp["productInfo"].(map[string]interface{})
if !ok1 {
@@ -145,7 +145,7 @@ func SupplyCloudChainFenxiaoNewChangeConsume(queue md.MqQueue) {
getV2, err11 := goods.GetV2(svc2.MasterDb(c))
if err11 != nil {
fmt.Println("!!!!!!", err11.Error())
return
continue
}
if getV2 {
continue
@@ -163,10 +163,10 @@ func SupplyCloudChainFenxiaoNewChangeConsume(queue md.MqQueue) {
case e.E:
err1 := err.(e.E)
fmt.Println("!!!!!!", err1.Error())
return
continue
default:
fmt.Println("!!!!!!", err.Error())
return
continue
}
}

@@ -176,10 +176,10 @@ func SupplyCloudChainFenxiaoNewChangeConsume(queue md.MqQueue) {
case e.E:
err1 := err1.(e.E)
fmt.Println("!!!!!!", err1.Error())
return
continue
default:
fmt.Println("!!!!!!", err.Error())
return
continue
}
}



正在加载...
取消
保存