结算信息逻辑修改(不同步),并且在外层展示用户选择的进件意愿
This commit is contained in:
@@ -223,4 +223,6 @@ public interface AccountService extends IService<Account> {
|
||||
* @return 是,即代表可以执行修改操作
|
||||
*/
|
||||
boolean canEditBankCard(String merchantCode);
|
||||
|
||||
boolean checkChannel(Integer channel, Integer userId);
|
||||
}
|
||||
|
||||
@@ -34,6 +34,8 @@ import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.OrderItem;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
@@ -562,6 +564,10 @@ public class AccountServiceImpl extends ServiceImpl<AccountMapper, Account> impl
|
||||
storeSummaryVO.setD1(d1);
|
||||
AccountDTO d0 = getRealAccount(userId, Account.CHANNEL_TYPE_D0);
|
||||
storeSummaryVO.setD0(d0);
|
||||
//现在只要进件一个通道就是已录入
|
||||
if (d1 != null || d0 != null){
|
||||
storeSummaryVO.setD0Status("1");
|
||||
}
|
||||
|
||||
MerchantChannelStatus mcsCurrent = mcsService.getValidData(mbi.getMerchantCode());
|
||||
if (mcsCurrent == null || mcsCurrent.getVirChannelFlag().equals(Account.CHANNEL_TYPE_D1)) {
|
||||
@@ -1363,4 +1369,28 @@ public class AccountServiceImpl extends ServiceImpl<AccountMapper, Account> impl
|
||||
|
||||
return statusFlag && flag;
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public boolean checkChannel(Integer channel, Integer userId) {
|
||||
|
||||
//更改传入的
|
||||
UpdateWrapper<Account> updateWrapper0 = new UpdateWrapper<>();
|
||||
updateWrapper0.eq("userId", userId)
|
||||
.eq("channelType", channel==0?"D0":"D1")
|
||||
.set("valid", 1);
|
||||
boolean update0 = update(updateWrapper0);
|
||||
//更改另一个
|
||||
UpdateWrapper<Account> updateWrapper1 = new UpdateWrapper<>();
|
||||
updateWrapper1.eq("userId", userId)
|
||||
.eq("channelType", channel==0?"D1":"D0")
|
||||
.set("valid", 0);
|
||||
boolean update1 = update(updateWrapper1);
|
||||
|
||||
if (update0 && update1){
|
||||
return true;
|
||||
}else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
package cn.pluss.platform.userPromotion;
|
||||
|
||||
import cn.pluss.platform.entity.UserPromotion;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
/**
|
||||
* @author lyf
|
||||
*/
|
||||
public interface UserPromotionService extends IService<UserPromotion> {
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
package cn.pluss.platform.userPromotion.impl;
|
||||
|
||||
|
||||
import cn.pluss.platform.entity.UserProfit;
|
||||
import cn.pluss.platform.entity.UserPromotion;
|
||||
import cn.pluss.platform.mapper.UserProfitMapper;
|
||||
import cn.pluss.platform.mapper.UserPromotionMapper;
|
||||
import cn.pluss.platform.userPromotion.UserPromotionService;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
@Service
|
||||
public class userPromotionServiceImpl extends ServiceImpl<UserPromotionMapper, UserPromotion> implements UserPromotionService {
|
||||
}
|
||||
Reference in New Issue
Block a user