|
|
@@ -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 |
|
|
|
} |