| | |
| | | import com.fasterxml.jackson.databind.ObjectMapper; |
| | | import com.google.gson.Gson; |
| | | import com.nq.common.CmcPayConfig; |
| | | import com.nq.common.ResponseCode; |
| | | import com.nq.common.ServerResponse; |
| | | import com.nq.dao.*; |
| | | import com.nq.enums.EStockType; |
| | | import com.nq.pay.PayUtil; |
| | | import com.nq.pojo.*; |
| | | import com.nq.service.*; |
| | |
| | | |
| | | public ServerResponse thirdPartyRecharge(HttpServletRequest request, String tradeAmount, Integer type) throws UnsupportedEncodingException, JsonProcessingException, NoSuchAlgorithmException { |
| | | // 支付1 |
| | | String reqUrl = "https://api.watchglbpay.com/pay/web"; |
| | | String reqUrl = "https://api.watchglb.com/pay/web"; |
| | | // 支付2 |
| | | String uipReqRul = "https://v2.fastechservicepro.com/payin/unifiedorder"; |
| | | |
| | |
| | | if(ObjectUtils.isEmpty(user)){ |
| | | GoogleTranslateUtil googleTranslateUtil = new GoogleTranslateUtil(); |
| | | String lang = request.getHeader("lang"); |
| | | return ServerResponse.createByErrorCodeMsg(401,googleTranslateUtil.translate("请登录",lang )); |
| | | return ServerResponse.createByErrorCodeMsg(ResponseCode.NEED_LOGIN.getCode(),googleTranslateUtil.translate("请登录",lang )); |
| | | } |
| | | |
| | | if(type == 1){//支付1 |
| | |
| | | } |
| | | |
| | | |
| | | @Transactional |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public ServerResponse flyPay(Integer payType, String payAmt, String currency, HttpServletRequest request) { |
| | | User user = iUserService.getCurrentUser(request); |
| | | SitePay sitePay = sitePayMapper.selectById(payType); |
| | |
| | | } |
| | | UserAssets userAssets = userAssetsMapper.selectOne(new LambdaQueryWrapper<>(UserAssets.class) |
| | | .eq(UserAssets::getUserId, paymentRecharge.getUserId()) |
| | | .eq(UserAssets::getAccectType, "IN") |
| | | .eq(UserAssets::getAccectType, EStockType.MX.getCode()) |
| | | ); |
| | | ServerResponse serverResponse = iUserAssetsServices.updateUserAssets(userAssets.getId(), vo.getOriAmount().toString(), "2"); |
| | | if(serverResponse.getStatus() == 0){ |
| | |
| | | } |
| | | UserAssets userAssets = userAssetsMapper.selectOne(new LambdaQueryWrapper<>(UserAssets.class) |
| | | .eq(UserAssets::getUserId, paymentRecharge.getUserId()) |
| | | .eq(UserAssets::getAccectType, "IN") |
| | | .eq(UserAssets::getAccectType, EStockType.MX.getCode()) |
| | | ); |
| | | ServerResponse serverResponse = iUserAssetsServices.updateUserAssets(userAssets.getId(), vo.getAccount_fee().toString(), "2"); |
| | | if(serverResponse.getStatus() == 0){ |