Browse Source

debug

master v0.7.8
lijianbin 3 years ago
parent
commit
ed808316e8
2 changed files with 11 additions and 9 deletions
  1. +1
    -1
      account.client.go
  2. +10
    -8
      account.client_test.go

+ 1
- 1
account.client.go View File

@ -784,7 +784,7 @@ func UpdateUserCoupon(dbname, userId, couponId, remark, orderSn, isUse, usetime
res := &Response{}
err = conn.UpdateUserUpgrade(req, res)
err = conn.UpdateUserCoupon(req, res)
if err != nil {
log.Println("userrpc UpdateUserCoupon error:", err)


+ 10
- 8
account.client_test.go View File

@ -1,7 +1,9 @@
package userrpc
import (
"strconv"
"testing"
"time"
)
func Test_GetUserScore(t *testing.T) {
@ -141,10 +143,10 @@ func Test_AddUserRedEnvelopeLog(t *testing.T) {
func Test_AddUserCoupon(t *testing.T) {
dbname := "shop_v2_org"
userid := "2"
couponId := "20"
expired_time := ""
couponId := "6"
expired_time := "1634684122"
order_sn := ""
remark := ""
remark := "商品券"
ret, err := AddUserCoupon(dbname, userid, couponId, expired_time,order_sn,remark)
t.Log(ret)
@ -154,11 +156,11 @@ func Test_AddUserCoupon(t *testing.T) {
func Test_UpdateUserCoupon(t *testing.T) {
dbname := "shop_v2_org"
userid := "2"
couponId := "20"
remark := ""
orderSn := ""
isUse := ""
usetime := ""
couponId := "6"
remark := "下单使用优惠券"
orderSn := "12345678910"
isUse := "1"
usetime := strconv.Itoa(int(time.Now().Unix()))
ret, err := UpdateUserCoupon(dbname, userid, couponId, remark, orderSn, isUse,usetime)
t.Log(ret)


Loading…
Cancel
Save