Commit 65965c60 authored by libin's avatar libin

Merge branch 'dev' into base-modify

parents 5798c2e5 0ec5c89f
...@@ -51,6 +51,8 @@ public class WalletCathListDTO { ...@@ -51,6 +51,8 @@ public class WalletCathListDTO {
@ApiModelProperty("提现单号") @ApiModelProperty("提现单号")
private String orderNo; private String orderNo;
@ApiModelProperty(value = "用户账号") @ApiModelProperty(value = "")
private String accountNumber; private String accountNumber;
private String accountName;
} }
...@@ -20,6 +20,8 @@ public class AppUserDetail { ...@@ -20,6 +20,8 @@ public class AppUserDetail {
private Integer userid; private Integer userid;
@Column(name = "is_member") @Column(name = "is_member")
private Integer isMember; private Integer isMember;
@Column(name = "wx_nickname")
private String wxNickname;
private String nickname; private String nickname;
private String realname; private String realname;
private String headimgurl; private String headimgurl;
......
...@@ -123,4 +123,7 @@ public class MyWalletCath implements Serializable { ...@@ -123,4 +123,7 @@ public class MyWalletCath implements Serializable {
@Column(name = "order_no") @Column(name = "order_no")
@ApiModelProperty(value = "第三方订单号:如微信,支付宝,银行卡等") @ApiModelProperty(value = "第三方订单号:如微信,支付宝,银行卡等")
private String orderNo; private String orderNo;
@Column(name = "account_name")
private String accountName;
} }
...@@ -19,6 +19,7 @@ public class AppUserDTO { ...@@ -19,6 +19,7 @@ public class AppUserDTO {
private Integer userid; private Integer userid;
private Integer isMember; private Integer isMember;
private String username; private String username;
private String wxNickname;
private String nickname; private String nickname;
private String realname; private String realname;
private String headimgurl; private String headimgurl;
......
...@@ -43,4 +43,7 @@ public class ApplyCathVo { ...@@ -43,4 +43,7 @@ public class ApplyCathVo {
@ApiModelProperty(value = "支付类型") @ApiModelProperty(value = "支付类型")
private Integer cathType; private Integer cathType;
@ApiModelProperty(value = "账号名称")
private String accountName;
} }
...@@ -21,9 +21,11 @@ public class PayAccountVo { ...@@ -21,9 +21,11 @@ public class PayAccountVo {
@ApiModelProperty(value = "微信用户名 | 支付宝帐号") @ApiModelProperty(value = "微信用户名 | 支付宝帐号")
private String accountDesc; private String accountDesc;
@ApiModelProperty("微信用户名 | 支付宝账号") @ApiModelProperty("微信用openid | 支付宝账号userid")
private String account; private String account;
@ApiModelProperty(value = "帐户类型 0:微信 1:支付宝 2:银行卡") @ApiModelProperty(value = "帐户类型 0:微信 1:支付宝 2:银行卡")
private Integer accountType; private Integer accountType;
private String nickName;
} }
...@@ -53,4 +53,5 @@ public class WalletCathAdminVo { ...@@ -53,4 +53,5 @@ public class WalletCathAdminVo {
@ApiModelProperty(value = "用户账号描述") @ApiModelProperty(value = "用户账号描述")
private String accountNumberDesc; private String accountNumberDesc;
private String accountName;
} }
...@@ -63,4 +63,9 @@ public class WalletCathVo { ...@@ -63,4 +63,9 @@ public class WalletCathVo {
@ApiModelProperty(value = "审核日期") @ApiModelProperty(value = "审核日期")
private Long finishTime; private Long finishTime;
@ApiModelProperty(value = "用户账号描述")
private String accountNumberDesc;
private String accountName;
} }
...@@ -4,6 +4,7 @@ import cn.hutool.core.bean.BeanUtil; ...@@ -4,6 +4,7 @@ import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.bean.copier.CopyOptions; import cn.hutool.core.bean.copier.CopyOptions;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import com.github.wxiaoqi.security.admin.entity.AppUserAlipay; import com.github.wxiaoqi.security.admin.entity.AppUserAlipay;
import com.github.wxiaoqi.security.admin.entity.AppUserDetail;
import com.github.wxiaoqi.security.admin.entity.AppUserLogin; import com.github.wxiaoqi.security.admin.entity.AppUserLogin;
import com.github.wxiaoqi.security.admin.entity.AppUserRelationTemp; import com.github.wxiaoqi.security.admin.entity.AppUserRelationTemp;
import com.github.wxiaoqi.security.admin.mapper.AppUserAlipayMapper; import com.github.wxiaoqi.security.admin.mapper.AppUserAlipayMapper;
...@@ -46,6 +47,9 @@ public class AppUserAlipayBiz extends BaseBiz<AppUserAlipayMapper, AppUserAlipay ...@@ -46,6 +47,9 @@ public class AppUserAlipayBiz extends BaseBiz<AppUserAlipayMapper, AppUserAlipay
@Autowired @Autowired
AppUserLoginBiz appUserLoginBiz; AppUserLoginBiz appUserLoginBiz;
@Autowired
AppUserDetailBiz appUserDetailBiz;
@Autowired @Autowired
ThirdFeign thirdFeign; ThirdFeign thirdFeign;
...@@ -97,9 +101,11 @@ public class AppUserAlipayBiz extends BaseBiz<AppUserAlipayMapper, AppUserAlipay ...@@ -97,9 +101,11 @@ public class AppUserAlipayBiz extends BaseBiz<AppUserAlipayMapper, AppUserAlipay
//微信 //微信
AppUserLogin appUserLogin = appUserLoginBiz.getUserById(userId); AppUserLogin appUserLogin = appUserLoginBiz.getUserById(userId);
if(appUserLogin != null && StringUtils.isNotBlank(appUserLogin.getWxOpenid())) { if(appUserLogin != null && StringUtils.isNotBlank(appUserLogin.getWxOpenid())) {
AppUserDetail appUserDetail = appUserDetailBiz.getUserByUserid(userId);
AppUserAlipay wxAppUser = new AppUserAlipay(); AppUserAlipay wxAppUser = new AppUserAlipay();
wxAppUser.setType(2); wxAppUser.setType(2);
wxAppUser.setUserId(userId); wxAppUser.setUserId(userId);
wxAppUser.setNickname(appUserDetail.getWxNickname());
wxAppUser.setTxAlipay(appUserLogin.getWxOpenid()); wxAppUser.setTxAlipay(appUserLogin.getWxOpenid());
appUserAlipays.add(wxAppUser); appUserAlipays.add(wxAppUser);
} }
......
...@@ -28,7 +28,6 @@ import com.xxfc.platform.universal.feign.ThirdFeign; ...@@ -28,7 +28,6 @@ import com.xxfc.platform.universal.feign.ThirdFeign;
import com.xxfc.platform.universal.vo.FundPayVo; import com.xxfc.platform.universal.vo.FundPayVo;
import com.xxfc.platform.universal.weixin.constant.PaySubErrorCodeEnum; import com.xxfc.platform.universal.weixin.constant.PaySubErrorCodeEnum;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import net.bytebuddy.implementation.bytecode.Throw;
import org.apache.commons.collections.CollectionUtils; import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.BeanUtils; import org.springframework.beans.BeanUtils;
...@@ -45,10 +44,10 @@ import tk.mybatis.mapper.entity.Example; ...@@ -45,10 +44,10 @@ import tk.mybatis.mapper.entity.Example;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.math.RoundingMode; import java.math.RoundingMode;
import java.time.Instant;
import java.time.LocalDate; import java.time.LocalDate;
import java.time.format.DateTimeFormatter; import java.time.format.DateTimeFormatter;
import java.util.*; import java.util.*;
import java.util.concurrent.Executors;
import java.util.stream.Collectors; import java.util.stream.Collectors;
/** /**
...@@ -93,6 +92,9 @@ public class MyWalletBiz extends BaseBiz<MyWalletMapper, MyWallet> implements In ...@@ -93,6 +92,9 @@ public class MyWalletBiz extends BaseBiz<MyWalletMapper, MyWallet> implements In
private DateTimeFormatter dateTimeFormatter; private DateTimeFormatter dateTimeFormatter;
private static final Integer WITHDRAW_ONLINE_WAY=1;
private static final Integer WITHDRAW_OFFLINE_WAY=2;
private BCryptPasswordEncoder encoder = new BCryptPasswordEncoder(12); private BCryptPasswordEncoder encoder = new BCryptPasswordEncoder(12);
...@@ -301,6 +303,12 @@ public class MyWalletBiz extends BaseBiz<MyWalletMapper, MyWallet> implements In ...@@ -301,6 +303,12 @@ public class MyWalletBiz extends BaseBiz<MyWalletMapper, MyWallet> implements In
if (sumDto == null) { if (sumDto == null) {
return ObjectRestResponse.createFailedResult(ResultCode.NULL_CODE, "参数不能为空"); return ObjectRestResponse.createFailedResult(ResultCode.NULL_CODE, "参数不能为空");
} }
MyWalletCath walletCath = new MyWalletCath();
walletCath.setCrtTime(Instant.now().toEpochMilli());
WithDrawRuleVo withDrawRule = configFeign.getWithDrawRule();
Integer withdrawWay = withDrawRule.getWithdrawWay();
BigDecimal commission = amount.multiply(sumDto.getProceduReates()).divide(new BigDecimal("100")).setScale(2, RoundingMode.HALF_UP); BigDecimal commission = amount.multiply(sumDto.getProceduReates()).divide(new BigDecimal("100")).setScale(2, RoundingMode.HALF_UP);
BigDecimal balnece = sumDto.getBalance(); BigDecimal balnece = sumDto.getBalance();
//到账金额 //到账金额
...@@ -309,9 +317,35 @@ public class MyWalletBiz extends BaseBiz<MyWalletMapper, MyWallet> implements In ...@@ -309,9 +317,35 @@ public class MyWalletBiz extends BaseBiz<MyWalletMapper, MyWallet> implements In
realAmount = balnece.subtract(commission); realAmount = balnece.subtract(commission);
} }
log.info("-----提现申请-----proceduReates===" + sumDto.getProceduReates() + "----commission====" + commission + "---realAmount===" + realAmount); log.info("-----提现申请-----proceduReates===" + sumDto.getProceduReates() + "----commission====" + commission + "---realAmount===" + realAmount);
//添加账号
// alipayBiz.addAlipay(userId,accountNumber); //线上自动提现
MyWalletCath walletCath = new MyWalletCath(); if (WITHDRAW_ONLINE_WAY.equals(withdrawWay)){
String pay_no;
String cono = OrderUtil.GetOrderNumber("");
HttpServletRequest request = ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()).getRequest();
String host = StringUtils.defaultIfBlank(request.getHeader("userHost"), ClientUtil.getClientIp(request));
FundPayVo fundPayVo = FundPayVo.builder()
.amount(applyCathVo.getCathType() == 0 ? String.valueOf(realAmount.multiply(new BigDecimal(100)).doubleValue()) : String.format("%.2f", realAmount.doubleValue()))
.outBizNo(cono)
.payeeAccount(applyCathVo.getAccountNumber())
.payerShowName("欣新房车网络科技(广东)股份有限公司")
.remark("提现转账")
.type(applyCathVo.getCathType())
.creatIp(host)
.build();
try {
//商户订单号
pay_no = thirdFeign.transferAccount(fundPayVo);
walletCath.setStauts(1);
walletCath.setCono(pay_no);
walletCath.setFinishTime(Instant.now().toEpochMilli());
}catch (BaseException baex){
throw new BaseException(baex.getMessage(),400);
}catch (Exception ex){
throw new BaseException((applyCathVo.getCathType() == 0?"微信提现":applyCathVo.getCathType() == 1?"支付宝提现":"银行提现")+"转账失败",ex);
}
}
//提现单号 //提现单号
String orderNo = snowflake.nextIdStr(); String orderNo = snowflake.nextIdStr();
orderNo = String.format("%s%s", dateTimeFormatter.format(LocalDate.now()), orderNo); orderNo = String.format("%s%s", dateTimeFormatter.format(LocalDate.now()), orderNo);
...@@ -319,6 +353,7 @@ public class MyWalletBiz extends BaseBiz<MyWalletMapper, MyWallet> implements In ...@@ -319,6 +353,7 @@ public class MyWalletBiz extends BaseBiz<MyWalletMapper, MyWallet> implements In
walletCath.setUserId(userId); walletCath.setUserId(userId);
walletCath.setBalance(balnece); walletCath.setBalance(balnece);
walletCath.setCathType(cathType); walletCath.setCathType(cathType);
walletCath.setAccountName(applyCathVo.getAccountName());
walletCath.setAccountNumber(accountNumber); walletCath.setAccountNumber(accountNumber);
walletCath.setAmount(amount); walletCath.setAmount(amount);
walletCath.setCommission(commission); walletCath.setCommission(commission);
...@@ -335,6 +370,24 @@ public class MyWalletBiz extends BaseBiz<MyWalletMapper, MyWallet> implements In ...@@ -335,6 +370,24 @@ public class MyWalletBiz extends BaseBiz<MyWalletMapper, MyWallet> implements In
myWallet.setWithdrawals(withdrawals); myWallet.setWithdrawals(withdrawals);
myWallet.setVersion(sumDto.getVersion()); myWallet.setVersion(sumDto.getVersion());
mapper.updMyWater(myWallet); mapper.updMyWater(myWallet);
//线上提现
if (WITHDRAW_ONLINE_WAY.equals(applyCathVo.getCathType())){
MyWalletDetail detail = new MyWalletDetail();
detail.setUserId(userId);
detail.setItype(1);
//设置提现单号
detail.setWithDrawOrderNo(orderNo);
detail.setCono(walletCath.getId().intValue());
detail.setBalance(balnece.add(withdrawals));
detail.setAmount(realAmount);
detail.setSource(10);
myWalletDetailBiz.insertSelective(detail);
detail.setId(null);
detail.setSource(13);
detail.setBalance(balnece.add(commission));
detail.setAmount(commission);
myWalletDetailBiz.insertSelective(detail);
}
return ObjectRestResponse.succ(walletCath.getId()); return ObjectRestResponse.succ(walletCath.getId());
} }
...@@ -362,7 +415,7 @@ public class MyWalletBiz extends BaseBiz<MyWalletMapper, MyWallet> implements In ...@@ -362,7 +415,7 @@ public class MyWalletBiz extends BaseBiz<MyWalletMapper, MyWallet> implements In
BigDecimal realAmount = cath.getRealAmount(); BigDecimal realAmount = cath.getRealAmount();
BigDecimal commission = cath.getCommission(); BigDecimal commission = cath.getCommission();
if (status == 1) { if (status == 1) {
String cono = StringUtil.isEmpty(cath.getCono()) ? OrderUtil.GetOrderNumber("TX"):cath.getCono(); String cono = StringUtil.isEmpty(cath.getCono()) ? OrderUtil.GetOrderNumber(""):cath.getCono();
HttpServletRequest request = ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()).getRequest(); HttpServletRequest request = ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()).getRequest();
String host = StringUtils.defaultIfBlank(request.getHeader("userHost"), ClientUtil.getClientIp(request)); String host = StringUtils.defaultIfBlank(request.getHeader("userHost"), ClientUtil.getClientIp(request));
FundPayVo fundPayVo = FundPayVo.builder() FundPayVo fundPayVo = FundPayVo.builder()
...@@ -444,6 +497,7 @@ public class MyWalletBiz extends BaseBiz<MyWalletMapper, MyWallet> implements In ...@@ -444,6 +497,7 @@ public class MyWalletBiz extends BaseBiz<MyWalletMapper, MyWallet> implements In
PayAccountVo alipayAccount = PayAccountVo.builder() PayAccountVo alipayAccount = PayAccountVo.builder()
.account(appUserAlipay.getTxAlipay()) .account(appUserAlipay.getTxAlipay())
.accountType(1) .accountType(1)
.nickName(appUserAlipay.getNickname())
.accountDesc(String.format("%s%s%s", "支付宝余额(", appUserAlipay.getTxAlipay(), ")")) .accountDesc(String.format("%s%s%s", "支付宝余额(", appUserAlipay.getTxAlipay(), ")"))
.build(); .build();
payAccountVos.add(alipayAccount); payAccountVos.add(alipayAccount);
...@@ -453,7 +507,8 @@ public class MyWalletBiz extends BaseBiz<MyWalletMapper, MyWallet> implements In ...@@ -453,7 +507,8 @@ public class MyWalletBiz extends BaseBiz<MyWalletMapper, MyWallet> implements In
if (!org.springframework.util.StringUtils.isEmpty(appUserLogin.getOpenid())) { if (!org.springframework.util.StringUtils.isEmpty(appUserLogin.getOpenid())) {
PayAccountVo wxAccount = PayAccountVo.builder() PayAccountVo wxAccount = PayAccountVo.builder()
.account(appUserLogin.getOpenid()) .account(appUserLogin.getOpenid())
.accountType(0) .accountType(2)
.nickName(appUserDetail.getWxNickname())
.accountDesc(String.format("%s%s%s", "微信零钱(", appUserDetail.getNickname(), ")")) .accountDesc(String.format("%s%s%s", "微信零钱(", appUserDetail.getNickname(), ")"))
.build(); .build();
payAccountVos.add(wxAccount); payAccountVos.add(wxAccount);
......
...@@ -63,6 +63,14 @@ public class MyWalletCathBiz extends BaseBiz<MyWalletCathMapper, MyWalletCath> { ...@@ -63,6 +63,14 @@ public class MyWalletCathBiz extends BaseBiz<MyWalletCathMapper, MyWalletCath> {
walletCathVo = new WalletCathVo(); walletCathVo = new WalletCathVo();
BeanUtils.copyProperties(walletCath, walletCathVo); BeanUtils.copyProperties(walletCath, walletCathVo);
totalWithdraw = totalWithdraw.add(walletCathVo.getAmount()); totalWithdraw = totalWithdraw.add(walletCathVo.getAmount());
//微信
if (walletCath.getCathType()==0){
walletCathVo.setAccountNumberDesc(String.format("%s%s%s","提现到微信(",walletCath.getAccountName(),")"));
}
//支付宝
if (walletCath.getCathType()==1){
walletCathVo.setAccountNumberDesc(String.format("%s%s%s","提现到支付宝(",walletCath.getAccountName(),")"));
}
walletCatchPageVos.add(walletCathVo); walletCatchPageVos.add(walletCathVo);
} }
walletCathPageVo.setPageNum(walletCathPage.getPageNum()); walletCathPageVo.setPageNum(walletCathPage.getPageNum());
...@@ -105,14 +113,7 @@ public class MyWalletCathBiz extends BaseBiz<MyWalletCathMapper, MyWalletCath> { ...@@ -105,14 +113,7 @@ public class MyWalletCathBiz extends BaseBiz<MyWalletCathMapper, MyWalletCath> {
BeanUtils.copyProperties(walletCathListDTO, walletCathAdminVo); BeanUtils.copyProperties(walletCathListDTO, walletCathAdminVo);
walletCathAdminVo.setUsername(StringUtils.isEmpty(walletCathListDTO.getRealname()) ? walletCathListDTO.getNickname() : walletCathListDTO.getRealname()); walletCathAdminVo.setUsername(StringUtils.isEmpty(walletCathListDTO.getRealname()) ? walletCathListDTO.getNickname() : walletCathListDTO.getRealname());
walletCathAdminVo.setPhone(walletCathListDTO.getUsername()); walletCathAdminVo.setPhone(walletCathListDTO.getUsername());
//微信
if (walletCathListDTO.getCathType()==0){
walletCathAdminVo.setAccountNumberDesc(String.format("%s%s%s","提现到微信(",walletCathListDTO.getAccountNumber(),")"));
}
//支付宝
if (walletCathListDTO.getCathType()==1){
walletCathAdminVo.setAccountNumberDesc(String.format("%s%s%s","提现到支付宝(",walletCathListDTO.getAccountNumber(),")"));
}
walletCathAdminVos.add(walletCathAdminVo); walletCathAdminVos.add(walletCathAdminVo);
} }
walletCathAdminVos.sort(Comparator.comparing(WalletCathAdminVo::getCrtTime).reversed()); walletCathAdminVos.sort(Comparator.comparing(WalletCathAdminVo::getCrtTime).reversed());
...@@ -141,4 +142,9 @@ public class MyWalletCathBiz extends BaseBiz<MyWalletCathMapper, MyWalletCath> { ...@@ -141,4 +142,9 @@ public class MyWalletCathBiz extends BaseBiz<MyWalletCathMapper, MyWalletCath> {
criteria.andIn("userId", userIds); criteria.andIn("userId", userIds);
mapper.deleteByExample(example); mapper.deleteByExample(example);
} }
@Override
public void insertSelective(MyWalletCath entity) {
mapper.insertSelective(entity);
}
} }
...@@ -16,7 +16,8 @@ ...@@ -16,7 +16,8 @@
wc.finish_time AS `finishTime`, wc.finish_time AS `finishTime`,
wc.cono, wc.cono,
wc.order_no AS `orderNo`, wc.order_no AS `orderNo`,
wc.account_number AS `accountNumber` wc.account_number AS `accountNumber`,
wc.account_name AS `accountName`
FROM FROM
(SELECT * FROM `my_wallet_cath` <if test="state != null"> (SELECT * FROM `my_wallet_cath` <if test="state != null">
WHERE `stauts`=#{state} WHERE `stauts`=#{state}
......
...@@ -102,7 +102,7 @@ public class OrderMemberService extends AbstractOrderHandle<OrderMemberDetailBiz ...@@ -102,7 +102,7 @@ public class OrderMemberService extends AbstractOrderHandle<OrderMemberDetailBiz
//设置订单状态为3 //设置订单状态为3
bo.getOrder().setStatus(OrderStatusEnum.ORDER_UNPAY.getCode()); bo.getOrder().setStatus(OrderStatusEnum.ORDER_UNPAY.getCode());
//设置订单图片 //设置订单图片
bo.getOrder().setPicture(bo.getBaseUserMemberLevel().getIcon()); bo.getOrder().setPicture(bo.getBaseUserMemberLevel().getItemImg());
//设置订单名称 //设置订单名称
bo.getOrder().setName(bo.getBaseUserMemberLevel().getName()); bo.getOrder().setName(bo.getBaseUserMemberLevel().getName());
......
...@@ -69,7 +69,7 @@ public class ActivityController extends BaseController<ActivityBiz, Activity> { ...@@ -69,7 +69,7 @@ public class ActivityController extends BaseController<ActivityBiz, Activity> {
} }
@PutMapping("/remove/id") @DeleteMapping("/remove/{id}")
@ApiOperation(value = "删除",notes = "删除") @ApiOperation(value = "删除",notes = "删除")
public ObjectRestResponse remove(@PathVariable Integer id ){ public ObjectRestResponse remove(@PathVariable Integer id ){
if (baseBiz.remove(id)) { if (baseBiz.remove(id)) {
......
...@@ -11,7 +11,8 @@ import lombok.AllArgsConstructor; ...@@ -11,7 +11,8 @@ import lombok.AllArgsConstructor;
@AllArgsConstructor @AllArgsConstructor
public enum AliNeedPayErrorEnum { public enum AliNeedPayErrorEnum {
SYSTEM_ERROR("系统繁忙","系统繁忙"); SYSTEM_ERROR("系统繁忙","系统繁忙"),
PAYER_BALANCE_NOT_ENOUGH("余额不足","余额不足");
private String desc; private String desc;
private String reason; private String reason;
......
...@@ -427,7 +427,7 @@ public class OrderPayBiz extends BaseBiz<OrderPayMapper, OrderPay> implements In ...@@ -427,7 +427,7 @@ public class OrderPayBiz extends BaseBiz<OrderPayMapper, OrderPay> implements In
log.info("转账调用失败"); log.info("转账调用失败");
String subCode = response.getSubCode(); String subCode = response.getSubCode();
if (aliNeedPayErrorCodes.contains(subCode)) { if (aliNeedPayErrorCodes.contains(subCode)) {
throw new BaseException("支付宝账号余额不足",PaySubErrorCodeEnum.PAY_NEED_ERROR.getSubCode()); throw new BaseException(AliNeedPayErrorEnum.valueOf(subCode).getDesc(),PaySubErrorCodeEnum.PAY_NEED_ERROR.getSubCode());
} }
throw new BaseException("支付宝转账失败:【错误码:" + response.getSubCode() + " 错误信息:" + response.getSubMsg() + "】",PaySubErrorCodeEnum.PAY_ERROR.getSubCode()); throw new BaseException("支付宝转账失败:【错误码:" + response.getSubCode() + " 错误信息:" + response.getSubMsg() + "】",PaySubErrorCodeEnum.PAY_ERROR.getSubCode());
} }
...@@ -641,8 +641,14 @@ public class OrderPayBiz extends BaseBiz<OrderPayMapper, OrderPay> implements In ...@@ -641,8 +641,14 @@ public class OrderPayBiz extends BaseBiz<OrderPayMapper, OrderPay> implements In
public static void main(String[] args) { public static void main(String[] args) {
OrderPayBiz orderPayBiz = new OrderPayBiz(); OrderPayBiz orderPayBiz = new OrderPayBiz();
FundPayVo fundPayVo = new FundPayVo();
fundPayVo.setRemark("转账");
fundPayVo.setOutBizNo("12345678");
fundPayVo.setAmount("0.1");
fundPayVo.setPayeeAccount("2088212169302286");
AlipayClient alipayClient = orderPayBiz.getAlipayClient();
try { try {
System.out.println(orderPayBiz.getAlipayToken("")); System.out.println(orderPayBiz.alipayfundTrans(alipayClient, fundPayVo));
} catch (AlipayApiException e) { } catch (AlipayApiException e) {
e.printStackTrace(); e.printStackTrace();
} }
......
...@@ -8,6 +8,7 @@ import com.xxfc.platform.universal.constant.enumerate.FileTypeEnum; ...@@ -8,6 +8,7 @@ import com.xxfc.platform.universal.constant.enumerate.FileTypeEnum;
import com.xxfc.platform.universal.service.UploadZipService; import com.xxfc.platform.universal.service.UploadZipService;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.apache.commons.io.FileUtils; import org.apache.commons.io.FileUtils;
import org.apache.commons.lang.StringUtils;
import org.codehaus.plexus.util.IOUtil; import org.codehaus.plexus.util.IOUtil;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value; import org.springframework.beans.factory.annotation.Value;
...@@ -96,7 +97,11 @@ public class UploadZipServiceImpl implements UploadZipService { ...@@ -96,7 +97,11 @@ public class UploadZipServiceImpl implements UploadZipService {
} }
} }
} }
result.substring(0,result.length()-1);
return ObjectRestResponse.succ(result.substring(0, result.length()-1)); if (StringUtils.isNotEmpty(result.toString())) {
result.substring(0,result.length()-1);
return ObjectRestResponse.succ(result.substring(0, result.length()-1));
}
return ObjectRestResponse.createFailedResult(ResultCode.FAILED_CODE,"压缩包中无照片或照片格式不对!");
} }
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment