Compare commits
6 Commits
feature/v2
...
master
| Author | SHA1 | Date |
|---|---|---|
|
|
ec5623bc07 | |
|
|
08932ad38f | |
|
|
bf0870865e | |
|
|
3510be1db7 | |
|
|
aba8a18900 | |
|
|
c8d3050c70 |
|
|
@ -55,14 +55,15 @@ tools:
|
||||||
enabled: true
|
enabled: true
|
||||||
api_key: "dingsbbntrkeiyazcfdg"
|
api_key: "dingsbbntrkeiyazcfdg"
|
||||||
api_secret: "ObqxwyR20r9rVNhju0sCPQyQA98_FZSc32W4vgxnGFH_b02HZr1BPCJsOAF816nu"
|
api_secret: "ObqxwyR20r9rVNhju0sCPQyQA98_FZSc32W4vgxnGFH_b02HZr1BPCJsOAF816nu"
|
||||||
zltxOrderAfterSaleDetail:
|
zltxOrderAfterSaleSupplier:
|
||||||
enabled: true
|
enabled: true
|
||||||
base_url: "https://revcl.1688sup.com/api/admin/afterSales/direct/%s"
|
base_url: "https://revcl.1688sup.com/api/admin/afterSales/directs"
|
||||||
api_key : "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJ1c2VyQ2VudGVyIiwiZXhwIjoxNzU2MTgyNTM1LCJuYmYiOjE3NTYxODA3MzUsImp0aSI6IjEiLCJQaG9uZSI6IjE4MDAwMDAwMDAwIiwiVXNlck5hbWUiOiJsc3hkIiwiUmVhbE5hbWUiOiLotoXnuqfnrqHnkIblkZgiLCJBY2NvdW50VHlwZSI6MSwiR3JvdXBDb2RlcyI6IlZDTF9DQVNISUVSLFZDTF9PUEVSQVRFLFZDTF9BRE1JTixWQ0xfQUFBLFZDTF9WQ0xfT1BFUkFULFZDTF9JTlZPSUNFLENSTV9BRE1JTixMSUFOTElBTl9BRE1JTixNQVJLRVRNQUcyX0FETUlOLFBIT05FQklMTF9BRE1JTixRSUFOWkhVX1NVUFBFUl9BRE0sTUFSS0VUSU5HU0FBU19TVVBFUkFETUlOLENBUkRfQ09ERSxDQVJEX1BST0NVUkVNRU5ULE1BUktFVElOR1NZU1RFTV9TVVBFUixTVEFUSVNUSUNBTFNZU1RFTV9BRE1JTixaTFRYX0FETUlOLFpMVFhfT1BFUkFURSIsIkRpbmdVc2VySWQiOiIxNjIwMjYxMjMwMjg5MzM4MzQifQ.N1xv1PYbcO8_jR5adaczc16YzGsr4z101gwEZdulkRaREBJNYTOnFrvRxTFx3RJTooXsqTqroE1MR84v_1WPX6BS6kKonA-kC1Jgot6yrt5rFWhGNGb2Cpr9rKIFCCQYmiGd3AUgDazEeaQ0_sodv3E-EXg9VfE1SX8nMcck9Yjnc8NCy7RTWaBIaSeOdZcEl-JfCD0S6GSx3oErp_hk-U9FKGwf60wAuDGTY1R0BP4BYpcEqS-C2LSnsSGyURi54Cuk5xH8r1WuF0Dm5bwAj5d7Hvs77-N_sUF-C5ONqyZJRAEhYLgcmN9RX_WQZfizdQJxizlTczdpzYfy-v-1eQ"
|
zltxOrderAfterSaleReseller:
|
||||||
zltxOrderAfterSalePreCheck:
|
|
||||||
enabled: true
|
enabled: true
|
||||||
base_url: "https://gateway.dev.cdlsxd.cn/zltx_api/admin/afterSales/reseller_pre"
|
base_url: "https://revcl.1688sup.com/api/admin/afterSales/reseller_pre_ai"
|
||||||
api_key : "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJ1c2VyQ2VudGVyIiwiZXhwIjoxNzU2MTgyNTM1LCJuYmYiOjE3NTYxODA3MzUsImp0aSI6IjEiLCJQaG9uZSI6IjE4MDAwMDAwMDAwIiwiVXNlck5hbWUiOiJsc3hkIiwiUmVhbE5hbWUiOiLotoXnuqfnrqHnkIblkZgiLCJBY2NvdW50VHlwZSI6MSwiR3JvdXBDb2RlcyI6IlZDTF9DQVNISUVSLFZDTF9PUEVSQVRFLFZDTF9BRE1JTixWQ0xfQUFBLFZDTF9WQ0xfT1BFUkFULFZDTF9JTlZPSUNFLENSTV9BRE1JTixMSUFOTElBTl9BRE1JTixNQVJLRVRNQUcyX0FETUlOLFBIT05FQklMTF9BRE1JTixRSUFOWkhVX1NVUFBFUl9BRE0sTUFSS0VUSU5HU0FBU19TVVBFUkFETUlOLENBUkRfQ09ERSxDQVJEX1BST0NVUkVNRU5ULE1BUktFVElOR1NZU1RFTV9TVVBFUixTVEFUSVNUSUNBTFNZU1RFTV9BRE1JTixaTFRYX0FETUlOLFpMVFhfT1BFUkFURSIsIkRpbmdVc2VySWQiOiIxNjIwMjYxMjMwMjg5MzM4MzQifQ.N1xv1PYbcO8_jR5adaczc16YzGsr4z101gwEZdulkRaREBJNYTOnFrvRxTFx3RJTooXsqTqroE1MR84v_1WPX6BS6kKonA-kC1Jgot6yrt5rFWhGNGb2Cpr9rKIFCCQYmiGd3AUgDazEeaQ0_sodv3E-EXg9VfE1SX8nMcck9Yjnc8NCy7RTWaBIaSeOdZcEl-JfCD0S6GSx3oErp_hk-U9FKGwf60wAuDGTY1R0BP4BYpcEqS-C2LSnsSGyURi54Cuk5xH8r1WuF0Dm5bwAj5d7Hvs77-N_sUF-C5ONqyZJRAEhYLgcmN9RX_WQZfizdQJxizlTczdpzYfy-v-1eQ"
|
zltxOrderAfterSaleResellerBatch:
|
||||||
|
enabled: true
|
||||||
|
base_url: "https://revcl.1688sup.com/api/admin/afterSales/reseller_pre_ai"
|
||||||
|
|
||||||
|
|
||||||
default_prompt:
|
default_prompt:
|
||||||
|
|
@ -73,4 +74,8 @@ default_prompt:
|
||||||
提取出图片中对用户可能有用的关键信息(例如金额、日期、标题、编号、联系信息、商品名称等)。
|
提取出图片中对用户可能有用的关键信息(例如金额、日期、标题、编号、联系信息、商品名称等)。
|
||||||
若图片为文档类(如合同、发票、收据),请结构化输出关键字段(如客户名称、金额、开票日期等)。
|
若图片为文档类(如合同、发票、收据),请结构化输出关键字段(如客户名称、金额、开票日期等)。
|
||||||
'
|
'
|
||||||
user_prompt: '识别图片内容'
|
user_prompt: '识别图片内容'
|
||||||
|
|
||||||
|
# 权限配置
|
||||||
|
permissionConfig:
|
||||||
|
permission_url: "https://api.user.1688sup.com/v1/menu/myCodes?systemId="
|
||||||
|
|
@ -36,16 +36,16 @@ db:
|
||||||
tools:
|
tools:
|
||||||
zltxOrderDetail:
|
zltxOrderDetail:
|
||||||
enabled: true
|
enabled: true
|
||||||
base_url: "https://revcl.1688sup.com/api/admin/direct/ai/%s"
|
base_url: "https://gateway.dev.cdlsxd.cn/zltx_api/admin/direct/ai/%s"
|
||||||
add_url: "https://revcl.1688sup.com/api/admin/direct/log/%s/%s"
|
add_url: "https://gateway.dev.cdlsxd.cn/zltx_api/admin/direct/log/%s/%s"
|
||||||
api_key: "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJ1c2VyQ2VudGVyIiwiZXhwIjoxNzU4MDkxOTU4LCJuYmYiOjE3NTgwOTAxNTgsImp0aSI6IjEiLCJQaG9uZSI6IjE4MDAwMDAwMDAwIiwiVXNlck5hbWUiOiJsc3hkIiwiUmVhbE5hbWUiOiLotoXnuqfnrqHnkIblkZgiLCJBY2NvdW50VHlwZSI6MSwiR3JvdXBDb2RlcyI6IlZDTF9DQVNISUVSLFZDTF9PUEVSQVRFLFZDTF9BRE1JTixWQ0xfQUFBLFZDTF9WQ0xfT1BFUkFULFZDTF9JTlZPSUNFLENSTV9BRE1JTixMSUFOTElBTl9BRE1JTixNQVJLRVRNQUcyX0FETUlOLFBIT05FQklMTF9BRE1JTixRSUFOWkhVX1NVUFBFUl9BRE0sTUFSS0VUSU5HU0FBU19TVVBFUkFETUlOLENBUkRfQ09ERSxDQVJEX1BST0NVUkVNRU5ULE1BUktFVElOR1NZU1RFTV9TVVBFUixTVEFUSVNUSUNBTFNZU1RFTV9BRE1JTixaTFRYX0FETUlOLFpMVFhfT1BFUkFURSIsIkRpbmdVc2VySWQiOiIxNjIwMjYxMjMwMjg5MzM4MzQifQ.Bjsx9f8yfcrV9EWxb0n6POwnXVOq9XPRD78JFZnnf1_VAVMN78W4W570SZL27PWuDnkD7E4oUg6RzeZwZgl7BZrNpNr-a-QpNC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TYXdIc5EAG0AbCzAk22nPTl47nkMeHtmisXQVLEsdibl1hW3ViFJlXwfXvUrOENItmL1_mRYkggUB0MaTu2nHJOYM6PaOVGLHx-74eepnmK2rm6konFEb6ed-Ukc6gVR-nM9yWZaYLYNGNKJLwZoCX3tRuerq74n4kzQgWmUEJeaVI1yIGSw1zw"
|
||||||
zltxProduct:
|
zltxProduct:
|
||||||
enabled: true
|
enabled: true
|
||||||
base_url: "https://revcl.1688sup.com/api/admin/oursProduct"
|
base_url: "https://gateway.dev.cdlsxd.cn/zltx_api/admin/oursProduct"
|
||||||
add_url: "https://revcl.1688sup.com/api/admin/platformProduct/getProductsByOfficialProductId"
|
add_url: "https://gateway.dev.cdlsxd.cn/zltx_api/admin/platformProduct/getProductsByOfficialProductId"
|
||||||
api_key: "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJ1c2VyQ2VudGVyIiwiZXhwIjoxNzU2MTgyNTM1LCJuYmYiOjE3NTYxODA3MzUsImp0aSI6IjEiLCJQaG9uZSI6IjE4MDAwMDAwMDAwIiwiVXNlck5hbWUiOiJsc3hkIiwiUmVhbE5hbWUiOiLotoXnuqfnrqHnkIblkZgiLCJBY2NvdW50VHlwZSI6MSwiR3JvdXBDb2RlcyI6IlZDTF9DQVNISUVSLFZDTF9PUEVSQVRFLFZDTF9BRE1JTixWQ0xfQUFBLFZDTF9WQ0xfT1BFUkFULFZDTF9JTlZPSUNFLENSTV9BRE1JTixMSUFOTElBTl9BRE1JTixNQVJLRVRNQUcyX0FETUlOLFBIT05FQklMTF9BRE1JTixRSUFOWkhVX1NVUFBFUl9BRE0sTUFSS0VUSU5HU0FBU19TVVBFUkFETUlOLENBUkRfQ09ERSxDQVJEX1BST0NVUkVNRU5ULE1BUktFVElOR1NZU1RFTV9TVVBFUixTVEFUSVNUSUNBTFNZU1RFTV9BRE1JTixaTFRYX0FETUlOLFpMVFhfT1BFUkFURSIsIkRpbmdVc2VySWQiOiIxNjIwMjY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kRaREBJNYTOnFrvRxTFx3RJTooXsqTqroE1MR84v_1WPX6BS6kKonA-kC1Jgot6yrt5rFWhGNGb2Cpr9rKIFCCQYmiGd3AUgDazEeaQ0_sodv3E-EXg9VfE1SX8nMcck9Yjnc8NCy7RTWaBIaSeOdZcEl-JfCD0S6GSx3oErp_hk-U9FKGwf60wAuDGTY1R0BP4BYpcEqS-C2LSnsSGyURi54Cuk5xH8r1WuF0Dm5bwAj5d7Hvs77-N_sUF-C5ONqyZJRAEhYLgcmN9RX_WQZfizdQJxizlTczdpzYfy-v-1eQ"
|
||||||
zltxOrderStatistics:
|
zltxOrderStatistics:
|
||||||
base_url: "https://revcl.1688sup.com/api/admin/direct/ai/search/"
|
base_url: "https://gateway.dev.cdlsxd.cn/zltx_api/admin/direct/ai/search/"
|
||||||
enabled: true
|
enabled: true
|
||||||
api_key: "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJ1c2VyQ2VudGVyIiwiZXhwIjoxNzU2MTgyNTM1LCJuYmYiOjE3NTYxODA3MzUsImp0aSI6IjEiLCJQaG9uZSI6IjE4MDAwMDAwMDAwIiwiVXNlck5hbWUiOiJsc3hkIiwiUmVhbE5hbWUiOiLotoXnuqfnrqHnkIblkZgiLCJBY2NvdW50VHlwZSI6MSwiR3JvdXBDb2RlcyI6IlZDTF9DQVNISUVSLFZDTF9PUEVSQVRFLFZDTF9BRE1JTixWQ0xfQUFBLFZDTF9WQ0xfT1BFUkFULFZDTF9JTlZPSUNFLENSTV9BRE1JTixMSUFOTElBTl9BRE1JTixNQVJLRVRNQUcyX0FETUlOLFBIT05FQklMTF9BRE1JTixRSUFOWkhVX1NVUFBFUl9BRE0sTUFSS0VUSU5HU0FBU19TVVBFUkFETUlOLENBUkRfQ09ERSxDQVJEX1BST0NVUkVNRU5ULE1BUktFVElOR1NZU1RFTV9TVVBFUixTVEFUSVNUSUNBTFNZU1RFTV9BRE1JTixaTFRYX0FETUlOLFpMVFhfT1BFU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xv1PYbcO8_jR5adaczc16YzGsr4z101gwEZdulkRaREBJNYTOnFrvRxTFx3RJTooXsqTqroE1MR84v_1WPX6BS6kKonA-kC1Jgot6yrt5rFWhGNGb2Cpr9rKIFCCQYmiGd3AUgDazEeaQ0_sodv3E-EXg9VfE1SX8nMcck9Yjnc8NCy7RTWaBIaSeOdZcEl-JfCD0S6GSx3oErp_hk-U9FKGwf60wAuDGTY1R0BP4BYpcEqS-C2LSnsSGyURi54Cuk5xH8r1WuF0Dm5bwAj5d7Hvs77-N_sUF-C5ONqyZJRAEhYLgcmN9RX_WQZfizdQJxizlTczdpzYfy-v-1eQ"
|
||||||
knowledge:
|
knowledge:
|
||||||
|
|
|
||||||
|
|
@ -70,6 +70,7 @@ func (t *TaskBiz) GetUserPermission(req *entitys.TaskRequest, auth string) (code
|
||||||
// 发送请求
|
// 发送请求
|
||||||
res, err := request.Send()
|
res, err := request.Send()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
err = errors.SysErr("请求用户权限失败")
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -112,6 +112,14 @@ func (t *OrderAfterSaleResellerTool) Execute(ctx context.Context, requireData *e
|
||||||
if len(req.OrderNumber) == 0 && len(req.Account) == 0 {
|
if len(req.OrderNumber) == 0 && len(req.Account) == 0 {
|
||||||
return fmt.Errorf("订单号 和 充值账号 不能同时为空")
|
return fmt.Errorf("订单号 和 充值账号 不能同时为空")
|
||||||
}
|
}
|
||||||
|
// 时间格式不匹配,直接置为空
|
||||||
|
if req.SerialCreateTime != "" {
|
||||||
|
_, err := time.ParseInLocation(time.DateTime, req.SerialCreateTime, time.Local)
|
||||||
|
if err != nil {
|
||||||
|
entitys.ResLog(requireData.Ch, t.Name(), "时间格式不匹配,已置为空")
|
||||||
|
req.SerialCreateTime = ""
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
entitys.ResLog(requireData.Ch, t.Name(), "正在拉取售后订单信息")
|
entitys.ResLog(requireData.Ch, t.Name(), "正在拉取售后订单信息")
|
||||||
|
|
||||||
|
|
@ -119,19 +127,21 @@ func (t *OrderAfterSaleResellerTool) Execute(ctx context.Context, requireData *e
|
||||||
}
|
}
|
||||||
|
|
||||||
func (t *OrderAfterSaleResellerTool) checkOrderAfterSaleReseller(toolReq OrderAfterSaleResellerRequest, requireData *entitys.RequireData) error {
|
func (t *OrderAfterSaleResellerTool) checkOrderAfterSaleReseller(toolReq OrderAfterSaleResellerRequest, requireData *entitys.RequireData) error {
|
||||||
// 流水创建时间上下浮动10min
|
var serialStartTime, serialEndTime int64
|
||||||
serialCreateTime := time.Now()
|
|
||||||
var err error
|
|
||||||
if toolReq.SerialCreateTime != "" {
|
if toolReq.SerialCreateTime != "" {
|
||||||
serialCreateTime, err = time.ParseInLocation(time.DateTime, toolReq.SerialCreateTime, time.Local)
|
// 流水创建时间上下浮动10min
|
||||||
|
serialCreateTime, err := time.ParseInLocation(time.DateTime, toolReq.SerialCreateTime, time.Local)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
serialStartTime = serialCreateTime.Unix() - 10*60
|
||||||
|
serialEndTime = serialCreateTime.Unix() + 10*60
|
||||||
|
} else {
|
||||||
|
// 未指定流水创建时间,默认30天内
|
||||||
|
serialEndTime = time.Now().Unix()
|
||||||
|
serialStartTime = serialEndTime - 60*60*24*30 // 30天内
|
||||||
}
|
}
|
||||||
|
|
||||||
serialStartTime := serialCreateTime.Unix() - 10*60
|
|
||||||
serialEndTime := serialCreateTime.Unix() + 10*60
|
|
||||||
|
|
||||||
// 账号数量超过10直接截断
|
// 账号数量超过10直接截断
|
||||||
if len(toolReq.Account) > 10 {
|
if len(toolReq.Account) > 10 {
|
||||||
entitys.ResLog(requireData.Ch, t.Name(), "账号数量超过10已被截断")
|
entitys.ResLog(requireData.Ch, t.Name(), "账号数量超过10已被截断")
|
||||||
|
|
@ -144,6 +154,7 @@ func (t *OrderAfterSaleResellerTool) checkOrderAfterSaleReseller(toolReq OrderAf
|
||||||
|
|
||||||
// 最终输出
|
// 最终输出
|
||||||
var orderList []*OrderAfterSaleResellerData
|
var orderList []*OrderAfterSaleResellerData
|
||||||
|
var err error
|
||||||
|
|
||||||
// 多订单号
|
// 多订单号
|
||||||
if len(toolReq.OrderNumber) > 0 {
|
if len(toolReq.OrderNumber) > 0 {
|
||||||
|
|
@ -245,6 +256,11 @@ func (t *OrderAfterSaleResellerTool) getAfterSaleResellerList(headers map[string
|
||||||
if responsibleType == 0 {
|
if responsibleType == 0 {
|
||||||
responsibleType = 4 // 默认无
|
responsibleType = 4 // 默认无
|
||||||
}
|
}
|
||||||
|
// 售后金额
|
||||||
|
afterSalesPrice := util.StringToFloat64(originInput.AfterSalesPrice)
|
||||||
|
if afterSalesPrice == 0 {
|
||||||
|
afterSalesPrice = item.OrderPrice
|
||||||
|
}
|
||||||
|
|
||||||
orderList = append(orderList, &OrderAfterSaleResellerData{
|
orderList = append(orderList, &OrderAfterSaleResellerData{
|
||||||
OrderType: item.OrderType,
|
OrderType: item.OrderType,
|
||||||
|
|
@ -261,7 +277,7 @@ func (t *OrderAfterSaleResellerTool) getAfterSaleResellerList(headers map[string
|
||||||
Platforms: item.Platforms,
|
Platforms: item.Platforms,
|
||||||
AfterType: afterType,
|
AfterType: afterType,
|
||||||
Remark: originInput.AfterSalesReason,
|
Remark: originInput.AfterSalesReason,
|
||||||
AfterAmount: util.StringToFloat64(originInput.AfterSalesPrice),
|
AfterAmount: afterSalesPrice,
|
||||||
ResponsibleType: responsibleType,
|
ResponsibleType: responsibleType,
|
||||||
ResponsiblePerson: originInput.ResponsiblePerson,
|
ResponsiblePerson: originInput.ResponsiblePerson,
|
||||||
})
|
})
|
||||||
|
|
|
||||||
|
|
@ -160,6 +160,11 @@ func (t *OrderAfterSaleResellerBatchTool) checkOrderAfterSaleResellerBatch(toolR
|
||||||
if responsibleType == 0 {
|
if responsibleType == 0 {
|
||||||
responsibleType = 4 // 默认无
|
responsibleType = 4 // 默认无
|
||||||
}
|
}
|
||||||
|
// 售后金额
|
||||||
|
afterSalesPrice := util.StringToFloat64(toolReq.AfterSalesPrice)
|
||||||
|
if afterSalesPrice == 0 {
|
||||||
|
afterSalesPrice = item.OrderPrice
|
||||||
|
}
|
||||||
|
|
||||||
toolResp.Data = append(toolResp.Data, &OrderAfterSaleResellerBatchData{
|
toolResp.Data = append(toolResp.Data, &OrderAfterSaleResellerBatchData{
|
||||||
OrderType: item.OrderType,
|
OrderType: item.OrderType,
|
||||||
|
|
@ -176,7 +181,7 @@ func (t *OrderAfterSaleResellerBatchTool) checkOrderAfterSaleResellerBatch(toolR
|
||||||
Platforms: item.Platforms,
|
Platforms: item.Platforms,
|
||||||
AfterType: afterType,
|
AfterType: afterType,
|
||||||
Remark: toolReq.AfterSalesReason,
|
Remark: toolReq.AfterSalesReason,
|
||||||
AfterAmount: util.StringToFloat64(toolReq.AfterSalesPrice),
|
AfterAmount: afterSalesPrice,
|
||||||
ResponsibleType: responsibleType,
|
ResponsibleType: responsibleType,
|
||||||
ResponsiblePerson: toolReq.ResponsiblePerson,
|
ResponsiblePerson: toolReq.ResponsiblePerson,
|
||||||
})
|
})
|
||||||
|
|
|
||||||
|
|
@ -106,6 +106,14 @@ func (t *OrderAfterSaleSupplierTool) Execute(ctx context.Context, requireData *e
|
||||||
if len(req.SerialNumber) == 0 && len(req.Account) == 0 {
|
if len(req.SerialNumber) == 0 && len(req.Account) == 0 {
|
||||||
return fmt.Errorf("充值流水号 和 充值账号 不能同时为空")
|
return fmt.Errorf("充值流水号 和 充值账号 不能同时为空")
|
||||||
}
|
}
|
||||||
|
// 时间格式不匹配,直接置为空
|
||||||
|
if req.SerialCreateTime != "" {
|
||||||
|
_, err := time.ParseInLocation(time.DateTime, req.SerialCreateTime, time.Local)
|
||||||
|
if err != nil {
|
||||||
|
entitys.ResLog(requireData.Ch, t.Name(), "时间格式不匹配,已置为空")
|
||||||
|
req.SerialCreateTime = ""
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
entitys.ResLog(requireData.Ch, t.Name(), "正在拉取售后订单信息")
|
entitys.ResLog(requireData.Ch, t.Name(), "正在拉取售后订单信息")
|
||||||
|
|
||||||
|
|
@ -113,17 +121,20 @@ func (t *OrderAfterSaleSupplierTool) Execute(ctx context.Context, requireData *e
|
||||||
}
|
}
|
||||||
|
|
||||||
func (t *OrderAfterSaleSupplierTool) checkOrderAfterSaleSupplier(toolReq OrderAfterSaleSupplierRequest, requireData *entitys.RequireData) error {
|
func (t *OrderAfterSaleSupplierTool) checkOrderAfterSaleSupplier(toolReq OrderAfterSaleSupplierRequest, requireData *entitys.RequireData) error {
|
||||||
// 流水创建时间上下浮动10min
|
var serialStartTime, serialEndTime int64
|
||||||
serialCreateTime := time.Now()
|
|
||||||
var err error
|
|
||||||
if toolReq.SerialCreateTime != "" {
|
if toolReq.SerialCreateTime != "" {
|
||||||
serialCreateTime, err = time.ParseInLocation(time.DateTime, toolReq.SerialCreateTime, time.Local)
|
// 流水创建时间上下浮动10min
|
||||||
|
serialCreateTime, err := time.ParseInLocation(time.DateTime, toolReq.SerialCreateTime, time.Local)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
serialStartTime = serialCreateTime.Unix() - 10*60
|
||||||
|
serialEndTime = serialCreateTime.Unix() + 10*60
|
||||||
|
} else {
|
||||||
|
// 未指定流水创建时间,默认30天内
|
||||||
|
serialEndTime = time.Now().Unix()
|
||||||
|
serialStartTime = serialEndTime - 60*60*24*30 // 30天内
|
||||||
}
|
}
|
||||||
serialStartTime := serialCreateTime.Unix() - 10*60
|
|
||||||
serialEndTime := serialCreateTime.Unix() + 10*60
|
|
||||||
|
|
||||||
// 账号数量超过10直接截断
|
// 账号数量超过10直接截断
|
||||||
if len(toolReq.Account) > 10 {
|
if len(toolReq.Account) > 10 {
|
||||||
|
|
@ -137,6 +148,7 @@ func (t *OrderAfterSaleSupplierTool) checkOrderAfterSaleSupplier(toolReq OrderAf
|
||||||
|
|
||||||
// 最终输出
|
// 最终输出
|
||||||
var orderList []*OrderAfterSaleSupplierData
|
var orderList []*OrderAfterSaleSupplierData
|
||||||
|
var err error
|
||||||
|
|
||||||
// 多流水号
|
// 多流水号
|
||||||
if len(toolReq.SerialNumber) > 0 {
|
if len(toolReq.SerialNumber) > 0 {
|
||||||
|
|
@ -232,6 +244,11 @@ func (t *OrderAfterSaleSupplierTool) getAfterSaleSupplierList(headers map[string
|
||||||
if afterType == 0 {
|
if afterType == 0 {
|
||||||
afterType = 1 // 默认退款
|
afterType = 1 // 默认退款
|
||||||
}
|
}
|
||||||
|
// 售后金额
|
||||||
|
afterSalesPrice := util.StringToFloat64(originInput.AfterSalesPrice)
|
||||||
|
if afterSalesPrice == 0 {
|
||||||
|
afterSalesPrice = item.PlatformPrice
|
||||||
|
}
|
||||||
|
|
||||||
orderList = append(orderList, &OrderAfterSaleSupplierData{
|
orderList = append(orderList, &OrderAfterSaleSupplierData{
|
||||||
SerialNumber: item.SerialNumber,
|
SerialNumber: item.SerialNumber,
|
||||||
|
|
@ -245,7 +262,7 @@ func (t *OrderAfterSaleSupplierTool) getAfterSaleSupplierList(headers map[string
|
||||||
PlatformID: item.PlatformID,
|
PlatformID: item.PlatformID,
|
||||||
SignCompanyName: item.SignCompanyName,
|
SignCompanyName: item.SignCompanyName,
|
||||||
Reason: originInput.AfterSalesReason,
|
Reason: originInput.AfterSalesReason,
|
||||||
SalePrice: util.StringToFloat64(originInput.AfterSalesPrice),
|
SalePrice: afterSalesPrice,
|
||||||
SaleType: afterType,
|
SaleType: afterType,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -77,6 +77,7 @@ func (w *BotTool) BugOptimizationSubmit(ctx context.Context, requireData *entity
|
||||||
// 记录 task_id 到 session_id 的映射
|
// 记录 task_id 到 session_id 的映射
|
||||||
w.SetTaskMapping(body.TaskId, requireData.Session)
|
w.SetTaskMapping(body.TaskId, requireData.Session)
|
||||||
entitys.ResLog(requireData.Ch, requireData.Match.Index, "问题记录中")
|
entitys.ResLog(requireData.Ch, requireData.Match.Index, "问题记录中")
|
||||||
|
entitys.ResLoading(requireData.Ch, requireData.Match.Index, "问题记录中...")
|
||||||
|
|
||||||
// 等待异步回调完成再结束
|
// 等待异步回调完成再结束
|
||||||
for {
|
for {
|
||||||
|
|
@ -84,8 +85,8 @@ func (w *BotTool) BugOptimizationSubmit(ctx context.Context, requireData *entity
|
||||||
if !ok || sessionID != requireData.Session {
|
if !ok || sessionID != requireData.Session {
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
entitys.ResLoading(requireData.Ch, requireData.Match.Index, "问题记录中...")
|
|
||||||
time.Sleep(time.Second)
|
time.Sleep(time.Second * 2)
|
||||||
}
|
}
|
||||||
|
|
||||||
return
|
return
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue