银盛D1相关,提现部分改动,注册逻辑更改,后台切换通道
This commit is contained in:
@@ -6,10 +6,29 @@ import cn.pluss.platform.vo.MerchantChannelStatusVO;
|
|||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
import org.apache.ibatis.annotations.Mapper;
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
import org.apache.ibatis.annotations.Param;
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
import org.apache.ibatis.annotations.Select;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@Mapper
|
@Mapper
|
||||||
public interface UserPromotionMapper extends BaseMapper<UserPromotion> {
|
public interface UserPromotionMapper extends BaseMapper<UserPromotion> {
|
||||||
List<UserPromotion> selectListByUserId(@Param("userIdList") List<Integer> userIdList);
|
List<UserPromotion> selectListByUserId(@Param("userIdList") List<Integer> userIdList);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@Select(value = "SELECT\n" +
|
||||||
|
"\tP.user_id AS userId,\n" +
|
||||||
|
"\tP.type_code AS typeCode,\n" +
|
||||||
|
"\tP.current_fee AS currentFee,\n" +
|
||||||
|
"\tP.parent_user_id AS parentUserId,\n" +
|
||||||
|
"\tP.is_extend AS isExtend,\n" +
|
||||||
|
"\tP.create_time AS createTime,\n" +
|
||||||
|
"\tP.update_time AS updateTime,\n" +
|
||||||
|
"\tu.loginName \n" +
|
||||||
|
"FROM\n" +
|
||||||
|
"\ttb_pluss_user_promotion P\n" +
|
||||||
|
"\tLEFT JOIN tb_pluss_user_info u ON P.user_id = u.id \n" +
|
||||||
|
"WHERE\n" +
|
||||||
|
"\tP.user_id = #{userId}")
|
||||||
|
UserPromotion selectByUserId(@Param("userId") String userId);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -37,7 +37,7 @@
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<script type="text/html" id="barDemo">
|
<script type="text/html" id="barDemo">
|
||||||
<a class="layui-btn layui-btn-xs" lay-event="edit">编辑</a>
|
<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>
|
<a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del">删除</a>
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
@@ -94,7 +94,7 @@
|
|||||||
return "银盛";
|
return "银盛";
|
||||||
} else if (c.channel == 5){
|
} else if (c.channel == 5){
|
||||||
return "拉卡拉"
|
return "拉卡拉"
|
||||||
}else if (c.channel == 5){
|
}else if (c.channel == 6){
|
||||||
return "银盛D1"
|
return "银盛D1"
|
||||||
}else {
|
}else {
|
||||||
return "未知通道"
|
return "未知通道"
|
||||||
@@ -155,17 +155,24 @@
|
|||||||
});
|
});
|
||||||
|
|
||||||
function toAdd(obj) {
|
function toAdd(obj) {
|
||||||
var url = '${ctx}/appVersionInfo/add';
|
|
||||||
<%--if (obj != undefined) {--%>
|
$.ajax({
|
||||||
<%-- url = "${ctx}/appVersionInfo/edit/" + obj.id--%>
|
url: '${ctx}/channel/update/'+obj.merchantCode,
|
||||||
<%--}--%>
|
type: 'get',
|
||||||
var index = layer.open({
|
dataType: 'JSON',
|
||||||
type: 2
|
contentType: "application/json",
|
||||||
, shade: 0.5
|
success: function (res) {
|
||||||
, maxmin: true
|
if (res.code == 200) {
|
||||||
, content: url
|
layer.msg(res.data, {
|
||||||
, area: ['550px', '600px']
|
icon: 1
|
||||||
});
|
});
|
||||||
|
} else {
|
||||||
|
layer.msg(res.data, {
|
||||||
|
icon: 5
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
function del(obj) {
|
function del(obj) {
|
||||||
|
|||||||
@@ -3,16 +3,19 @@ package cn.pluss.platform.entity;
|
|||||||
import com.baomidou.mybatisplus.annotation.FieldStrategy;
|
import com.baomidou.mybatisplus.annotation.FieldStrategy;
|
||||||
import com.baomidou.mybatisplus.annotation.TableField;
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
import com.baomidou.mybatisplus.annotation.TableId;
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import org.springframework.format.annotation.DateTimeFormat;
|
import org.springframework.format.annotation.DateTimeFormat;
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author DJH
|
* @author DJH
|
||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
|
@TableName("tb_pluss_cash")
|
||||||
public class Cash {
|
public class Cash {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -153,5 +156,8 @@ public class Cash {
|
|||||||
*/
|
*/
|
||||||
@TableField(insertStrategy = FieldStrategy.NEVER, updateStrategy = FieldStrategy.NEVER)
|
@TableField(insertStrategy = FieldStrategy.NEVER, updateStrategy = FieldStrategy.NEVER)
|
||||||
private BigDecimal virRealCashAmt;
|
private BigDecimal virRealCashAmt;
|
||||||
|
|
||||||
|
@TableField("cashStatus")
|
||||||
|
private String cashStatus;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -95,12 +95,12 @@ public class UserInfo {
|
|||||||
* 用户注册选择身份
|
* 用户注册选择身份
|
||||||
*/
|
*/
|
||||||
@TableField(exist = false)
|
@TableField(exist = false)
|
||||||
private String typeCode;
|
private String typeCode = "MC";
|
||||||
/**
|
/**
|
||||||
* 费率
|
* 费率
|
||||||
*/
|
*/
|
||||||
@TableField(exist = false)
|
@TableField(exist = false)
|
||||||
private String currentFee;
|
private String currentFee = "0.38";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 生成一个新的用户对象
|
* 生成一个新的用户对象
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
package cn.pluss.platform.entity;
|
package cn.pluss.platform.entity;
|
||||||
|
|
||||||
|
import cn.pluss.platform.vo.CashStatusVO;
|
||||||
import com.alibaba.fastjson.annotation.JSONField;
|
import com.alibaba.fastjson.annotation.JSONField;
|
||||||
import com.baomidou.mybatisplus.annotation.TableField;
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
import com.baomidou.mybatisplus.annotation.TableName;
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
@@ -7,6 +8,7 @@ import lombok.Data;
|
|||||||
import org.springframework.format.annotation.DateTimeFormat;
|
import org.springframework.format.annotation.DateTimeFormat;
|
||||||
|
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 用户推广费率对照表
|
* 用户推广费率对照表
|
||||||
@@ -40,4 +42,11 @@ public class UserPromotion {
|
|||||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||||
@JSONField(format = "yyyy-MM-dd HH:mm:ss")
|
@JSONField(format = "yyyy-MM-dd HH:mm:ss")
|
||||||
private Date updateTime;
|
private Date updateTime;
|
||||||
|
|
||||||
|
@TableField(exist = false)
|
||||||
|
private List<CashStatusVO> cashStatusVOList;
|
||||||
|
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String loginName;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,19 @@
|
|||||||
|
package cn.pluss.platform.vo;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class CashStatusVO implements Serializable {
|
||||||
|
|
||||||
|
private String userType;
|
||||||
|
|
||||||
|
private String userId;
|
||||||
|
|
||||||
|
private String loginName;
|
||||||
|
|
||||||
|
|
||||||
|
private String status;
|
||||||
|
}
|
||||||
|
|
||||||
@@ -2,7 +2,9 @@ package cn.pluss.platform.cash.impl;
|
|||||||
|
|
||||||
import cn.hutool.core.date.DateUtil;
|
import cn.hutool.core.date.DateUtil;
|
||||||
import cn.hutool.core.util.DesensitizedUtil;
|
import cn.hutool.core.util.DesensitizedUtil;
|
||||||
|
import cn.hutool.core.util.ObjectUtil;
|
||||||
import cn.hutool.crypto.SecureUtil;
|
import cn.hutool.crypto.SecureUtil;
|
||||||
|
import cn.hutool.json.JSONUtil;
|
||||||
import cn.pluss.platform.ali.AlipayService;
|
import cn.pluss.platform.ali.AlipayService;
|
||||||
import cn.pluss.platform.cash.CashService;
|
import cn.pluss.platform.cash.CashService;
|
||||||
import cn.pluss.platform.cashAccount.CashAccountService;
|
import cn.pluss.platform.cashAccount.CashAccountService;
|
||||||
@@ -14,11 +16,13 @@ import cn.pluss.platform.fans.FansService;
|
|||||||
import cn.pluss.platform.mapper.CashMapper;
|
import cn.pluss.platform.mapper.CashMapper;
|
||||||
import cn.pluss.platform.mapper.FansMapper;
|
import cn.pluss.platform.mapper.FansMapper;
|
||||||
import cn.pluss.platform.mapper.MerchantProfitMapper;
|
import cn.pluss.platform.mapper.MerchantProfitMapper;
|
||||||
|
import cn.pluss.platform.mapper.UserPromotionMapper;
|
||||||
import cn.pluss.platform.merchantProfit.MerchantProfitService;
|
import cn.pluss.platform.merchantProfit.MerchantProfitService;
|
||||||
import cn.pluss.platform.userApp.UserAppService;
|
import cn.pluss.platform.userApp.UserAppService;
|
||||||
import cn.pluss.platform.userInfo.UserInfoService;
|
import cn.pluss.platform.userInfo.UserInfoService;
|
||||||
import cn.pluss.platform.user.impl.GeneralPushUtil;
|
import cn.pluss.platform.user.impl.GeneralPushUtil;
|
||||||
import cn.pluss.platform.util.StringUtil;
|
import cn.pluss.platform.util.StringUtil;
|
||||||
|
import cn.pluss.platform.vo.CashStatusVO;
|
||||||
import com.alibaba.fastjson.JSONObject;
|
import com.alibaba.fastjson.JSONObject;
|
||||||
import com.baomidou.mybatisplus.core.conditions.Wrapper;
|
import com.baomidou.mybatisplus.core.conditions.Wrapper;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
@@ -351,10 +355,41 @@ public class CashServiceImpl extends ServiceImpl<CashMapper, Cash> implements Ca
|
|||||||
if (StringUtil.isNotEmpty(tokenUa.getLogo())) {
|
if (StringUtil.isNotEmpty(tokenUa.getLogo())) {
|
||||||
cash.setLogo(tokenUa.getLogo());
|
cash.setLogo(tokenUa.getLogo());
|
||||||
}
|
}
|
||||||
|
//增加用户层级
|
||||||
|
LinkedList<CashStatusVO> cashMap = getCashMap(String.valueOf(cash.getUserId()), new LinkedList<>());
|
||||||
|
cash.setCashStatus(JSONUtil.toJsonStr(cashMap));
|
||||||
save(cash);
|
save(cash);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
@Lazy
|
||||||
|
UserPromotionMapper userPromotionMapper;
|
||||||
|
public LinkedList<CashStatusVO> getCashMap(String userId, LinkedList<CashStatusVO> list){
|
||||||
|
UserPromotion promotion=userPromotionMapper.selectByUserId(userId);
|
||||||
|
if(ObjectUtil.isNotEmpty(promotion)&&"0".equals(promotion.getParentUserId())){
|
||||||
|
CashStatusVO cashStatus=new CashStatusVO();
|
||||||
|
cashStatus.setUserId(promotion.getUserId().toString());
|
||||||
|
cashStatus.setUserType(promotion.getTypeCode());
|
||||||
|
cashStatus.setStatus("0");
|
||||||
|
cashStatus.setLoginName(promotion.getLoginName());
|
||||||
|
list.add(cashStatus);
|
||||||
|
promotion.setCashStatusVOList(list);
|
||||||
|
return list;
|
||||||
|
|
||||||
|
}
|
||||||
|
if("AG".equals(promotion.getTypeCode())||"SO".equals(promotion.getTypeCode())||"FO".equals(promotion.getTypeCode())){
|
||||||
|
CashStatusVO cashStatus=new CashStatusVO();
|
||||||
|
cashStatus.setUserId(promotion.getUserId().toString());
|
||||||
|
cashStatus.setUserType(promotion.getTypeCode());
|
||||||
|
cashStatus.setStatus("0");
|
||||||
|
cashStatus.setLoginName(promotion.getLoginName());
|
||||||
|
list.add(cashStatus);
|
||||||
|
promotion.setCashStatusVOList(list);
|
||||||
|
}
|
||||||
|
getCashMap(promotion.getParentUserId(),list);
|
||||||
|
return list;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Cash queryCash(Cash cash) {
|
public Cash queryCash(Cash cash) {
|
||||||
return baseMapper.selectOne(new QueryWrapper<>(cash));
|
return baseMapper.selectOne(new QueryWrapper<>(cash));
|
||||||
|
|||||||
@@ -340,7 +340,7 @@ public class YSAuditServiceV3 implements cn.pluss.platform.channel.ys.YSAuditSer
|
|||||||
if (existD1 != null && !MerchantChannelStatus.AUDIT_STATUS_SUCCESS.equals(existD1.getStatus()) && !MerchantChannelStatus.AUDIT_STATUS_SIGNED.equals(existD1.getStatus()) && !MerchantChannelStatus.AUDIT_STATUS_WAITING_SIGN.equals(existD1.getStatus())) {
|
if (existD1 != null && !MerchantChannelStatus.AUDIT_STATUS_SUCCESS.equals(existD1.getStatus()) && !MerchantChannelStatus.AUDIT_STATUS_SIGNED.equals(existD1.getStatus()) && !MerchantChannelStatus.AUDIT_STATUS_WAITING_SIGN.equals(existD1.getStatus())) {
|
||||||
throw new MsgException("当前D1通道存在未进件完成的的进件数据,不允许进件银盛");
|
throw new MsgException("当前D1通道存在未进件完成的的进件数据,不允许进件银盛");
|
||||||
}
|
}
|
||||||
|
//TODO 非营业执照商户同一结算人仅可申请两次实时到账
|
||||||
if (MERCH_TYPE_MICRO.equals(mbi.getMerchantType())) {
|
if (MERCH_TYPE_MICRO.equals(mbi.getMerchantType())) {
|
||||||
int ysCount = accountMapper.selectYSAuditSmallCount(mbi.getUserId());
|
int ysCount = accountMapper.selectYSAuditSmallCount(mbi.getUserId());
|
||||||
if (ysCount >= 2) {
|
if (ysCount >= 2) {
|
||||||
@@ -429,7 +429,11 @@ public class YSAuditServiceV3 implements cn.pluss.platform.channel.ys.YSAuditSer
|
|||||||
CustInfo custInfo = new CustInfo();
|
CustInfo custInfo = new CustInfo();
|
||||||
mercInfo.setCustInfo(custInfo);
|
mercInfo.setCustInfo(custInfo);
|
||||||
//商户基本信息
|
//商户基本信息
|
||||||
custInfo.setMercName(mbi.getMerchantName());
|
if ("1".equals(mbi.getMerchantType())) {
|
||||||
|
custInfo.setMercName(mbi.getAlias());
|
||||||
|
}else {
|
||||||
|
custInfo.setMercName(mbi.getMerchantName());
|
||||||
|
}
|
||||||
custInfo.setMercShortName(mbi.getAlias());
|
custInfo.setMercShortName(mbi.getAlias());
|
||||||
|
|
||||||
switch (mbi.getMerchantType()) {
|
switch (mbi.getMerchantType()) {
|
||||||
|
|||||||
@@ -224,6 +224,15 @@ public class MerchantRateNewServiceImpl extends ServiceImpl<MerchantRateNewMappe
|
|||||||
case 5:
|
case 5:
|
||||||
result=lklChangeRateNewService.getDefaultRate();
|
result=lklChangeRateNewService.getDefaultRate();
|
||||||
break;
|
break;
|
||||||
|
case 6:
|
||||||
|
MerchantRateNew merchantRateNew = new MerchantRateNew();
|
||||||
|
merchantRateNew.setChannel(6);
|
||||||
|
merchantRateNew.setWxRate(38);
|
||||||
|
merchantRateNew.setAliRate(38);
|
||||||
|
merchantRateNew.setBankRate(61);
|
||||||
|
merchantRateNew.setBankRateLarge(61);
|
||||||
|
result = ysChangeRateService.getDefaultRate();
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
MsgException.throwException("通道异常!");
|
MsgException.throwException("通道异常!");
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -430,7 +430,7 @@ public class MerchantServiceImpl implements MerchantService {
|
|||||||
//拉卡拉的主扫接口
|
//拉卡拉的主扫接口
|
||||||
result=lkLPayServiceImpl.tradePay(order,channel,merchant);
|
result=lkLPayServiceImpl.tradePay(order,channel,merchant);
|
||||||
} else if (channel.getChannel() == 6) {
|
} else if (channel.getChannel() == 6) {
|
||||||
|
result = ysPayOldService.tradePay(order, channel,merchant);
|
||||||
}else {
|
}else {
|
||||||
MsgException.throwException("未知通道");
|
MsgException.throwException("未知通道");
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
package cn.pluss.platform.merchantChannelStatus;
|
package cn.pluss.platform.merchantChannelStatus;
|
||||||
|
|
||||||
|
import cn.hutool.core.util.ObjectUtil;
|
||||||
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.*;
|
import cn.pluss.platform.vo.*;
|
||||||
@@ -239,15 +240,22 @@ public interface MerchantChannelStatusService extends IService<MerchantChannelSt
|
|||||||
}
|
}
|
||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
default void updateValid(String merchantCode){
|
default void updateValid(String merchantCode){
|
||||||
|
|
||||||
|
//当前通道
|
||||||
MerchantChannelStatus validData = getValidData(merchantCode);
|
MerchantChannelStatus validData = getValidData(merchantCode);
|
||||||
|
|
||||||
UpdateWrapper<MerchantChannelStatus> UpdateWrapper1 = new UpdateWrapper<MerchantChannelStatus>();
|
validData.setValid(0);
|
||||||
UpdateWrapper1.eq("id", validData.getId());
|
getBaseMapper().updateById(validData);
|
||||||
UpdateWrapper1.set("valid",0);
|
|
||||||
|
|
||||||
UpdateWrapper<MerchantChannelStatus> UpdateWrapper = new UpdateWrapper<MerchantChannelStatus>();
|
|
||||||
UpdateWrapper.eq("merchantCode", merchantCode)
|
|
||||||
.eq("valid",-1);
|
QueryWrapper<MerchantChannelStatus> queryWrapper=new QueryWrapper<>();
|
||||||
UpdateWrapper.set("valid",1);
|
queryWrapper.eq("merchantCode", merchantCode);
|
||||||
|
queryWrapper.ne("id",validData.getId());
|
||||||
|
MerchantChannelStatus status=getBaseMapper().selectOne(queryWrapper);
|
||||||
|
if(ObjectUtil.isNotEmpty(status)){
|
||||||
|
status.setValid(1);
|
||||||
|
getBaseMapper().update(status,queryWrapper);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -173,7 +173,7 @@ public class MerchantChannelStatusServiceImpl extends ServiceImpl<MerchantChanne
|
|||||||
case MerchantChannelStatus.AUDIT_STATUS_SUCCESS:
|
case MerchantChannelStatus.AUDIT_STATUS_SUCCESS:
|
||||||
// d1已进件通过, 此时说明需求进件的是银盛
|
// d1已进件通过, 此时说明需求进件的是银盛
|
||||||
MerchantBaseInfo mbi = mbiService.getMerchantBaseInfoByMerchantCode(merchantCode);
|
MerchantBaseInfo mbi = mbiService.getMerchantBaseInfoByMerchantCode(merchantCode);
|
||||||
|
//TODO 非营业执照商户同一结算人仅可申请两次实时到账
|
||||||
int ysCount = accountMapper.selectYSAuditSmallCount(mbi.getUserId());
|
int ysCount = accountMapper.selectYSAuditSmallCount(mbi.getUserId());
|
||||||
if (ysCount >= 2) {
|
if (ysCount >= 2) {
|
||||||
throw new MsgException("非营业执照商户同一结算人仅可申请两次实时到账");
|
throw new MsgException("非营业执照商户同一结算人仅可申请两次实时到账");
|
||||||
|
|||||||
@@ -913,7 +913,10 @@ public class MerchantOrderServiceImpl extends ServiceImpl<MerchantOrderMapper, M
|
|||||||
}else if("5".equals(order.getAisleSwitch())){
|
}else if("5".equals(order.getAisleSwitch())){
|
||||||
JSONObject object=lkLPayServiceImpl.tradePay(dto,order);
|
JSONObject object=lkLPayServiceImpl.tradePay(dto,order);
|
||||||
return scanPay(object,order);
|
return scanPay(object,order);
|
||||||
} else{
|
} else if("6".equals(order.getAisleSwitch())){
|
||||||
|
JSONObject object = ysPayOldService.tradePay(dto, order);
|
||||||
|
return scanPay(object, order);
|
||||||
|
}else{
|
||||||
throw new MsgException("未知通道!");
|
throw new MsgException("未知通道!");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -2387,6 +2390,34 @@ public class MerchantOrderServiceImpl extends ServiceImpl<MerchantOrderMapper, M
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
case 6:
|
||||||
|
order.setAisleSwitch("6");
|
||||||
|
|
||||||
|
order.setSettlementType(SettleTypeEnum.D0.getValue());
|
||||||
|
order.setChannelRate(YsOldConstants.CHANNEL_WECHAT_ALIPAY_BANK_COST_RATE.multiply(new BigDecimal(10000)));
|
||||||
|
order.setChannelFee(new BigDecimal(order.getConsumeFee().toString()).multiply(YsOldConstants.CHANNEL_WECHAT_ALIPAY_BANK_COST_RATE).setScale(2,BigDecimal.ROUND_HALF_UP));
|
||||||
|
if(params.get("payWay") == null){
|
||||||
|
orderPrefix = "YS_";
|
||||||
|
}else{
|
||||||
|
if("WXZF".equalsIgnoreCase((String) params.get("payWay"))){
|
||||||
|
orderPrefix = "YS_W_";
|
||||||
|
order.setPayTypeCode(Constant.PAY_TYPE_WECHAT);
|
||||||
|
order.setPayTypeName(Constant.PAY_TYPE_NAME_WECHAT);
|
||||||
|
}else if("ZFBZF".equalsIgnoreCase((String)params.get("payWay"))){
|
||||||
|
orderPrefix = "YS_Z_";
|
||||||
|
order.setPayTypeCode(Constant.PAY_TYPE_ALIPAY);
|
||||||
|
order.setPayTypeName(Constant.PAY_TYPE_NAME_ALIPAY);
|
||||||
|
}else if("UNIONPAY".equalsIgnoreCase((String)params.get("payWay"))){
|
||||||
|
if(order.getConsumeFee() > 1000.0d){
|
||||||
|
order.setChannelRate(YsOldConstants.CREDIT_DEBIT_CARD_BANK_RATE_LARGE.multiply(new BigDecimal(10000)));
|
||||||
|
order.setChannelFee(new BigDecimal(order.getConsumeFee().toString()).multiply(YsOldConstants.CREDIT_DEBIT_CARD_BANK_RATE_LARGE).setScale(2,BigDecimal.ROUND_HALF_UP));
|
||||||
|
}
|
||||||
|
orderPrefix = "YS_Y_";
|
||||||
|
order.setPayTypeCode(Constant.PAY_TYPE_YSFPAY);
|
||||||
|
order.setPayTypeName(Constant.PAY_TYPE_NAME_YSFPAY);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
throw new MsgException("无效的通道");
|
throw new MsgException("无效的通道");
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -440,6 +440,9 @@ public class ApiPayServiceImpl implements ApiPayService {
|
|||||||
}else if(channel.getChannel()==5){
|
}else if(channel.getChannel()==5){
|
||||||
JSONObject res = lklPayService.tradePay(order,channel,merchant);
|
JSONObject res = lklPayService.tradePay(order,channel,merchant);
|
||||||
return assemblePayRresultParam(res, order);
|
return assemblePayRresultParam(res, order);
|
||||||
|
}else if (channel.getChannel() == 6){
|
||||||
|
JSONObject res = ysPayOldService.tradePay(order, channel,merchant);
|
||||||
|
return assemblePayRresultParam(res, order);
|
||||||
}
|
}
|
||||||
return ResultGenerator.genFailJsonResult("未知的通道!");
|
return ResultGenerator.genFailJsonResult("未知的通道!");
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
|||||||
@@ -217,7 +217,9 @@ public class UserInfoServiceImpl extends BaseUserInfoService {
|
|||||||
|
|
||||||
if(ObjectUtil.isNotEmpty(promotion)){
|
if(ObjectUtil.isNotEmpty(promotion)){
|
||||||
if("MG".equals(promotion.getTypeCode())||"FB".equals(promotion.getTypeCode())||
|
if("MG".equals(promotion.getTypeCode())||"FB".equals(promotion.getTypeCode())||
|
||||||
"SB".equals(promotion.getTypeCode())||"1".equals(promotion.getIsExtend())){
|
"SB".equals(promotion.getTypeCode())||"1".equals(promotion.getIsExtend())||
|
||||||
|
"2".equals(promotion.getIsExtend())){
|
||||||
|
|
||||||
return promotion;
|
return promotion;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -114,12 +114,6 @@ public class UserInfoServiceNewImpl extends BaseUserInfoService {
|
|||||||
userApp.setParentId(new Long(244));
|
userApp.setParentId(new Long(244));
|
||||||
userApp.setInviteNum(getRandomNum());
|
userApp.setInviteNum(getRandomNum());
|
||||||
//查找代理
|
//查找代理
|
||||||
if (userInfo.getTypeCode() == null){
|
|
||||||
userInfo.setTypeCode("MG");
|
|
||||||
}
|
|
||||||
if (userInfo.getCurrentFee() == null){
|
|
||||||
userInfo.setCurrentFee("0.38");
|
|
||||||
}
|
|
||||||
UserPromotion promotion= getUserPromotionByUserId(String.valueOf(244));
|
UserPromotion promotion= getUserPromotionByUserId(String.valueOf(244));
|
||||||
String parenId=promotion.getUserId().toString();
|
String parenId=promotion.getUserId().toString();
|
||||||
UserPromotion promotionNew = new UserPromotion();
|
UserPromotion promotionNew = new UserPromotion();
|
||||||
@@ -206,11 +200,10 @@ public class UserInfoServiceNewImpl extends BaseUserInfoService {
|
|||||||
|
|
||||||
if(ObjectUtil.isNotEmpty(promotion)){
|
if(ObjectUtil.isNotEmpty(promotion)){
|
||||||
if("MG".equals(promotion.getTypeCode())||"FB".equals(promotion.getTypeCode())||
|
if("MG".equals(promotion.getTypeCode())||"FB".equals(promotion.getTypeCode())||
|
||||||
"SB".equals(promotion.getTypeCode())||"1".equals(promotion.getIsExtend())){
|
"SB".equals(promotion.getTypeCode())||"1".equals(promotion.getIsExtend())||
|
||||||
|
"2".equals(promotion.getIsExtend())){
|
||||||
return promotion;
|
return promotion;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
getUserPromotionByUserId(promotion.getParentUserId());
|
getUserPromotionByUserId(promotion.getParentUserId());
|
||||||
return null;
|
return null;
|
||||||
|
|||||||
@@ -154,7 +154,12 @@ public class YsPayOldServiceImpl extends YsPayServiceImpl{
|
|||||||
if(StringUtil.isNotEmpty(channel.getMercName())){
|
if(StringUtil.isNotEmpty(channel.getMercName())){
|
||||||
//reqData.put("seller_name",channel.getMercName());
|
//reqData.put("seller_name",channel.getMercName());
|
||||||
}
|
}
|
||||||
reqData.put("business_code",YsBusinessCodeEnum.getCodeValue(channel.getSettlementType()));
|
if (channel.getChannel() == 4) {
|
||||||
|
reqData.put("business_code", YsBusinessCodeEnum.getCodeValue(channel.getSettlementType()));
|
||||||
|
}else {
|
||||||
|
reqData.put("business_code", YsBusinessCodeEnum.D1.getCode());
|
||||||
|
}
|
||||||
|
|
||||||
merchant.setChannelLimitPay(reqData,channel.getChannel());
|
merchant.setChannelLimitPay(reqData,channel.getChannel());
|
||||||
YsEnum ysEnum = null;
|
YsEnum ysEnum = null;
|
||||||
if(StringUtil.isNotEmpty(order.getScanType()) && "01".equals(order.getScanType())){
|
if(StringUtil.isNotEmpty(order.getScanType()) && "01".equals(order.getScanType())){
|
||||||
@@ -208,7 +213,7 @@ public class YsPayOldServiceImpl extends YsPayServiceImpl{
|
|||||||
String sub_code = respData.getString("sub_code");
|
String sub_code = respData.getString("sub_code");
|
||||||
String sub_msg = respData.getString("sub_msg");
|
String sub_msg = respData.getString("sub_msg");
|
||||||
if("4335".equals(sub_code) && StringUtil.isNotEmpty(sub_msg) && sub_msg.contains("商户需补齐相关资料")){
|
if("4335".equals(sub_code) && StringUtil.isNotEmpty(sub_msg) && sub_msg.contains("商户需补齐相关资料")){
|
||||||
MsgException.throwException("D0实时到账:商户未在银收客APP-商户认证-微信认证(支付宝认证)内完成授权,暂时无法收款");
|
MsgException.throwException("商户未在银收客APP-商户认证-微信认证(支付宝认证)内完成授权,暂时无法收款");
|
||||||
}else if("4335".equals(sub_code) && StringUtil.isNotEmpty(sub_msg) && sub_msg.contains("金额超限")){
|
}else if("4335".equals(sub_code) && StringUtil.isNotEmpty(sub_msg) && sub_msg.contains("金额超限")){
|
||||||
MsgException.throwException("单笔交易金额超限");
|
MsgException.throwException("单笔交易金额超限");
|
||||||
}else{
|
}else{
|
||||||
@@ -251,6 +256,8 @@ public class YsPayOldServiceImpl extends YsPayServiceImpl{
|
|||||||
return object;
|
return object;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 反扫
|
* 反扫
|
||||||
* @param merchantOrderDTO
|
* @param merchantOrderDTO
|
||||||
|
|||||||
@@ -1709,6 +1709,8 @@ public class MerchantController {
|
|||||||
unionInfo = ysPayOldService.getUnionInfo(userAuthCode, payMentApp, null);
|
unionInfo = ysPayOldService.getUnionInfo(userAuthCode, payMentApp, null);
|
||||||
} else if (channel.getChannel() == 5) {
|
} else if (channel.getChannel() == 5) {
|
||||||
unionInfo=lkLPayService.getUnionInfo(userAuthCode,payMentApp,channel.getMerchantCode());
|
unionInfo=lkLPayService.getUnionInfo(userAuthCode,payMentApp,channel.getMerchantCode());
|
||||||
|
} else if (channel.getChannel() == 6) {
|
||||||
|
unionInfo = ysPayOldService.getUnionInfo(userAuthCode, payMentApp, null);
|
||||||
} else {
|
} else {
|
||||||
view.addObject("error", "未知通道类型");
|
view.addObject("error", "未知通道类型");
|
||||||
return view;
|
return view;
|
||||||
|
|||||||
Reference in New Issue
Block a user