后台迁移相关

This commit is contained in:
liuyingfang
2023-10-09 13:47:13 +08:00
parent e27fa5a8e1
commit ce3dfb492d
16 changed files with 351 additions and 105 deletions

View File

@@ -1,5 +1,6 @@
package com.chaozhanggui.admin.system.controller;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.chaozhanggui.admin.system.service.MerchantChannelStatusService;
import com.chaozhanggui.common.system.config.RespBody;
import com.chaozhanggui.merchant.service.MerchantService;
@@ -7,6 +8,8 @@ import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import java.util.HashMap;
import java.util.Map;
/**
* 商户通道相关信息
@@ -128,25 +131,69 @@ public class MerchantChannelStatusController {
// }
/**
* 后台进件
* 后台进件/驳回
* @param userId
* @param channelId
* @param merchantCode
* @return
*/
@GetMapping(value = "/manualMerchantIncom/{userId}/{channelId}/{merchantCode}")
public RespBody manualMerchantIncome(@PathVariable("userId") String userId, @PathVariable("channelId") String channelId, @PathVariable("merchantCode") String merchantCode){
merchantService.merchantAudit(userId,channelId);
return new RespBody ();
@GetMapping(value = "/manualMerchantIncom")
public RespBody manualMerchantIncome(@RequestParam("userId") String userId, @RequestParam("channelId") String channelId,
@RequestParam("merchantCode") String merchantCode,@RequestParam("type")String type,
@RequestParam("errMsg")String errMsg){
if ("1".equals(type)) {
//进件
merchantService.merchantAudit(userId, channelId);
}else if ("2".equals(type)){
//驳回
merchantService.rejectAudit(merchantCode,errMsg);
}
return new RespBody ("000000");
}
/**
* 进件审核驳回
*/
// @GetMapping(value = "/rejectAudit/{userId}")
// @ResponseBody
// public Map<String, Object> rejectAudit(@PathVariable("userId") Integer userId, String errMsg) {
// UserApp userApp = new UserApp().setUserId(userId.longValue()).setUserType("promoter");
// userApp = userAppService.queryUserApp(userApp);
//
// Map<String, Object> result = new HashMap<>(2);
// try {
// mcsService.rejectAudit(userApp.getMerchantCode(), errMsg);
// result.put("code", "1");
// result.put("msg", "处理成功");
// } catch (Exception e) {
// result.put("code", "0");
// result.put("msg", e.getMessage());
// }
//
// return result;
// }
/**
* 通道进件信息
* @return
*/
@GetMapping("/messageChannel/{userId}")
public RespBody messageChannel(@PathVariable("userId") Integer userId){
return merchantChannelStatusService.messageChannel(userId);
@GetMapping("/messageChannel/{userId}/{merchantCode}")
public RespBody messageChannel(@PathVariable("userId") Integer userId,@PathVariable("merchantCode")String merchantCode){
return merchantChannelStatusService.messageChannel(userId, merchantCode);
}
/**
* ip记录
* @param userId
* @return
*/
@GetMapping("/userIpPage")
public RespBody userIpPageInfo(@RequestParam("userId") Integer userId, @RequestParam("currPage") Integer currPage,
@RequestParam("size") Integer size) {
return merchantChannelStatusService.userIpPageInfo(userId,currPage,size);
}
}

View File

@@ -2,23 +2,18 @@ package com.chaozhanggui.admin.system.service;
import cn.hutool.core.util.ObjectUtil;
import com.chaozhanggui.common.system.config.RespBody;
import com.chaozhanggui.dao.system.dao.TbPlussAccountMapper;
import com.chaozhanggui.dao.system.dao.TbPlussMerchantChannelMapper;
import com.chaozhanggui.dao.system.dao.TbPlussMerchantChannelStatusMapper;
import com.chaozhanggui.dao.system.dao.TbPlussMerchantRejectDescMapper;
import com.chaozhanggui.dao.system.entity.TbPlussAccount;
import com.chaozhanggui.dao.system.entity.TbPlussMerchantChannel;
import com.chaozhanggui.dao.system.entity.TbPlussMerchantChannelStatus;
import com.chaozhanggui.dao.system.entity.TbPlussMerchantRejectDesc;
import com.chaozhanggui.dao.system.dao.*;
import com.chaozhanggui.dao.system.entity.*;
import com.chaozhanggui.merchant.service.sxf.SxfMerchantAuditService;
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.web.bind.annotation.RequestParam;
import javax.annotation.Resource;
import java.util.HashMap;
import java.util.List;
import java.util.Objects;
import java.util.*;
/**
* @author lyf
@@ -105,78 +100,80 @@ public class MerchantChannelStatusService {
private TbPlussMerchantChannelMapper merchantChannelMapper;
@Resource
private TbPlussAccountMapper accountMapper;
@Resource
private TbPlussOperationRecordMapper operationRecordMapper;
/**
* 后台进件
* @param userId
* @param channelId
* @param merchantCode
* @return
*/
public RespBody manualMerchantIncome(Integer userId, String channelId, String merchantCode){
//检查进件通道
if (ObjectUtil.isEmpty(channelId)){
return new RespBody("000080");
}
TbPlussMerchantChannelStatus merchantChannelStatus = merchantChannelStatusMapper.selectByPrimaryKey(Integer.valueOf(channelId));
if (ObjectUtil.isEmpty(merchantChannelStatus)){
return new RespBody("000081");
}
//通道互不干扰
if ("1".equals(channelId)) {
TbPlussMerchantChannelStatus sxfChannel = merchantChannelStatusMapper.selectByMerchantCode(merchantCode, 3);
if (sxfChannel != null || Objects.equals(sxfChannel.getChannel(),3)){
return new RespBody("000082");
}
}
if ("3".equals(channelId)) {
TbPlussMerchantChannelStatus ryxChannel = merchantChannelStatusMapper.selectByMerchantCode(merchantCode, 1);
if (ryxChannel != null && Objects.equals(ryxChannel.getChannel(), 1)) {
return new RespBody("000083");
}
}
//先查询该通道下是否有记录
TbPlussMerchantChannelStatus mcs = merchantChannelStatusMapper.selectByMerchantCode(merchantCode, Integer.valueOf(channelId));
if (mcs == null) {
return new RespBody("000084");
} else {
if (mcs.getChannel() != null) {
if (Integer.parseInt(channelId) == mcs.getChannel()
&& TbPlussMerchantChannelStatus.isAudited(mcs)) {
return new RespBody("000085");
}
}
}
TbPlussMerchantChannelStatus.checkCanAudit(mcs);
//选择通道
switch (channelId) {
case "1":
// 随行付
sxfMerchantAuditService.merchantAudit(String.valueOf(userId), false);
break;
// case "2":
// // 乐刷,暂不支持
// leshuaMerchantAuditService.merchantAudit(userId, false);
// /**
// * 后台进件
// * @param userId
// * @param channelId
// * @param merchantCode
// * @return
// */
// public RespBody manualMerchantIncome(Integer userId, String channelId, String merchantCode){
// //检查进件通道
// if (ObjectUtil.isEmpty(channelId)){
// return new RespBody("000080");
// }
// TbPlussMerchantChannelStatus merchantChannelStatus = merchantChannelStatusMapper.selectByPrimaryKey(Integer.valueOf(channelId));
// if (ObjectUtil.isEmpty(merchantChannelStatus)){
// return new RespBody("000081");
// }
// //通道互不干扰
// if ("1".equals(channelId)) {
// TbPlussMerchantChannelStatus sxfChannel = merchantChannelStatusMapper.selectByMerchantCode(merchantCode, 3);
// if (sxfChannel != null || Objects.equals(sxfChannel.getChannel(),3)){
// return new RespBody("000082");
// }
// }
// if ("3".equals(channelId)) {
// TbPlussMerchantChannelStatus ryxChannel = merchantChannelStatusMapper.selectByMerchantCode(merchantCode, 1);
// if (ryxChannel != null && Objects.equals(ryxChannel.getChannel(), 1)) {
// return new RespBody("000083");
// }
// }
// //先查询该通道下是否有记录
// TbPlussMerchantChannelStatus mcs = merchantChannelStatusMapper.selectByMerchantCode(merchantCode, Integer.valueOf(channelId));
// if (mcs == null) {
// return new RespBody("000084");
// } else {
// if (mcs.getChannel() != null) {
// if (Integer.parseInt(channelId) == mcs.getChannel()
// && TbPlussMerchantChannelStatus.isAudited(mcs)) {
// return new RespBody("000085");
// }
// }
// }
// TbPlussMerchantChannelStatus.checkCanAudit(mcs);
// //选择通道
// switch (channelId) {
// case "1":
// // 随行付
// sxfMerchantAuditService.merchantAudit(String.valueOf(userId), false);
// break;
// case "3":
// // 瑞银信
// ryxMerchantAuditService.merchantAudit(userId, false);
// break;
// case "4":
// // 银盛
// ysAuditServiceV3.merchantAuditV3(userId, false, 4);
// break;
// case "5":
// laKalaInterface.createTuoKeInfo(userId);
// break;
// case "6":
// ysAuditServiceV3.merchantAuditV3(userId, false, 6);
// break;
// default:
// MsgException.throwException("未知的进件通道");
}
return new RespBody("000000");
}
//// case "2":
//// // 乐刷,暂不支持
//// leshuaMerchantAuditService.merchantAudit(userId, false);
//// break;
//// case "3":
//// // 瑞银信
//// ryxMerchantAuditService.merchantAudit(userId, false);
//// break;
//// case "4":
//// // 银盛
//// ysAuditServiceV3.merchantAuditV3(userId, false, 4);
//// break;
//// case "5":
//// laKalaInterface.createTuoKeInfo(userId);
//// break;
//// case "6":
//// ysAuditServiceV3.merchantAuditV3(userId, false, 6);
//// break;
//// default:
//// MsgException.throwException("未知的进件通道");
// }
// return new RespBody("000000");
// }
public TbPlussMerchantChannelStatus getValidData(String merchantCode){
if (StringUtils.isEmpty(merchantCode)) {
@@ -191,18 +188,79 @@ public class MerchantChannelStatusService {
return merchantChannelStatusMapper.getIncomingInfoAnother(merchantCode);
}
public RespBody messageChannel(Integer userId){
HashMap<String, List<Object>> map = new HashMap<>();
public RespBody messageChannel(Integer userId,String merchantCode){
//获取审核备注组
List<TbPlussMerchantRejectDesc> merchantRejectDescs = merchantRejectDescMapper.selectRejectList();
//通道选择
List<TbPlussMerchantChannel> merchantChannels = merchantChannelMapper.selectAll();
//默认结算方式
TbPlussAccount account = accountMapper.selectDefault(userId);
//初始化
HashMap<String, Object> channelMap = new HashMap<>();
channelMap.put("reviewRemarks",merchantRejectDescs);
channelMap.put("merchantChannels",merchantChannels);
//TODO
List<HashMap> merchantChannelMessage = new ArrayList<>();
//D1(已完成)
List<TbPlussMerchantChannelStatus> channelD1 = merchantChannelStatusMapper.getByCodeAndChannelFlagList(merchantCode, "D1");
if (channelD1.size()>1){
return new RespBody("000087");
}
if (channelD1.size() != 0) {
HashMap<String, Object> d1 = new HashMap<>();
//审核备注
d1.put("remake", channelD1.get(0).getRemark());
d1.put("status",channelD1.get(0).getStatus());
d1.put("channel",channelD1.get(0).getChannel());
d1.put("valid",account == null? null:account.getChanneltype());
d1.put("thirdStatus",channelD1.get(0).getThirdstatus());
merchantChannelMessage.add(d1);
}
return new RespBody();
//D0(已完成)
List<TbPlussMerchantChannelStatus> channelD0 = merchantChannelStatusMapper.getByCodeAndChannelFlagList(merchantCode, "D0");
if (channelD0.size()>1){
return new RespBody("000087");
}
if (channelD0.size() != 0) {
HashMap<String, Object> d0 = new HashMap<>();
//审核备注
d0.put("remake", channelD0.get(0).getRemark());
d0.put("status",channelD0.get(0).getStatus());
d0.put("channel",channelD0.get(0).getChannel());
d0.put("valid",account == null? null:account.getChanneltype());
d0.put("thirdStatus",channelD0.get(0).getThirdstatus());
merchantChannelMessage.add(d0);
}
//未审核
List<TbPlussMerchantChannelStatus> channel = merchantChannelStatusMapper.getByCodeAndChannelFlagList(merchantCode, "1");
if (channel.size()>1){
return new RespBody("000087");
}
if (channel.size() != 0) {
HashMap<String, Object> unaudited = new HashMap<>();
//审核备注
unaudited.put("remake", channel.get(0).getRemark());
unaudited.put("status",channel.get(0).getStatus());
unaudited.put("channel",channel.get(0).getChannel());
unaudited.put("valid",account == null? null:account.getChanneltype());
unaudited.put("thirdStatus",channel.get(0).getThirdstatus());
merchantChannelMessage.add(unaudited);
}
channelMap.put("merchantChannelMessage",merchantChannelMessage);
return new RespBody(channelMap);
}
/**
* ip记录
* @param userId
* @return
*/
public RespBody userIpPageInfo(Integer userId, Integer currPage, Integer size){
PageHelper.startPage(currPage, size);
List<TbPlussOperationRecord> operationRecord = operationRecordMapper.selectUserSameIpCountPage(userId);
PageInfo<TbPlussOperationRecord> mercOrderDetailPageInfo = new PageInfo<>(operationRecord);
return new RespBody(mercOrderDetailPageInfo);
}
}

View File

@@ -23,8 +23,14 @@ public class NotificationService {
public RespBody notificationQuery(Integer currPage, Integer size){
PageHelper.startPage(currPage, size);
//消失列表
List<TbPlussNotice> notificationList = tbPlussNoticeMapper.queryNotification();
PageInfo pageInfo=new PageInfo(notificationList);
return new RespBody(pageInfo);
//未读信息
Integer unread = tbPlussNoticeMapper.unreadMessage();
HashMap<Object, Object> map = new HashMap<>();
map.put("unread",unread);
map.put("list",pageInfo);
return new RespBody(map);
}
}

View File

@@ -25,7 +25,8 @@ public class RespBody {
setMessage(e.getMessage(),"-60009");
}else {
try {
setCode(e.getMessage());
setCode(RespBody.fail);
setMessage(e.getMessage());
} catch (NumberFormatException e1) {
setMessage(e.getMessage(),"-1");
logger.info("", e);

View File

@@ -85,6 +85,7 @@ public class ExceptionUtil {
map.put("000084","商户未提交进件请求");
map.put("000085","当前通道下已进件,请选择别的进件通道");
map.put("000086","不是目标用户");
map.put("000087","数据有误");

View File

@@ -25,4 +25,5 @@ public interface TbPlussMerchantChannelMapper extends IService<TbPlussMerchantCh
int updateByPrimaryKey(TbPlussMerchantChannel record);
List<TbPlussMerchantChannel> selectAll();
List<Integer> getValidChannelIdList();
}

View File

@@ -32,9 +32,13 @@ public interface TbPlussMerchantChannelStatusMapper {
Map<String,Object> selectByUserId(@Param("userId") String userId, @Param("channel") String channel);
TbPlussMerchantChannelStatus getByCodeAndChannelFlag(@Param("merchantCode") String merchantCode, @Param("virChannelFlag") String virChannelFlag);
List<TbPlussMerchantChannelStatus> getByCodeAndChannelFlagList(@Param("merchantCode") String merchantCode, @Param("virChannelFlag") String virChannelFlag);
TbPlussMerchantChannelStatus getByCodeNullChannel(@Param("merchantCode") String merchantCode);
TbPlussMerchantChannelStatus getByMerchantCode(@Param("merchantCode") String merchantCode,@Param("channel") String channel );
List<TbPlussMerchantChannelStatus> getByMerchantCodes(@Param("merchantCode") String merchantCode);
TbPlussMerchantChannelStatus getByIdLock(@Param("id") Integer id);
List<TbPlussMerchantChannelStatus> getByMerchantCodeList(@Param("merchantCode") String merchantCode);
@@ -46,4 +50,6 @@ public interface TbPlussMerchantChannelStatusMapper {
TbPlussMerchantChannelStatus getIncomingInfo(@Param("status1")String status1, @Param("status2")String status2,
@Param("merchantCode")String merchantCode);
TbPlussMerchantChannelStatus getIncomingInfoAnother(@Param("merchantCode")String merchantCode);
TbPlussMerchantChannelStatus reject(@Param("merchantCode") String merchantCode,@Param("ids") List<Integer> ids);
}

View File

@@ -25,5 +25,7 @@ public interface TbPlussNoticeMapper {
int updateByPrimaryKey(TbPlussNotice record);
Integer unreadMessage();
List<TbPlussNotice> queryNotification();
}

View File

@@ -1,10 +1,14 @@
package com.chaozhanggui.dao.system.dao;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.chaozhanggui.dao.system.entity.TbPlussOperationRecord;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Component;
import java.util.List;
@Component
@Mapper
public interface TbPlussOperationRecordMapper {
@@ -21,4 +25,7 @@ public interface TbPlussOperationRecordMapper {
int updateByPrimaryKeyWithBLOBs(TbPlussOperationRecord record);
int updateByPrimaryKey(TbPlussOperationRecord record);
List<TbPlussOperationRecord> selectUserSameIpCountPage(@Param("userId") Integer userId);
}

View File

@@ -20,6 +20,8 @@ public interface TbPlussUserAppMapper {
int insertSelective(TbPlussUserApp record);
TbPlussUserApp selectByPrimaryKey(Integer id);
TbPlussUserApp selectByMerchantCode(@Param("merchantCode")String merchantCode);
TbPlussUserApp selectByUserId(Integer userId);
int updateByPrimaryKeySelective(TbPlussUserApp record);

View File

@@ -94,4 +94,7 @@
<select id="selectAll" resultMap="BaseResultMap">
select * from tb_pluss_merchant_channel where `status`=1
</select>
<select id="getValidChannelIdList" resultType="java.lang.Integer">
select id from tb_pluss_merchant_channel where `status`=1
</select>
</mapper>

View File

@@ -454,4 +454,26 @@
SELECT * FROM tb_pluss_merchant_channel_status
WHERE id = #{id} FOR UPDATE;
</select>
<select id="getByCodeAndChannelFlagList"
resultType="com.chaozhanggui.dao.system.entity.TbPlussMerchantChannelStatus">
SELECT * FROM tb_pluss_merchant_channel_status
WHERE merchantCode=#{merchantCode}
AND virChannelFlag=#{virChannelFlag}
</select>
<select id="getByMerchantCodes" resultType="com.chaozhanggui.dao.system.entity.TbPlussMerchantChannelStatus">
SELECT * FROM tb_pluss_merchant_channel_status
WHERE merchantCode=#{merchantCode}
</select>
<select id="reject" resultType="com.chaozhanggui.dao.system.entity.TbPlussMerchantChannelStatus">
SELECT * FROM tb_pluss_merchant_channel_status
WHERE merchantCode=#{merchantCode}
AND (channel IN
<foreach item="item" index="index" collection="ids" open="(" separator="," close=")">
#{item}
</foreach>
OR channel IS NULL)
AND status = '1'
AND thirdStatus = '-100'
limit 1
</select>
</mapper>

View File

@@ -38,9 +38,21 @@
<select id="queryNotification" resultType="com.chaozhanggui.dao.system.entity.TbPlussNotice">
select * from tb_pluss_notice
where typeFirst = 1
AND typeSecond != -1
ORDER BY id DESC
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
<select id="unreadMessage" resultType="java.lang.Integer">
SELECT
COUNT( 1 )
FROM
tb_pluss_notice
WHERE
typeFirst = 1
AND isDeal = 0
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from tb_pluss_notice
where id = #{id,jdbcType=INTEGER}
</delete>

View File

@@ -27,7 +27,27 @@
from tb_pluss_operation_record
where id = #{id,jdbcType=INTEGER}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
<select id="selectUserSameIpCountPage"
resultType="com.chaozhanggui.dao.system.entity.TbPlussOperationRecord">
SELECT DISTINCT opr.remark
, opr.ip
, t.count
, opr.createTime
, opr.extension ->> '$.city' city
, opr.extension ->> '$.province' province
, opr.extension ->> '$.county' county
FROM tb_pluss_operation_record opr LEFT JOIN (
SELECT ip, COUNT(DISTINCT opr.userId) `count` FROM tb_pluss_operation_record opr
LEFT JOIN tb_pluss_merchant_base_info mbi ON mbi.userId = opr.userId
LEFT JOIN tb_pluss_merchant_channel_status mcs ON mcs.merchantCode = mbi.merchantCode
WHERE mcs.`status` = '3' AND mbi.userId = #{userId}
GROUP BY ip
) t
ON opr.ip = t.ip
WHERE opr.userId = #{userId}
ORDER BY opr.createTime DESC
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from tb_pluss_operation_record
where id = #{id,jdbcType=INTEGER}
</delete>

View File

@@ -572,4 +572,10 @@
from tb_pluss_user_app
where userId = #{userId}
</select>
<select id="selectByMerchantCode" resultType="com.chaozhanggui.dao.system.entity.TbPlussUserApp">
select
<include refid="Base_Column_List" />
from tb_pluss_user_app
where merchantCode=#{merchantCode}
</select>
</mapper>

View File

@@ -1,20 +1,20 @@
package com.chaozhanggui.merchant.service;
import cn.hutool.core.util.ObjectUtil;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.chaozhanggui.common.system.config.MsgException;
import com.chaozhanggui.dao.system.dao.TbPlussMerchantBaseInfoMapper;
import com.chaozhanggui.dao.system.dao.TbPlussMerchantChannelMapper;
import com.chaozhanggui.dao.system.dao.TbPlussMerchantChannelStatusMapper;
import com.chaozhanggui.dao.system.dao.TbPlussUserInfoMapper;
import com.chaozhanggui.dao.system.entity.TbPlussMerchantBaseInfo;
import com.chaozhanggui.dao.system.entity.TbPlussMerchantChannel;
import com.chaozhanggui.dao.system.entity.TbPlussMerchantChannelStatus;
import com.chaozhanggui.dao.system.entity.TbPlussUserInfo;
import com.chaozhanggui.dao.system.dao.*;
import com.chaozhanggui.dao.system.entity.*;
import com.chaozhanggui.merchant.service.sxf.SxfMerchantAuditService;
import com.chaozhanggui.merchant.service.ys.YSAuditServiceV3;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import javax.annotation.Resource;
import java.util.Collections;
import java.util.Date;
import java.util.List;
import java.util.Map;
@Service
@@ -36,6 +36,12 @@ public class MerchantService {
private LklAuditService lklAuditService;
@Resource
private SxfMerchantAuditService sxfMerchantAuditService;
@Resource
private YSAuditServiceV3 ysAuditServiceV3;
@Resource
private TbPlussUserAppMapper tbPlussUserAppMapper;
@Resource
private TbPlussNoticeMapper tbPlussNoticeMapper;
/**
* 通用进件方法
@@ -94,6 +100,7 @@ public class MerchantService {
case "3":
break;
case "4":
ysAuditServiceV3.merchantAuditV3(userId,false, Integer.valueOf(channelId));
break;
case "5":
@@ -104,6 +111,7 @@ public class MerchantService {
break;
case "6":
ysAuditServiceV3.merchantAuditV3(userId,false, Integer.valueOf(channelId));
break;
default:
MsgException.throwException("未知的进件通道");
@@ -113,7 +121,51 @@ public class MerchantService {
}
@Transactional(rollbackFor = Exception.class)
public void rejectAudit(String merchantCode, String errMsg){
MsgException.checkBlank(errMsg, "请补充驳回原因");
List<Integer> validChannelIdList = tbPlussMerchantChannelMapper.getValidChannelIdList();
// LambdaQueryWrapper<MerchantChannelStatus> qWrapper = new LambdaQueryWrapper<MerchantChannelStatus>()
// .eq(MerchantChannelStatus::getMerchantCode, merchantCode)
// .and(wrapper -> wrapper.in(MerchantChannelStatus::getChannel, validChannelIdList)
// .or()
// .isNull(MerchantChannelStatus::getChannel))
// .eq(MerchantChannelStatus::getStatus, "1")
// .eq(MerchantChannelStatus::getThirdStatus, "-100");
//
// MerchantChannelStatus merchantChannelStatus = getOne(qWrapper);
TbPlussMerchantChannelStatus merchantChannelStatus = tbPlussMerchantChannelStatusMapper.reject(merchantCode, validChannelIdList);
TbPlussMerchantChannelStatus.checkCanAudit(merchantChannelStatus);
// 添加行数据锁
merchantChannelStatus = tbPlussMerchantChannelStatusMapper.getByIdLock(merchantChannelStatus.getId());
//
TbPlussMerchantChannelStatus merchant = new TbPlussMerchantChannelStatus();
merchant.setId(merchantChannelStatus.getId());
merchant.setStatus(TbPlussMerchantChannelStatus.AUDIT_STATUS_REJECT);
merchant.setRemark(errMsg);
merchant.setCallbackstatus("1");
merchant.setUpdatetime(new Date());
merchant.setThirdstatus("");
tbPlussMerchantChannelStatusMapper.updateByPrimaryKeySelective(merchant);
TbPlussUserApp userApp = tbPlussUserAppMapper.selectByMerchantCode(merchantCode);
TbPlussNotice notice = new TbPlussNotice(1, 1, userApp);
notice.setNoticecode(System.currentTimeMillis() + "");
notice.setUniquekey(System.currentTimeMillis() + "");
notice.setCreatedt(new Date());
notice.setConrtent("商户进件驳回, " + errMsg);
tbPlussNoticeMapper.insertSelective(notice);
}
public static boolean isAudited(TbPlussMerchantChannelStatus mcs) {