Merge branch 'test' into dev
# Conflicts: # src/main/java/com/sqx/modules/course/service/impl/CourseCollectServiceImpl.java
This commit is contained in:
commit
0e71a843cc
|
|
@ -61,18 +61,6 @@ public class UserEntity implements Serializable {
|
||||||
@ApiModelProperty("性别 1男 2女")
|
@ApiModelProperty("性别 1男 2女")
|
||||||
private Integer sex;
|
private Integer sex;
|
||||||
|
|
||||||
/**
|
|
||||||
* 姓名
|
|
||||||
*/
|
|
||||||
@TableField("cert_name")
|
|
||||||
private String certName;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 身份证号码
|
|
||||||
*/
|
|
||||||
@TableField("cert_no")
|
|
||||||
private String certNo;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 微信小程序openid
|
* 微信小程序openid
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,9 @@ import com.sqx.common.utils.IPUtils;
|
||||||
import com.sqx.modules.app.annotation.Login;
|
import com.sqx.modules.app.annotation.Login;
|
||||||
import com.sqx.modules.app.entity.TbUserBlacklist;
|
import com.sqx.modules.app.entity.TbUserBlacklist;
|
||||||
import com.sqx.modules.app.entity.UserEntity;
|
import com.sqx.modules.app.entity.UserEntity;
|
||||||
|
import com.sqx.modules.app.entity.UserInfo;
|
||||||
import com.sqx.modules.app.mapper.TbUserBlacklistMapper;
|
import com.sqx.modules.app.mapper.TbUserBlacklistMapper;
|
||||||
|
import com.sqx.modules.app.service.UserInfoService;
|
||||||
import com.sqx.modules.app.service.UserService;
|
import com.sqx.modules.app.service.UserService;
|
||||||
import com.sqx.modules.app.utils.JwtUtils;
|
import com.sqx.modules.app.utils.JwtUtils;
|
||||||
import com.sqx.modules.redisService.RedisService;
|
import com.sqx.modules.redisService.RedisService;
|
||||||
|
|
@ -41,6 +43,8 @@ public class AuthorizationInterceptor extends HandlerInterceptorAdapter {
|
||||||
@Autowired
|
@Autowired
|
||||||
private UserService userService;
|
private UserService userService;
|
||||||
@Autowired
|
@Autowired
|
||||||
|
private UserInfoService userInfoService;
|
||||||
|
@Autowired
|
||||||
private TbUserBlacklistMapper tbUserBlacklistMapper;
|
private TbUserBlacklistMapper tbUserBlacklistMapper;
|
||||||
|
|
||||||
private final RedisService redisService;
|
private final RedisService redisService;
|
||||||
|
|
@ -106,9 +110,10 @@ public class AuthorizationInterceptor extends HandlerInterceptorAdapter {
|
||||||
if (user != null && user.getStatus().equals(0)) {
|
if (user != null && user.getStatus().equals(0)) {
|
||||||
throw new CzgException("异常行为用户: {}" + user.getUserId());
|
throw new CzgException("异常行为用户: {}" + user.getUserId());
|
||||||
}
|
}
|
||||||
|
// 实名认证信息
|
||||||
if (StrUtil.isNotBlank(user.getCertNo())) {
|
UserInfo userInfo = userInfoService.getByUserId(user.getUserId());
|
||||||
TbUserBlacklist blacklist = tbUserBlacklistMapper.selectOne(Wrappers.<TbUserBlacklist>lambdaQuery().eq(TbUserBlacklist::getIdCardNo, user.getCertNo()));
|
if (userInfo != null && StrUtil.isNotBlank(userInfo.getCertNo())) {
|
||||||
|
TbUserBlacklist blacklist = tbUserBlacklistMapper.selectOne(Wrappers.<TbUserBlacklist>lambdaQuery().eq(TbUserBlacklist::getIdCardNo, userInfo.getCertNo()));
|
||||||
if (blacklist != null) {
|
if (blacklist != null) {
|
||||||
throw new CzgException(StrUtil.format("黑名单用户,禁止访问:{} / {}", blacklist.getRealName(), blacklist.getIdCardNo()));
|
throw new CzgException(StrUtil.format("黑名单用户,禁止访问:{} / {}", blacklist.getRealName(), blacklist.getIdCardNo()));
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -164,7 +164,8 @@ public class CourseCollectServiceImpl extends ServiceImpl<CourseCollectDao, Cour
|
||||||
|
|
||||||
List<CourseDetails> courseDetails1 = courseIdList.isEmpty() ? new ArrayList<>() :
|
List<CourseDetails> courseDetails1 = courseIdList.isEmpty() ? new ArrayList<>() :
|
||||||
courseDetailsService.list(new LambdaQueryWrapper<CourseDetails>().in(CourseDetails::getCourseDetailsId, courseDetailIds));
|
courseDetailsService.list(new LambdaQueryWrapper<CourseDetails>().in(CourseDetails::getCourseDetailsId, courseDetailIds));
|
||||||
Map<Long, CourseDetails> courseDetailsMap = courseDetails1.stream().collect(Collectors.toMap(CourseDetails::getCourseId, item -> item));
|
Map<Long, CourseDetails> courseDetailsMap = courseDetails1.stream()
|
||||||
|
.collect(Collectors.toMap(CourseDetails::getCourseId, item -> item, (key1, key2) -> key1));
|
||||||
// List<CourseDetails> courseDetails2 = courseIdList.isEmpty() ? new ArrayList<>() : courseDetailsDao.countByCourseId(courseIdList);
|
// List<CourseDetails> courseDetails2 = courseIdList.isEmpty() ? new ArrayList<>() : courseDetailsDao.countByCourseId(courseIdList);
|
||||||
// Map<Long, Integer> countMap = courseDetails2.stream()
|
// Map<Long, Integer> countMap = courseDetails2.stream()
|
||||||
// .collect(Collectors.toMap(CourseDetails::getCourseId, CourseDetails::getCourseDetailsCount));
|
// .collect(Collectors.toMap(CourseDetails::getCourseId, CourseDetails::getCourseDetailsCount));
|
||||||
|
|
|
||||||
|
|
@ -804,6 +804,5 @@ public class OrdersServiceImpl extends ServiceImpl<OrdersDao, Orders> implements
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
orders.setSysUserId(sysUserEntity.getUserId());
|
orders.setSysUserId(sysUserEntity.getUserId());
|
||||||
orders.setUserName(sysUserEntity.getUsername());
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue