|
|
@@ -66,7 +66,6 @@ public class AlipayController extends BaseController { |
|
|
*/ |
|
|
*/ |
|
|
@PostMapping(value = "/imageUpload", consumes = "multipart/*", headers = "content-type=multipart/form-data") |
|
|
@PostMapping(value = "/imageUpload", consumes = "multipart/*", headers = "content-type=multipart/form-data") |
|
|
@ApiOperation("上传图片") |
|
|
@ApiOperation("上传图片") |
|
|
@SystemControllerLog(description = "上传图片") |
|
|
|
|
|
public ResultData imageUpload(@RequestParam("file") MultipartFile multiReq |
|
|
public ResultData imageUpload(@RequestParam("file") MultipartFile multiReq |
|
|
,@RequestParam Map<String, String> param) { |
|
|
,@RequestParam Map<String, String> param) { |
|
|
String tenantId = param.get("tenantId"); |
|
|
String tenantId = param.get("tenantId"); |
|
|
@@ -133,7 +132,6 @@ public class AlipayController extends BaseController { |
|
|
|
|
|
|
|
|
@ApiOperation("创建商圈会员卡") |
|
|
@ApiOperation("创建商圈会员卡") |
|
|
@PostMapping(value = "/merchantMemberConfig") |
|
|
@PostMapping(value = "/merchantMemberConfig") |
|
|
@SystemControllerLog(description = "支付账号-新增") |
|
|
|
|
|
public ResultData merchantMemberConfig(@RequestBody Map<String, String> param) { |
|
|
public ResultData merchantMemberConfig(@RequestBody Map<String, String> param) { |
|
|
String tenantId = param.get("tenantId"); |
|
|
String tenantId = param.get("tenantId"); |
|
|
if (StringUtils.isBlank(tenantId)) { |
|
|
if (StringUtils.isBlank(tenantId)) { |
|
|
@@ -191,10 +189,9 @@ public class AlipayController extends BaseController { |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
@ApiOperation("消息订阅") |
|
|
|
|
|
@PostMapping(value = "/topicSubscribe") |
|
|
|
|
|
@SystemControllerLog(description = "支付账号-新增") |
|
|
|
|
|
public ResultData topicSubscribe(@RequestBody Map<String, String> param) { |
|
|
|
|
|
|
|
|
@ApiOperation("商圈交易成功信息订阅") |
|
|
|
|
|
@PostMapping(value = "/smartDistrictTradeSuccessTopicSubscribe") |
|
|
|
|
|
public ResultData smartDistrictTradeSuccessTopicSubscribe(@RequestBody Map<String, String> param) { |
|
|
String tenantId = param.get("tenantId"); |
|
|
String tenantId = param.get("tenantId"); |
|
|
if (StringUtils.isBlank(tenantId)) { |
|
|
if (StringUtils.isBlank(tenantId)) { |
|
|
return new ResultData(Result.ERROR,"tenantId不能为空"); |
|
|
return new ResultData(Result.ERROR,"tenantId不能为空"); |
|
|
@@ -208,7 +205,35 @@ public class AlipayController extends BaseController { |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
try { |
|
|
try { |
|
|
boolean result = aliPayUtil.smartDistrictTopicSubscribe(wxMall.getAlipayAppAuthToken()); |
|
|
|
|
|
|
|
|
boolean result = aliPayUtil.smartDistrictTopicSubscribe(wxMall.getAlipayAppAuthToken(),"alipay.business.mall.trade.success"); |
|
|
|
|
|
if (result) { |
|
|
|
|
|
return new ResultData(); |
|
|
|
|
|
}else { |
|
|
|
|
|
return new ResultData(Result.ERROR,"消息订阅失败"); |
|
|
|
|
|
} |
|
|
|
|
|
} catch (Exception e) { |
|
|
|
|
|
logger.error("topicSubscribe error.",e); |
|
|
|
|
|
return new ResultData(Result.ERROR,"topicSubscribe error."); |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@ApiOperation("商圈交易退款信息订阅") |
|
|
|
|
|
@PostMapping(value = "/smartDistrictTradeRefundTopicSubscribe") |
|
|
|
|
|
public ResultData smartDistrictTradeRefundTopicSubscribe(@RequestBody Map<String, String> param) { |
|
|
|
|
|
String tenantId = param.get("tenantId"); |
|
|
|
|
|
if (StringUtils.isBlank(tenantId)) { |
|
|
|
|
|
return new ResultData(Result.ERROR,"tenantId不能为空"); |
|
|
|
|
|
} |
|
|
|
|
|
WxMall wxMall = mallService.getByTenantId(tenantId); |
|
|
|
|
|
if (null == wxMall ) { |
|
|
|
|
|
return new ResultData(Result.ERROR,"wxMall未查询到"); |
|
|
|
|
|
} |
|
|
|
|
|
if(StringUtils.isBlank(wxMall.getAlipayAppAuthToken())) { |
|
|
|
|
|
return new ResultData(Result.ERROR,"wxMall alipayAppAuthToken为空"); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
try { |
|
|
|
|
|
boolean result = aliPayUtil.smartDistrictTopicSubscribe(wxMall.getAlipayAppAuthToken(),"alipay.business.mall.trade.refunded"); |
|
|
if (result) { |
|
|
if (result) { |
|
|
return new ResultData(); |
|
|
return new ResultData(); |
|
|
}else { |
|
|
}else { |
|
|
|