Browse Source

查询火苗职位接口SQL调整

DESKTOP-VAEGFGM\zqc 8 months ago
parent
commit
3443542d61

+ 3 - 0
menduner/menduner-system-biz/src/main/java/com/citu/module/menduner/system/controller/app/jobhunt/flame/AppFlameJobAdvertisedRespVO.java

@@ -31,4 +31,7 @@ public class AppFlameJobAdvertisedRespVO extends JobAdvertisedSimpleRespVO {
     @Schema(description = "职位类型名称", example = "java")
     private String positionName;
 
+    // 工作经验
+    private String type;
+
 }

+ 10 - 4
menduner/menduner-system-biz/src/main/java/com/citu/module/menduner/system/controller/app/jobhunt/flame/AppFlameJobController.java

@@ -2,6 +2,7 @@ package com.citu.module.menduner.system.controller.app.jobhunt.flame;
 
 import com.citu.framework.common.pojo.CommonResult;
 import com.citu.framework.common.pojo.PageResult;
+import com.citu.framework.tenant.core.aop.TenantIgnore;
 import com.citu.module.menduner.system.controller.app.jobhunt.industry.vo.AppIndustryListReqVO;
 import com.citu.module.menduner.system.controller.app.jobhunt.industry.vo.AppIndustrySimpleRespVO;
 import com.citu.module.menduner.system.controller.base.enterprise.vo.EnterpriseDetailRespVO;
@@ -16,10 +17,7 @@ import io.swagger.v3.oas.annotations.tags.Tag;
 import lombok.extern.slf4j.Slf4j;
 import org.springframework.security.access.prepost.PreAuthorize;
 import org.springframework.validation.annotation.Validated;
-import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RequestParam;
-import org.springframework.web.bind.annotation.RestController;
+import org.springframework.web.bind.annotation.*;
 
 import javax.annotation.Resource;
 import javax.validation.Valid;
