master
袁野 6 months ago
parent ecd2d52370
commit 2d3b914537
  1. 23
      bweb/src/main/java/com/bweb/controller/mer/BsMerController.java
  2. 16
      service/src/main/java/com/hfkj/mer/impl/BsMerPayConfigServiceImpl.java

@ -195,14 +195,6 @@ public class BsMerController {
try { try {
SessionObject sessionObject = userCenter.getSessionObject(request);
SecUserSessionObject userModel = (SecUserSessionObject) sessionObject.getObject();
if (userModel.getAccount().getObjectType() != SecUserObjectTypeEnum.type2.getCode()) {
throw ErrorHelp.genException(SysCode.System, ErrorCode.ROLE_NOT_PERMISSIONS, "");
}
if (body == null if (body == null
|| body.getMerId() == null || body.getMerId() == null
|| body.getPayPlatform() == null) { || body.getPayPlatform() == null) {
@ -221,14 +213,13 @@ public class BsMerController {
} }
} }
BsMerPayConfig merPayConfig; Map<String, Object> param = new HashMap<>();
param.put("merId", body.getMerId());
param.put("payPlatform", body.getPayPlatform());
if (body.getId() != null) { BsMerPayConfig merPayConfig = bsMerPayConfigService.queryDetailByMap(param);
merPayConfig = bsMerPayConfigService.queryDetail(body.getId());
if (merPayConfig == null) { if (merPayConfig == null) {
throw ErrorHelp.genException(SysCode.System, ErrorCode.CONTENT_NOT_FOUND, "");
}
} else {
merPayConfig = new BsMerPayConfig(); merPayConfig = new BsMerPayConfig();
merPayConfig.setCreateTime(new Date()); merPayConfig.setCreateTime(new Date());
} }
@ -248,7 +239,7 @@ public class BsMerController {
merPayConfig.setStatus(1); merPayConfig.setStatus(1);
if (body.getId() != null) { if (merPayConfig.getId() != null) {
bsMerPayConfigService.update(merPayConfig); bsMerPayConfigService.update(merPayConfig);
} else { } else {
bsMerPayConfigService.create(merPayConfig); bsMerPayConfigService.create(merPayConfig);

@ -85,8 +85,8 @@ public class BsMerPayConfigServiceImpl implements BsMerPayConfigService {
if (MapUtils.getLong(map, "merId") != null) { if (MapUtils.getLong(map, "merId") != null) {
criteria.andMerIdEqualTo(MapUtils.getLong(map, "merId")); criteria.andMerIdEqualTo(MapUtils.getLong(map, "merId"));
} }
if (MapUtils.getLong(map, "payPlatform") != null) { if (MapUtils.getInteger(map, "payPlatform") != null) {
criteria.andMerIdEqualTo(MapUtils.getLong(map, "payPlatform")); criteria.andPayPlatformEqualTo(MapUtils.getInteger(map, "payPlatform"));
} }
criteria.andStatusEqualTo(1); criteria.andStatusEqualTo(1);
@ -100,6 +100,16 @@ public class BsMerPayConfigServiceImpl implements BsMerPayConfigService {
@Override @Override
public List<BsMerPayConfig> getList(Map<String, Object> map) { public List<BsMerPayConfig> getList(Map<String, Object> map) {
return Collections.emptyList(); BsMerPayConfigExample example = new BsMerPayConfigExample();
BsMerPayConfigExample.Criteria criteria = example.createCriteria();
if (MapUtils.getLong(map, "merId") != null) {
criteria.andMerIdEqualTo(MapUtils.getLong(map, "merId"));
}
if (MapUtils.getString(map, "merNo") != null) {
criteria.andMerNoEqualTo(MapUtils.getString(map, "merNo"));
}
criteria.andStatusEqualTo(1);
return bsMerPayConfigMapper.selectByExample(example);
} }
} }

Loading…
Cancel
Save