diff --git a/business/jxstore/financial/bill.go b/business/jxstore/financial/bill.go index 14ccf8cd0..6f6b9cdae 100644 --- a/business/jxstore/financial/bill.go +++ b/business/jxstore/financial/bill.go @@ -218,7 +218,6 @@ func WXInvestMemberNew(ctx *jxcontext.Context, memberID int, userID string) (err } else { userMember2.EndAt = time.Now().AddDate(1, 0, 0) } - //////// userinfo, err := dao.GetUser(db, userMember2.UserID) if err != nil { return "", err diff --git a/business/model/dao/dao_user.go b/business/model/dao/dao_user.go index f6ddad51f..9e3eb9c2a 100644 --- a/business/model/dao/dao_user.go +++ b/business/model/dao/dao_user.go @@ -436,3 +436,19 @@ func GetUserUnionBindImg(db *DaoDB, unionID, actID string) (userBinds *model.Use err = GetRow(db, &userBinds, sql, sqlParams) return userBinds, err } +func GetUserVendorOrder(db *DaoDB, userID, localWayBill string) (userVendorOrder *model.UserVendorOrder, err error) { + sql := `SELECT * FROM user_vendor_order WHERE deleted_at = ? ` + sqlParams := []interface{}{ + utils.DefaultTimeValue, + } + if userID != "" { + sql += "AND user_id = ?" + sqlParams = append(sqlParams, userID) + } + if localWayBill != "" { + sql += " AND local_way_bill = ?" + sqlParams = append(sqlParams, localWayBill) + } + err = GetRow(db, &userVendorOrder, sql, sqlParams) + return userVendorOrder, err +} diff --git a/business/q_bida/q_bida_server.go b/business/q_bida/q_bida_server.go index 26e198a45..c82e8197c 100644 --- a/business/q_bida/q_bida_server.go +++ b/business/q_bida/q_bida_server.go @@ -200,11 +200,14 @@ func CreateWayOrder(ctx *jxcontext.Context, param *model.MakeOrderParamReq, user func CancelWayOrder(ctx *jxcontext.Context, userId string, param *bida.CancelOrderReq) error { // 查询订单 globals.SugarLogger.Debug("userid==================", userId) + globals.SugarLogger.Debug("param.order_no==================", param.OrderNo) + order := &model.UserVendorOrder{UserId: userId, LocalWayBill: param.OrderNo} if err := dao.GetEntity(dao.GetDB(), order, "UserId", "LocalWayBill"); err != nil { return err } - + globals.SugarLogger.Debugf("sdhgeagqweg344w33qgweag== %s ", order.OtherWayBill) + globals.SugarLogger.Debugf("jbhbhjdsgbgjhghiwsg== %s ", order.LastOperator) if time.Now().Unix()-order.CreatedAt.Unix() <= 30 { return errors.New("支付成功后,超过30s才能取消") }