@@ -45,12 +43,20 @@ public class AppFlameJobController {
     @Resource
     private DictDataApi dictDataApi;
 
+    @TenantIgnore
     @GetMapping("/page")
     @Operation(summary = "分页搜索职位")
     public CommonResult<PageResult<AppFlameJobRespVO>> getFlameJobPage(@Valid AppFlameJobPageReqVO reqVO) {
         return success(jobIntegrationService.getFlameJobPage(reqVO));
     }
 
+    @TenantIgnore
+    @PostMapping("/page")
+    @Operation(summary = "分页搜索职位")
+    public CommonResult<PageResult<AppFlameJobRespVO>> getFlameJobPage2(@RequestBody @Valid AppFlameJobPageReqVO reqVO) {
+        return success(jobIntegrationService.getFlameJobPage(reqVO));
+    }
+
     @GetMapping("/get/enterprise")
     @Operation(summary = "获得企业信息")
     public CommonResult<EnterpriseDetailRespVO> getEnterprise(@RequestParam("id") Long id) {

+ 1 - 1
menduner/menduner-system-biz/src/main/java/com/citu/module/menduner/system/controller/app/jobhunt/flame/AppFlameJobPageReqVO.java

@@ -14,7 +14,7 @@ import java.util.List;
 @NoArgsConstructor
 public class AppFlameJobPageReqVO extends PageParam {
 
-
+    @Schema(description = "岗位Ids", example = "java")
     private List<Long> jobIds;
 
     @Schema(description = "搜索内容", example = "java")

+ 4 - 0
menduner/menduner-system-biz/src/main/java/com/citu/module/menduner/system/dal/mysql/job/JobFairDetailMapper.java

@@ -1,9 +1,11 @@
 package com.citu.module.menduner.system.dal.mysql.job;
 
 
+import com.baomidou.mybatisplus.annotation.InterceptorIgnore;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.citu.framework.mybatis.core.mapper.BaseMapperX;
+import com.citu.framework.tenant.core.aop.TenantIgnore;
 import com.citu.module.menduner.system.controller.app.jobhunt.flame.AppFlameJobPageReqVO;
 import com.citu.module.menduner.system.controller.app.jobhunt.flame.AppFlameJobRespVO;
 import com.citu.module.menduner.system.dal.dataobject.job.JobFairDetailDO;
@@ -21,6 +23,8 @@ import java.util.List;
 public interface JobFairDetailMapper extends BaseMapperX<JobFairDetailDO> {
 
 
+
+    @InterceptorIgnore(tenantLine = "true")
     IPage<AppFlameJobRespVO> search(Page<?> page, @Param("reqVO") AppFlameJobPageReqVO reqVO);
 
 

+ 2 - 0
menduner/menduner-system-biz/src/main/java/com/citu/module/menduner/system/service/job/JobIntegrationServiceImpl.java

@@ -8,6 +8,7 @@ import com.citu.framework.common.pojo.PageParam;
 import com.citu.framework.common.pojo.PageResult;
 import com.citu.framework.dict.core.DictFrameworkUtils;
 import com.citu.framework.mybatis.core.util.MyBatisUtils;
+import com.citu.framework.tenant.core.aop.TenantIgnore;
 import com.citu.module.menduner.common.util.LoginUserContext;
 import com.citu.module.menduner.system.controller.app.jobhunt.flame.AppFlameJobPageReqVO;
 import com.citu.module.menduner.system.controller.app.jobhunt.flame.AppFlameJobRespVO;
@@ -418,6 +419,7 @@ public class JobIntegrationServiceImpl implements JobIntegrationService {
         jobFairDetailMapper.deleteById(detailDO.getId());
     }
 
+    @TenantIgnore
     @Override
     public PageResult<AppFlameJobRespVO> getFlameJobPage(AppFlameJobPageReqVO reqVO) {
         IPage<AppFlameJobRespVO> pageResult = jobFairDetailMapper.search(MyBatisUtils.buildPage(reqVO), reqVO);

+ 69 - 25
menduner/menduner-system-biz/src/main/resources/mapper/job/JobFairDetailMapper.xml

@@ -10,8 +10,12 @@
         <association property="job"
                      javaType="com.citu.module.menduner.system.controller.app.jobhunt.flame.AppFlameJobAdvertisedRespVO"
                      autoMapping="true">
-            <result property="tagList" column="tag_list"  typeHandler="com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler"/>
+            <result property="tagList" column="job_tag_list"  typeHandler="com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler"/>
             <result property="id"  column="job_id"/>
+            <result property="name" column="job_title"/>
+            <result property="status" column="job_status"/>
+            <result property="type" column="work_experience_type"/>
+            <result property="address" column="job_address"/>
         </association>
 
 
@@ -35,16 +39,59 @@
         <association property="business"
                      javaType="com.citu.module.menduner.system.controller.base.enterprise.business.EnterpriseBusinessRespVO"
                      autoMapping="true">
+            <result property="name" column="enterprise_name" />
+
         </association>
     </resultMap>
 
     <select id="search"
             resultMap="AppFlameJobRespVOResultMap" >
         select
-        e.name as enterprise_name,
-        e.id as eenterprise_id,
-        d.job_id as job_id,
-        a.*,x.*,e.*,b.*
+            e.name as enterprise_name,
+            e.id as eenterprise_id,
+            d.job_id as job_id,
+            a.user_id,
+            a.area_id,
+            a.name as job_title, <!-- 招聘职位标题 -->
+            a.position_id,
+            a.type as work_experience_type,
+            a.exp_type,
+            a.edu_type,
+            a.pay_from,
+            a.pay_to,
+            a.pay_unit,
+            a.tag_list as  job_tag_list,  <!-- 职位标签 -->
+            a.content,
+            a.requirement,
+            a.expire_time,
+            a.top,
+            a.address as job_address,
+            a.longitude,
+            a.latitude,
+            a.hire,
+            a.hire_price,
+            a.status  as job_status, <!-- 职位状态 -->
+            x.major_id,
+            x.hot,
+            x.dept,
+            x.frequency,
+            e.*,
+            b.code,
+            b.type,
+            b.area,
+            b.address,
+            b.representative,
+            b.establishment_time,
+            b.registered_capital,
+            b.approval_time,
+            b.former_name,
+            b.industry,
+            b.registration_authority,
+            b.business_status,
+            b.business_term,
+            b.business_scope
+<!--       b.business_url  -->
+
         from
         mde_job_fair as f
         inner join mde_job_fair_detail as d on f.id = d.job_fair_id
@@ -57,43 +104,40 @@
            and a.status = 0
            and (a.expire_time > now() or a.expire_time is null)
 
-           <if test="reqVO.enterpriseId != null">
-               and e.id = #{enterpriseId}
-               and f.enterprise_id = #{enterpriseId}
+           <if test="reqVO.enterpriseId != null and 0!=reqVO.enterpriseId">
+               and e.id = #{reqVO.enterpriseId}
+               and f.enterprise_id = #{reqVO.enterpriseId}
            </if>
-           <if test="reqVO.jobFairId != null">
-               and f.id = #{jobFairId}
+           <if test="reqVO.jobFairId != null and 0!=reqVO.jobFairId ">
+               and f.id = #{reqVO.jobFairId}
            </if>
            <if test="reqVO.content != null and reqVO.content != ''">
                and (a.name like concat('%',#{content},'%') or e.name like concat('%',#{content},'%')) or e.another_name like concat('%',#{content},'%'))
            </if>
-           <if test="reqVO.areaId != null">
-               and a.area_id = #{areaId}
+           <if test="reqVO.areaId != null and 0!=reqVO.areaId">
+               and a.area_id = #{reqVO.areaId}
            </if>
-           <if test="reqVO.positionId != null">
-               and a.position_id = #{positionId}
+           <if test="reqVO.positionId != null  and 0!= reqVO.positionId">
+               and a.position_id = #{reqVO.positionId}
            </if>
-           <if test="reqVO.jobType != null">
-               and a.job_type = #{jobType}
-           </if>
-           <if test="reqVO.eduType != null">
-               and a.edu_type = #{eduType}
+<!--           <if test="reqVO.jobType != null">-->
+<!--               and a.job_type = #{reqVO.jobType}-->
+<!--           </if>-->
+           <if test="reqVO.eduType != null  and 0!=reqVO.eduType ">
+               and a.edu_type = #{reqVO.eduType}
            </if>
            <if test="reqVO.hot != null">
-               and x.hot = #{hot}
+               and x.hot = #{reqVO.hot}
            </if>
            <if test="reqVO.majorId != null">
-               and x.major_id = #{majorId}
+               and x.major_id = #{reqVO.majorId}
            </if>
-
            <if test="reqVO.jobIds != null  and reqVO.jobIds.size() > 0 ">
-               f.id  in
+             and  d.job_id  in
                <foreach collection="reqVO.jobIds" item="item" separator="," open="(" close=")">
                    #{item}
                </foreach>
            </if>
-
-
        </where>
         ORDER BY d.create_time ,a.update_time DESC