Commit 7a010864 by 涂亚平

临时上个版本 联调中

1 parent ef6776fe
...@@ -17,6 +17,6 @@ public class OperatorsDTO { ...@@ -17,6 +17,6 @@ public class OperatorsDTO {
private String userName; private String userName;
private Integer id; private Long id;
} }
...@@ -24,7 +24,7 @@ public interface CompanyDictMapper extends BaseMapper<CompanyDictDO> { ...@@ -24,7 +24,7 @@ public interface CompanyDictMapper extends BaseMapper<CompanyDictDO> {
* 企业管理--查找所有主账号 * 企业管理--查找所有主账号
* @return * @return
*/ */
IPage<OperatorsVO> operators(IPage page, String companyName,Long fieldId,Integer role); IPage<OperatorsVO> operators(IPage page, String companyName,Long fieldId,Long id);
/** /**
* 查找所有的公司名称 * 查找所有的公司名称
......
...@@ -213,6 +213,10 @@ public class AdministerServiceImpl extends ServiceImpl<AdministerMapper, Adminis ...@@ -213,6 +213,10 @@ public class AdministerServiceImpl extends ServiceImpl<AdministerMapper, Adminis
redisUtil.set(RedisPrefixConstant.SUBSIDY_ADMINISTER_PREFIX + administerDO.getAccountName(), administerDO1); redisUtil.set(RedisPrefixConstant.SUBSIDY_ADMINISTER_PREFIX + administerDO.getAccountName(), administerDO1);
} }
if (null == administerDO1){
throw new HttpException(10012);
}
if ("0".equals(administerDO1.getStatus())) { if ("0".equals(administerDO1.getStatus())) {
throw new HttpException(10013); throw new HttpException(10013);
} }
...@@ -326,7 +330,7 @@ public class AdministerServiceImpl extends ServiceImpl<AdministerMapper, Adminis ...@@ -326,7 +330,7 @@ public class AdministerServiceImpl extends ServiceImpl<AdministerMapper, Adminis
public IPage<OperatorsVO> operators(OperatorsDTO operatorsDTO) { public IPage<OperatorsVO> operators(OperatorsDTO operatorsDTO) {
Page pager = new Page(operatorsDTO.getPageNum(), operatorsDTO.getPageSize()); Page pager = new Page(operatorsDTO.getPageNum(), operatorsDTO.getPageSize());
IPage<OperatorsVO> operatorsVOIPage = companyDictMapper.operators(pager, operatorsDTO.getCompanyName(), operatorsDTO.getFieldId(),0); IPage<OperatorsVO> operatorsVOIPage = companyDictMapper.operators(pager, operatorsDTO.getCompanyName(), operatorsDTO.getFieldId(),null);
List<OperatorsVO> operatorsVOS = operatorsVOIPage.getRecords(); List<OperatorsVO> operatorsVOS = operatorsVOIPage.getRecords();
for (OperatorsVO operatorsVO : operatorsVOS) { for (OperatorsVO operatorsVO : operatorsVOS) {
......
...@@ -2,6 +2,7 @@ package com.subsidy.service.impl; ...@@ -2,6 +2,7 @@ package com.subsidy.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.subsidy.common.constant.CourseNotification;
import com.subsidy.common.exception.HttpException; import com.subsidy.common.exception.HttpException;
import com.subsidy.dto.classDict.AddClassDTO; import com.subsidy.dto.classDict.AddClassDTO;
import com.subsidy.dto.classDict.AddMemberToClassDTO; import com.subsidy.dto.classDict.AddMemberToClassDTO;
...@@ -71,17 +72,17 @@ public class ClassDictServiceImpl extends ServiceImpl<ClassDictMapper, ClassDict ...@@ -71,17 +72,17 @@ public class ClassDictServiceImpl extends ServiceImpl<ClassDictMapper, ClassDict
@Autowired @Autowired
private QuartzUtil quartzUtil; private QuartzUtil quartzUtil;
public List<GetAllClassesVO> getAllClasses(ClassDictDO classDictDO) throws Exception{ public List<GetAllClassesVO> getAllClasses(ClassDictDO classDictDO) throws Exception {
DateFormat fmt = new SimpleDateFormat("yyyy-MM-dd"); DateFormat fmt = new SimpleDateFormat("yyyy-MM-dd");
List<GetAllClassesVO> getAllClassesVOS = this.baseMapper.getAllClasses(classDictDO); List<GetAllClassesVO> getAllClassesVOS = this.baseMapper.getAllClasses(classDictDO);
for (GetAllClassesVO getAllClassesVO : getAllClassesVOS){ for (GetAllClassesVO getAllClassesVO : getAllClassesVOS) {
if (new Date().before(fmt.parse(getAllClassesVO.getStartDate()))){ if (new Date().before(fmt.parse(getAllClassesVO.getStartDate()))) {
getAllClassesVO.setOpenStatus("1"); //待开始 getAllClassesVO.setOpenStatus("1"); //待开始
}else if (new Date().after(fmt.parse(getAllClassesVO.getEndDate()))){ } else if (new Date().after(fmt.parse(getAllClassesVO.getEndDate()))) {
getAllClassesVO.setOpenStatus("2"); getAllClassesVO.setOpenStatus("2");
}else { } else {
getAllClassesVO.setOpenStatus("0"); getAllClassesVO.setOpenStatus("0");
} }
} }
...@@ -98,6 +99,7 @@ public class ClassDictServiceImpl extends ServiceImpl<ClassDictMapper, ClassDict ...@@ -98,6 +99,7 @@ public class ClassDictServiceImpl extends ServiceImpl<ClassDictMapper, ClassDict
return ConstantUtils.DELETE_SUCCESS; return ConstantUtils.DELETE_SUCCESS;
} }
@Transactional(rollbackFor = Exception.class)
public Long addClass(AddClassDTO addClassDTO) { public Long addClass(AddClassDTO addClassDTO) {
//新建一个班级 //新建一个班级
...@@ -111,27 +113,27 @@ public class ClassDictServiceImpl extends ServiceImpl<ClassDictMapper, ClassDict ...@@ -111,27 +113,27 @@ public class ClassDictServiceImpl extends ServiceImpl<ClassDictMapper, ClassDict
ClassMemberMappingDO classMemberMappingDO = new ClassMemberMappingDO(); ClassMemberMappingDO classMemberMappingDO = new ClassMemberMappingDO();
classMemberMappingDO.setMemberId(lg); classMemberMappingDO.setMemberId(lg);
classMemberMappingDO.setClassId(classDictDO.getId()); classMemberMappingDO.setClassId(classDictDO.getId());
classMemberMappingMapper.insert(classMemberMappingDO);
} }
//添加通知 //添加通知
if (null != addClassDTO.getClassNoticeDOS()){ if (null != addClassDTO.getClassNoticeDOS()) {
List<ClassNoticeDO> classNoticeDOS = addClassDTO.getClassNoticeDOS(); List<ClassNoticeDO> classNoticeDOS = addClassDTO.getClassNoticeDOS();
for (ClassNoticeDO classNoticeDO : classNoticeDOS) { for (ClassNoticeDO classNoticeDO : classNoticeDOS) {
if(DateFormatUtil.parse(classNoticeDO.getNoticeTime(),"yyyy-MM-dd").before(new Date())) { if (DateFormatUtil.parse(classNoticeDO.getNoticeTime(), "yyyy-MM-dd").before(new Date())) {
throw new HttpException(70001); throw new HttpException(70001);
} }
classNoticeDO.setClassId(classDictDO.getId()); classNoticeDO.setClassId(classDictDO.getId());
classNoticeDO.setStatus(CourseNotification.UNSENT);
classNoticeMapper.insert(classNoticeDO); classNoticeMapper.insert(classNoticeDO);
Map<String, Object> params = new HashMap<>(); Map<String, Object> params = new HashMap<>();
//params.put("classId", classNoticeDO.getClassId()); params.put("classId", classNoticeDO.getClassId());
params.put("id", classNoticeDO.getId()); params.put("id", classNoticeDO.getId());
String name = classDictDO.getClassName()+"-"+classNoticeDO.getNoticeType()+"-"+classNoticeDO.getNoticeTime(); String name = classDictDO.getClassName() + "-" + classNoticeDO.getNoticeType() + "-" + classNoticeDO.getNoticeTime();
quartzUtil.addSimpleJob(CourseNotificationJob.class, DateFormatUtil.parse(classNoticeDO.getNoticeTime(), "yyyy-MM-dd") , params, name, "CourseNotificationJob"); quartzUtil.addSimpleJob(CourseNotificationJob.class, DateFormatUtil.parse(classNoticeDO.getNoticeTime(), "yyyy-MM-dd"), params, name, "CourseNotificationJob");
} }
} }
return classDictDO.getId(); return classDictDO.getId();
} }
...@@ -155,9 +157,9 @@ public class ClassDictServiceImpl extends ServiceImpl<ClassDictMapper, ClassDict ...@@ -155,9 +157,9 @@ public class ClassDictServiceImpl extends ServiceImpl<ClassDictMapper, ClassDict
//答疑记录也删除 //答疑记录也删除
answeringQuestionMapper.delete(new QueryWrapper<AnsweringQuestionDO>() answeringQuestionMapper.delete(new QueryWrapper<AnsweringQuestionDO>()
.lambda() .lambda()
.eq(AnsweringQuestionDO::getAskId,classMemberMappingDO.getMemberId()) .eq(AnsweringQuestionDO::getAskId, classMemberMappingDO.getMemberId())
.eq(AnsweringQuestionDO::getClassId,classMemberMappingDO.getClassId())); .eq(AnsweringQuestionDO::getClassId, classMemberMappingDO.getClassId()));
return ConstantUtils.DELETE_SUCCESS; return ConstantUtils.DELETE_SUCCESS;
} }
......
...@@ -76,7 +76,18 @@ public class CompanyDictServiceImpl extends ServiceImpl<CompanyDictMapper, Compa ...@@ -76,7 +76,18 @@ public class CompanyDictServiceImpl extends ServiceImpl<CompanyDictMapper, Compa
private ClassTypeDictMapper classTypeDictMapper; private ClassTypeDictMapper classTypeDictMapper;
public IPage<OperatorsVO> operators(OperatorsDTO operatorsDTO) { public IPage<OperatorsVO> operators(OperatorsDTO operatorsDTO) {
Page pager = new Page(operatorsDTO.getPageNum(), operatorsDTO.getPageSize()); Page pager = new Page(operatorsDTO.getPageNum(), operatorsDTO.getPageSize());
IPage page = this.baseMapper.operators(pager, operatorsDTO.getCompanyName(), operatorsDTO.getFieldId(),1);
//判断该用户的角色
Integer count = roleAdministerMappingMapper.selectCount(new QueryWrapper<RoleAdministerMappingDO>()
.lambda()
.eq(RoleAdministerMappingDO::getAdministerId,operatorsDTO.getId())
.eq(RoleAdministerMappingDO::getRoleId,1));
//
//if (count > 0){
// operatorsDTO.setId(null);
//}
IPage page = this.baseMapper.operators(pager, operatorsDTO.getCompanyName(), operatorsDTO.getFieldId(),operatorsDTO.getId());
List<OperatorsVO> operatorsVOS = page.getRecords(); List<OperatorsVO> operatorsVOS = page.getRecords();
for (OperatorsVO operatorsVO : operatorsVOS) { for (OperatorsVO operatorsVO : operatorsVOS) {
//查看公司所在行业 //查看公司所在行业
......
...@@ -6,6 +6,7 @@ meishu.code-message[10003]=验证码错误 ...@@ -6,6 +6,7 @@ meishu.code-message[10003]=验证码错误
meishu.code-message[10004]=账号或密码错误 meishu.code-message[10004]=账号或密码错误
meishu.code-message[10010]=学生信息不存在 meishu.code-message[10010]=学生信息不存在
meishu.code-message[10011]=成员信息不存在 meishu.code-message[10011]=成员信息不存在
meishu.code-message[10012]=该账号不存在
meishu.code-message[10013]=账户已冻结,请联系账户管理员 meishu.code-message[10013]=账户已冻结,请联系账户管理员
meishu.code-message[10014]=该成员已存在,请勿重复添加 meishu.code-message[10014]=该成员已存在,请勿重复添加
meishu.code-message[10015]=首次登录请使用验证码登录 meishu.code-message[10015]=首次登录请使用验证码登录
......
...@@ -41,6 +41,9 @@ ...@@ -41,6 +41,9 @@
and t2.delete_date is null and t2.delete_date is null
and t3.delete_date is null and t3.delete_date is null
and role = #{role} and role = #{role}
<if test="id != null and id != ''">
and t2.id = #{id}
</if>
<if test="companyName != null and companyName != ''"> <if test="companyName != null and companyName != ''">
and t2.company_name like concat('%',#{companyName} ,'%') and t2.company_name like concat('%',#{companyName} ,'%')
</if> </if>
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!