This commit is contained in:
richboo111
2022-07-27 10:43:21 +08:00
parent 4a3f6b114c
commit e2b3637d9a
3 changed files with 23 additions and 6 deletions

View File

@@ -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

View File

@@ -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 `
sqlParams := []interface{}{
utils.DefaultTimeValue,
}
if userID != "" {
sql += " 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
}

View File

@@ -198,17 +198,19 @@ func CreateWayOrder(ctx *jxcontext.Context, param *model.MakeOrderParamReq, user
// CancelWayOrder 取消运单 todo
func CancelWayOrder(ctx *jxcontext.Context, userId string, param *bida.CancelOrderReq) error {
var db = dao.GetDB()
// 查询订单
globals.SugarLogger.Debug("userid==================", userId)
globals.SugarLogger.Debug("param.order_no==================", param.OrderNo)
//order:=get
order := &model.UserVendorOrder{UserId: userId, LocalWayBill: param.OrderNo}
//orders, err := QueryOrderDetail(param.Type, param.OrderNo)
//order := &orders
//order := &model.UserVendorOrder{UserId: userId, LocalWayBill: param.OrderNo}
order, err := dao.GetUserVendorOrder(db, userId, param.OrderNo)
if err != nil {
return err
}
globals.SugarLogger.Debugf("dgergergesgreger== %s ", order.OtherWayBill)
globals.SugarLogger.Debugf("hjghauifhwquihfuiojqw== %s ", order.LastOperator)
if err := dao.GetEntity(dao.GetDB(), order, "UserId", "LocalWayBill"); err != nil {
if err := dao.GetEntity(dao.GetDB(), order, "UserId", "LocalWayBill"); err != nil {
return err
}
globals.SugarLogger.Debugf("sdhgeagqweg344w33qgweag== %s ", order.OtherWayBill)