|
@@ -267,7 +267,7 @@ public class UserProfileServiceImpl extends ServiceImpl<UserProfileMapper, UserP
|
|
|
public boolean updateAuditByEditBo(UserProfileEditBo bo,LoginUser loginUser) {
|
|
|
UserProfile update = BeanUtil.toBean(bo,UserProfile.class);
|
|
|
UserProfileVo userProfileVo1 = this.queryById(bo.getId());
|
|
|
-
|
|
|
+ //查询此人审核资料是否有权限
|
|
|
if (baseMapper.selectCountProfile(loginUser.getUser().getUserId(),userProfileVo1.getGoodsId()) < 1){
|
|
|
throw new IllegalArgumentException("您没有审核权限");
|
|
|
}
|
|
@@ -278,9 +278,12 @@ public class UserProfileServiceImpl extends ServiceImpl<UserProfileMapper, UserP
|
|
|
update.setChangeStatus(1);
|
|
|
|
|
|
UserProfileVo userProfileVo = this.queryById(bo.getId());
|
|
|
+ //发送消息分为资料审核发送,和盖章审核发送 1资料 2盖章
|
|
|
if (userProfileVo.getTypeStatus().equals(1)){
|
|
|
+ //审核资料发送消息
|
|
|
sendAuidit(update);
|
|
|
}else if (userProfileVo.getTypeStatus().equals(2)){
|
|
|
+ //审核承诺书发送消息
|
|
|
sendAuiditSMS(update);
|
|
|
}
|
|
|
return this.updateById(update);
|
|
@@ -291,6 +294,7 @@ public class UserProfileServiceImpl extends ServiceImpl<UserProfileMapper, UserP
|
|
|
Long gradeId = baseMapper.selectGrade(userProfileVo.getUserId(),userProfileVo.getGoodsId());
|
|
|
if (bo.getStatus().equals(1)) {
|
|
|
InformRemindVo informRemindVo = informRemindService.queryById(23L);
|
|
|
+ //站内信有无启用,启用发送
|
|
|
if (informRemindVo.getWayStatus().equals(1)) {
|
|
|
InformUserAddBo informUserAddBo = new InformUserAddBo();
|
|
|
informUserAddBo.setUserId(userProfileVo.getUserId());
|
|
@@ -307,6 +311,7 @@ public class UserProfileServiceImpl extends ServiceImpl<UserProfileMapper, UserP
|
|
|
informUserAddBo.setText("尊敬的用户:您上传"+goodsVo1.getGoodsName()+"课程的承诺书审核成功");
|
|
|
iInformUserService.insertByAddBo(informUserAddBo);
|
|
|
}
|
|
|
+ //短信有无启用,启用发送
|
|
|
if (informRemindVo.getNoteStatus().equals(1)){
|
|
|
InformUserAddBo informUserAddBo = new InformUserAddBo();
|
|
|
informUserAddBo.setUserId(userProfileVo.getUserId());
|
|
@@ -328,6 +333,7 @@ public class UserProfileServiceImpl extends ServiceImpl<UserProfileMapper, UserP
|
|
|
}
|
|
|
}else {
|
|
|
InformRemindVo informRemindTwoVo = informRemindService.queryById(24L);
|
|
|
+ //站内信有无启用,启用发送
|
|
|
if (informRemindTwoVo.getWayStatus().equals(1)) {
|
|
|
InformUserAddBo informUserAddBo = new InformUserAddBo();
|
|
|
informUserAddBo.setUserId(userProfileVo.getUserId());
|
|
@@ -344,6 +350,7 @@ public class UserProfileServiceImpl extends ServiceImpl<UserProfileMapper, UserP
|
|
|
informUserAddBo.setText("尊敬的用户:您上传"+goodsVo1.getGoodsName()+"课程的承诺书审核不通过,请重新完善吧");
|
|
|
iInformUserService.insertByAddBo(informUserAddBo);
|
|
|
}
|
|
|
+ //短信有无启用,启用发送
|
|
|
if (informRemindTwoVo.getNoteStatus().equals(1)){
|
|
|
InformUserAddBo informUserAddBo = new InformUserAddBo();
|
|
|
informUserAddBo.setUserId(userProfileVo.getUserId());
|
|
@@ -368,9 +375,11 @@ public class UserProfileServiceImpl extends ServiceImpl<UserProfileMapper, UserP
|
|
|
|
|
|
private void sendAuidit(UserProfile bo) {
|
|
|
UserProfileVo userProfileVo = this.queryById(bo.getId());
|
|
|
+ //查询所在班级
|
|
|
Long gradeId = baseMapper.selectGrade(userProfileVo.getUserId(),userProfileVo.getGoodsId());
|
|
|
if (bo.getStatus().equals(1)) {
|
|
|
InformRemindVo informRemindVo = informRemindService.queryById(3L);
|
|
|
+ //站内信有无启用,启用发送
|
|
|
if (informRemindVo.getWayStatus().equals(1)) {
|
|
|
InformUserAddBo informUserAddBo = new InformUserAddBo();
|
|
|
informUserAddBo.setUserId(userProfileVo.getUserId());
|
|
@@ -387,6 +396,7 @@ public class UserProfileServiceImpl extends ServiceImpl<UserProfileMapper, UserP
|
|
|
informUserAddBo.setText("尊敬的用户:您填写的"+goodsVo1.getGoodsName()+"课程报名信息审核成功,请尽快去学习吧");
|
|
|
iInformUserService.insertByAddBo(informUserAddBo);
|
|
|
}
|
|
|
+ //短信有无启用,启用发送
|
|
|
if (informRemindVo.getNoteStatus().equals(1)){
|
|
|
InformUserAddBo informUserAddBo = new InformUserAddBo();
|
|
|
informUserAddBo.setUserId(userProfileVo.getUserId());
|
|
@@ -408,6 +418,7 @@ public class UserProfileServiceImpl extends ServiceImpl<UserProfileMapper, UserP
|
|
|
}
|
|
|
}else {
|
|
|
InformRemindVo informRemindTwoVo = informRemindService.queryById(4L);
|
|
|
+ //站内信有无启用,启用发送
|
|
|
if (informRemindTwoVo.getWayStatus().equals(1)) {
|
|
|
InformUserAddBo informUserAddBo = new InformUserAddBo();
|
|
|
informUserAddBo.setUserId(userProfileVo.getUserId());
|
|
@@ -424,6 +435,7 @@ public class UserProfileServiceImpl extends ServiceImpl<UserProfileMapper, UserP
|
|
|
informUserAddBo.setText("尊敬的用户:您填写的"+goodsVo1.getGoodsName()+"课程报名信息审核不通过,请重新完善吧");
|
|
|
iInformUserService.insertByAddBo(informUserAddBo);
|
|
|
}
|
|
|
+ //短信有无启用,启用发送
|
|
|
if (informRemindTwoVo.getNoteStatus().equals(1)){
|
|
|
InformUserAddBo informUserAddBo = new InformUserAddBo();
|
|
|
informUserAddBo.setUserId(userProfileVo.getUserId());
|