|
@@ -7,12 +7,8 @@ import cn.hutool.poi.excel.ExcelUtil;
|
|
import cn.hutool.poi.excel.ExcelWriter;
|
|
import cn.hutool.poi.excel.ExcelWriter;
|
|
import com.txz.cif.core.Result;
|
|
import com.txz.cif.core.Result;
|
|
import com.txz.cif.core.ResultGenerator;
|
|
import com.txz.cif.core.ResultGenerator;
|
|
-import com.txz.cif.model.Account;
|
|
|
|
-import com.txz.cif.model.BizLog;
|
|
|
|
-import com.txz.cif.model.RechargeRecord;
|
|
|
|
-import com.txz.cif.service.AccountService;
|
|
|
|
-import com.txz.cif.service.BizLogService;
|
|
|
|
-import com.txz.cif.service.RechargeRecordService;
|
|
|
|
|
|
+import com.txz.cif.model.*;
|
|
|
|
+import com.txz.cif.service.*;
|
|
|
|
|
|
import com.txz.cif.core.ResultCode;
|
|
import com.txz.cif.core.ResultCode;
|
|
|
|
|
|
@@ -53,7 +49,14 @@ public class RechargeRecordController {
|
|
|
|
|
|
@Resource
|
|
@Resource
|
|
private AccountService accountService;
|
|
private AccountService accountService;
|
|
- @GetMapping("/detail")
|
|
|
|
|
|
+
|
|
|
|
+ @Resource
|
|
|
|
+ private PaymentChannelService paymentChannelService;
|
|
|
|
+ @Resource
|
|
|
|
+ private PaymentMethodService paymentMethodService;
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ @GetMapping("/detail")
|
|
@ApiOperation(value = "rechargeRecord获取详情",httpMethod = "GET")
|
|
@ApiOperation(value = "rechargeRecord获取详情",httpMethod = "GET")
|
|
public Result<RechargeRecordBO> detail(@RequestParam Long id) {
|
|
public Result<RechargeRecordBO> detail(@RequestParam Long id) {
|
|
if(id == null){
|
|
if(id == null){
|
|
@@ -79,6 +82,18 @@ public class RechargeRecordController {
|
|
if (earnings != null){
|
|
if (earnings != null){
|
|
bo.setEarningsBalance(earnings.getBalance());
|
|
bo.setEarningsBalance(earnings.getBalance());
|
|
}
|
|
}
|
|
|
|
+ if (rechargeRecord.getMethodId() != null){
|
|
|
|
+ PaymentMethod method = paymentMethodService.findById(rechargeRecord.getMethodId());
|
|
|
|
+ if (method != null){
|
|
|
|
+ bo.setMethodName(method.getMethodName());
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ if (rechargeRecord.getChannelId() != null){
|
|
|
|
+ PaymentChannel channel = paymentChannelService.findById(rechargeRecord.getChannelId());
|
|
|
|
+ if (channel != null){
|
|
|
|
+ bo.setChannelName(channel.getChannelName());
|
|
|
|
+ }
|
|
|
|
+ }
|
|
return ResultGenerator.genSuccessResult(bo);
|
|
return ResultGenerator.genSuccessResult(bo);
|
|
} catch (Exception e) {
|
|
} catch (Exception e) {
|
|
log.error("查询对象操作异常e:{}",e);
|
|
log.error("查询对象操作异常e:{}",e);
|