|
|
@ -1,8 +1,11 @@ |
|
|
|
package com.cweb.controller; |
|
|
|
package com.cweb.controller; |
|
|
|
|
|
|
|
|
|
|
|
import com.hfkj.common.utils.ResponseMsgUtil; |
|
|
|
import com.hfkj.common.utils.ResponseMsgUtil; |
|
|
|
|
|
|
|
import com.hfkj.entity.BsMerPlatformNo; |
|
|
|
|
|
|
|
import com.hfkj.entity.BsMerPlatformTerm; |
|
|
|
import com.hfkj.model.ResponseData; |
|
|
|
import com.hfkj.model.ResponseData; |
|
|
|
import com.hfkj.service.BsMerPlatformNoService; |
|
|
|
import com.hfkj.service.BsMerPlatformNoService; |
|
|
|
|
|
|
|
import com.hfkj.service.BsMerPlatformTermService; |
|
|
|
import com.hfkj.sysenum.PlatformTypeEnum; |
|
|
|
import com.hfkj.sysenum.PlatformTypeEnum; |
|
|
|
import io.swagger.annotations.Api; |
|
|
|
import io.swagger.annotations.Api; |
|
|
|
import io.swagger.annotations.ApiOperation; |
|
|
|
import io.swagger.annotations.ApiOperation; |
|
|
@ -15,6 +18,9 @@ import org.springframework.web.bind.annotation.RequestParam; |
|
|
|
import org.springframework.web.bind.annotation.ResponseBody; |
|
|
|
import org.springframework.web.bind.annotation.ResponseBody; |
|
|
|
|
|
|
|
|
|
|
|
import javax.annotation.Resource; |
|
|
|
import javax.annotation.Resource; |
|
|
|
|
|
|
|
import java.util.HashMap; |
|
|
|
|
|
|
|
import java.util.List; |
|
|
|
|
|
|
|
import java.util.Map; |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* @className: BsMerPlatformNo |
|
|
|
* @className: BsMerPlatformNo |
|
|
@ -22,23 +28,33 @@ import javax.annotation.Resource; |
|
|
|
* @date: 2023/5/23 |
|
|
|
* @date: 2023/5/23 |
|
|
|
**/ |
|
|
|
**/ |
|
|
|
@Controller |
|
|
|
@Controller |
|
|
|
@Api(value = "设备管理") |
|
|
|
@Api(value = "商户渠道管理") |
|
|
|
@RequestMapping(value = "/merPlatformNo") |
|
|
|
@RequestMapping(value = "/merPlatform") |
|
|
|
public class BsMerPlatformNoController { |
|
|
|
public class BsMerPlatformNoController { |
|
|
|
|
|
|
|
|
|
|
|
private static Logger log = LoggerFactory.getLogger(BsMerLedgerController.class); |
|
|
|
private static Logger log = LoggerFactory.getLogger(BsMerLedgerController.class); |
|
|
|
|
|
|
|
|
|
|
|
@Resource |
|
|
|
@Resource |
|
|
|
private BsMerPlatformNoService merPlatformNoService; |
|
|
|
private BsMerPlatformNoService merPlatformNoService; |
|
|
|
|
|
|
|
@Resource |
|
|
|
|
|
|
|
private BsMerPlatformTermService merPlatformTermService; |
|
|
|
|
|
|
|
|
|
|
|
@RequestMapping(value="/getMerPlatformNo",method = RequestMethod.GET) |
|
|
|
@RequestMapping(value="/getMerPlatformList",method = RequestMethod.GET) |
|
|
|
@ResponseBody |
|
|
|
@ResponseBody |
|
|
|
@ApiOperation(value = "查询商户分账功能") |
|
|
|
@ApiOperation(value = "查询商户渠道平台列表") |
|
|
|
public ResponseData getMerPlatformNo(@RequestParam(name = "merId", required = true) Long merId, |
|
|
|
public ResponseData getMerPlatformList(@RequestParam(name = "merId", required = true) Long merId, |
|
|
|
@RequestParam(name = "platformType", required = true) Integer platformType) { |
|
|
|
@RequestParam(name = "platformType", required = false) Integer platformType) { |
|
|
|
try { |
|
|
|
try { |
|
|
|
|
|
|
|
|
|
|
|
return ResponseMsgUtil.success(merPlatformNoService.getPlatformNo(merId, PlatformTypeEnum.getDataByNumber(platformType))); |
|
|
|
Map<String, Object> param = new HashMap<>(); |
|
|
|
|
|
|
|
param.put("merId", merId); |
|
|
|
|
|
|
|
param.put("platformType", platformType); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
List<BsMerPlatformNo> merPlatformNoList = merPlatformNoService.getMerPlatformNoList(param); |
|
|
|
|
|
|
|
for (BsMerPlatformNo merPlatformNo : merPlatformNoList) { |
|
|
|
|
|
|
|
merPlatformNo.setMerPlatformTerm(merPlatformTermService.getMerPlatformTerm(merPlatformNo.getId(), "WECHAT_PAY")); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
return ResponseMsgUtil.success(merPlatformNoList); |
|
|
|
|
|
|
|
|
|
|
|
} catch (Exception e) { |
|
|
|
} catch (Exception e) { |
|
|
|
log.error(e.getMessage(), e); |
|
|
|
log.error(e.getMessage(), e); |
|
|
|