|
@@ -33,6 +33,7 @@ func (r *reWardStruct) PayCallBack(param *CallBackParam) bool {
|
|
}
|
|
}
|
|
var (
|
|
var (
|
|
filter, _ = json.Marshal(filterMap)
|
|
filter, _ = json.Marshal(filterMap)
|
|
|
|
+ now = time.Now()
|
|
orderCode = fmt.Sprintf("%s%s", time.Now().Format("150405"), qutil.GetRandom(6))
|
|
orderCode = fmt.Sprintf("%s%s", time.Now().Format("150405"), qutil.GetRandom(6))
|
|
)
|
|
)
|
|
if !util.Mysql.ExecTx("打赏数据保存", func(tx *sql.Tx) bool {
|
|
if !util.Mysql.ExecTx("打赏数据保存", func(tx *sql.Tx) bool {
|
|
@@ -41,12 +42,12 @@ func (r *reWardStruct) PayCallBack(param *CallBackParam) bool {
|
|
"order_code": orderCode,
|
|
"order_code": orderCode,
|
|
"order_money": param.TotalFee,
|
|
"order_money": param.TotalFee,
|
|
"pay_money": param.CashFee,
|
|
"pay_money": param.CashFee,
|
|
- "pay_time": time.Now().Format("2006-01-02 15:04:05"),
|
|
|
|
|
|
+ "pay_time": now.Format("2006-01-02 15:04:05"),
|
|
"filter": string(filter),
|
|
"filter": string(filter),
|
|
"order_status": 1,
|
|
"order_status": 1,
|
|
"service_status": 0,
|
|
"service_status": 0,
|
|
"product_type": "打赏",
|
|
"product_type": "打赏",
|
|
- "create_time": time.Now().Format("2006-01-02 15:04:05"),
|
|
|
|
|
|
+ "create_time": now.Format("2006-01-02 15:04:05"),
|
|
"distribution_channel": "x01", //销售渠道
|
|
"distribution_channel": "x01", //销售渠道
|
|
"order_channel": "xdqd01", //下单渠道
|
|
"order_channel": "xdqd01", //下单渠道
|
|
"saleDep": "040000",
|
|
"saleDep": "040000",
|
|
@@ -58,16 +59,20 @@ func (r *reWardStruct) PayCallBack(param *CallBackParam) bool {
|
|
return false
|
|
return false
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ service_starttime := now.Format(time.DateTime)
|
|
|
|
+ service_endtime := time.Date(now.Year(), now.Month(), now.Day(), 23, 59, 59, 0, time.Local).Format(time.DateTime)
|
|
if util.Mysql.InsertByTx(tx, "jy_order_detail", map[string]interface{}{
|
|
if util.Mysql.InsertByTx(tx, "jy_order_detail", map[string]interface{}{
|
|
- "order_code": orderCode,
|
|
|
|
- "product_type": "打赏",
|
|
|
|
- "original_price": param.CashFee,
|
|
|
|
- "final_price": param.TotalFee,
|
|
|
|
- "product_code": "ds001",
|
|
|
|
- "tactics": 1, //1购买 2赠送
|
|
|
|
- "service_type": 1, //1:购买 2:续费 3:升级 4:试用
|
|
|
|
- "is_master": 1,
|
|
|
|
- "filter": gconv.String(g.Map{}),
|
|
|
|
|
|
+ "order_code": orderCode,
|
|
|
|
+ "product_type": "打赏",
|
|
|
|
+ "original_price": param.CashFee,
|
|
|
|
+ "final_price": param.TotalFee,
|
|
|
|
+ "product_code": "ds001",
|
|
|
|
+ "tactics": 1, //1购买 2赠送
|
|
|
|
+ "service_type": 1, //1:购买 2:续费 3:升级 4:试用
|
|
|
|
+ "is_master": 1,
|
|
|
|
+ "service_starttime": service_starttime,
|
|
|
|
+ "service_endtime": service_endtime,
|
|
|
|
+ "filter": gconv.String(g.Map{}),
|
|
}) <= 0 {
|
|
}) <= 0 {
|
|
return false
|
|
return false
|
|
}
|
|
}
|