|
@@ -113,7 +113,7 @@ public class WeixinServiceImpl implements WeixinService {
|
|
|
* @return
|
|
|
* */
|
|
|
@Override
|
|
|
- public String getAccessToken(Integer merchantId, boolean isMinApp, boolean useCache) throws BusinessCheckException {
|
|
|
+ public String getAccessToken(Long merchantId, boolean isMinApp, boolean useCache) throws BusinessCheckException {
|
|
|
String platForm = isMinApp == true ? "minApp" : "mp";
|
|
|
String wxAppId = env.getProperty("weixin.official.appId");
|
|
|
String wxAppSecret = env.getProperty("weixin.official.appSecret");
|
|
@@ -262,7 +262,7 @@ public class WeixinServiceImpl implements WeixinService {
|
|
|
String orderSn = result.get("out_trade_no");
|
|
|
logger.info("支付通知,xml = {}, orderSn = {}", xmlMsg, orderSn);
|
|
|
|
|
|
- Integer storeId = 0;
|
|
|
+ Long storeId = 0L;
|
|
|
String platform = PlatformTypeEnum.MP_WEIXIN.getCode();
|
|
|
if (StringUtil.isNotEmpty(orderSn)) {
|
|
|
MtOrder mtOrder = orderService.getOrderInfoByOrderSn(orderSn);
|
|
@@ -328,7 +328,7 @@ public class WeixinServiceImpl implements WeixinService {
|
|
|
* @return
|
|
|
* */
|
|
|
@Override
|
|
|
- public JSONObject getWxProfile(Integer merchantId, String code) throws BusinessCheckException {
|
|
|
+ public JSONObject getWxProfile(Long merchantId, String code) throws BusinessCheckException {
|
|
|
String wxAppId = env.getProperty("wxpay.appId");
|
|
|
String wxAppSecret = env.getProperty("wxpay.appSecret");
|
|
|
|
|
@@ -366,7 +366,7 @@ public class WeixinServiceImpl implements WeixinService {
|
|
|
* @return
|
|
|
* */
|
|
|
@Override
|
|
|
- public JSONObject getWxOpenId(Integer merchantId, String code) throws BusinessCheckException {
|
|
|
+ public JSONObject getWxOpenId(Long merchantId, String code) throws BusinessCheckException {
|
|
|
String wxAppId = env.getProperty("weixin.official.appId");
|
|
|
String wxAppSecret = env.getProperty("weixin.official.appSecret");
|
|
|
|
|
@@ -455,7 +455,7 @@ public class WeixinServiceImpl implements WeixinService {
|
|
|
* @return
|
|
|
* */
|
|
|
@Override
|
|
|
- public Boolean sendSubscribeMessage(Integer merchantId, Integer userId, String toUserOpenId, String key, String page, Map<String,Object> params, Date sendTime) throws BusinessCheckException {
|
|
|
+ public Boolean sendSubscribeMessage(Long merchantId, Long userId, String toUserOpenId, String key, String page, Map<String,Object> params, Date sendTime) throws BusinessCheckException {
|
|
|
if (StringUtil.isEmpty(toUserOpenId) || StringUtil.isEmpty(key) || userId < 1) {
|
|
|
return false;
|
|
|
}
|
|
@@ -534,7 +534,7 @@ public class WeixinServiceImpl implements WeixinService {
|
|
|
* @return
|
|
|
* */
|
|
|
@Override
|
|
|
- public Boolean doSendSubscribeMessage(Integer merchantId, String reqDataJsonStr) {
|
|
|
+ public Boolean doSendSubscribeMessage(Long merchantId, String reqDataJsonStr) {
|
|
|
try {
|
|
|
String url = "https://api.weixin.qq.com/cgi-bin/message/subscribe/send?access_token=" + getAccessToken(merchantId, true,true);
|
|
|
String response = HttpRESTDataClient.requestPost(url, "application/json; charset=utf-8", reqDataJsonStr);
|
|
@@ -566,7 +566,7 @@ public class WeixinServiceImpl implements WeixinService {
|
|
|
* @return
|
|
|
* */
|
|
|
@Override
|
|
|
- public Map<String, String> queryPaidOrder(Integer storeId, String transactionId, String orderSn) {
|
|
|
+ public Map<String, String> queryPaidOrder(Long storeId, String transactionId, String orderSn) {
|
|
|
try {
|
|
|
MtOrder mtOrder = orderService.getOrderInfoByOrderSn(orderSn);
|
|
|
String platform = PlatformTypeEnum.MP_WEIXIN.getCode();
|
|
@@ -609,7 +609,7 @@ public class WeixinServiceImpl implements WeixinService {
|
|
|
* @return
|
|
|
* */
|
|
|
@Override
|
|
|
- public Boolean doRefund(Integer storeId, String orderSn, BigDecimal totalAmount, BigDecimal refundAmount, String platform) throws BusinessCheckException {
|
|
|
+ public Boolean doRefund(Long storeId, String orderSn, BigDecimal totalAmount, BigDecimal refundAmount, String platform) throws BusinessCheckException {
|
|
|
try {
|
|
|
logger.info("WeixinService.doRefund orderSn = {}, totalFee = {}, refundFee = {}", orderSn, totalAmount, refundAmount);
|
|
|
if (StringUtil.isEmpty(orderSn)) {
|
|
@@ -667,7 +667,7 @@ public class WeixinServiceImpl implements WeixinService {
|
|
|
* @return
|
|
|
* */
|
|
|
@Override
|
|
|
- public String createQrCode(Integer merchantId, String type, Integer id, String page, Integer width) throws BusinessCheckException {
|
|
|
+ public String createQrCode(Long merchantId, String type, Long id, String page, Integer width) throws BusinessCheckException {
|
|
|
try {
|
|
|
String accessToken = getAccessToken(merchantId, true,true);
|
|
|
if (StringUtil.isEmpty(accessToken)) {
|
|
@@ -743,7 +743,7 @@ public class WeixinServiceImpl implements WeixinService {
|
|
|
* @return
|
|
|
* */
|
|
|
@Override
|
|
|
- public String createWxCard(Integer merchantId, String wxCardId) throws BusinessCheckException {
|
|
|
+ public String createWxCard(Long merchantId, String wxCardId) throws BusinessCheckException {
|
|
|
String cardId = "";
|
|
|
try {
|
|
|
MtSetting mtSetting = settingService.querySettingByName(merchantId, SettingTypeEnum.USER.getKey(),UserSettingEnum.WX_MEMBER_CARD.getKey());
|
|
@@ -879,7 +879,7 @@ public class WeixinServiceImpl implements WeixinService {
|
|
|
* @return
|
|
|
* */
|
|
|
@Override
|
|
|
- public String createCardQrCode(Integer merchantId, String cardId, String code) {
|
|
|
+ public String createCardQrCode(Long merchantId, String cardId, String code) {
|
|
|
try {
|
|
|
String accessToken = getAccessToken(merchantId, false, true);
|
|
|
String url = "https://api.weixin.qq.com/card/qrcode/create?access_token="+accessToken;
|
|
@@ -929,7 +929,7 @@ public class WeixinServiceImpl implements WeixinService {
|
|
|
* @return
|
|
|
* */
|
|
|
@Override
|
|
|
- public Boolean isOpenCard(Integer merchantId, String cardId, String openId) {
|
|
|
+ public Boolean isOpenCard(Long merchantId, String cardId, String openId) {
|
|
|
try {
|
|
|
String accessToken = getAccessToken(merchantId, false,true);
|
|
|
String url = "https://api.weixin.qq.com/card/user/getcardlist?access_token="+accessToken;
|
|
@@ -965,7 +965,7 @@ public class WeixinServiceImpl implements WeixinService {
|
|
|
* @return
|
|
|
* */
|
|
|
@Override
|
|
|
- public String createMiniAppLink(Integer merchantId, String path) {
|
|
|
+ public String createMiniAppLink(Long merchantId, String path) {
|
|
|
String link = "";
|
|
|
try {
|
|
|
String accessToken = getAccessToken(merchantId, true,true);
|
|
@@ -1005,7 +1005,7 @@ public class WeixinServiceImpl implements WeixinService {
|
|
|
* @param platform 支付平台
|
|
|
* @return
|
|
|
* */
|
|
|
- private Map<String, String> microPay(Integer storeId, Map<String, String> reqData, String ip, String platform) {
|
|
|
+ private Map<String, String> microPay(Long storeId, Map<String, String> reqData, String ip, String platform) {
|
|
|
try {
|
|
|
String orderSn = reqData.get("out_trade_no");
|
|
|
|
|
@@ -1091,7 +1091,7 @@ public class WeixinServiceImpl implements WeixinService {
|
|
|
* @param platform 支付平台
|
|
|
* @return
|
|
|
* */
|
|
|
- private Map<String, String> jsapiPay(Integer storeId, Map<String, String> reqData, String ip, String platform) {
|
|
|
+ private Map<String, String> jsapiPay(Long storeId, Map<String, String> reqData, String ip, String platform) {
|
|
|
try {
|
|
|
logger.info("调用微信支付下单接口入参:{},请求平台:{}", JsonUtil.toJSONString(reqData), platform);
|
|
|
// 获取支付配置
|
|
@@ -1145,7 +1145,7 @@ public class WeixinServiceImpl implements WeixinService {
|
|
|
* @param platform 支付平台
|
|
|
* @return
|
|
|
* */
|
|
|
- private Map<String, String> wapPay(Integer storeId, Map<String, String> reqData, String ip, String platform) {
|
|
|
+ private Map<String, String> wapPay(Long storeId, Map<String, String> reqData, String ip, String platform) {
|
|
|
try {
|
|
|
logger.info("调用微信h5支付下单接口入参{},请求平台:{}", JsonUtil.toJSONString(reqData), platform);
|
|
|
// 支付配置
|
|
@@ -1205,7 +1205,7 @@ public class WeixinServiceImpl implements WeixinService {
|
|
|
* @throws BusinessCheckException
|
|
|
* @return
|
|
|
* */
|
|
|
- private WxPayApiConfig getApiConfig(Integer storeId, String platform) throws BusinessCheckException {
|
|
|
+ private WxPayApiConfig getApiConfig(Long storeId, String platform) throws BusinessCheckException {
|
|
|
WxPayApiConfig apiConfig;
|
|
|
String mchId = wxPayBean.getMchId();
|
|
|
String apiV2 = wxPayBean.getApiV2();
|