|
@@ -1204,13 +1204,13 @@ public class ClassGradeUserServiceImpl extends ServiceImpl<ClassGradeUserMapper,
|
|
byte[] rgbKey = OFFICIALPUSH_TOKEN.substring(0, 8).getBytes("UTF-8");
|
|
byte[] rgbKey = OFFICIALPUSH_TOKEN.substring(0, 8).getBytes("UTF-8");
|
|
pars = ToolsUtils.decryptDesNew(bo.getData(), OFFICIALPUSH_TOKEN.substring(0, 8));
|
|
pars = ToolsUtils.decryptDesNew(bo.getData(), OFFICIALPUSH_TOKEN.substring(0, 8));
|
|
} catch (Exception e) {
|
|
} catch (Exception e) {
|
|
- throw new CustomException("解析错误");
|
|
|
|
|
|
+ throw new CustomException("解析错误",507);
|
|
}
|
|
}
|
|
Map<String, String> split = Splitter.on("&").withKeyValueSeparator("=").split(pars);
|
|
Map<String, String> split = Splitter.on("&").withKeyValueSeparator("=").split(pars);
|
|
String idCard = split.get("idnum");
|
|
String idCard = split.get("idnum");
|
|
String datetime = split.get("datetime");
|
|
String datetime = split.get("datetime");
|
|
if (Validator.isEmpty(datetime)) {
|
|
if (Validator.isEmpty(datetime)) {
|
|
- throw new CustomException("数据错误");
|
|
|
|
|
|
+ throw new CustomException("数据错误",507);
|
|
}
|
|
}
|
|
if(Validator.isNotEmpty(idCard)){
|
|
if(Validator.isNotEmpty(idCard)){
|
|
idCard = idCard.trim();
|
|
idCard = idCard.trim();
|
|
@@ -1225,7 +1225,7 @@ public class ClassGradeUserServiceImpl extends ServiceImpl<ClassGradeUserMapper,
|
|
}
|
|
}
|
|
User user = iUserService.getByCardNoTenant(idCard);
|
|
User user = iUserService.getByCardNoTenant(idCard);
|
|
if (Validator.isEmpty(user)) {
|
|
if (Validator.isEmpty(user)) {
|
|
- throw new CustomException("身份证查无用户");
|
|
|
|
|
|
+ throw new CustomException("身份证查无用户",507);
|
|
}
|
|
}
|
|
if(Validator.isNotEmpty(user.getTenantId())){
|
|
if(Validator.isNotEmpty(user.getTenantId())){
|
|
ServletUtils.getRequestAttributes().getResponse().setHeader("TenantId", user.getTenantId().toString());
|
|
ServletUtils.getRequestAttributes().getResponse().setHeader("TenantId", user.getTenantId().toString());
|
|
@@ -1233,15 +1233,15 @@ public class ClassGradeUserServiceImpl extends ServiceImpl<ClassGradeUserMapper,
|
|
String bh = split.get("bh");
|
|
String bh = split.get("bh");
|
|
List<ClassGrade> classGradeList = iClassGradeService.list(new LambdaQueryWrapper<ClassGrade>().eq(ClassGrade::getOfficialName, bh));
|
|
List<ClassGrade> classGradeList = iClassGradeService.list(new LambdaQueryWrapper<ClassGrade>().eq(ClassGrade::getOfficialName, bh));
|
|
if (Validator.isEmpty(classGradeList) || classGradeList.size() == 0) {
|
|
if (Validator.isEmpty(classGradeList) || classGradeList.size() == 0) {
|
|
- throw new CustomException("班级不存在");
|
|
|
|
|
|
+ throw new CustomException("班级不存在",507);
|
|
}
|
|
}
|
|
ClassGradeUser classGradeUser = null;
|
|
ClassGradeUser classGradeUser = null;
|
|
ClassGrade grade = null;
|
|
ClassGrade grade = null;
|
|
for (ClassGrade classGrade : classGradeList) {
|
|
for (ClassGrade classGrade : classGradeList) {
|
|
classGradeUser = iClassGradeUserService.getOne(new LambdaQueryWrapper<ClassGradeUser>()
|
|
classGradeUser = iClassGradeUserService.getOne(new LambdaQueryWrapper<ClassGradeUser>()
|
|
.eq(ClassGradeUser::getGradeId, classGrade.getGradeId())
|
|
.eq(ClassGradeUser::getGradeId, classGrade.getGradeId())
|
|
- .eq(ClassGradeUser::getChangeGrade, 0)
|
|
|
|
- .eq(ClassGradeUser::getStatus, 1)
|
|
|
|
|
|
+// .eq(ClassGradeUser::getChangeGrade, 0)
|
|
|
|
+// .eq(ClassGradeUser::getStatus, 1)
|
|
.eq(ClassGradeUser::getUserId, user.getUserId()).last("limit 1"));
|
|
.eq(ClassGradeUser::getUserId, user.getUserId()).last("limit 1"));
|
|
if (Validator.isNotEmpty(classGradeUser)) {
|
|
if (Validator.isNotEmpty(classGradeUser)) {
|
|
grade = classGrade;
|
|
grade = classGrade;
|
|
@@ -1249,11 +1249,11 @@ public class ClassGradeUserServiceImpl extends ServiceImpl<ClassGradeUserMapper,
|
|
}
|
|
}
|
|
}
|
|
}
|
|
if (Validator.isEmpty(classGradeUser)) {
|
|
if (Validator.isEmpty(classGradeUser)) {
|
|
- throw new CustomException("班级用户不存在");
|
|
|
|
|
|
+ throw new CustomException("班级用户不存在",507);
|
|
}
|
|
}
|
|
OrderGoods orderGoods = iOrderGoodsService.getOne(new LambdaQueryWrapper<OrderGoods>().eq(OrderGoods::getOrderGoodsId, classGradeUser.getOrderGoodsId()));
|
|
OrderGoods orderGoods = iOrderGoodsService.getOne(new LambdaQueryWrapper<OrderGoods>().eq(OrderGoods::getOrderGoodsId, classGradeUser.getOrderGoodsId()));
|
|
if (Validator.isEmpty(orderGoods)) {
|
|
if (Validator.isEmpty(orderGoods)) {
|
|
- throw new CustomException("订单商品不存在");
|
|
|
|
|
|
+ throw new CustomException("订单商品不存在",507);
|
|
}
|
|
}
|
|
Goods goods = iGoodsService.getOne(new LambdaQueryWrapper<Goods>().eq(Goods::getGoodsId, orderGoods.getGoodsId()));
|
|
Goods goods = iGoodsService.getOne(new LambdaQueryWrapper<Goods>().eq(Goods::getGoodsId, orderGoods.getGoodsId()));
|
|
CourseBusinessQueryBo queryBo = new CourseBusinessQueryBo();
|
|
CourseBusinessQueryBo queryBo = new CourseBusinessQueryBo();
|
|
@@ -1287,7 +1287,7 @@ public class ClassGradeUserServiceImpl extends ServiceImpl<ClassGradeUserMapper,
|
|
SysUser sysUser = iSysUserService.getOne(new LambdaQueryWrapper<SysUser>()
|
|
SysUser sysUser = iSysUserService.getOne(new LambdaQueryWrapper<SysUser>()
|
|
.eq(SysUser::getUserName, userName).last("limit 1"));
|
|
.eq(SysUser::getUserName, userName).last("limit 1"));
|
|
if(Validator.isEmpty(sysUser)){
|
|
if(Validator.isEmpty(sysUser)){
|
|
- throw new CustomException("未创建监管账号");
|
|
|
|
|
|
+ throw new CustomException("未创建监管账号",507);
|
|
}
|
|
}
|
|
LoginUser loginUser = new LoginUser();
|
|
LoginUser loginUser = new LoginUser();
|
|
loginUser.setUser(sysUser);
|
|
loginUser.setUser(sysUser);
|