|
|
|
@@ -64,25 +64,14 @@ public class WxMerchantController extends BaseController { |
|
|
|
} |
|
|
|
|
|
|
|
@ApiOperation("根据code查询接口") |
|
|
|
@GetMapping("/findByCode") |
|
|
|
@GetMapping("/findById") |
|
|
|
@ApiImplicitParam(name = "merchantCode", value = "merchantCode", dataType = "String", paramType = "query", required = true) |
|
|
|
public ResultData findByCode(String merchantCode) { |
|
|
|
logger.debug("[" + getIpAddr() + "] WxMerchantController::findByCode"); |
|
|
|
if(merchantCode == null) { |
|
|
|
public ResultData findById(Long id) { |
|
|
|
logger.debug("[" + getIpAddr() + "] WxMerchantController::findById"); |
|
|
|
if(id == null) { |
|
|
|
return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL); |
|
|
|
} |
|
|
|
String codeMD5 = HashUtil.DecodeByMD5(merchantCode); |
|
|
|
if(StringUtils.isBlank(codeMD5)) { |
|
|
|
return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL); |
|
|
|
} |
|
|
|
HashMap<String, String> params = new HashMap<String, String>(); |
|
|
|
TenantEntity tenantEntity = getTenantInfo(); |
|
|
|
params.put("tenantId", tenantEntity.getTenantId()); |
|
|
|
if (StringUtils.isNotBlank(tenantEntity.getParentTenantId())) { |
|
|
|
params.put("parentTenantId", tenantEntity.getParentTenantId()); |
|
|
|
} |
|
|
|
params.put("merchantCode", codeMD5); |
|
|
|
WxMerchantVo wxMerchant = wxMerchantService.getMerchantInfo(params); |
|
|
|
WxMerchant wxMerchant = wxMerchantService.selectById(id); |
|
|
|
return new ResultData(wxMerchant); |
|
|
|
} |
|
|
|
|
|
|
|
|