解决冲突
This commit is contained in:
commit
a54212d38c
|
@ -19,8 +19,12 @@ func ApiRes(c *gin.Context, data interface{}, code int, msg ...string) {
|
|||
var logId int64
|
||||
var responseData interface{}
|
||||
var message string
|
||||
var appCheckInfo *services.AppCheck
|
||||
originData := "{}"
|
||||
appCheckInfo := GetAppCheckInfo(c).(*services.AppCheck)
|
||||
appInfo := GetAppCheckInfo(c)
|
||||
if appInfo != nil {
|
||||
appCheckInfo = appInfo.(*services.AppCheck)
|
||||
}
|
||||
// 空数据
|
||||
if utils.IsNil(data) {
|
||||
data = struct{}{}
|
||||
|
|
|
@ -71,7 +71,7 @@ func QueryOrder(c *gin.Context) {
|
|||
cond := builder.NewCond()
|
||||
cond = cond.And(builder.Eq{"out_trade_no": order.OutTradeNo}, builder.Eq{"app_id": order.AppId})
|
||||
_, code := services.OrderFindOne(&order, cond)
|
||||
if code != errorcode.OrdersExist {
|
||||
if code != errorcode.Success {
|
||||
controllers.ApiRes(c, nil, code)
|
||||
return
|
||||
}
|
||||
|
|
|
@ -102,7 +102,10 @@ func (o *OrdersResponse) ResponseFromDb(db ordersmodel.OrdersBackendList) {
|
|||
}
|
||||
|
||||
type OrderLogsListRequest struct {
|
||||
OrderId int64 `json:"order_id" form:"order_id"`
|
||||
Id int64 `json:"id" form:"id"`
|
||||
OrderId int64 `json:"order_id" form:"order_id"`
|
||||
AppId int64 `json:"app_id" form:"app_id"`
|
||||
OutTradeNo string `json:"out_trade_no" form:"out_trade_no"`
|
||||
entities.PageRequest
|
||||
}
|
||||
|
||||
|
|
|
@ -12,6 +12,8 @@ var FrontRequestMap = map[string]func() (validForm interface{}, isSaveLog bool){
|
|||
}
|
||||
|
||||
var FrontRequestMapBeforeDecrypt = map[string]func() interface{}{
|
||||
|
||||
common.FRONT_V1 + "/pay/url": func() interface{} { return new(front.RequestBody) },
|
||||
common.FRONT_V1 + "/pay/refund": func() interface{} { return new(front.RequestBody) },
|
||||
common.FRONT_V1 + "/pay/query": func() interface{} { return new(front.RequestBody) },
|
||||
}
|
||||
|
|
|
@ -60,6 +60,15 @@ func OrderRequestLogsList(req backend.OrderLogsListRequest) (requestLog []orderr
|
|||
if req.OrderId > 0 {
|
||||
conn = conn.And(builder.Eq{"orders.id": req.OrderId})
|
||||
}
|
||||
if req.Id > 0 {
|
||||
conn = conn.And(builder.Eq{"order_request_log.id": req.Id})
|
||||
}
|
||||
if req.AppId > 0 {
|
||||
conn = conn.And(builder.Eq{"order_request_log.app_id": req.AppId})
|
||||
}
|
||||
if req.OutTradeNo != "" {
|
||||
conn = conn.And(builder.Like{"order_request_log.out_trade_no", req.OutTradeNo})
|
||||
}
|
||||
// 请求日志
|
||||
orderLogList := make([]orderrequestlogmodel.OrderRequestLog, 0)
|
||||
total, err := requestRepo.OrderRequestLogBackendList(conn, req.PageRequest, &orderLogList)
|
||||
|
@ -74,6 +83,9 @@ func OrderCallbackLogsList(req backend.OrderLogsListRequest) (callback []orderca
|
|||
if req.OrderId > 0 {
|
||||
conn = conn.And(builder.Eq{"order_id": req.OrderId})
|
||||
}
|
||||
if req.Id > 0 {
|
||||
conn = conn.And(builder.Eq{"id": req.Id})
|
||||
}
|
||||
// 回调日志
|
||||
callbackLogList := make([]ordercallbacklogmodel.OrderCallbackLog, 0)
|
||||
total, err := callbackRepo.OrderCallbackLogList(conn, req.PageRequest, &callbackLogList)
|
||||
|
@ -90,6 +102,9 @@ func OrderThirdLogsList(req backend.OrderLogsListRequest) (thirdLod []orderthird
|
|||
if req.OrderId > 0 {
|
||||
conn = conn.And(builder.Eq{"order_id": req.OrderId})
|
||||
}
|
||||
if req.Id > 0 {
|
||||
conn = conn.And(builder.Eq{"id": req.Id})
|
||||
}
|
||||
thirdLogList := make([]orderthirdpaylogmodel.OrderThirdPayLog, 0)
|
||||
total, err := thirdRepo.OrderThirdPayLogList(conn, req.PageRequest, &thirdLogList)
|
||||
code = handErr(err)
|
||||
|
|
Loading…
Reference in New Issue