Sfoglia il codice sorgente

企业信息管理页面搭建2

liao-sea 1 anno fa
parent
commit
6718cecfee

+ 3 - 1
src/main/java/com/hz/employmentsite/mapper/cquery/CompanyCQuery.java

@@ -6,5 +6,7 @@ import org.apache.ibatis.annotations.Param;
 import java.util.List;
 
 public interface CompanyCQuery {
-    List<CompanyVo> selectJobhuntList(@Param("name") String name, @Param("wantedJobId")Integer wantedJobId, @Param("isAccomplish")Boolean isAccomplish);
+    List<CompanyVo> getList(@Param("primaryKey") String primaryKey, @Param("companyName") String companyName,
+                            @Param("companyCode") String companyCode, @Param("recordStatus") String recordStatus,
+                            @Param("regionCode") String regionCode, @Param("streetCode") String streetCode);
 }

+ 27 - 3
src/main/java/com/hz/employmentsite/services/impl/companyService/CompanyServiceImpl.java

@@ -1,15 +1,39 @@
 package com.hz.employmentsite.services.impl.companyService;
 
+import com.github.pagehelper.PageHelper;
 import com.github.pagehelper.PageInfo;
+import com.hz.employmentsite.mapper.PcCompanyMapper;
+import com.hz.employmentsite.mapper.cquery.CompanyCQuery;
+import com.hz.employmentsite.model.PcCompanyExample;
 import com.hz.employmentsite.services.service.companyService.CompanyService;
-import com.hz.employmentsite.vo.jobUserManager.RecommendVo;
+import com.hz.employmentsite.vo.companyService.CompanyVo;
+import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
+import java.util.List;
+
 @Service("CompanyService")
 public class CompanyServiceImpl implements CompanyService {
 
+    @Autowired
+    private CompanyCQuery companyCQuery;
+
+    @Autowired
+    private PcCompanyMapper pcCompanyMapper;
+
+    @Override
+    public PageInfo<CompanyVo> getList(Integer pageIndex, Integer pageSize, String primaryKey, String companyName, String companyCode, String recordStatus, String regionCode, String streetCode) {
+        PageHelper.startPage(pageIndex, pageSize);
+        List<CompanyVo> dataList = companyCQuery.getList(primaryKey,companyName,companyCode,recordStatus,regionCode,streetCode);
+        PageInfo<CompanyVo> result = new PageInfo(dataList);
+        return result;
+    }
+
     @Override
-    public PageInfo<RecommendVo> getList(Integer page, Integer rows, String siteName, String companyName, String companyCode) {
-        return null;
+    public Integer delete(List<String> idList){
+        PcCompanyExample contactExample = new PcCompanyExample();
+        contactExample.or().andCompanyIDIn(idList);
+        pcCompanyMapper.deleteByExample(contactExample);
+        return pcCompanyMapper.deleteByExample(contactExample);
     }
 }

+ 7 - 2
src/main/java/com/hz/employmentsite/services/service/companyService/CompanyService.java

@@ -1,8 +1,13 @@
 package com.hz.employmentsite.services.service.companyService;
 
 import com.github.pagehelper.PageInfo;
-import com.hz.employmentsite.vo.jobUserManager.RecommendVo;
+import com.hz.employmentsite.vo.companyService.CompanyVo;
+
+import java.util.List;
 
 public interface CompanyService {
-    PageInfo<RecommendVo> getList(Integer page, Integer rows, String siteName, String companyName, String companyCode);
+
+    PageInfo<CompanyVo> getList(Integer pageIndex, Integer pageSize, String siteName, String companyName,String companyCode,String recordStatus,String regionCode,String streetCode);
+
+    Integer delete(List<String> idList);
 }

+ 26 - 0
src/main/resources/mapping/cquery/CompanyCQuery.xml

@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.hz.employmentsite.mapper.cquery.CompanyCQuery">
+    <select id="getList" resultType="com.hz.employmentsite.vo.companyService.CompanyVo">
+        select   *  from pc_company where 1=1
+        <if test="primaryKey!='' and primaryKey!=null">
+            and companyID in (${primaryKey})
+        </if>
+        <if test="companyName!='' and companyName!=null">
+            and companyName like Concat('%',#{companyName},'%')
+        </if>
+        <if test="companyCode!='' and companyCode!=null">
+            and companyCode like Concat('%',#{companyCode},'%')
+        </if>
+        <if test="recordStatus!='' and recordStatus!=null">
+            and recordStatus =  #{recordStatus}
+        </if>
+        <if test="regionCode!='' and regionCode!=null">
+            and regionCode like Concat('%',#{regionCode},'%')
+        </if>
+        <if test="streetCode!='' and regionCode!=null">
+            and streetCode like Concat('%',#{streetCode},'%')
+        </if>
+    </select>
+
+</mapper>

+ 1 - 1
src/main/resources/mapping/cquery/InstitutionCQuery.xml

@@ -8,7 +8,7 @@
             and B.institutionID in (${primaryKey})
         </if>
         <if test="companyName!='' and companyName!=null">
-            and companyname like Concat('%',#{companyName},'%')
+            and companyName like Concat('%',#{companyName},'%')
         </if>
         <if test="companyAddress!='' and companyAddress!=null">
             and companyAddress like Concat('%',#{companyAddress},'%')

+ 2 - 2
vue/src/router/asyncModules/companyService.ts

@@ -1,4 +1,4 @@
 export default {
-  'companyService/company/index': () => import('@/views/company/index.vue'),
-  'companyService/post/index': () => import('@/views/post/index.vue'),
+  'companyService/company/index': () => import('@/views/companyService/company/index.vue'),
+  'companyService/post/index': () => import('@/views/companyService/post/index.vue'),
 };

vue/src/views/company/index.vue → vue/src/views/companyService/company/index.vue


vue/src/views/post/index.vue → vue/src/views/companyService/post/index.vue