huangjiajun 6 mesi fa
parent
commit
4540786aa5
2 ha cambiato i file con 6 aggiunte e 4 eliminazioni
  1. +3
    -2
      src/implement/installment_payment_list_db.go
  2. +3
    -2
      src/implement/installment_payment_repaid_flow_db.go

+ 3
- 2
src/implement/installment_payment_list_db.go Vedi File

@@ -53,15 +53,16 @@ func (i InstallmentPaymentListDb) GetInstallmentPaymentListById(id int) (m *mode
return m, nil
}
func (i InstallmentPaymentListDb) FinInstallmentPaymentList(arg map[string]string) (m *[]models.InstallmentPaymentList, err error) {
mm := make([]models.InstallmentPaymentList, 0)
sess := i.Db.Where("uid=?", arg["uid"])
if arg["state"] != "" {
sess.And("is_repaid_off=?", zhios_order_relate_utils.StrToInt(arg["state"])-1)
}
size := zhios_order_relate_utils.StrToInt(arg["size"])
start := (zhios_order_relate_utils.StrToInt(arg["p"]) - 1) * size
err = sess.Limit(size, start).Find(m)
err = sess.Limit(size, start).Find(&mm)
if err != nil {
return nil, zhios_order_relate_logx.Error(err)
}
return m, nil
return &mm, nil
}

+ 3
- 2
src/implement/installment_payment_repaid_flow_db.go Vedi File

@@ -24,12 +24,13 @@ func (i InstallmentPaymentRepaidFlowDb) InsertInstallmentPaymentRepaidFlowBySess
return m.Id, nil
}
func (i InstallmentPaymentRepaidFlowDb) FinInstallmentRepaidFlow(arg map[string]string) (m *[]models.InstallmentPaymentRepaidFlow, err error) {
mm := make([]models.InstallmentPaymentRepaidFlow, 0)
sess := i.Db.Where("uid=?", arg["uid"]).And("record_id=?", arg["id"])
size := zhios_order_relate_utils.StrToInt(arg["size"])
start := (zhios_order_relate_utils.StrToInt(arg["p"]) - 1) * size
err = sess.Limit(size, start).Find(m)
err = sess.Limit(size, start).Find(&mm)
if err != nil {
return nil, zhios_order_relate_logx.Error(err)
}
return m, nil
return &mm, nil
}

Caricamento…
Annulla
Salva