1
This commit is contained in:
1
business/partner/printer/xpyun/xpyun.go
Normal file
1
business/partner/printer/xpyun/xpyun.go
Normal file
@@ -0,0 +1 @@
|
||||
package xpyun
|
||||
@@ -451,48 +451,48 @@ func CreateFreightTemplate(storeCode, deliveryFeeDeductionSill int) (int64, erro
|
||||
},
|
||||
}
|
||||
//直辖市特殊处理
|
||||
if HandleMunicipality(storeDetail.CityName) {
|
||||
param.Template.ProductCity = int64(storeDetail.ProvinceCode)
|
||||
param.Columns = []freightTemplate_create_request.ColumnsItem{{
|
||||
ProvinceInfos: []freightTemplate_create_request.ProvinceInfosItem{{
|
||||
Id: utils.Str2Int64(utils.Int2Str(storeDetail.ProvinceCode)[:2]),
|
||||
Children: []freightTemplate_create_request.ChildrenItem_4{
|
||||
{
|
||||
Id: int64(storeDetail.ProvinceCode),
|
||||
Children: []freightTemplate_create_request.ChildrenItem_5{
|
||||
{
|
||||
Id: int64(storeDetail.DistrictCode),
|
||||
//Children: []freightTemplate_create_request.ChildrenItem{
|
||||
// {Id: 0},
|
||||
//},
|
||||
},
|
||||
},
|
||||
},
|
||||
}},
|
||||
}},
|
||||
}
|
||||
if flag, code := HandleMunicipality(storeDetail.CityName); flag {
|
||||
param.Template.ProductCity = code
|
||||
//param.Columns = []freightTemplate_create_request.ColumnsItem{{
|
||||
// ProvinceInfos: []freightTemplate_create_request.ProvinceInfosItem{{
|
||||
// Id: utils.Str2Int64(utils.Int2Str(storeDetail.ProvinceCode)[:2]),
|
||||
// Children: []freightTemplate_create_request.ChildrenItem_4{
|
||||
// {
|
||||
// Id: int64(storeDetail.ProvinceCode),
|
||||
// Children: []freightTemplate_create_request.ChildrenItem_5{
|
||||
// {
|
||||
// Id: int64(storeDetail.DistrictCode),
|
||||
// //Children: []freightTemplate_create_request.ChildrenItem{
|
||||
// // {Id: 0},
|
||||
// //},
|
||||
// },
|
||||
// },
|
||||
// },
|
||||
// }},
|
||||
// }},
|
||||
//}
|
||||
} else {
|
||||
param.Template.ProductCity = int64(storeDetail.CityCode)
|
||||
param.Columns = []freightTemplate_create_request.ColumnsItem{{
|
||||
ProvinceInfos: []freightTemplate_create_request.ProvinceInfosItem{
|
||||
{
|
||||
Id: utils.Str2Int64(utils.Int2Str(storeDetail.ProvinceCode)[:2]),
|
||||
Children: []freightTemplate_create_request.ChildrenItem_4{
|
||||
{
|
||||
Id: int64(storeDetail.CityCode),
|
||||
Children: []freightTemplate_create_request.ChildrenItem_5{
|
||||
{
|
||||
Id: int64(storeDetail.DistrictCode),
|
||||
//Children: []freightTemplate_create_request.ChildrenItem{
|
||||
// {Id: 0},
|
||||
//},
|
||||
},
|
||||
},
|
||||
},
|
||||
}},
|
||||
},
|
||||
},
|
||||
}
|
||||
//param.Columns = []freightTemplate_create_request.ColumnsItem{{
|
||||
// ProvinceInfos: []freightTemplate_create_request.ProvinceInfosItem{
|
||||
// {
|
||||
// Id: utils.Str2Int64(utils.Int2Str(storeDetail.ProvinceCode)[:2]),
|
||||
// Children: []freightTemplate_create_request.ChildrenItem_4{
|
||||
// {
|
||||
// Id: int64(storeDetail.CityCode),
|
||||
// Children: []freightTemplate_create_request.ChildrenItem_5{
|
||||
// {
|
||||
// Id: int64(storeDetail.DistrictCode),
|
||||
// //Children: []freightTemplate_create_request.ChildrenItem{
|
||||
// // {Id: 0},
|
||||
// //},
|
||||
// },
|
||||
// },
|
||||
// },
|
||||
// }},
|
||||
// },
|
||||
//},
|
||||
//}
|
||||
}
|
||||
if deliveryFeeDeductionSill != 0 {
|
||||
param.Template.TemplateName += "满减包邮模板"
|
||||
@@ -595,8 +595,8 @@ func CreateBindFreeShipTemplate(vendorOrgCode string, storeID int, shipFee int64
|
||||
}},
|
||||
}
|
||||
//直辖市特殊处理
|
||||
if HandleMunicipality(storeDetail.CityName) {
|
||||
param.Template.ProductCity = int64(storeDetail.ProvinceCode)
|
||||
if flag, code := HandleMunicipality(storeDetail.CityName); flag {
|
||||
param.Template.ProductCity = code
|
||||
} else {
|
||||
param.Template.ProductCity = int64(storeDetail.CityCode)
|
||||
}
|
||||
@@ -1031,11 +1031,11 @@ func ToStringSlice(actual interface{}) ([]string, error) {
|
||||
}
|
||||
|
||||
//直辖市判断
|
||||
func HandleMunicipality(cityName string) bool {
|
||||
func HandleMunicipality(cityName string) (bool, int64) {
|
||||
if cityName == tiktok_api.MunicipalityBeiJin || cityName == tiktok_api.MunicipalityShangHai || cityName == tiktok_api.MunicipalityTianJin || cityName == tiktok_api.MunicipalityChongQing {
|
||||
return true
|
||||
return true, int64(tiktok_api.MunicipalityCode[cityName])
|
||||
}
|
||||
return false
|
||||
return false, 0
|
||||
}
|
||||
|
||||
//判断门店是否审核通过
|
||||
|
||||
Reference in New Issue
Block a user