1
This commit is contained in:
@@ -30,7 +30,7 @@ func init() {
|
||||
// 天天果园
|
||||
//api = New("c45e6510-00ba-4be2-977e-bcb9c9792cc7", "5d5577a2506f41b8b4ec520ba83490f5", "0b01b9eeb15b41dab1c3d05d95c17a26")
|
||||
// 京东果园 320406
|
||||
api = New("de4a9818-b171-41ed-ba37-0b060cad001f", "1dba76d40cac446ca500c0391a0b6c9d", "a88d031a1e7b462cb1579f12e97fe7f4")
|
||||
//api = New("de4a9818-b171-41ed-ba37-0b060cad001f", "1dba76d40cac446ca500c0391a0b6c9d", "a88d031a1e7b462cb1579f12e97fe7f4")
|
||||
// 京东白货
|
||||
//api = New("9053e4fd-4e0e-4e9e-8ab1-f348e5cbf3e7", "4602bd4b84984186815dbc03299c7094", "386ab19719d9470487011217d0c57349")
|
||||
// 果切 379599
|
||||
@@ -38,7 +38,7 @@ func init() {
|
||||
// 李氏水果 346254
|
||||
//api = New("c7c41cb6-6db4-4f67-a864-ca5f524653d0", "13493b4a951945f689dcc989b6693631", "7e28a37be43a430bb5928c835e482fe2")
|
||||
// 381564
|
||||
//api = New("4d0c707a-54eb-4f05-8187-6cedf95827c7", "d2d1e2e3213d4320bc2712a684307831", "1750f5b9848d4a6492c1c20b487074da")
|
||||
api = New("4d0c707a-54eb-4f05-8187-6cedf95827c7", "d2d1e2e3213d4320bc2712a684307831", "1750f5b9848d4a6492c1c20b487074da")
|
||||
// 390558
|
||||
//api = New("9053e4fd-4e0e-4e9e-8ab1-f348e5cbf3e7", "4602bd4b84984186815dbc03299c7094", "386ab19719d9470487011217d0c57349")
|
||||
|
||||
|
||||
@@ -121,7 +121,7 @@ func TestGetAfsService2(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestOrderShoudSettlementService2(t *testing.T) {
|
||||
result, err := api.OrderShoudSettlementService2("2305327970000571")
|
||||
result, err := api.OrderShoudSettlementService2("334205528418")
|
||||
if err != nil {
|
||||
t.Fatal(err.Error())
|
||||
}
|
||||
|
||||
@@ -180,7 +180,7 @@ func (a *API) ApplyElectronicContract(param *ApplyContractParam) (*ApplyContract
|
||||
func (a *API) ApplyElectronicContractByPeople(param *ApplyContractByPeople) error {
|
||||
reqParameter := map[string]interface{}{
|
||||
"req_data": utils.Struct2Map(param, "", false),
|
||||
"ver": Version,
|
||||
"ver": Version2,
|
||||
"timestamp": utils.Time2TimeStrByFormat(time.Now(), TimeFormat),
|
||||
"req_id": utils.GetUUID(),
|
||||
}
|
||||
|
||||
@@ -114,17 +114,6 @@ func (a *API) CommentAddReply(poiCode string, commentID int64, reply string) (er
|
||||
}
|
||||
|
||||
func (a *API) GetComment4ShanGou(param map[string]interface{}, isPost bool, cookie string) ([]*CommentsList, error) {
|
||||
//wmPoiId := NumberCell + fmt.Sprintf("name=\"wmPoiId\"\r\n\r\n%v\r\n", param["wmPoiId"])
|
||||
//appType := NumberCell + fmt.Sprintf("name=\"appType\"\r\n\r\n%v\r\n", param["appType"])
|
||||
//pageNum := NumberCell + fmt.Sprintf("name=\"pageNum\"\r\n\r\n%v\r\n", param["pageNum"])
|
||||
//rate := NumberCell + fmt.Sprintf("name=\"rate\"\r\n\r\n%v\r\n", param["rate"])
|
||||
//reply := NumberCell + fmt.Sprintf("name=\"reply\"\r\n\r\n%v\r\n", param["reply"])
|
||||
//context := NumberCell + fmt.Sprintf("name=\"context\"\r\n\r\n%v\r\n", param["context"])
|
||||
//startDate := NumberCell + fmt.Sprintf("name=\"startDate\"\r\n\r\n%v\r\n", param["startDate"])
|
||||
//endDate := NumberCell + fmt.Sprintf("name=\"endDate\"\r\n\r\n%v\r\n", param["endDate"])
|
||||
//timeType := NumberCell + fmt.Sprintf("name=\"timeType\"\r\n\r\n%v\r\n-----011000010111000001101001--\r\n\r\n", param["timeType"])
|
||||
//date := wmPoiId + appType + pageNum + rate + reply + context + startDate + endDate + timeType
|
||||
|
||||
result, err := a.AccessStoreComment(CommentUrl, param, isPost, cookie)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
|
||||
@@ -12,44 +12,41 @@ import (
|
||||
)
|
||||
|
||||
func TestCommentQuery(t *testing.T) {
|
||||
result, err := api.CommentQuery("17896509", "20250716", "20250717", 0, 20, CommentReplyStatusAll)
|
||||
result, err := api.CommentQuery("7070710", "20250820", "20250824", 0, 20, CommentReplyStatusAll)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
for _, mtwmComment := range result {
|
||||
if mtwmComment.CommentID == 8667486211 {
|
||||
|
||||
foodNameList := make(map[string]int, 0)
|
||||
skuIdMap := make(map[string]int, 0)
|
||||
for _, fn := range mtwmComment.PraiseRetailList {
|
||||
skuIdMap[fn.SkuId] = 1
|
||||
foodNameList[fn.Name] = 1
|
||||
}
|
||||
for _, fn := range mtwmComment.CriticRetailList {
|
||||
skuIdMap[fn.SkuId] = 1
|
||||
foodNameList[fn.Name] = 1
|
||||
}
|
||||
|
||||
for _, fn := range mtwmComment.CommentOrderDetail {
|
||||
if len(fn.FoodName)-strings.LastIndex(fn.FoodName, ")") > 3 {
|
||||
foodNameList[strings.TrimSpace(fn.FoodName)] = 1
|
||||
} else {
|
||||
foodNameList[strings.TrimSpace(fn.FoodName[0:strings.LastIndex(fn.FoodName, "(")])] = 1
|
||||
}
|
||||
}
|
||||
nameList := make([]string, 0, 0)
|
||||
skuIdList := make([]int, 0, 0)
|
||||
for k, _ := range foodNameList {
|
||||
nameList = append(nameList, k)
|
||||
}
|
||||
for k, _ := range skuIdMap {
|
||||
skuIdList = append(skuIdList, utils.Str2Int(k))
|
||||
}
|
||||
|
||||
globals.SugarLogger.Debugf("----------nameList:= %s", utils.Format4Output(nameList, false))
|
||||
globals.SugarLogger.Debugf("----------skuIdList:= %s", utils.Format4Output(skuIdList, false))
|
||||
break
|
||||
foodNameList := make(map[string]int, 0)
|
||||
skuIdMap := make(map[string]int, 0)
|
||||
for _, fn := range mtwmComment.PraiseRetailList {
|
||||
skuIdMap[fn.SkuId] = 1
|
||||
foodNameList[fn.Name] = 1
|
||||
}
|
||||
for _, fn := range mtwmComment.CriticRetailList {
|
||||
skuIdMap[fn.SkuId] = 1
|
||||
foodNameList[fn.Name] = 1
|
||||
}
|
||||
|
||||
for _, fn := range mtwmComment.CommentOrderDetail {
|
||||
if len(fn.FoodName)-strings.LastIndex(fn.FoodName, ")") > 3 {
|
||||
foodNameList[strings.TrimSpace(fn.FoodName)] = 1
|
||||
} else {
|
||||
foodNameList[strings.TrimSpace(fn.FoodName[0:strings.LastIndex(fn.FoodName, "(")])] = 1
|
||||
}
|
||||
}
|
||||
nameList := make([]string, 0, 0)
|
||||
skuIdList := make([]int, 0, 0)
|
||||
for k, _ := range foodNameList {
|
||||
nameList = append(nameList, k)
|
||||
}
|
||||
for k, _ := range skuIdMap {
|
||||
skuIdList = append(skuIdList, utils.Str2Int(k))
|
||||
}
|
||||
|
||||
globals.SugarLogger.Debugf("----------nameList:= %s", utils.Format4Output(nameList, false))
|
||||
globals.SugarLogger.Debugf("----------skuIdList:= %s", utils.Format4Output(skuIdList, false))
|
||||
break
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -24,7 +24,7 @@ func TestCBMessageTemplateSend(t *testing.T) {
|
||||
// "oYN_ust9hXKEvEv0X6Mq6nlAWs_E": 1, // me
|
||||
// "oYN_usvnObzrPweIgHTad9-uMf78": 1, // 老赵
|
||||
err := api.CBMessageTemplateSend("oYN_usjzxL9LBzh_hjf0-E_LGmvs", "b8-tLyWwAmK-1tEU1eGqp_YAAqQtSzoVDZkHuyUe9lk", "", map[string]interface{}{
|
||||
"appid": "wx4b5930c13f8b1170",
|
||||
"appid": "wx2bb99eb5d2c9b82c",
|
||||
//"pagepath": "pages/order-manager/main",
|
||||
}, map[string]interface{}{
|
||||
"first": map[string]interface{}{
|
||||
|
||||
@@ -25,7 +25,8 @@ func init() {
|
||||
// 果园
|
||||
//api = New("wx2d6949f724b2541d", "11f3c380551c4683c149990b004d6df9")
|
||||
// 菜市 wixnapp2
|
||||
api = New("wx4b5930c13f8b1170", "2a57228a716ce991a52739f0ff41111d")
|
||||
//api = New("wx4b5930c13f8b1170", "2a57228a716ce991a52739f0ff41111d")
|
||||
api = New("wx2bb99eb5d2c9b82c", "6bbbed1443cc062c20a015a64c07a531")
|
||||
//api.CBSetToken("79_3x4gI4IFn9JKJd0EouSLe2HYFFoscRntAYCTZec4VLBlgivhOR0D2vp0mF0u6T-DmzbnAXotpTs_5Yp5Knxak7bfaMDzoaFMZM14r5n4CKpNTOaLH4PSyap2TnALTKgAHASAR")
|
||||
api.CBSetToken("79_gI9G28eqf110pCXCapGEKTPCDMYSo3i4tDo0GnftvpOGjm6n8zOgZGymLD5IpZrwh8Er2QLgg7bh3GYKs3wJiusDWYVQc6D-BouYF0DHIFJ3XtffYF3hxUFclAECWSeAEAICY")
|
||||
api.CBSetToken("duyaeVYUsz8LuKBqJeQO1NX6KmoC43yfMsbJybcRJ3e")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user