支付宝认证,切换支付通道新逻辑,后台切换列表,推广三张图详情,关闭向充值服务请求,
This commit is contained in:
@@ -5,13 +5,14 @@ import cn.pluss.platform.api.Result;
|
|||||||
import cn.pluss.platform.api.ResultGenerator;
|
import cn.pluss.platform.api.ResultGenerator;
|
||||||
import cn.pluss.platform.appGuide.AppGuideService;
|
import cn.pluss.platform.appGuide.AppGuideService;
|
||||||
import cn.pluss.platform.entity.AppGuide;
|
import cn.pluss.platform.entity.AppGuide;
|
||||||
|
import cn.pluss.platform.enums.image;
|
||||||
|
import com.alipay.api.domain.UserVo;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.web.bind.annotation.GetMapping;
|
import org.springframework.web.bind.annotation.*;
|
||||||
import org.springframework.web.bind.annotation.PathVariable;
|
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
|
||||||
|
|
||||||
import javax.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.Map;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -26,7 +27,8 @@ public class IntroduceController {
|
|||||||
private AppGuideService appGuideService;
|
private AppGuideService appGuideService;
|
||||||
|
|
||||||
@GetMapping({"/common", "/common/{code}"})
|
@GetMapping({"/common", "/common/{code}"})
|
||||||
public Result<String> billIntro(@PathVariable(value = "code", required = false) String code, HttpServletRequest httpServletRequest) {
|
public Result<String> billIntro(@PathVariable(value = "code", required = false) String code, HttpServletRequest httpServletRequest,
|
||||||
|
@RequestParam String typeCode) {
|
||||||
if (StringUtils.isEmpty(code)) {
|
if (StringUtils.isEmpty(code)) {
|
||||||
String html = "<p><img src=\"https://www.shouyinbei.net/resources/images/upload/82031620725808697.jpg\" style=\"\"/></p><p><img src=\"https://www.shouyinbei.net/resources/images/upload/86751620725811158.jpg\" style=\"\"/></p><p><img src=\"https://www.shouyinbei.net/resources/images/upload/38401620725814105.jpg\" style=\"\"/></p><p><img src=\"https://www.shouyinbei.net/resources/images/upload/14561620725816223.jpg\" style=\"\"/></p><p><img src=\"https://www.shouyinbei.net/resources/images/upload/45071620725822267.jpg\" style=\"\"/></p><p><img src=\"https://www.shouyinbei.net/resources/images/upload/31221620725827105.jpg\" style=\"\"/></p><p><img src=\"https://www.shouyinbei.net/resources/images/upload/68211620725829889.jpg\" style=\"\"/></p><p><br/></p>";
|
String html = "<p><img src=\"https://www.shouyinbei.net/resources/images/upload/82031620725808697.jpg\" style=\"\"/></p><p><img src=\"https://www.shouyinbei.net/resources/images/upload/86751620725811158.jpg\" style=\"\"/></p><p><img src=\"https://www.shouyinbei.net/resources/images/upload/38401620725814105.jpg\" style=\"\"/></p><p><img src=\"https://www.shouyinbei.net/resources/images/upload/14561620725816223.jpg\" style=\"\"/></p><p><img src=\"https://www.shouyinbei.net/resources/images/upload/45071620725822267.jpg\" style=\"\"/></p><p><img src=\"https://www.shouyinbei.net/resources/images/upload/31221620725827105.jpg\" style=\"\"/></p><p><img src=\"https://www.shouyinbei.net/resources/images/upload/68211620725829889.jpg\" style=\"\"/></p><p><br/></p>";
|
||||||
return ResultGenerator.genSuccessResult(html);
|
return ResultGenerator.genSuccessResult(html);
|
||||||
@@ -36,10 +38,12 @@ public class IntroduceController {
|
|||||||
if (!"SHTGKT".equals(code)){
|
if (!"SHTGKT".equals(code)){
|
||||||
return ResultGenerator.genSuccessResult(entity == null ? "" : entity.getContent());
|
return ResultGenerator.genSuccessResult(entity == null ? "" : entity.getContent());
|
||||||
}
|
}
|
||||||
|
//如果是推广宽图则看宽图是否开放
|
||||||
if (Objects.equals(entity.getType(), "1")) {
|
if (Objects.equals(entity.getType(), "1")) {
|
||||||
String type = httpServletRequest.getHeader("type");
|
String type = httpServletRequest.getHeader("type");
|
||||||
|
//TODO 暂时安卓开发IOS不开
|
||||||
if ("1".equals(type)){
|
if ("1".equals(type)){
|
||||||
return ResultGenerator.genSuccessResult(entity == null ? "" : entity.getContent());
|
return ResultGenerator.genSuccessResult(image(typeCode));
|
||||||
}else if ("2".equals(type)){
|
}else if ("2".equals(type)){
|
||||||
return ResultGenerator.genFailResult("");
|
return ResultGenerator.genFailResult("");
|
||||||
}
|
}
|
||||||
@@ -48,4 +52,37 @@ public class IntroduceController {
|
|||||||
return ResultGenerator.genFailResult("");
|
return ResultGenerator.genFailResult("");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
private String image(String typeCode){
|
||||||
|
switch (typeCode){
|
||||||
|
case "AG":
|
||||||
|
return image.PROMOTION_IMAGE.getImageUrl();
|
||||||
|
case "XW":
|
||||||
|
return image.SMALL_IMAGE.getImageUrl();
|
||||||
|
default:
|
||||||
|
return image.OTHER_IMAGE.getImageUrl();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@PostMapping ({"/common"})
|
||||||
|
public Result<String> billIntro(HttpServletRequest httpServletRequest,
|
||||||
|
@RequestBody Map<String, String> params) {
|
||||||
|
AppGuide entity = appGuideService.getByCode(params.get("code"));
|
||||||
|
if (!"SHTGKT".equals(params.get("code"))){
|
||||||
|
return ResultGenerator.genSuccessResult(entity == null ? "" : entity.getContent());
|
||||||
|
}
|
||||||
|
//如果是推广宽图则看宽图是否开放
|
||||||
|
if (Objects.equals(entity.getType(), "1")) {
|
||||||
|
String type = httpServletRequest.getHeader("type");
|
||||||
|
//TODO 暂时安卓开发IOS不开
|
||||||
|
if ("1".equals(type)){
|
||||||
|
return ResultGenerator.genSuccessResult(image(params.get("typeCode")));
|
||||||
|
}else if ("2".equals(type)){
|
||||||
|
return ResultGenerator.genFailResult("");
|
||||||
|
}
|
||||||
|
return ResultGenerator.genSuccessResult(entity == null ? "" : entity.getContent());
|
||||||
|
}else {
|
||||||
|
return ResultGenerator.genFailResult("");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -2,10 +2,14 @@ package cn.pluss.platform.controller;
|
|||||||
|
|
||||||
import cn.pluss.platform.api.Result;
|
import cn.pluss.platform.api.Result;
|
||||||
import cn.pluss.platform.api.ResultGenerator;
|
import cn.pluss.platform.api.ResultGenerator;
|
||||||
|
import cn.pluss.platform.entity.Account;
|
||||||
import cn.pluss.platform.entity.MerchantChannelStatus;
|
import cn.pluss.platform.entity.MerchantChannelStatus;
|
||||||
import cn.pluss.platform.enums.ZfbChannel;
|
import cn.pluss.platform.enums.ZfbChannel;
|
||||||
import cn.pluss.platform.exception.MsgException;
|
import cn.pluss.platform.exception.MsgException;
|
||||||
|
import cn.pluss.platform.mapper.AccountMapper;
|
||||||
|
import cn.pluss.platform.merchant.AccountService;
|
||||||
import cn.pluss.platform.merchantChannelStatus.MerchantChannelStatusService;
|
import cn.pluss.platform.merchantChannelStatus.MerchantChannelStatusService;
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
@@ -22,6 +26,10 @@ import java.util.Map;
|
|||||||
public class ZfbAttestationController {
|
public class ZfbAttestationController {
|
||||||
@Resource
|
@Resource
|
||||||
private MerchantChannelStatusService merchantChannelStatusService;
|
private MerchantChannelStatusService merchantChannelStatusService;
|
||||||
|
@Resource
|
||||||
|
private AccountService accountService;
|
||||||
|
@Resource
|
||||||
|
private AccountMapper accountMapper;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 支付认证
|
* 支付认证
|
||||||
@@ -30,42 +38,40 @@ public class ZfbAttestationController {
|
|||||||
*/
|
*/
|
||||||
@PostMapping
|
@PostMapping
|
||||||
public Result<Object> Attestation(@RequestBody Map<String, String> params) {
|
public Result<Object> Attestation(@RequestBody Map<String, String> params) {
|
||||||
List<MerchantChannelStatus> merchantCode = merchantChannelStatusService.getMerchantCodeByInfo(params.get("merchantCode"));
|
|
||||||
List<Object> result = new ArrayList<>();
|
QueryWrapper<Account> QueryWrapper = new QueryWrapper<Account>()
|
||||||
for (MerchantChannelStatus channelStatus : merchantCode) {
|
.eq("userId", Integer.valueOf(params.get("userId")))
|
||||||
switch (channelStatus.getChannel()){
|
.eq("valid", 1);
|
||||||
case 1:
|
Account one = accountService.getOne(QueryWrapper);
|
||||||
HashMap<Object, Object> merchantCodeMap = new HashMap<>();
|
if (one == null){
|
||||||
merchantCodeMap.put("virChannelFlag", channelStatus.getVirChannelFlag());
|
throw new MsgException("账号异常");
|
||||||
merchantCodeMap.put("url", ZfbChannel.SXF_CHANNEL.getUrl());
|
|
||||||
merchantCodeMap.put("nameChannel",ZfbChannel.SXF_CHANNEL.getName());
|
|
||||||
result.add(merchantCodeMap);
|
|
||||||
break;
|
|
||||||
case 4:
|
|
||||||
HashMap<Object, Object> merchantCodeMap4 = new HashMap<>();
|
|
||||||
merchantCodeMap4.put("virChannelFlag", channelStatus.getVirChannelFlag());
|
|
||||||
merchantCodeMap4.put("url", ZfbChannel.YS_CHANNEL.getUrl());
|
|
||||||
merchantCodeMap4.put("nameChannel",ZfbChannel.YS_CHANNEL.getName());
|
|
||||||
result.add(merchantCodeMap4);
|
|
||||||
break;
|
|
||||||
case 5:
|
|
||||||
HashMap<Object, Object> merchantCodeMap5 = new HashMap<>();
|
|
||||||
merchantCodeMap5.put("virChannelFlag", channelStatus.getVirChannelFlag());
|
|
||||||
merchantCodeMap5.put("url", ZfbChannel.LKL_CHANNEL.getUrl());
|
|
||||||
merchantCodeMap5.put("nameChannel",ZfbChannel.LKL_CHANNEL.getName());
|
|
||||||
result.add(merchantCodeMap5);
|
|
||||||
break;
|
|
||||||
case 6:
|
|
||||||
HashMap<Object, Object> merchantCodeMap6 = new HashMap<>();
|
|
||||||
merchantCodeMap6.put("virChannelFlag", channelStatus.getVirChannelFlag());
|
|
||||||
merchantCodeMap6.put("url", ZfbChannel.YS_CHANNEL.getUrl());
|
|
||||||
merchantCodeMap6.put("nameChannel",ZfbChannel.YS_CHANNEL.getName());
|
|
||||||
result.add(merchantCodeMap6);
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
throw new MsgException("未知通道");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
return ResultGenerator.genSuccessResult(result);
|
MerchantChannelStatus merchantCode = merchantChannelStatusService.getMerchantCodeByInfo(params.get("merchantCode"), one.getChannelType());
|
||||||
|
HashMap<Object, Object> merchantCodeMap = new HashMap<>();
|
||||||
|
switch (merchantCode.getChannel()){
|
||||||
|
case 1:
|
||||||
|
merchantCodeMap.put("virChannelFlag", merchantCode.getVirChannelFlag());
|
||||||
|
merchantCodeMap.put("url", ZfbChannel.SXF_CHANNEL.getUrl());
|
||||||
|
merchantCodeMap.put("nameChannel",ZfbChannel.SXF_CHANNEL.getName());
|
||||||
|
break;
|
||||||
|
case 4:
|
||||||
|
merchantCodeMap.put("virChannelFlag", merchantCode.getVirChannelFlag());
|
||||||
|
merchantCodeMap.put("url", ZfbChannel.YS_CHANNEL.getUrl());
|
||||||
|
merchantCodeMap.put("nameChannel",ZfbChannel.YS_CHANNEL.getName());
|
||||||
|
break;
|
||||||
|
case 5:
|
||||||
|
merchantCodeMap.put("virChannelFlag", merchantCode.getVirChannelFlag());
|
||||||
|
merchantCodeMap.put("url", ZfbChannel.LKL_CHANNEL.getUrl());
|
||||||
|
merchantCodeMap.put("nameChannel",ZfbChannel.LKL_CHANNEL.getName());
|
||||||
|
break;
|
||||||
|
case 6:
|
||||||
|
merchantCodeMap.put("virChannelFlag", merchantCode.getVirChannelFlag());
|
||||||
|
merchantCodeMap.put("url", ZfbChannel.YS_CHANNEL.getUrl());
|
||||||
|
merchantCodeMap.put("nameChannel",ZfbChannel.YS_CHANNEL.getName());
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
throw new MsgException("未知通道");
|
||||||
|
}
|
||||||
|
return ResultGenerator.genSuccessResult(merchantCodeMap);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ package cn.pluss.platform.controller.merchant;
|
|||||||
import cn.pluss.platform.api.Result;
|
import cn.pluss.platform.api.Result;
|
||||||
import cn.pluss.platform.api.ResultGenerator;
|
import cn.pluss.platform.api.ResultGenerator;
|
||||||
import cn.pluss.platform.merchantChannelStatus.MerchantChannelStatusService;
|
import cn.pluss.platform.merchantChannelStatus.MerchantChannelStatusService;
|
||||||
|
import cn.pluss.platform.vo.AccountChannelVO;
|
||||||
import cn.pluss.platform.vo.ChannelStatusVO;
|
import cn.pluss.platform.vo.ChannelStatusVO;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
@@ -31,6 +32,16 @@ public class MerchantChannelStatusController {
|
|||||||
return ResultGenerator.genSuccessResult(csVO);
|
return ResultGenerator.genSuccessResult(csVO);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 结算类型切换
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@GetMapping("/channelCheck")
|
||||||
|
public Result<AccountChannelVO> channelCheck(){
|
||||||
|
return ResultGenerator.genSuccessResult(channelStatusService.channelCheck());
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 快速到账通道和常规通道切换
|
* 快速到账通道和常规通道切换
|
||||||
* @param params 通道标识,目前是0:常规通道, 1: 快速到账通道
|
* @param params 通道标识,目前是0:常规通道, 1: 快速到账通道
|
||||||
@@ -42,4 +53,10 @@ public class MerchantChannelStatusController {
|
|||||||
ChannelStatusVO channelStatusVO = channelStatusService.appSwitchChannel(Integer.parseInt(flag));
|
ChannelStatusVO channelStatusVO = channelStatusService.appSwitchChannel(Integer.parseInt(flag));
|
||||||
return ResultGenerator.genSuccessResult(channelStatusVO);
|
return ResultGenerator.genSuccessResult(channelStatusVO);
|
||||||
}
|
}
|
||||||
|
@PostMapping("/request")
|
||||||
|
public Result<ChannelStatusVO> request(@RequestBody Map<String, Object> params){
|
||||||
|
String flag = (String) params.get("flag");
|
||||||
|
ChannelStatusVO channelStatusVO = channelStatusService.appSwitchRequest(Integer.parseInt(flag));
|
||||||
|
return ResultGenerator.genSuccessResult(channelStatusVO);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,8 +1,10 @@
|
|||||||
package cn.pluss.platform.mapper;
|
package cn.pluss.platform.mapper;
|
||||||
|
|
||||||
import cn.pluss.platform.entity.MerchantChannelStatus;
|
import cn.pluss.platform.entity.MerchantChannelStatus;
|
||||||
|
import cn.pluss.platform.vo.ChannelStatusVO;
|
||||||
import cn.pluss.platform.vo.MerchantChannelStatusVO;
|
import cn.pluss.platform.vo.MerchantChannelStatusVO;
|
||||||
import cn.pluss.platform.vo.UserNumVO;
|
import cn.pluss.platform.vo.UserNumVO;
|
||||||
|
import cn.pluss.platform.vo.merchantChannelVO;
|
||||||
import com.baomidou.mybatisplus.core.conditions.Wrapper;
|
import com.baomidou.mybatisplus.core.conditions.Wrapper;
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
import com.baomidou.mybatisplus.core.toolkit.Constants;
|
import com.baomidou.mybatisplus.core.toolkit.Constants;
|
||||||
@@ -11,6 +13,7 @@ import org.apache.ibatis.annotations.Param;
|
|||||||
import org.apache.ibatis.annotations.Select;
|
import org.apache.ibatis.annotations.Select;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
@Mapper
|
@Mapper
|
||||||
public interface MerchantChannelStatusMapper extends BaseMapper<MerchantChannelStatus> {
|
public interface MerchantChannelStatusMapper extends BaseMapper<MerchantChannelStatus> {
|
||||||
@@ -49,4 +52,5 @@ public interface MerchantChannelStatusMapper extends BaseMapper<MerchantChannelS
|
|||||||
* @return java.util.Map<java.lang.String,java.lang.Integer>
|
* @return java.util.Map<java.lang.String,java.lang.Integer>
|
||||||
*/
|
*/
|
||||||
UserNumVO getUserNumInfo(@Param("userId") Long userId, @Param("date")String date, @Param("dateType")Integer dateType);
|
UserNumVO getUserNumInfo(@Param("userId") Long userId, @Param("date")String date, @Param("dateType")Integer dateType);
|
||||||
|
List<merchantChannelVO> pageDate(@Param("pageSize")Integer size, @Param("offset")Integer page);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -74,4 +74,19 @@
|
|||||||
WHERE channel = 4 AND `status` = 3 AND (extra ->> '$.sysFlowId') = #{sysFlowId}
|
WHERE channel = 4 AND `status` = 3 AND (extra ->> '$.sysFlowId') = #{sysFlowId}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
<select id="pageDate" parameterType="java.lang.Integer" resultType="cn.pluss.platform.vo.merchantChannelVO">
|
||||||
|
SELECT mcs.merchantCode,
|
||||||
|
mcs.valid,
|
||||||
|
mcs.status,
|
||||||
|
mcs.updateTime,
|
||||||
|
mcs.virChannelFlag,
|
||||||
|
mcs.channel,
|
||||||
|
ba.merchantName,
|
||||||
|
ba.contactName,
|
||||||
|
ba.alias
|
||||||
|
from tb_pluss_merchant_channel_status mcs
|
||||||
|
LEFT JOIN tb_pluss_merchant_base_info ba ON mcs.merchantCode = ba.merchantCode
|
||||||
|
WHERE mcs.`valid` = -1
|
||||||
|
order by mcs.id desc limit #{pageSize} offset #{offset};
|
||||||
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|||||||
@@ -0,0 +1,57 @@
|
|||||||
|
package cn.pluss.platform.controller.channelCheck;
|
||||||
|
|
||||||
|
|
||||||
|
import cn.pluss.platform.api.PageInfo;
|
||||||
|
import cn.pluss.platform.api.Result;
|
||||||
|
import cn.pluss.platform.api.ResultGenerator;
|
||||||
|
import cn.pluss.platform.controller.BaseNoModelController;
|
||||||
|
import cn.pluss.platform.entity.AppVersionInfo;
|
||||||
|
import cn.pluss.platform.entity.BestNewActivity;
|
||||||
|
import cn.pluss.platform.entity.MerchantChannelStatus;
|
||||||
|
import cn.pluss.platform.entity.UserApp;
|
||||||
|
import cn.pluss.platform.merchantChannelStatus.MerchantChannelStatusService;
|
||||||
|
import cn.pluss.platform.util.PageUtils;
|
||||||
|
import cn.pluss.platform.vo.ChannelStatusVO;
|
||||||
|
import cn.pluss.platform.vo.merchantChannelVO;
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
import io.swagger.models.auth.In;
|
||||||
|
import org.springframework.stereotype.Controller;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author lyf
|
||||||
|
*/
|
||||||
|
@Controller
|
||||||
|
@RequestMapping("/channel")
|
||||||
|
public class ChannelController extends BaseNoModelController {
|
||||||
|
@Resource
|
||||||
|
private MerchantChannelStatusService merchantChannelStatusService;
|
||||||
|
@GetMapping("/merchantIndex")
|
||||||
|
public String permissionIndex() {
|
||||||
|
return "/channel/merchantIndex";
|
||||||
|
}
|
||||||
|
|
||||||
|
@GetMapping("/page")
|
||||||
|
@ResponseBody
|
||||||
|
public Result<List<merchantChannelVO>> page(Integer size, Integer page) {
|
||||||
|
List<merchantChannelVO> pageData= merchantChannelStatusService.pageDate(size, page);
|
||||||
|
return ResultGenerator.genSuccessResult(pageData);
|
||||||
|
}
|
||||||
|
|
||||||
|
// @GetMapping("/update/{merchantCode}")
|
||||||
|
// @ResponseBody
|
||||||
|
// public Result<Object> update(@PathVariable(value = "merchantCode") String merchantCode){
|
||||||
|
// UpdateWrapper<MerchantChannelStatus> UpdateWrapper = new UpdateWrapper<MerchantChannelStatus>();
|
||||||
|
// UpdateWrapper.eq("merchantCode", merchantCode);
|
||||||
|
// UpdateWrapper.set("")
|
||||||
|
//
|
||||||
|
// merchantChannelStatusService.update();
|
||||||
|
// }
|
||||||
|
}
|
||||||
@@ -36,7 +36,7 @@
|
|||||||
<div class="layui-form-item">
|
<div class="layui-form-item">
|
||||||
<label class="layui-form-label">协议</label>
|
<label class="layui-form-label">协议</label>
|
||||||
<div class="layui-input-block">
|
<div class="layui-input-block">
|
||||||
<select id="discern">
|
<select id="discern" style="z-index: 9999">
|
||||||
<option value="">请选择</option>
|
<option value="">请选择</option>
|
||||||
<option value="0" <c:if test="${agreement.discern == 0}">selected</c:if>>注册协议</option>
|
<option value="0" <c:if test="${agreement.discern == 0}">selected</c:if>>注册协议</option>
|
||||||
<option value="1" <c:if test="${agreement.discern == 1}">selected</c:if>>银行卡协议</option>
|
<option value="1" <c:if test="${agreement.discern == 1}">selected</c:if>>银行卡协议</option>
|
||||||
@@ -45,6 +45,9 @@
|
|||||||
<option value="5" <c:if test="${agreement.discern == 5}">selected</c:if>>应用权限说明</option>
|
<option value="5" <c:if test="${agreement.discern == 5}">selected</c:if>>应用权限说明</option>
|
||||||
<option value="6" <c:if test="${agreement.discern == 6}">selected</c:if>>第三方SDK说明</option>
|
<option value="6" <c:if test="${agreement.discern == 6}">selected</c:if>>第三方SDK说明</option>
|
||||||
<option value="7" <c:if test="${agreement.discern == 7}">selected</c:if>>会员协议</option>
|
<option value="7" <c:if test="${agreement.discern == 7}">selected</c:if>>会员协议</option>
|
||||||
|
<option value="8" <c:if test="${agreement.discern == 8}">selected</c:if>>费率信息</option>
|
||||||
|
<option value="9" <c:if test="${agreement.discern == 9}">selected</c:if>>微信认证流程</option>
|
||||||
|
<option value="10" <c:if test="${agreement.discern == 10}">selected</c:if>>支付宝认证流程</option>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -0,0 +1,194 @@
|
|||||||
|
<%--
|
||||||
|
Created by IntelliJ IDEA.
|
||||||
|
User: Administrator
|
||||||
|
Date: 2020/8/3
|
||||||
|
Time: 14:29
|
||||||
|
To change this template use File | Settings | File Templates.
|
||||||
|
--%>
|
||||||
|
<%@ page contentType="text/html; charset=utf-8"
|
||||||
|
pageEncoding="utf-8" %>
|
||||||
|
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||||
|
<meta name="apple-mobile-web-app-capable" content="yes">
|
||||||
|
<meta name="apple-mobile-web-app-status-bar-style" content="black">
|
||||||
|
<meta name="format-detection" content="telephone=no">
|
||||||
|
<meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1">
|
||||||
|
<meta name="renderer" content="webkit">
|
||||||
|
<!-- 移动设备 viewport -->
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0">
|
||||||
|
<jsp:include page="../../common.jsp"/>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div class="row animated fadeInRight" style="margin: 0;">
|
||||||
|
<div class="wrapper wrapper-content mt5 right-content ml5 mr5">
|
||||||
|
<table class="layui-hide" id="appVersionInfoTab" lay-filter="appVersionInfoTab"></table>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<script type="text/html" id="toolbarDemo">
|
||||||
|
<div class="layui-btn-container">
|
||||||
|
<button class="layui-btn layui-btn-sm" lay-event="add">添加</button>
|
||||||
|
<button class="layui-btn layui-btn-sm" lay-event="search">查询</button>
|
||||||
|
</div>
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<script type="text/html" id="barDemo">
|
||||||
|
<a class="layui-btn layui-btn-xs" lay-event="edit">编辑</a>
|
||||||
|
<a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del">删除</a>
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
layui.use(['table', 'layer'], function () {
|
||||||
|
var table = layui.table;
|
||||||
|
var layer = layui.layer;
|
||||||
|
|
||||||
|
var tableIns = table.render({
|
||||||
|
elem: '#appVersionInfoTab'
|
||||||
|
, url: '${ctx}/channel/page'
|
||||||
|
, response: {
|
||||||
|
statusName: 'code' //数据状态的字段名称,默认:code
|
||||||
|
, countName: 'count' //数据总数的字段名称,默认:count
|
||||||
|
, dataName: 'data' //默数据列表的字段名称,认:data
|
||||||
|
, statusCode: 200
|
||||||
|
}
|
||||||
|
, parseData: function (res) { //res 即为原始返回的数据
|
||||||
|
return {
|
||||||
|
"code": res.code, //解析接口状态
|
||||||
|
"msg": res.message, //解析提示文本
|
||||||
|
"count": res.data.count, //解析数据长度
|
||||||
|
"data": res.data ,//解析数据列表
|
||||||
|
};
|
||||||
|
console.log(res.data)
|
||||||
|
console.log("+++++++++++++++++++++++++++")
|
||||||
|
}
|
||||||
|
, toolbar: '#toolbarDemo' //开启头部工具栏,并为其绑定左侧模板
|
||||||
|
, defaultToolbar: ['filter']
|
||||||
|
, title: 'app版本数据表'
|
||||||
|
, cols: [[
|
||||||
|
{type: 'checkbox', fixed: 'left'}
|
||||||
|
// , {field: 'numbers', title: '序号', fixed: 'left', width: 80, type: 'numbers'}
|
||||||
|
, {field: 'alias', title: '商户简称'}
|
||||||
|
, {field: 'contactName', title: '商户联系人', sort: true}
|
||||||
|
, {field: 'merchantCode', title: '商户code'}
|
||||||
|
, {field: 'merchantName', title: '商户名称', hidden: true}
|
||||||
|
, {field: 'status', title: '进件状态',templet: function (p) {
|
||||||
|
if (p.status == 3) {
|
||||||
|
return "已进件";
|
||||||
|
} else if (p.status == 1){
|
||||||
|
return "审核中";
|
||||||
|
} else if (p.status == 2){
|
||||||
|
return "进件失败"
|
||||||
|
}
|
||||||
|
}},
|
||||||
|
{field: 'virChannelFlag', title: '切换通道'
|
||||||
|
|
||||||
|
},
|
||||||
|
{field: 'channel', title: '通道名称',templet: function (c) {
|
||||||
|
if (c.channel == 1) {
|
||||||
|
return "随行付";
|
||||||
|
} else if (c.channel == 4){
|
||||||
|
return "银盛";
|
||||||
|
} else if (c.channel == 5){
|
||||||
|
return "拉卡拉"
|
||||||
|
}else if (c.channel == 5){
|
||||||
|
return "银盛D1"
|
||||||
|
}else {
|
||||||
|
return "未知通道"
|
||||||
|
}
|
||||||
|
}},
|
||||||
|
|
||||||
|
, {
|
||||||
|
field: 'updateTime',
|
||||||
|
title: '修改日期',
|
||||||
|
width: 160
|
||||||
|
// ,templet: "<div>{{layui.util.toDateString(d.updateTime, 'yyyy-MM-dd HH:mm:ss')}}</div>"
|
||||||
|
}
|
||||||
|
, {fixed: 'right', title: '操作', minWidth: 110, toolbar: '#barDemo'}
|
||||||
|
]]
|
||||||
|
, request: {
|
||||||
|
pageName: 'page' //页码的参数名称,默认:page
|
||||||
|
, limitName: 'size' //每页数据量的参数名,默认:limit
|
||||||
|
}
|
||||||
|
, page: true
|
||||||
|
, done: function () {
|
||||||
|
$("[data-field='forceUpdate']").children().each(function () {
|
||||||
|
if ($(this).text() == '0') {
|
||||||
|
$(this).text('否');
|
||||||
|
} else if ($(this).text() == '1') {
|
||||||
|
$(this).text('是');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
//头工具栏事件
|
||||||
|
table.on('toolbar(appVersionInfoTab)', function (obj) {
|
||||||
|
switch (obj.event) {
|
||||||
|
case 'add':
|
||||||
|
// 添加
|
||||||
|
toAdd();
|
||||||
|
break;
|
||||||
|
case 'search':
|
||||||
|
// 查询
|
||||||
|
tableIns.reload();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
//监听行工具事件
|
||||||
|
table.on('tool(appVersionInfoTab)', function (obj) {
|
||||||
|
var data = obj.data;
|
||||||
|
//console.log(obj)
|
||||||
|
if (obj.event === 'del') {
|
||||||
|
layer.confirm('真的删除行么?', function (index) {
|
||||||
|
obj.del(data);
|
||||||
|
layer.close(index);
|
||||||
|
del(obj);
|
||||||
|
});
|
||||||
|
} else if (obj.event === 'edit') {
|
||||||
|
toAdd(obj.data);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
function toAdd(obj) {
|
||||||
|
var url = '${ctx}/appVersionInfo/add';
|
||||||
|
<%--if (obj != undefined) {--%>
|
||||||
|
<%-- url = "${ctx}/appVersionInfo/edit/" + obj.id--%>
|
||||||
|
<%--}--%>
|
||||||
|
var index = layer.open({
|
||||||
|
type: 2
|
||||||
|
, shade: 0.5
|
||||||
|
, maxmin: true
|
||||||
|
, content: url
|
||||||
|
, area: ['550px', '600px']
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
function del(obj) {
|
||||||
|
$.ajax({
|
||||||
|
url: '${ctx}/appVersionInfo/delete',
|
||||||
|
type: 'post',
|
||||||
|
data: JSON.stringify(obj.data),
|
||||||
|
dataType: 'JSON',
|
||||||
|
contentType: "application/json",
|
||||||
|
success: function (res) {
|
||||||
|
if (res.code == 200) {
|
||||||
|
layer.msg(res.data, {
|
||||||
|
icon: 1
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
layer.msg(res.data, {
|
||||||
|
icon: 5
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
@@ -0,0 +1,31 @@
|
|||||||
|
package cn.pluss.platform.vo;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author lyf
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class AccountChannelVO {
|
||||||
|
/**
|
||||||
|
* 当前通道D1,D0
|
||||||
|
*/
|
||||||
|
private String currentChannel;
|
||||||
|
// /**
|
||||||
|
// * 当前通道 status 0或无、待审核,1、审核中 2、审核失败 3、审核通过',
|
||||||
|
// */
|
||||||
|
// private String currentStatus;
|
||||||
|
/**
|
||||||
|
* 其他通道D1,D0, 1未选择通道
|
||||||
|
*/
|
||||||
|
private String otherChannel;
|
||||||
|
// /**
|
||||||
|
// * 其他通道 status 0或无、待审核,1、审核中 2、审核失败 3、审核通过
|
||||||
|
// */
|
||||||
|
// private String otherStatus;
|
||||||
|
|
||||||
|
// /**
|
||||||
|
// * 切换通道状态 0未有切换 -1切换审核中 1已切换为当前通道
|
||||||
|
// */
|
||||||
|
// private Integer valid;
|
||||||
|
}
|
||||||
@@ -38,4 +38,5 @@ public class ChannelStatusVO extends MerchantChannelStatus {
|
|||||||
|
|
||||||
return signUrl;
|
return signUrl;
|
||||||
}
|
}
|
||||||
|
private Integer statusD1;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -113,11 +113,11 @@ public class WxCertInfoVO {
|
|||||||
*/
|
*/
|
||||||
private String altImgUrl;
|
private String altImgUrl;
|
||||||
|
|
||||||
public static WxCertInfoVO empty(String channelType) {
|
public static WxCertInfoVO empty(String channelType, String channelId) {
|
||||||
WxCertInfoVO wxCertInfoVO = new WxCertInfoVO();
|
WxCertInfoVO wxCertInfoVO = new WxCertInfoVO();
|
||||||
wxCertInfoVO.setChannelType(channelType);
|
wxCertInfoVO.setChannelType(channelType);
|
||||||
wxCertInfoVO.setStatus(SubMerchantApplyOrder.STATUS_NO_AUDIT);
|
wxCertInfoVO.setStatus(SubMerchantApplyOrder.STATUS_NO_AUDIT);
|
||||||
|
wxCertInfoVO.setChannelId(channelId);
|
||||||
return wxCertInfoVO;
|
return wxCertInfoVO;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,32 @@
|
|||||||
|
package cn.pluss.platform.vo;
|
||||||
|
|
||||||
|
import com.alibaba.fastjson.annotation.JSONField;
|
||||||
|
import lombok.Data;
|
||||||
|
import org.springframework.format.annotation.DateTimeFormat;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author lyf
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class merchantChannelVO {
|
||||||
|
private String merchantCode;
|
||||||
|
|
||||||
|
private Integer valid;
|
||||||
|
|
||||||
|
private Integer status;
|
||||||
|
|
||||||
|
private String merchantName;
|
||||||
|
|
||||||
|
private String contactName;
|
||||||
|
|
||||||
|
private String alias;
|
||||||
|
@JSONField(format = "yyyy-MM-dd hh:mm:ss")
|
||||||
|
@DateTimeFormat(pattern = "yyyy-MM-dd hh:mm:ss")
|
||||||
|
private Date updateTime;
|
||||||
|
|
||||||
|
private String virChannelFlag;
|
||||||
|
|
||||||
|
private Integer channel;
|
||||||
|
}
|
||||||
@@ -1395,7 +1395,8 @@ public class AccountServiceImpl extends ServiceImpl<AccountMapper, Account> impl
|
|||||||
UpdateWrapper<Account> updateWrapper0 = new UpdateWrapper<>();
|
UpdateWrapper<Account> updateWrapper0 = new UpdateWrapper<>();
|
||||||
updateWrapper0.eq("userId", userId)
|
updateWrapper0.eq("userId", userId)
|
||||||
.eq("channelType", channel==0?"D0":"D1")
|
.eq("channelType", channel==0?"D0":"D1")
|
||||||
.set("valid", 1);
|
.set("valid", 1)
|
||||||
|
.set("updateTime",new Date());
|
||||||
boolean update0 = update(updateWrapper0);
|
boolean update0 = update(updateWrapper0);
|
||||||
//更改另一个
|
//更改另一个
|
||||||
UpdateWrapper<Account> updateWrapper1 = new UpdateWrapper<>();
|
UpdateWrapper<Account> updateWrapper1 = new UpdateWrapper<>();
|
||||||
|
|||||||
@@ -2,13 +2,13 @@ package cn.pluss.platform.merchantChannelStatus;
|
|||||||
|
|
||||||
import cn.pluss.platform.entity.MerchantChannelStatus;
|
import cn.pluss.platform.entity.MerchantChannelStatus;
|
||||||
import cn.pluss.platform.mapper.MerchantChannelStatusMapper;
|
import cn.pluss.platform.mapper.MerchantChannelStatusMapper;
|
||||||
import cn.pluss.platform.vo.ChannelStatusVO;
|
import cn.pluss.platform.vo.*;
|
||||||
import cn.pluss.platform.vo.MerchantChannelStatusVO;
|
|
||||||
import cn.pluss.platform.vo.UserNumVO;
|
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
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.core.toolkit.Wrappers;
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import com.baomidou.mybatisplus.extension.service.IService;
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
|
|
||||||
@@ -52,11 +52,12 @@ public interface MerchantChannelStatusService extends IService<MerchantChannelSt
|
|||||||
return getBaseMapper().selectOne(qWrapper);
|
return getBaseMapper().selectOne(qWrapper);
|
||||||
}
|
}
|
||||||
|
|
||||||
default List<MerchantChannelStatus> getMerchantCodeByInfo(String merchantCode) {
|
default MerchantChannelStatus getMerchantCodeByInfo(String merchantCode, String channel) {
|
||||||
QueryWrapper<MerchantChannelStatus> qWrapper = new QueryWrapper<>();
|
QueryWrapper<MerchantChannelStatus> qWrapper = new QueryWrapper<>();
|
||||||
qWrapper.eq("merchantCode", merchantCode)
|
qWrapper.eq("merchantCode", merchantCode)
|
||||||
.eq("status",3);
|
.eq("status",3)
|
||||||
return getBaseMapper().selectList(qWrapper);
|
.eq("virChannelFlag", channel);
|
||||||
|
return getBaseMapper().selectOne(qWrapper);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -164,12 +165,19 @@ public interface MerchantChannelStatusService extends IService<MerchantChannelSt
|
|||||||
*/
|
*/
|
||||||
ChannelStatusVO appSwitchChannel(int flag);
|
ChannelStatusVO appSwitchChannel(int flag);
|
||||||
|
|
||||||
|
ChannelStatusVO appSwitchRequest(int flag);
|
||||||
/**
|
/**
|
||||||
* 查询用户当前的通道信息
|
* 查询用户当前的通道信息
|
||||||
* @return 通道进件信息
|
* @return 通道进件信息
|
||||||
*/
|
*/
|
||||||
ChannelStatusVO appCurrent();
|
ChannelStatusVO appCurrent();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通道状态切换相关状态参数
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
AccountChannelVO channelCheck();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 清理驳回的信息中的通道相关数据
|
* 清理驳回的信息中的通道相关数据
|
||||||
* @param merchantCode 商户编号
|
* @param merchantCode 商户编号
|
||||||
@@ -221,4 +229,11 @@ public interface MerchantChannelStatusService extends IService<MerchantChannelSt
|
|||||||
* 当前用户指定时间段 进件商户数量
|
* 当前用户指定时间段 进件商户数量
|
||||||
*/
|
*/
|
||||||
UserNumVO getUserNumInfo(Long userId, String date, Integer dateType);
|
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.notice.NoticeService;
|
||||||
import cn.pluss.platform.userApp.UserAppService;
|
import cn.pluss.platform.userApp.UserAppService;
|
||||||
import cn.pluss.platform.user.impl.GeneralPushUtil;
|
import cn.pluss.platform.user.impl.GeneralPushUtil;
|
||||||
|
import cn.pluss.platform.vo.AccountChannelVO;
|
||||||
import cn.pluss.platform.vo.ChannelStatusVO;
|
import cn.pluss.platform.vo.ChannelStatusVO;
|
||||||
import cn.pluss.platform.vo.UserNumVO;
|
import cn.pluss.platform.vo.UserNumVO;
|
||||||
|
import cn.pluss.platform.vo.merchantChannelVO;
|
||||||
import cn.pluss.platform.wx.WxTalkService;
|
import cn.pluss.platform.wx.WxTalkService;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
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.core.toolkit.Wrappers;
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
import lombok.Setter;
|
import lombok.Setter;
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
@@ -85,6 +89,8 @@ public class MerchantChannelStatusServiceImpl extends ServiceImpl<MerchantChanne
|
|||||||
private GeneralPushUtil generalPushUtil;
|
private GeneralPushUtil generalPushUtil;
|
||||||
@Autowired
|
@Autowired
|
||||||
private YSAuditServiceV3 ysAuditServiceV3;
|
private YSAuditServiceV3 ysAuditServiceV3;
|
||||||
|
@Resource
|
||||||
|
private MerchantChannelStatusMapper merchantChannelStatus;
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@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
|
@Override
|
||||||
public ChannelStatusVO appCurrent() {
|
public ChannelStatusVO appCurrent() {
|
||||||
UserApp userApp = userAppService.queryUserAppByToken();
|
UserApp userApp = userAppService.queryUserAppByToken();
|
||||||
@@ -373,9 +429,71 @@ public class MerchantChannelStatusServiceImpl extends ServiceImpl<MerchantChanne
|
|||||||
channelStatusVO.setHasQuickCash(Objects.equals(channelStatusVO.getChannel(), 4));
|
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;
|
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
|
@Override
|
||||||
public MerchantChannelStatus getChannelByMerchantId(String merchantId) {
|
public MerchantChannelStatus getChannelByMerchantId(String merchantId) {
|
||||||
@@ -451,4 +569,10 @@ public class MerchantChannelStatusServiceImpl extends ServiceImpl<MerchantChanne
|
|||||||
public UserNumVO getUserNumInfo(Long userId, String date, Integer dateType) {
|
public UserNumVO getUserNumInfo(Long userId, String date, Integer dateType) {
|
||||||
return baseMapper.getUserNumInfo(userId,date,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", "");
|
// resultMap.put("rechargeToken", "");
|
||||||
try {
|
// try {
|
||||||
MultiValueMap<String, String> multiValueMap = new LinkedMultiValueMap<>();
|
// MultiValueMap<String, String> multiValueMap = new LinkedMultiValueMap<>();
|
||||||
multiValueMap.add("mobile", loginName);
|
// multiValueMap.add("mobile", loginName);
|
||||||
|
//
|
||||||
RestTemplate restTemplate = new RestTemplate();
|
// RestTemplate restTemplate = new RestTemplate();
|
||||||
// 设置为UTF8编码
|
// // 设置为UTF8编码
|
||||||
restTemplate.getMessageConverters().set(1, new StringHttpMessageConverter(StandardCharsets.UTF_8));
|
// restTemplate.getMessageConverters().set(1, new StringHttpMessageConverter(StandardCharsets.UTF_8));
|
||||||
|
//
|
||||||
String tokenInfo = restTemplate.postForObject(
|
// String tokenInfo = restTemplate.postForObject(
|
||||||
"https://cz-2133569-1313226949.ap-shanghai.run.tcloudbase.com/login/kyMobilelogin", multiValueMap,
|
// "https://cz-2133569-1313226949.ap-shanghai.run.tcloudbase.com/login/kyMobilelogin", multiValueMap,
|
||||||
String.class);
|
// String.class);
|
||||||
|
//
|
||||||
ObjectMapper mapper = new ObjectMapper();
|
// ObjectMapper mapper = new ObjectMapper();
|
||||||
JsonNode jsonNode = mapper.readTree(tokenInfo);
|
// JsonNode jsonNode = mapper.readTree(tokenInfo);
|
||||||
JsonNode code = jsonNode.get("code");
|
// JsonNode code = jsonNode.get("code");
|
||||||
|
//
|
||||||
if (code.asText().equals("0")) {
|
// if (code.asText().equals("0")) {
|
||||||
JsonNode token = jsonNode.get("data").get("token");
|
// JsonNode token = jsonNode.get("data").get("token");
|
||||||
resultMap.put("rechargeToken", token.asText());
|
// resultMap.put("rechargeToken", token.asText());
|
||||||
}
|
// }
|
||||||
} catch (Exception e) {
|
// } catch (Exception e) {
|
||||||
|
//
|
||||||
}
|
// }
|
||||||
|
|
||||||
|
|
||||||
clearJpushAlias(queryUserApp.getUserId() + "");
|
clearJpushAlias(queryUserApp.getUserId() + "");
|
||||||
|
|||||||
@@ -210,18 +210,21 @@ public class WxCertServiceImpl implements WxCertService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private WxCertInfoVO wxCertInfo(MerchantBaseInfo mbi, String channelType) {
|
private WxCertInfoVO wxCertInfo(MerchantBaseInfo mbi, String channelType) {
|
||||||
|
String channelId=null;
|
||||||
if (StringUtils.isEmpty(channelType)) {
|
if (StringUtils.isEmpty(channelType)) {
|
||||||
MerchantChannelStatus mcs = mcsService.getValidData(mbi.getMerchantCode());
|
MerchantChannelStatus mcs = mcsService.getValidData(mbi.getMerchantCode());
|
||||||
if (Objects.equals(mcs.getChannel(), 4)) {
|
if (Objects.equals(mcs.getChannel(), 4)) {
|
||||||
channelType = "D0";
|
channelType = "D0";
|
||||||
|
channelId = String.valueOf(mcs.getChannel());
|
||||||
} else {
|
} else {
|
||||||
channelType = "D1";
|
channelType = "D1";
|
||||||
|
channelId = String.valueOf(mcs.getChannel());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
MerchantChannelStatus mcs = mcsService.getByMerchantCodeAndChannelType(mbi.getMerchantCode(), channelType);
|
MerchantChannelStatus mcs = mcsService.getByMerchantCodeAndChannelType(mbi.getMerchantCode(), channelType);
|
||||||
|
|
||||||
WxCertInfoVO result = WxCertInfoVO.empty(channelType);
|
WxCertInfoVO result = WxCertInfoVO.empty(channelType, channelId);
|
||||||
result.setMerchantCode(mbi.getMerchantCode());
|
result.setMerchantCode(mbi.getMerchantCode());
|
||||||
if (mcs == null || !(MerchantChannelStatus.AUDIT_STATUS_SUCCESS.equals(mcs.getStatus())
|
if (mcs == null || !(MerchantChannelStatus.AUDIT_STATUS_SUCCESS.equals(mcs.getStatus())
|
||||||
|| MerchantChannelStatus.AUDIT_STATUS_DATA_EDIT.equals(mcs.getStatus()))) {
|
|| MerchantChannelStatus.AUDIT_STATUS_DATA_EDIT.equals(mcs.getStatus()))) {
|
||||||
|
|||||||
Reference in New Issue
Block a user