提交代码

yy_dev
胡锐 1 year ago
parent 2bf9a9632e
commit 3dec0b8619
  1. 30
      cweb/src/main/java/com/cweb/controller/BsMerPlatformNoController.java
  2. 10
      service/src/main/java/com/hfkj/entity/BsMerPlatformNo.java
  3. 6
      service/src/main/java/com/hfkj/service/impl/BsMerPlatformNoServiceImpl.java

@ -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);

@ -109,6 +109,16 @@ public class BsMerPlatformNo implements Serializable {
private String ext3; private String ext3;
BsMerPlatformTerm merPlatformTerm;
public BsMerPlatformTerm getMerPlatformTerm() {
return merPlatformTerm;
}
public void setMerPlatformTerm(BsMerPlatformTerm merPlatformTerm) {
this.merPlatformTerm = merPlatformTerm;
}
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
public Long getId() { public Long getId() {

@ -67,11 +67,15 @@ public class BsMerPlatformNoServiceImpl implements BsMerPlatformNoService {
criteria.andAgentIdEqualTo(MapUtils.getLong(param, "agentId")); criteria.andAgentIdEqualTo(MapUtils.getLong(param, "agentId"));
} }
if (MapUtils.getLong(param, "merId") != null) {
criteria.andMerIdEqualTo(MapUtils.getLong(param, "merId"));
}
if (MapUtils.getInteger(param, "platformType") != null) { if (MapUtils.getInteger(param, "platformType") != null) {
criteria.andPlatformTypeEqualTo(MapUtils.getInteger(param, "platformType")); criteria.andPlatformTypeEqualTo(MapUtils.getInteger(param, "platformType"));
} }
example.setOrderByClause("create_time desc");
return merPlatformNoMapper.selectByExample(example); return merPlatformNoMapper.selectByExample(example);
} }
} }

Loading…
Cancel
Save