提交代码

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;
import com.hfkj.common.utils.ResponseMsgUtil;
import com.hfkj.entity.BsMerPlatformNo;
import com.hfkj.entity.BsMerPlatformTerm;
import com.hfkj.model.ResponseData;
import com.hfkj.service.BsMerPlatformNoService;
import com.hfkj.service.BsMerPlatformTermService;
import com.hfkj.sysenum.PlatformTypeEnum;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
@ -15,6 +18,9 @@ import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import javax.annotation.Resource;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* @className: BsMerPlatformNo
@ -22,23 +28,33 @@ import javax.annotation.Resource;
* @date: 2023/5/23
**/
@Controller
@Api(value = "设备管理")
@RequestMapping(value = "/merPlatformNo")
@Api(value = "商户渠道管理")
@RequestMapping(value = "/merPlatform")
public class BsMerPlatformNoController {
private static Logger log = LoggerFactory.getLogger(BsMerLedgerController.class);
@Resource
private BsMerPlatformNoService merPlatformNoService;
@Resource
private BsMerPlatformTermService merPlatformTermService;
@RequestMapping(value="/getMerPlatformNo",method = RequestMethod.GET)
@RequestMapping(value="/getMerPlatformList",method = RequestMethod.GET)
@ResponseBody
@ApiOperation(value = "查询商户分账功能")
public ResponseData getMerPlatformNo(@RequestParam(name = "merId", required = true) Long merId,
@RequestParam(name = "platformType", required = true) Integer platformType) {
@ApiOperation(value = "查询商户渠道平台列表")
public ResponseData getMerPlatformList(@RequestParam(name = "merId", required = true) Long merId,
@RequestParam(name = "platformType", required = false) Integer platformType) {
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) {
log.error(e.getMessage(), e);

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

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

Loading…
Cancel
Save