From b29efd276339be8ab6e96e05671fe5d4708405aa Mon Sep 17 00:00:00 2001 From: Administrator Date: Fri, 4 Mar 2022 18:05:44 +0800 Subject: [PATCH] 新电脑了 --- src/main/java/com/subsidy/mapper/JobDictMapper.java | 7 +------ src/main/java/com/subsidy/service/impl/AdministerServiceImpl.java | 6 ++++++ src/main/java/com/subsidy/service/impl/JobDictServiceImpl.java | 14 +++++++++++++- src/main/java/com/subsidy/vo/administer/AdministerPermissionVO.java | 2 +- src/main/java/com/subsidy/vo/administer/LoginVO.java | 1 - src/main/resources/application.properties | 4 ++-- src/main/resources/mapper/JobDictMapper.xml | 11 ----------- 7 files changed, 23 insertions(+), 22 deletions(-) diff --git a/src/main/java/com/subsidy/mapper/JobDictMapper.java b/src/main/java/com/subsidy/mapper/JobDictMapper.java index ca6a375..9379e8a 100644 --- a/src/main/java/com/subsidy/mapper/JobDictMapper.java +++ b/src/main/java/com/subsidy/mapper/JobDictMapper.java @@ -3,6 +3,7 @@ package com.subsidy.mapper; import com.subsidy.model.CompanyDictDO; import com.subsidy.model.JobDictDO; import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import org.apache.ibatis.annotations.Param; import org.springframework.stereotype.Repository; import java.util.List; @@ -29,10 +30,4 @@ public interface JobDictMapper extends BaseMapper { */ List queryMemberJobs(Long memberId); - /** - * 查询岗位 - * @param companyId - * @return - */ - List queryJobs(Long companyId); } diff --git a/src/main/java/com/subsidy/service/impl/AdministerServiceImpl.java b/src/main/java/com/subsidy/service/impl/AdministerServiceImpl.java index 6b10d9a..368e673 100644 --- a/src/main/java/com/subsidy/service/impl/AdministerServiceImpl.java +++ b/src/main/java/com/subsidy/service/impl/AdministerServiceImpl.java @@ -44,6 +44,7 @@ import com.subsidy.model.MemberDepartmentMappingDO; import com.subsidy.model.OprAdmDictDO; import com.subsidy.model.PaperDictDO; import com.subsidy.model.RoleAdministerMappingDO; +import com.subsidy.model.RoleDictDO; import com.subsidy.model.SignInRecordDO; import com.subsidy.model.VodDictDO; import com.subsidy.service.AdministerService; @@ -321,6 +322,11 @@ public class AdministerServiceImpl extends ServiceImpl() + .lambda() + .eq(RoleAdministerMappingDO::getAdministerId,administerDO.getId())); + administerPermissionVO.setRole(roleAdministerMappingDO.getRoleId()); return administerPermissionVO; } diff --git a/src/main/java/com/subsidy/service/impl/JobDictServiceImpl.java b/src/main/java/com/subsidy/service/impl/JobDictServiceImpl.java index fa1af0b..a7686de 100644 --- a/src/main/java/com/subsidy/service/impl/JobDictServiceImpl.java +++ b/src/main/java/com/subsidy/service/impl/JobDictServiceImpl.java @@ -23,7 +23,19 @@ import java.util.List; public class JobDictServiceImpl extends ServiceImpl implements JobDictService { public List queryJobs(JobDictDO jobDictDO) { - return this.baseMapper.queryJobs(jobDictDO.getId()); + + if (null!=jobDictDO.getCompanyId()){ + return this.baseMapper.selectList(new QueryWrapper() + .lambda() + .eq(JobDictDO::getCompanyId,jobDictDO.getCompanyId()) + .orderByDesc(JobDictDO::getCreateDate)); + }else { + return this.baseMapper.selectList(new QueryWrapper() + .lambda() + .isNull(JobDictDO::getCompanyId) + .orderByDesc(JobDictDO::getCreateDate)); + } + } public String deleteJob(JobDictDO jobDictDO) { diff --git a/src/main/java/com/subsidy/vo/administer/AdministerPermissionVO.java b/src/main/java/com/subsidy/vo/administer/AdministerPermissionVO.java index d60b7f1..39fc8cc 100644 --- a/src/main/java/com/subsidy/vo/administer/AdministerPermissionVO.java +++ b/src/main/java/com/subsidy/vo/administer/AdministerPermissionVO.java @@ -11,7 +11,7 @@ public class AdministerPermissionVO { private String userName; - private String role; + private Long role; private String img; diff --git a/src/main/java/com/subsidy/vo/administer/LoginVO.java b/src/main/java/com/subsidy/vo/administer/LoginVO.java index d97ab86..1594562 100644 --- a/src/main/java/com/subsidy/vo/administer/LoginVO.java +++ b/src/main/java/com/subsidy/vo/administer/LoginVO.java @@ -7,5 +7,4 @@ public class LoginVO { private String token; - } diff --git a/src/main/resources/application.properties b/src/main/resources/application.properties index a62a220..37ce64a 100644 --- a/src/main/resources/application.properties +++ b/src/main/resources/application.properties @@ -1,7 +1,7 @@ # 环境配置 -spring.profiles.active=dev +spring.profiles.active=prod # 端口号 -spring.server.port=23457 +spring.server.port=23459 #嵌入tomcat配置 #和CPU数 spring.server.acceptorThreadCount=600 diff --git a/src/main/resources/mapper/JobDictMapper.xml b/src/main/resources/mapper/JobDictMapper.xml index fbe078d..e7462e6 100644 --- a/src/main/resources/mapper/JobDictMapper.xml +++ b/src/main/resources/mapper/JobDictMapper.xml @@ -44,15 +44,4 @@ and t.member_id = #{memberId} - - -- libgit2 0.25.0