支付宝认证,切换支付通道新逻辑,后台切换列表,推广三张图详情,关闭向充值服务请求,
This commit is contained in:
@@ -1395,7 +1395,8 @@ public class AccountServiceImpl extends ServiceImpl<AccountMapper, Account> impl
|
||||
UpdateWrapper<Account> updateWrapper0 = new UpdateWrapper<>();
|
||||
updateWrapper0.eq("userId", userId)
|
||||
.eq("channelType", channel==0?"D0":"D1")
|
||||
.set("valid", 1);
|
||||
.set("valid", 1)
|
||||
.set("updateTime",new Date());
|
||||
boolean update0 = update(updateWrapper0);
|
||||
//更改另一个
|
||||
UpdateWrapper<Account> updateWrapper1 = new UpdateWrapper<>();
|
||||
|
||||
@@ -2,13 +2,13 @@ package cn.pluss.platform.merchantChannelStatus;
|
||||
|
||||
import cn.pluss.platform.entity.MerchantChannelStatus;
|
||||
import cn.pluss.platform.mapper.MerchantChannelStatusMapper;
|
||||
import cn.pluss.platform.vo.ChannelStatusVO;
|
||||
import cn.pluss.platform.vo.MerchantChannelStatusVO;
|
||||
import cn.pluss.platform.vo.UserNumVO;
|
||||
import cn.pluss.platform.vo.*;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
|
||||
@@ -52,11 +52,12 @@ public interface MerchantChannelStatusService extends IService<MerchantChannelSt
|
||||
return getBaseMapper().selectOne(qWrapper);
|
||||
}
|
||||
|
||||
default List<MerchantChannelStatus> getMerchantCodeByInfo(String merchantCode) {
|
||||
default MerchantChannelStatus getMerchantCodeByInfo(String merchantCode, String channel) {
|
||||
QueryWrapper<MerchantChannelStatus> qWrapper = new QueryWrapper<>();
|
||||
qWrapper.eq("merchantCode", merchantCode)
|
||||
.eq("status",3);
|
||||
return getBaseMapper().selectList(qWrapper);
|
||||
.eq("status",3)
|
||||
.eq("virChannelFlag", channel);
|
||||
return getBaseMapper().selectOne(qWrapper);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -164,12 +165,19 @@ public interface MerchantChannelStatusService extends IService<MerchantChannelSt
|
||||
*/
|
||||
ChannelStatusVO appSwitchChannel(int flag);
|
||||
|
||||
ChannelStatusVO appSwitchRequest(int flag);
|
||||
/**
|
||||
* 查询用户当前的通道信息
|
||||
* @return 通道进件信息
|
||||
*/
|
||||
ChannelStatusVO appCurrent();
|
||||
|
||||
/**
|
||||
* 通道状态切换相关状态参数
|
||||
* @return
|
||||
*/
|
||||
AccountChannelVO channelCheck();
|
||||
|
||||
/**
|
||||
* 清理驳回的信息中的通道相关数据
|
||||
* @param merchantCode 商户编号
|
||||
@@ -221,4 +229,11 @@ public interface MerchantChannelStatusService extends IService<MerchantChannelSt
|
||||
* 当前用户指定时间段 进件商户数量
|
||||
*/
|
||||
UserNumVO getUserNumInfo(Long userId, String date, Integer dateType);
|
||||
|
||||
List<merchantChannelVO> pageDate(Integer size, Integer page);
|
||||
|
||||
default void update(String merchantCode){
|
||||
UpdateWrapper<MerchantChannelStatus> objectUpdateWrapper = new UpdateWrapper<MerchantChannelStatus>()
|
||||
.eq("merchantCode",merchantCode);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -16,13 +16,17 @@ import cn.pluss.platform.merchantChannelStatus.MerchantChannelStatusService;
|
||||
import cn.pluss.platform.notice.NoticeService;
|
||||
import cn.pluss.platform.userApp.UserAppService;
|
||||
import cn.pluss.platform.user.impl.GeneralPushUtil;
|
||||
import cn.pluss.platform.vo.AccountChannelVO;
|
||||
import cn.pluss.platform.vo.ChannelStatusVO;
|
||||
import cn.pluss.platform.vo.UserNumVO;
|
||||
import cn.pluss.platform.vo.merchantChannelVO;
|
||||
import cn.pluss.platform.wx.WxTalkService;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import lombok.Setter;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
@@ -85,6 +89,8 @@ public class MerchantChannelStatusServiceImpl extends ServiceImpl<MerchantChanne
|
||||
private GeneralPushUtil generalPushUtil;
|
||||
@Autowired
|
||||
private YSAuditServiceV3 ysAuditServiceV3;
|
||||
@Resource
|
||||
private MerchantChannelStatusMapper merchantChannelStatus;
|
||||
|
||||
|
||||
@Override
|
||||
@@ -358,6 +364,56 @@ public class MerchantChannelStatusServiceImpl extends ServiceImpl<MerchantChanne
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public ChannelStatusVO appSwitchRequest(int flag) {
|
||||
UserApp userApp = userAppService.queryUserAppByToken();
|
||||
LambdaQueryWrapper<MerchantChannelStatus> qWrapper = Wrappers.lambdaQuery();
|
||||
if (flag == 1){
|
||||
qWrapper.eq(MerchantChannelStatus::getVirChannelFlag, Account.CHANNEL_TYPE_D0)
|
||||
.eq(MerchantChannelStatus::getMerchantCode, userApp.getMerchantCode());
|
||||
|
||||
MerchantChannelStatus quickChannel = getOne(qWrapper);
|
||||
MsgException.checkNull(quickChannel, "暂未开通快速通道");
|
||||
|
||||
MsgException.checkEquals(quickChannel.getValid(), MerchantChannelStatus.VALID_STATUS_BAN, quickChannel.getRemark());
|
||||
|
||||
if (!MerchantChannelStatus.isAudited(quickChannel)) {
|
||||
throw new MsgException("当前状态暂不允许切换通道");
|
||||
}
|
||||
|
||||
MsgException.checkNull(quickChannel, "暂未开通快速通道");
|
||||
UpdateWrapper<MerchantChannelStatus> uWrapper = new UpdateWrapper<MerchantChannelStatus>();
|
||||
uWrapper.eq("merchantCode", userApp.getMerchantCode())
|
||||
.eq("virChannelFlag","D0")
|
||||
.set("valid", -1);
|
||||
update(uWrapper);
|
||||
quickChannel.setValid(-1);
|
||||
return Converter.INSTANCE.toVO(quickChannel);
|
||||
}else {
|
||||
qWrapper.eq(MerchantChannelStatus::getVirChannelFlag, Account.CHANNEL_TYPE_D1)
|
||||
.eq(MerchantChannelStatus::getMerchantCode, userApp.getMerchantCode());
|
||||
|
||||
MerchantChannelStatus channelStatus = getOne(qWrapper);
|
||||
|
||||
MsgException.checkNull(channelStatus, "暂未进件");
|
||||
|
||||
String status = channelStatus.getStatus();
|
||||
|
||||
MsgException.checkEquals(channelStatus.getValid(), MerchantChannelStatus.VALID_STATUS_BAN, channelStatus.getRemark());
|
||||
|
||||
if (!MerchantChannelStatus.AUDIT_STATUS_SUCCESS.equals(status) && !MerchantChannelStatus.AUDIT_STATUS_DATA_EDIT.equals(status)) {
|
||||
throw new MsgException("进件暂未通过");
|
||||
}
|
||||
UpdateWrapper<MerchantChannelStatus> uWrapper = new UpdateWrapper<MerchantChannelStatus>();
|
||||
uWrapper.eq("merchantCode", userApp.getMerchantCode())
|
||||
.eq("virChannelFlag","D1")
|
||||
.set("valid", -1);
|
||||
update(uWrapper);
|
||||
channelStatus.setValid(-1);
|
||||
return Converter.INSTANCE.toVO(channelStatus);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public ChannelStatusVO appCurrent() {
|
||||
UserApp userApp = userAppService.queryUserAppByToken();
|
||||
@@ -373,9 +429,71 @@ public class MerchantChannelStatusServiceImpl extends ServiceImpl<MerchantChanne
|
||||
channelStatusVO.setHasQuickCash(Objects.equals(channelStatusVO.getChannel(), 4));
|
||||
}
|
||||
|
||||
//增加字段判段D1字段
|
||||
QueryWrapper<MerchantChannelStatus> queryWrappers = new QueryWrapper<MerchantChannelStatus>()
|
||||
.eq("merchantCode",entity.getMerchantCode())
|
||||
.ne("virChannelFlag","D0")
|
||||
.last("LIMIT "+1);
|
||||
MerchantChannelStatus one = getOne(queryWrappers);
|
||||
|
||||
if (one == null) {
|
||||
channelStatusVO.setStatusD1(1);
|
||||
}else if ("3".equals(one.getStatus())){
|
||||
//进件完成
|
||||
channelStatusVO.setStatusD1(3);
|
||||
}else if ("1".equals(one.getStatus())) {
|
||||
//审核中
|
||||
channelStatusVO.setStatusD1(2);
|
||||
}else {
|
||||
channelStatusVO.setStatusD1(2);
|
||||
}
|
||||
|
||||
return channelStatusVO;
|
||||
}
|
||||
|
||||
@Override
|
||||
public AccountChannelVO channelCheck() {
|
||||
UserApp userApp = userAppService.queryUserAppByToken();
|
||||
//当前通道
|
||||
MerchantChannelStatus entity = getValidData(userApp.getMerchantCode());
|
||||
|
||||
AccountChannelVO accountChannelVO = new AccountChannelVO();
|
||||
accountChannelVO.setCurrentChannel(entity.getVirChannelFlag());
|
||||
|
||||
if (Objects.equals(entity.getStatus(), "3")){
|
||||
if ("D0".equals(entity.getVirChannelFlag())){
|
||||
accountChannelVO.setCurrentChannel("0");
|
||||
}else if ("D1".equals(entity.getVirChannelFlag())){
|
||||
accountChannelVO.setCurrentChannel("1");
|
||||
}else {
|
||||
accountChannelVO.setCurrentChannel("2");
|
||||
}
|
||||
}
|
||||
//另一个通道
|
||||
LambdaQueryWrapper<MerchantChannelStatus> qWrapper = new LambdaQueryWrapper<MerchantChannelStatus>()
|
||||
.eq(MerchantChannelStatus::getMerchantCode, entity.getMerchantCode())
|
||||
.eq(MerchantChannelStatus::getValid,0)
|
||||
.ne(MerchantChannelStatus::getVirChannelFlag, entity.getVirChannelFlag())
|
||||
.orderByAsc(MerchantChannelStatus::getValid)
|
||||
.orderByDesc(MerchantChannelStatus::getId)
|
||||
.last("limit 1");
|
||||
MerchantChannelStatus one = getOne(qWrapper);
|
||||
if (one == null) {
|
||||
accountChannelVO.setOtherChannel("0");
|
||||
}else if (one.getValid() == -1){
|
||||
accountChannelVO.setOtherChannel("2");
|
||||
}else if (one.getChannel() == null){
|
||||
accountChannelVO.setOtherChannel("3");
|
||||
}else if (Objects.equals(one.getStatus(), "3")){
|
||||
accountChannelVO.setOtherChannel("4");
|
||||
}else if(Objects.equals(one.getStatus(), "2")) {
|
||||
accountChannelVO.setOtherChannel("0");
|
||||
}else {
|
||||
accountChannelVO.setOtherChannel("5");
|
||||
}
|
||||
return accountChannelVO;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public MerchantChannelStatus getChannelByMerchantId(String merchantId) {
|
||||
@@ -451,4 +569,10 @@ public class MerchantChannelStatusServiceImpl extends ServiceImpl<MerchantChanne
|
||||
public UserNumVO getUserNumInfo(Long userId, String date, Integer dateType) {
|
||||
return baseMapper.getUserNumInfo(userId,date,dateType);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<merchantChannelVO> pageDate(Integer size, Integer page) {
|
||||
|
||||
return merchantChannelStatus.pageDate(size, page-1);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -454,30 +454,30 @@ public abstract class BaseUserInfoService extends ServiceImpl<UserInfoMapper, Us
|
||||
|
||||
|
||||
//登录同步到充值服务
|
||||
resultMap.put("rechargeToken", "");
|
||||
try {
|
||||
MultiValueMap<String, String> multiValueMap = new LinkedMultiValueMap<>();
|
||||
multiValueMap.add("mobile", loginName);
|
||||
|
||||
RestTemplate restTemplate = new RestTemplate();
|
||||
// 设置为UTF8编码
|
||||
restTemplate.getMessageConverters().set(1, new StringHttpMessageConverter(StandardCharsets.UTF_8));
|
||||
|
||||
String tokenInfo = restTemplate.postForObject(
|
||||
"https://cz-2133569-1313226949.ap-shanghai.run.tcloudbase.com/login/kyMobilelogin", multiValueMap,
|
||||
String.class);
|
||||
|
||||
ObjectMapper mapper = new ObjectMapper();
|
||||
JsonNode jsonNode = mapper.readTree(tokenInfo);
|
||||
JsonNode code = jsonNode.get("code");
|
||||
|
||||
if (code.asText().equals("0")) {
|
||||
JsonNode token = jsonNode.get("data").get("token");
|
||||
resultMap.put("rechargeToken", token.asText());
|
||||
}
|
||||
} catch (Exception e) {
|
||||
|
||||
}
|
||||
// resultMap.put("rechargeToken", "");
|
||||
// try {
|
||||
// MultiValueMap<String, String> multiValueMap = new LinkedMultiValueMap<>();
|
||||
// multiValueMap.add("mobile", loginName);
|
||||
//
|
||||
// RestTemplate restTemplate = new RestTemplate();
|
||||
// // 设置为UTF8编码
|
||||
// restTemplate.getMessageConverters().set(1, new StringHttpMessageConverter(StandardCharsets.UTF_8));
|
||||
//
|
||||
// String tokenInfo = restTemplate.postForObject(
|
||||
// "https://cz-2133569-1313226949.ap-shanghai.run.tcloudbase.com/login/kyMobilelogin", multiValueMap,
|
||||
// String.class);
|
||||
//
|
||||
// ObjectMapper mapper = new ObjectMapper();
|
||||
// JsonNode jsonNode = mapper.readTree(tokenInfo);
|
||||
// JsonNode code = jsonNode.get("code");
|
||||
//
|
||||
// if (code.asText().equals("0")) {
|
||||
// JsonNode token = jsonNode.get("data").get("token");
|
||||
// resultMap.put("rechargeToken", token.asText());
|
||||
// }
|
||||
// } catch (Exception e) {
|
||||
//
|
||||
// }
|
||||
|
||||
|
||||
clearJpushAlias(queryUserApp.getUserId() + "");
|
||||
|
||||
@@ -210,18 +210,21 @@ public class WxCertServiceImpl implements WxCertService {
|
||||
}
|
||||
|
||||
private WxCertInfoVO wxCertInfo(MerchantBaseInfo mbi, String channelType) {
|
||||
String channelId=null;
|
||||
if (StringUtils.isEmpty(channelType)) {
|
||||
MerchantChannelStatus mcs = mcsService.getValidData(mbi.getMerchantCode());
|
||||
if (Objects.equals(mcs.getChannel(), 4)) {
|
||||
channelType = "D0";
|
||||
channelId = String.valueOf(mcs.getChannel());
|
||||
} else {
|
||||
channelType = "D1";
|
||||
channelId = String.valueOf(mcs.getChannel());
|
||||
}
|
||||
}
|
||||
|
||||
MerchantChannelStatus mcs = mcsService.getByMerchantCodeAndChannelType(mbi.getMerchantCode(), channelType);
|
||||
|
||||
WxCertInfoVO result = WxCertInfoVO.empty(channelType);
|
||||
WxCertInfoVO result = WxCertInfoVO.empty(channelType, channelId);
|
||||
result.setMerchantCode(mbi.getMerchantCode());
|
||||
if (mcs == null || !(MerchantChannelStatus.AUDIT_STATUS_SUCCESS.equals(mcs.getStatus())
|
||||
|| MerchantChannelStatus.AUDIT_STATUS_DATA_EDIT.equals(mcs.getStatus()))) {
|
||||
|
||||
Reference in New Issue
Block a user