linxk há 2 semanas atrás
pai
commit
acb36864ca

+ 5 - 0
cif-service/src/main/java/com/txz/cif/web/bo/RechargeRecordBO.java

@@ -59,6 +59,11 @@ public class RechargeRecordBO {
     @ApiModelProperty(value="channel渠道")
     private String channel;
 
+    @ApiModelProperty(value="支付通道")
+    private String channelName;
+    @ApiModelProperty(value="支付方式")
+    private String methodName;
+
     /**
      * 币种
      */

+ 22 - 7
cif-service/src/main/java/com/txz/cif/web/mng/RechargeRecordController.java

@@ -7,12 +7,8 @@ import cn.hutool.poi.excel.ExcelUtil;
 import cn.hutool.poi.excel.ExcelWriter;
 import com.txz.cif.core.Result;
 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;
 
@@ -53,7 +49,14 @@ public class RechargeRecordController {
 
 	@Resource
 	private AccountService accountService;
-    @GetMapping("/detail")
+
+	@Resource
+	private PaymentChannelService paymentChannelService;
+	@Resource
+	private PaymentMethodService paymentMethodService;
+
+
+	@GetMapping("/detail")
 	@ApiOperation(value = "rechargeRecord获取详情",httpMethod = "GET")
     public Result<RechargeRecordBO> detail(@RequestParam Long id) {
     	if(id == null){
@@ -79,6 +82,18 @@ public class RechargeRecordController {
 			if (earnings != null){
 				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);
 		} catch (Exception e) {
 			log.error("查询对象操作异常e:{}",e);