dev
parent
d8bcf52b85
commit
6cbdbaeaaa
|
|
@ -7,7 +7,9 @@ import com.cowr.common.view.PageParam;
|
|||
import com.cowr.common.view.Result;
|
||||
import com.cowr.model.Customer;
|
||||
import com.cowr.model.CustomerReceiver;
|
||||
import com.cowr.model.PrepayCustomer;
|
||||
import com.cowr.model.Sysuser;
|
||||
import com.cowr.ssjygl.prepay.prepaycustomer.PrepayCustomerService;
|
||||
import com.jfinal.kit.StrKit;
|
||||
import com.jfinal.plugin.activerecord.Db;
|
||||
import com.jfinal.plugin.activerecord.Page;
|
||||
|
|
@ -51,6 +53,12 @@ public class CustomerService extends BaseService {
|
|||
out.set("receiver_address", receiver.getAddress());
|
||||
}
|
||||
|
||||
PrepayCustomer prepayCustomer = PrepayCustomerService.me.getPrepayCustomer(id);
|
||||
|
||||
if (prepayCustomer != null) {
|
||||
out.set("surplus", prepayCustomer.getSurplus());
|
||||
}
|
||||
|
||||
return Result.success(out);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -223,7 +223,7 @@ public class RefundDetailSyncService extends BaseSyncService {
|
|||
return Result.failed("未找到客户预付费信息");
|
||||
}
|
||||
|
||||
if (prepayCustomer.getSurplus() == null || amount.compareTo(prepayCustomer.getSurplus()) >= 0) {
|
||||
if (prepayCustomer.getSurplus() == null || amount.subtract(prepayCustomer.getSurplus()).compareTo(new BigDecimal("0")) < 0) {
|
||||
return Result.failed("退费金额不能大于账户余额");
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue