This commit is contained in:
邹宗楠
2022-08-22 11:27:24 +08:00
parent 027ffa19ca
commit dc6db2db8e
6 changed files with 2 additions and 29 deletions

View File

@@ -17,7 +17,7 @@ func TestPrintMsg(t *testing.T) {
ModelIDCULD: model.ModelIDCULD{},
PrintNo: "20220707000002",
Content: "<center>居中文字</center>",
OrderNo: "11111111", // 2147483648111
OrderNo: "1", // 2147483648111
Status: 0,
Comment: "",
MsgID: "1",

View File

@@ -7,7 +7,6 @@ import (
"git.rosy.net.cn/jx-callback/business/jxutils/jxcontext"
"git.rosy.net.cn/jx-callback/business/model"
"git.rosy.net.cn/jx-callback/business/model/dao"
"git.rosy.net.cn/jx-callback/globals"
"github.com/astaxie/beego/client/orm"
"time"
)
@@ -42,7 +41,6 @@ func AddBillExpend(txDB orm.TxOrmer, billID int64, billType, expendPrice, jobID
ExpendPrice: expendPrice,
JobID: jobID,
}
globals.SugarLogger.Debug("进入AddBillExpend")
dao.WrapAddIDCULEntity(billExpend, jxcontext.AdminCtx.GetUserName())
return dao.CreateEntityTx(txDB, billExpend)
}
@@ -70,7 +68,6 @@ func GetUserBillDetail(ctx *jxcontext.Context, userID, fromTime, toTime string,
func AddExpendUpdateAccount(txDB orm.TxOrmer, userBill *model.UserBill, billType, price, jobID int) (err error) {
//1、账户支出增加一条记录
globals.SugarLogger.Debug("进入AddExpendUpdateAccount")
err = AddBillExpend(txDB, userBill.BillID, billType, price, jobID)
if err != nil {
return err

View File

@@ -245,7 +245,6 @@ func OnTLPayCallback(call *tonglianpayapi.CallBackResult) (err error) {
}
func onTLpayFinished(call *tonglianpayapi.CallBackResult) (err error) {
globals.SugarLogger.Debug("进入微信回调============================")
order := &model.Order{
OrderID: call.CusorderID,
TransactionID: call.TrxID,
@@ -334,8 +333,6 @@ func onTLpayFinished(call *tonglianpayapi.CallBackResult) (err error) {
}
}
dao.Commit(db, txdb)
globals.SugarLogger.Debug("call.TrxStatus======================", call.TrxStatus)
globals.SugarLogger.Debug("order.OrderType======================", order.OrderType)
if call.TrxStatus == tonglianpayapi.TrxStatusSuccess {
switch order.OrderType {
case model.PayType4Express:

View File

@@ -4,7 +4,6 @@ import (
"fmt"
"git.rosy.net.cn/jx-callback/business/jxutils/ddmsg"
"git.rosy.net.cn/jx-callback/business/jxutils/weixinmsg"
"git.rosy.net.cn/jx-callback/business/model"
"git.rosy.net.cn/baseapi/platformapi/dingdingapi"
@@ -33,7 +32,7 @@ func SendUserMessage(msgType string, user *model.User, title, content string) (e
}
err = ddmsg.SendDDUserMessage(msgType, auth.AuthID, title, content)
} else if auth.Type == weixin.AuthTypeMP && msgType != dingdingapi.MsgTypeMarkdown {
err = weixinmsg.NotifyStoreStatusChanged(auth.AuthID, title, content)
//err = weixinmsg.NotifyStoreStatusChanged(auth.AuthID, title, content)
}
break
}

View File

@@ -68,14 +68,12 @@ func QueryExpressPrice(param *bida.GetExpressPriceReq) (map[string]*bida.GetExpr
param.ReceiveAddress = v + param.ReceiveAddress
}
}
globals.SugarLogger.Debug("检测param是否加上前缀", param.SendAddress, param.ReceiveAddress)
// 给快递默认值
result := make(map[string]*bida.GetExpressPriceRes, 0)
if param.Type == 0 {
// 渠道费每公斤加价五毛
switch param.ChannelType {
case 1: // 快递
globals.SugarLogger.Debug("进入QueryExpressPrice case1 ")
for i := 0; i < len(ExpressCompany); i++ {
param.Type = ExpressCompany[i]
fee, err := api.QBiDaAPI.GetExpressPrice(param)
@@ -267,12 +265,10 @@ func CancelWayOrder(ctx *jxcontext.Context, userId string, param *bida.CancelOrd
if err != nil {
return FailCode, err
}
globals.SugarLogger.Debug("回调获取order详情", orderWay)
userBill, err := dao.GetUserBill(db, orderWay.UserID, "")
if err != nil {
return FailCode, err
}
globals.SugarLogger.Debug("回调获取user_bill详情", userBill)
if orderWay.Status == 110 {
if orderWay.PayMethod == 1 { // 余额支付
@@ -306,15 +302,12 @@ func CancelWayOrder(ctx *jxcontext.Context, userId string, param *bida.CancelOrd
}
}
if orderWay.PayMethod == 5 { //混合支付
globals.SugarLogger.Debug("回调进入混合支付流程")
//余额增加相应金额
globals.SugarLogger.Debug("回调输出订单id", orderWay.OrderID)
mixPayInfo, err := dao.GetMixPayDetail(orderWay.OrderID)
if err != nil {
return FailCode, err
}
//userBill.AccountBalance = mixPayInfo.BalancePrice
globals.SugarLogger.Debug("回调输出userBill.AccountBalance", userBill.AccountBalance)
if err := dao.UpdateUserBill(userBill.UserID, mixPayInfo.BalancePrice); err != nil {
return 0, err
}
@@ -327,10 +320,6 @@ func CancelWayOrder(ctx *jxcontext.Context, userId string, param *bida.CancelOrd
return FailCode, err
}
globals.SugarLogger.Debug("回调进入微信退款")
globals.SugarLogger.Debug("orderWay==============", orderWay)
globals.SugarLogger.Debug("order==============", order)
globals.SugarLogger.Debug("order.OtherWayBill==============", order.OtherWayBill)
res, err := RefundOrderByTL(ctx, orderWay, order, order.OtherWayBill, int(orderWay.PayPrice*100), "申请退款")
if len(res.VendorRefundID) > 0 {
return SuccessCode, err
@@ -435,7 +424,6 @@ func CreateOrder2QBiDa(order *model.UserVendorOrder, orderId string) error {
// globals.SugarLogger.Debug("Callback Success But Order Status Update Fail ....")
// return errors.New("Callback Success But Order Status Update Fail ")
//}
globals.SugarLogger.Debug("我到qbd回调接口了")
// 创建QBIDA订单
makeOrder := &bida.MakeOrderReq{
PromiseTimeType: order.PromiseTimeType,
@@ -472,9 +460,7 @@ func CreateOrder2QBiDa(order *model.UserVendorOrder, orderId string) error {
otherId, err := createOtherOrder(makeOrder)
if err != nil {
order.ErrorMsg = err.Error()
globals.SugarLogger.Debug("err==========", err)
}
globals.SugarLogger.Debug("otherId==========", otherId)
order.OtherWayBill = otherId
order.OrderStatus = model.OrderStatusWaitPickup
order.UpdatedAt = time.Now()
@@ -486,16 +472,12 @@ func CreateOrder2QBiDa(order *model.UserVendorOrder, orderId string) error {
// RefundOrderByTL 发起取消订单
func RefundOrderByTL(ctx *jxcontext.Context, orderPay *model.Order, order *model.UserVendorOrder, refundID string, refundFee int, refundDesc string) (orderPayRefund *model.OrderPayRefund, err error) {
globals.SugarLogger.Debug("进入取消订单流程")
globals.SugarLogger.Debug("进入取消订单流程,输出退款金额", refundFee)
result, err := api.TLpayAPI.PayRefund(&tonglianpayapi.PayRefundParam{
Trxamt: refundFee / 100,
Reqsn: utils.GetUUID(),
Remark: refundDesc,
OldTrxID: orderPay.TransactionID,
})
globals.SugarLogger.Debug("result===============", result)
globals.SugarLogger.Debug("errerrerr===============", err)
if err == nil {
orderPayRefund = &model.OrderPayRefund{
RefundID: refundID,

View File

@@ -282,7 +282,6 @@ func (c *EventController) UploadImg() {
// @router /UploadAudio [post]
func (c *EventController) UploadAudio() {
c.callUploadAudio(func(params *tEventUploadAudioParams) (retVal interface{}, errCode string, err error) {
globals.SugarLogger.Debug("我进入UploadAudio了")
var (
timeStr = time.Now().Format("20060102")
filePath = audioPath + timeStr
@@ -308,7 +307,6 @@ func (c *EventController) UploadAudio() {
}
defer f.Close()
io.Copy(f, file)
globals.SugarLogger.Debug("打印一下f========", f, file)
//c.SaveToFile("rsmAudio", filePath+fileName)
return &model.ImMessageRecord{
//Content: "https://www.jxcs.net/jxdata/cthrgw/dist/audio/" + timeStr + "/" + fileName,