更新9.24
This commit is contained in:
parent
146969fdb0
commit
57c3422180
@ -147,6 +147,15 @@ public class FleetInfoServiceImpl extends ServiceImpl<FleetInfoMapper,FleetInfo>
|
||||
.eq(MtUser::getMobile, fleetInfo.getMobile())
|
||||
.last("limit 1"));
|
||||
createVaseInfo(mtUser, nowAccountInfo.getStoreId().toString(), fleetInfo.getStaffId(), null);
|
||||
}else {
|
||||
//判断当前用户是否已加入车队
|
||||
FleetInfo fleetInfo2 = baseMapper.selectOne(new LambdaQueryWrapper<FleetInfo>()
|
||||
.eq(FleetInfo::getUserId, mtUser.getId())
|
||||
.eq(FleetInfo::getStoreId, nowAccountInfo.getStoreId())
|
||||
.last("limit 1"));
|
||||
if (ObjectUtil.isNotEmpty(fleetInfo2)){
|
||||
throw new RuntimeException("当前用户已创建车队");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -102,10 +102,18 @@ public class FleetMemberServiceImpl extends ServiceImpl<FleetMemberMapper,FleetM
|
||||
@Override
|
||||
public int insert(FleetMember fleetMember) {
|
||||
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
|
||||
FleetMember fleetMember1 = queryByMobile(fleetMember.getMobile());
|
||||
if (ObjectUtil.isNotEmpty(fleetMember1)) {
|
||||
return 0;
|
||||
// FleetMember fleetMember1 = queryByMobile(fleetMember.getMobile());
|
||||
//判断用户是否存在选择的车队
|
||||
FleetMember fleetMember2 = baseMapper.selectOne(new LambdaQueryWrapper<FleetMember>()
|
||||
.eq(FleetMember::getMobile, fleetMember.getMobile())
|
||||
.eq(FleetMember::getFleetId, fleetMember.getFleetId())
|
||||
.last("limit 1"));
|
||||
if (ObjectUtil.isNotEmpty(fleetMember2)){
|
||||
throw new RuntimeException("该用户已加入该车队");
|
||||
}
|
||||
// if (ObjectUtil.isNotEmpty(fleetMember1)) {
|
||||
// return 0;
|
||||
// }
|
||||
// LJUserVo user = userService.selectUserByMobileAndChantStoreId(fleetMember.getMobile());
|
||||
//判断当前车队负责人是否存在账号
|
||||
MtUser mtUser = mtUserMapper.selectOne(new LambdaQueryWrapper<MtUser>()
|
||||
|
Loading…
Reference in New Issue
Block a user