From 4d145a1793b73d08891051daef50ade1f2cce660 Mon Sep 17 00:00:00 2001 From: Administrator Date: Tue, 22 Feb 2022 21:22:16 +0800 Subject: [PATCH] 临时上个版本 联调中 --- src/main/java/com/subsidy/controller/AdministerController.java | 2 +- src/main/java/com/subsidy/service/AdministerService.java | 2 +- src/main/java/com/subsidy/service/impl/AdministerServiceImpl.java | 6 ++---- src/main/java/com/subsidy/service/impl/CompanyDictServiceImpl.java | 12 +++++++----- src/main/java/com/subsidy/service/impl/MemberServiceImpl.java | 1 + src/main/resources/mapper/ClassMemberMappingMapper.xml | 1 + src/main/resources/mapper/CompanyDictMapper.xml | 1 - src/main/resources/mapper/VodDictMapper.xml | 1 + 8 files changed, 14 insertions(+), 12 deletions(-) diff --git a/src/main/java/com/subsidy/controller/AdministerController.java b/src/main/java/com/subsidy/controller/AdministerController.java index 5e3310f..e7347f2 100644 --- a/src/main/java/com/subsidy/controller/AdministerController.java +++ b/src/main/java/com/subsidy/controller/AdministerController.java @@ -217,7 +217,7 @@ public class AdministerController { @PostMapping("importMember") @ApiOperation("导入学生 {companyId 公司id file}") - public ResponseVO importMember(Long companyId,@RequestParam("file") MultipartFile file){ + public ResponseVO importMember(Long companyId,@RequestParam("file") MultipartFile file)throws Exception{ return ResponseData.generateCreatedResponse(0,administerService.importMember(companyId,file)); } diff --git a/src/main/java/com/subsidy/service/AdministerService.java b/src/main/java/com/subsidy/service/AdministerService.java index f26f37a..b678fff 100644 --- a/src/main/java/com/subsidy/service/AdministerService.java +++ b/src/main/java/com/subsidy/service/AdministerService.java @@ -74,7 +74,7 @@ public interface AdministerService extends IService { void memberStudyLog(MemberStudyLogDTO memberStudyLogDTO)throws Exception; - String importMember(Long companyId, MultipartFile multipartFile); + String importMember(Long companyId, MultipartFile multipartFile)throws Exception; IPage manageMember(ManageMemberDTO manageMemberDTO); } diff --git a/src/main/java/com/subsidy/service/impl/AdministerServiceImpl.java b/src/main/java/com/subsidy/service/impl/AdministerServiceImpl.java index 01d190c..3f5416f 100644 --- a/src/main/java/com/subsidy/service/impl/AdministerServiceImpl.java +++ b/src/main/java/com/subsidy/service/impl/AdministerServiceImpl.java @@ -128,6 +128,7 @@ import java.util.HashMap; import java.util.List; import java.util.Set; import java.util.TreeSet; +import java.util.concurrent.ExecutionException; import java.util.concurrent.atomic.AtomicInteger; import java.util.zip.ZipEntry; import java.util.zip.ZipOutputStream; @@ -1284,7 +1285,7 @@ public class AdministerServiceImpl extends ServiceImpl() - .lambda() - .eq(RoleAdministerMappingDO::getAdministerId,operatorsDTO.getId()) - .eq(RoleAdministerMappingDO::getRoleId,1)); + //Integer count = roleAdministerMappingMapper.selectCount(new QueryWrapper() + // .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()); + AdministerDO administerDO = administerMapper.selectById(operatorsDTO.getId()); + + IPage page = this.baseMapper.operators(pager, operatorsDTO.getCompanyName(), operatorsDTO.getFieldId(),administerDO.getCompanyId()); List operatorsVOS = page.getRecords(); for (OperatorsVO operatorsVO : operatorsVOS) { //查看公司所在行业 diff --git a/src/main/java/com/subsidy/service/impl/MemberServiceImpl.java b/src/main/java/com/subsidy/service/impl/MemberServiceImpl.java index 7f54ac2..2d5544e 100644 --- a/src/main/java/com/subsidy/service/impl/MemberServiceImpl.java +++ b/src/main/java/com/subsidy/service/impl/MemberServiceImpl.java @@ -141,6 +141,7 @@ public class MemberServiceImpl extends ServiceImpl imple return iPage; } + @Transactional(rollbackFor = Exception.class) public String deleteMember(MemberDO memberDO) { this.baseMapper.deleteById(memberDO.getId()); diff --git a/src/main/resources/mapper/ClassMemberMappingMapper.xml b/src/main/resources/mapper/ClassMemberMappingMapper.xml index 3487154..78ef38e 100644 --- a/src/main/resources/mapper/ClassMemberMappingMapper.xml +++ b/src/main/resources/mapper/ClassMemberMappingMapper.xml @@ -70,6 +70,7 @@ t.delete_date IS NULL AND t2.delete_date IS NULL and t2.end_date >=DATE_FORMAT(now(), '%Y-%m-%d') + and t2.start_date < DATE_FORMAT(now(), '%Y-%m-%d') and t.member_id = #{memberId} diff --git a/src/main/resources/mapper/CompanyDictMapper.xml b/src/main/resources/mapper/CompanyDictMapper.xml index 6fef702..f39635c 100644 --- a/src/main/resources/mapper/CompanyDictMapper.xml +++ b/src/main/resources/mapper/CompanyDictMapper.xml @@ -40,7 +40,6 @@ t.delete_date IS NULL and t2.delete_date is null and t3.delete_date is null - and role = #{role} and t2.id = #{id} diff --git a/src/main/resources/mapper/VodDictMapper.xml b/src/main/resources/mapper/VodDictMapper.xml index e8d8503..1d68a8f 100644 --- a/src/main/resources/mapper/VodDictMapper.xml +++ b/src/main/resources/mapper/VodDictMapper.xml @@ -63,6 +63,7 @@ WHERE t.delete_date IS NULL AND t2.delete_date IS NULL + and t2.id is not null and t.course_id = #{courseId} and t2.vod_name like concat('%',#{vodName} ,'%') -- libgit2 0.25.0