Merge branch 'master' into cc_20260415_trans
This commit is contained in:
@@ -34,6 +34,6 @@ public class WalletPayVO {
|
||||
|
||||
|
||||
public String getPayType() {
|
||||
return "平安钱包";
|
||||
return "网商钱包";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,6 +4,7 @@ import com.alibaba.fastjson.JSONObject;
|
||||
import com.cool.store.constants.RedisConstant;
|
||||
import com.cool.store.context.CurrentUserHolder;
|
||||
import com.cool.store.context.LoginUserInfo;
|
||||
import com.cool.store.dao.EnterpriseUserDAO;
|
||||
import com.cool.store.dao.WithdrawApplicationDAO;
|
||||
import com.cool.store.dao.wallet.WalletTradeDAO;
|
||||
import com.cool.store.dto.wallet.AccountWithdrawerDTO;
|
||||
@@ -27,16 +28,17 @@ import com.cool.store.utils.RedisUtil;
|
||||
import com.github.pagehelper.PageHelper;
|
||||
import com.github.pagehelper.PageInfo;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.math.BigDecimal;
|
||||
import java.text.MessageFormat;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
import java.util.*;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
import java.util.stream.Collectors;
|
||||
import java.util.stream.Stream;
|
||||
|
||||
import static com.cool.store.enums.wallet.WalletTradeModuleEnum.STANDARD_STORE;
|
||||
import static com.cool.store.enums.wallet.WalletTradeModuleEnum.TRANSFER;
|
||||
@@ -60,12 +62,24 @@ public class WithdrawApplicationServiceImpl implements WithdrawApplicationServic
|
||||
@Resource
|
||||
WalletTradeDAO walletTradeDAO;
|
||||
|
||||
@Resource
|
||||
EnterpriseUserDAO enterpriseUserDAO;
|
||||
|
||||
private static final String WITHDRAW_ORDER_PREFIX = "TX";
|
||||
|
||||
@Override
|
||||
public PageInfo<WithdrawApplicationDTO> page(WithdrawApplicationPageRequest request) {
|
||||
PageHelper.startPage(request.getPageNum(), request.getPageSize());
|
||||
List<WithdrawApplicationDTO> responses = withdrawApplicationDAO.pageQuery(request);
|
||||
Set<String> userIdList = responses.stream()
|
||||
.filter(x -> StringUtils.isNotBlank(x.getCreateUserId()))
|
||||
.flatMap(x -> Stream.of( x.getCreateUserId()))
|
||||
.filter(StringUtils::isNotBlank)
|
||||
.collect(Collectors.toSet());
|
||||
Map<String, String> userNameMap = enterpriseUserDAO.getUserNameMap(new ArrayList<>(userIdList));
|
||||
responses.stream().forEach(x->{
|
||||
x.setCreateUserName(userNameMap.get(x.getCreateUserId()));
|
||||
});
|
||||
return new PageInfo<>(responses);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package com.cool.store.controller.webb;
|
||||
|
||||
import com.cool.store.dto.wallet.WithdrawApplicationDTO;
|
||||
import com.cool.store.job.XxlJobHandler;
|
||||
import com.cool.store.request.WithdrawApplicationPageRequest;
|
||||
import com.cool.store.request.WithdrawApplicationRequest;
|
||||
import com.cool.store.response.ResponseResult;
|
||||
@@ -26,6 +27,8 @@ public class WithdrawApplicationController {
|
||||
|
||||
@Resource
|
||||
private WithdrawApplicationService withdrawApplicationService;
|
||||
@Resource
|
||||
XxlJobHandler xxlJobHandler;
|
||||
|
||||
@PostMapping("/add")
|
||||
@ApiOperation("新增提现申请")
|
||||
@@ -44,4 +47,11 @@ public class WithdrawApplicationController {
|
||||
public ResponseResult<Boolean> confirmWithdraw(@RequestParam Long id) {
|
||||
return ResponseResult.success(withdrawApplicationService.confirmWithdraw(id));
|
||||
}
|
||||
|
||||
@ApiOperation("刷新提现单状态")
|
||||
@GetMapping("/refreshStatus")
|
||||
public ResponseResult<Boolean> refreshStatus() {
|
||||
xxlJobHandler.withdrawUpdate();
|
||||
return ResponseResult.success(Boolean.TRUE);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user