Merge branch 'jdshop' of https://e.coding.net/rosydev/jx-callback into jdshop

This commit is contained in:
richboo111
2022-12-22 14:16:46 +08:00
26 changed files with 553 additions and 401 deletions

View File

@@ -1544,7 +1544,7 @@ func (c *StoreController) CreateFreeShipTemplates() {
})
}
// @Title 打印机获取授权账号再京西菜市的绑定关系
// @Title 打印机获取授权账号再京西菜市的绑定关系(其实就是根据平台门店id获取绑定门店id)
// @Description 打印机获取授权账号再京西菜市的绑定关系
// @Param token header string true "认证token"
// @Param vendorStoreId formData string true "平台账号id"
@@ -1558,3 +1558,20 @@ func (c *StoreController) PrintCheckAccountAuthorization() {
return retVal, "", err
})
}
// @Title 门店存在时,绑定打印机账号信息
// @Description 门店存在时,绑定打印机账号信息
// @Param token header string true "认证token"
// @Param storeId formData int64 true "京西门店id"
// @Param printSn formData string true "打印机编号"
// @Param printKey formData string true "打印机秘钥"
// @Success 200 {object} controllers.CallResult
// @Failure 200 {object} controllers.CallResult
// @router /BindJxPrinter [post]
func (c *StoreController) BindJxPrinter() {
c.callBindJxPrinter(func(params *tStoreBindJxPrinterParams) (interface{}, string, error) {
err := cms.BindJxPrintToStore(int64(params.StoreId), params.PrintSn, params.PrintKey)
return nil, "", err
})
}

View File

@@ -149,18 +149,20 @@ func (c *LogisticsController) LogisticsQuery() {
Message: "运单账号不存在",
}
c.ServeJSON()
return
}
// 查询订单的运单是否存在
data, err := dao.GetWayBillsByWayBillId(dao.GetDB(), param.TrackNo)
if err != nil || len(data) == 0 {
globals.SugarLogger.Debugf("根据单号查询运单数据错误:%s", err)
globals.SugarLogger.Debugf("根据单号查询运单数据错误:%s,运单号 :%s", err.Error(), param.TrackNo)
c.Data["json"] = LogisticsQueryRest{
Result: false,
ReturnCode: "1002",
Message: "运单账号不存在",
}
c.ServeJSON()
return
}
returnParam := &LogisticsQueryRest{