1
This commit is contained in:
parent
3a0348635c
commit
2d47880e59
@ -7,7 +7,7 @@ import (
|
|||||||
"fmt"
|
"fmt"
|
||||||
//"mt"
|
//"mt"
|
||||||
//"strings"
|
//"strings"
|
||||||
//"jccommon"
|
"jccommon"
|
||||||
)
|
)
|
||||||
|
|
||||||
type recharge struct {
|
type recharge struct {
|
||||||
@ -55,11 +55,29 @@ func (this *recharge) deliverGoods(ds *f5.DataSet) bool {
|
|||||||
result = false
|
result = false
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
idx := q5.ToInt64(ds.GetByName("idx"))
|
||||||
status := q5.ToInt32(ds.GetByName("stauts"))
|
status := q5.ToInt32(ds.GetByName("stauts"))
|
||||||
if status != 0 {
|
if status != 0 {
|
||||||
result = true
|
result = this.markStatus(idx, jccommon.RECHARGE_ORDER_STATUS_SENT) == nil
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
return result
|
return result
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (this *recharge) markStatus(idx int64, status int32) error {
|
||||||
|
var resultErr error
|
||||||
|
f5.GetGoStyleDb().Update(
|
||||||
|
constant.BCEVENT_DB,
|
||||||
|
"t_recharge",
|
||||||
|
[][]string{
|
||||||
|
{"idx", q5.ToString(idx)},
|
||||||
|
},
|
||||||
|
[][]string{
|
||||||
|
{"status", q5.ToString(status)},
|
||||||
|
},
|
||||||
|
func (err error, lastInsertId int64, rowsAffected int64) {
|
||||||
|
resultErr = err
|
||||||
|
})
|
||||||
|
return resultErr
|
||||||
|
}
|
||||||
|
@ -102,6 +102,11 @@ const (
|
|||||||
MAP_MODE_BOUNTY = 301
|
MAP_MODE_BOUNTY = 301
|
||||||
)
|
)
|
||||||
|
|
||||||
|
const (
|
||||||
|
RECHARGE_ORDER_STATUS_PENDING = 0
|
||||||
|
RECHARGE_ORDER_STATUS_SENT =1
|
||||||
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
BC_CURRENCY_NAME_ETHEREUM = "Ethereum"
|
BC_CURRENCY_NAME_ETHEREUM = "Ethereum"
|
||||||
BC_CURRENCY_NAME_USDC = "USDC"
|
BC_CURRENCY_NAME_USDC = "USDC"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user