|
@@ -421,21 +421,7 @@ func HasDepositOperate(ctx context.Context, orderCode string) (bool, error) {
|
|
|
|
|
|
// GetDepositPayMoney 获取保证金已支付金额
|
|
// GetDepositPayMoney 获取保证金已支付金额
|
|
func GetDepositPayMoney(ctx context.Context, orderCode string) (int64, error) {
|
|
func GetDepositPayMoney(ctx context.Context, orderCode string) (int64, error) {
|
|
- data, err := g.DB().Query(ctx, "SELECT pay_money FROM order_deposit_payment WHERE order_code=? and is_del=0 ", orderCode)
|
|
|
|
- if err != nil {
|
|
|
|
- log.Println("获取保证金已支付金额异常:", err, orderCode)
|
|
|
|
- return 0, err
|
|
|
|
- }
|
|
|
|
- if data.Len() == 0 {
|
|
|
|
- return 0, nil
|
|
|
|
- }
|
|
|
|
- dataMap := data[0].Map()
|
|
|
|
- return common.Int64All(dataMap["pay_money"]), nil
|
|
|
|
-}
|
|
|
|
-
|
|
|
|
-// GetDepositMoney 获取保证金金额
|
|
|
|
-func GetDepositMoney(ctx context.Context, orderCode string) (int64, error) {
|
|
|
|
- data, err := g.DB().Query(ctx, "SELECT money FROM order_deposit WHERE order_code=?", orderCode)
|
|
|
|
|
|
+ data, err := g.DB().Query(ctx, "SELECT pay_money FROM order_deposit WHERE order_code=? and state=1 and is_del=0 ", orderCode)
|
|
if err != nil {
|
|
if err != nil {
|
|
log.Println("获取保证金已支付金额异常:", err, orderCode)
|
|
log.Println("获取保证金已支付金额异常:", err, orderCode)
|
|
return 0, err
|
|
return 0, err
|