Commit 257da81e by 涂亚平

start...

1 parent 6053fd45
Showing with 146 additions and 358 deletions
2023-02-21 17:40:33,790 [http-nio-34567-exec-6] ERROR com.laowu.common.exception.GlobalExceptionHandler:88 - JSON parse error: Cannot deserialize instance of `java.lang.Long` out of START_ARRAY token; nested exception is com.fasterxml.jackson.databind.exc.MismatchedInputException: Cannot deserialize instance of `java.lang.Long` out of START_ARRAY token 2023-02-22 13:26:33,663 [http-nio-34567-exec-8] ERROR com.laowu.common.exception.GlobalExceptionHandler:88 - JSON parse error: Cannot deserialize instance of `java.lang.Long` out of START_ARRAY token; nested exception is com.fasterxml.jackson.databind.exc.MismatchedInputException: Cannot deserialize instance of `java.lang.Long` out of START_ARRAY token
at [Source: (PushbackInputStream); line: 1, column: 78] (through reference chain: com.laowu.dto.job.JobDTO["positions"]->java.util.ArrayList[0]) at [Source: (PushbackInputStream); line: 1, column: 50] (through reference chain: com.laowu.dto.job.JobDTO["recruitId"])
2023-02-21 17:49:44,584 [http-nio-34567-exec-6] ERROR com.laowu.common.exception.GlobalExceptionHandler:88 - JSON parse error: Cannot deserialize instance of `java.lang.Long` out of START_ARRAY token; nested exception is com.fasterxml.jackson.databind.exc.MismatchedInputException: Cannot deserialize instance of `java.lang.Long` out of START_ARRAY token 2023-02-22 17:01:30,928 [http-nio-34567-exec-7] ERROR com.laowu.common.exception.GlobalExceptionHandler:88 - JSON parse error: Cannot deserialize instance of `java.lang.Long` out of START_ARRAY token; nested exception is com.fasterxml.jackson.databind.exc.MismatchedInputException: Cannot deserialize instance of `java.lang.Long` out of START_ARRAY token
at [Source: (PushbackInputStream); line: 1, column: 78] (through reference chain: com.laowu.dto.job.JobDTO["positions"]->java.util.ArrayList[0]) at [Source: (PushbackInputStream); line: 1, column: 40] (through reference chain: com.laowu.dto.company.CompanyDTO["placeId"])
This diff could not be displayed because it is too large.
...@@ -133,6 +133,7 @@ ...@@ -133,6 +133,7 @@
</dependencies> </dependencies>
<build> <build>
<finalName>laowu</finalName>
<plugins> <plugins>
<plugin> <plugin>
<groupId>org.springframework.boot</groupId> <groupId>org.springframework.boot</groupId>
......
package com.laowu.controller; package com.laowu.controller;
import com.laowu.service.CityDictService;
import com.laowu.util.ResponseData;
import com.laowu.util.ResponseVO;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
...@@ -16,7 +22,17 @@ import io.swagger.annotations.Api; ...@@ -16,7 +22,17 @@ import io.swagger.annotations.Api;
*/ */
@RestController @RestController
@Api(tags = "城市字典表") @Api(tags = "城市字典表")
@RequestMapping("/city-dict-do") @RequestMapping("/cityDict")
public class CityDictController { public class CityDictController {
@Autowired
private CityDictService cityDictService;
@PostMapping("allCities")
@ApiOperation("查询所有城市 ")
public ResponseVO allCities(){
return ResponseData.generateCreatedResponse(0,cityDictService.allCities());
}
} }
...@@ -32,7 +32,7 @@ public class CompanyDictController { ...@@ -32,7 +32,7 @@ public class CompanyDictController {
private CompanyDictService companyDictService; private CompanyDictService companyDictService;
@PostMapping("/company") @PostMapping("/company")
@ApiOperation("获取所有企业 pageSize pageNum companyName placeId businessId") @ApiOperation("获取所有企业 pageSize pageNum companyName cityId businessId")
public ResponseVO company(@RequestBody CompanyDTO companyDTO){ public ResponseVO company(@RequestBody CompanyDTO companyDTO){
return ResponseData.generateCreatedResponse(0,companyDictService.company(companyDTO)); return ResponseData.generateCreatedResponse(0,companyDictService.company(companyDTO));
} }
...@@ -44,13 +44,13 @@ public class CompanyDictController { ...@@ -44,13 +44,13 @@ public class CompanyDictController {
} }
@PostMapping("addCompany") @PostMapping("addCompany")
@ApiOperation("添加企业 companyName companyLogo placeId businessId companyCode account companyDesc companyPhotoDOS[ photo]") @ApiOperation("添加企业 companyName companyLogo cityId businessId companyCode account companyDesc companyPhotoDOS[ photo]")
public ResponseVO addCompany(@RequestBody AddCompanyDTO addCompanyDTO){ public ResponseVO addCompany(@RequestBody AddCompanyDTO addCompanyDTO){
return ResponseData.generateCreatedResponse(0,companyDictService.addCompany(addCompanyDTO)); return ResponseData.generateCreatedResponse(0,companyDictService.addCompany(addCompanyDTO));
} }
@PostMapping("updateCompany") @PostMapping("updateCompany")
@ApiOperation("更新企业 id companyName companyLogo placeId businessId companyCode account companyDesc companyPhotoDOS[ photo]") @ApiOperation("更新企业 id companyName companyLogo cityId businessId companyCode account companyDesc companyPhotoDOS[ photo]")
public ResponseVO updateCompany(@RequestBody AddCompanyDTO addCompanyDTO){ public ResponseVO updateCompany(@RequestBody AddCompanyDTO addCompanyDTO){
return ResponseData.generateCreatedResponse(0,companyDictService.updateCompany(addCompanyDTO)); return ResponseData.generateCreatedResponse(0,companyDictService.updateCompany(addCompanyDTO));
} }
......
package com.laowu.controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import io.swagger.annotations.Api;
/**
* <p>
* 公司介绍 前端控制器
* </p>
*
* @author Tuyp
* @since 2023-02-15
*/
@RestController
@Api(tags = "公司介绍")
@RequestMapping("/job-photo-do")
public class JobPhotoController {
}
package com.laowu.controller;
import com.laowu.service.ProvinceDictService;
import com.laowu.util.ResponseData;
import com.laowu.util.ResponseVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import io.swagger.annotations.Api;
/**
* <p>
* 城市字典表 前端控制器
* </p>
*
* @author Tuyp
* @since 2023-02-15
*/
@RestController
@Api(tags = "城市字典表")
@RequestMapping("/provinceDict")
public class ProvinceDictController {
@Autowired
private ProvinceDictService provinceDictService;
@PostMapping("allProvince")
public ResponseVO allProvince(){
return ResponseData.generateCreatedResponse(0,provinceDictService.allProvince());
}
}
...@@ -11,7 +11,7 @@ public class CompanyDTO { ...@@ -11,7 +11,7 @@ public class CompanyDTO {
private String companyName; private String companyName;
private Long placeId; private Long cityId;
private Long businessId; private Long businessId;
......
...@@ -11,11 +11,11 @@ public class JobDTO { ...@@ -11,11 +11,11 @@ public class JobDTO {
private Integer pageNum; private Integer pageNum;
private Long recruitId; private List<Long> recruitId;
private Integer jobType; private Integer jobType;
private Long cityId; private List<Long> cityId;
private List<Long> positions; private List<Long> positions;
......
...@@ -20,6 +20,6 @@ public interface CompanyDictMapper extends BaseMapper<CompanyDictDO> { ...@@ -20,6 +20,6 @@ public interface CompanyDictMapper extends BaseMapper<CompanyDictDO> {
/** /**
* 查询企业 * 查询企业
*/ */
IPage<CompanyVO> company(IPage page, String companyName, Long placeId,Long businessId); IPage<CompanyVO> company(IPage page, String companyName, Long cityId,Long businessId);
} }
...@@ -24,7 +24,7 @@ public interface JobDictMapper extends BaseMapper<JobDictDO> { ...@@ -24,7 +24,7 @@ public interface JobDictMapper extends BaseMapper<JobDictDO> {
/** /**
* 查询工作 分页 * 查询工作 分页
*/ */
IPage<JobVO> jobs(IPage page, Long recruitId, Long cityId, List<Long> positions,Integer jobType,String jobName,String recruitStatus); IPage<JobVO> jobs(IPage page, List<Long> recruitId, List<Long> cityId, List<Long> positions,Integer jobType,String jobName,String recruitStatus);
/** /**
* 查询 一个工作 * 查询 一个工作
......
package com.laowu.mapper;
import com.laowu.model.JobPhotoDO;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.springframework.stereotype.Repository;
/**
* <p>
* 公司介绍 Mapper 接口
* </p>
*
* @author Tuyp
* @since 2023-02-15
*/
@Repository
public interface JobPhotoMapper extends BaseMapper<JobPhotoDO> {
}
package com.laowu.mapper;
import com.laowu.model.ProvinceDictDO;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.springframework.stereotype.Repository;
/**
* <p>
* 城市字典表 Mapper 接口
* </p>
*
* @author Tuyp
* @since 2023-02-15
*/
@Repository
public interface ProvinceDictMapper extends BaseMapper<ProvinceDictDO> {
}
...@@ -28,7 +28,7 @@ public class CityDictDO extends BaseModel { ...@@ -28,7 +28,7 @@ public class CityDictDO extends BaseModel {
/** /**
* 省id * 省id
*/ */
private Long provinceId; private Long parentId;
/** /**
* 城市名 * 城市名
......
...@@ -38,7 +38,7 @@ public class CompanyDictDO extends BaseModel { ...@@ -38,7 +38,7 @@ public class CompanyDictDO extends BaseModel {
/** /**
* 地区id * 地区id
*/ */
private Long placeId; private Long cityId;
/** /**
* 经营范围id * 经营范围id
......
...@@ -86,9 +86,9 @@ public class JobDictDO extends BaseModel { ...@@ -86,9 +86,9 @@ public class JobDictDO extends BaseModel {
*/ */
private String jobRequirement; private String jobRequirement;
/** // /**
* 公司描述 // * 公司描述
*/ // */
private String companyDesc; // private String companyDesc;
} }
package com.laowu.model;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.laowu.util.BaseModel;
import lombok.Data;
import lombok.EqualsAndHashCode;
/**
* <p>
* 公司介绍
* </p>
*
* @author Tuyp
* @since 2023-02-15
*/
@Data
@EqualsAndHashCode(callSuper = true)
@TableName("job_photo")
public class JobPhotoDO extends BaseModel {
private static final long serialVersionUID = 1L;
@TableId(value = "id", type = IdType.AUTO)
private Long id;
/**
* 职位id
*/
private Long jobId;
/**
* 公司照片
*/
private String companyPhotos;
}
package com.laowu.model;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.laowu.util.BaseModel;
import lombok.Data;
import lombok.EqualsAndHashCode;
/**
* <p>
* 城市字典表
* </p>
*
* @author Tuyp
* @since 2023-02-15
*/
@Data
@EqualsAndHashCode(callSuper = true)
@TableName("province_dict")
public class ProvinceDictDO extends BaseModel {
private static final long serialVersionUID = 1L;
@TableId(value = "id", type = IdType.AUTO)
private Long id;
/**
* 城市
*/
private String province;
}
...@@ -2,6 +2,9 @@ package com.laowu.service; ...@@ -2,6 +2,9 @@ package com.laowu.service;
import com.laowu.model.CityDictDO; import com.laowu.model.CityDictDO;
import com.baomidou.mybatisplus.extension.service.IService; import com.baomidou.mybatisplus.extension.service.IService;
import com.laowu.vo.city.AllCitiesVO;
import java.util.List;
/** /**
* <p> * <p>
...@@ -13,4 +16,6 @@ import com.baomidou.mybatisplus.extension.service.IService; ...@@ -13,4 +16,6 @@ import com.baomidou.mybatisplus.extension.service.IService;
*/ */
public interface CityDictService extends IService<CityDictDO> { public interface CityDictService extends IService<CityDictDO> {
List<AllCitiesVO> allCities();
} }
package com.laowu.service;
import com.laowu.model.JobPhotoDO;
import com.baomidou.mybatisplus.extension.service.IService;
/**
* <p>
* 公司介绍 服务类
* </p>
*
* @author Tuyp
* @since 2023-02-15
*/
public interface JobPhotoService extends IService<JobPhotoDO> {
}
package com.laowu.service;
import com.laowu.model.ProvinceDictDO;
import com.baomidou.mybatisplus.extension.service.IService;
import java.util.List;
/**
* <p>
* 城市字典表 服务类
* </p>
*
* @author Tuyp
* @since 2023-02-15
*/
public interface ProvinceDictService extends IService<ProvinceDictDO> {
List<ProvinceDictDO> allProvince();
}
package com.laowu.service.impl; package com.laowu.service.impl;
import com.laowu.model.CityDictDO; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.laowu.mapper.CityDictMapper; import com.laowu.mapper.CityDictMapper;
import com.laowu.model.CityDictDO;
import com.laowu.service.CityDictService; import com.laowu.service.CityDictService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.laowu.vo.city.AllCitiesVO;
import org.springframework.beans.BeanUtils;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import java.util.ArrayList;
import java.util.List;
/** /**
* <p> * <p>
* 城市字典表 服务实现类 * 城市字典表 服务实现类
...@@ -17,4 +23,25 @@ import org.springframework.stereotype.Service; ...@@ -17,4 +23,25 @@ import org.springframework.stereotype.Service;
@Service @Service
public class CityDictServiceImpl extends ServiceImpl<CityDictMapper, CityDictDO> implements CityDictService { public class CityDictServiceImpl extends ServiceImpl<CityDictMapper, CityDictDO> implements CityDictService {
public List<AllCitiesVO> allCities() {
List<AllCitiesVO> allCities = new ArrayList<>();
List<CityDictDO> cityDictDOS = this.baseMapper.selectList(new QueryWrapper<CityDictDO>()
.lambda()
.isNull(CityDictDO::getParentId));
for (CityDictDO cityDictDO : cityDictDOS){
AllCitiesVO allCitiesVO = new AllCitiesVO();
BeanUtils.copyProperties(cityDictDO, allCitiesVO);
List<CityDictDO> cityDictDOS1 = this.baseMapper.selectList(new QueryWrapper<CityDictDO>()
.lambda()
.eq(CityDictDO::getParentId,cityDictDO.getId()));
allCitiesVO.setCityDictDOS(cityDictDOS1);
allCities.add(allCitiesVO);
}
return allCities;
}
} }
...@@ -38,7 +38,7 @@ public class CompanyDictServiceImpl extends ServiceImpl<CompanyDictMapper, Compa ...@@ -38,7 +38,7 @@ public class CompanyDictServiceImpl extends ServiceImpl<CompanyDictMapper, Compa
Page pager = new Page(companyDTO.getPageNum(), companyDTO.getPageSize()); Page pager = new Page(companyDTO.getPageNum(), companyDTO.getPageSize());
IPage<CompanyVO> company = this.baseMapper.company(pager, companyDTO.getCompanyName(), companyDTO.getPlaceId(), companyDTO.getBusinessId()); IPage<CompanyVO> company = this.baseMapper.company(pager, companyDTO.getCompanyName(), companyDTO.getCityId(), companyDTO.getBusinessId());
List<CompanyVO> records = company.getRecords(); List<CompanyVO> records = company.getRecords();
for (CompanyVO companyVO : records) { for (CompanyVO companyVO : records) {
......
...@@ -8,11 +8,11 @@ import com.laowu.common.exception.HttpException; ...@@ -8,11 +8,11 @@ import com.laowu.common.exception.HttpException;
import com.laowu.dto.job.BatchAddJobDTO; import com.laowu.dto.job.BatchAddJobDTO;
import com.laowu.dto.job.JobDTO; import com.laowu.dto.job.JobDTO;
import com.laowu.dto.job.JobManagementDTO; import com.laowu.dto.job.JobManagementDTO;
import com.laowu.mapper.CompanyPhotoMapper;
import com.laowu.mapper.JobDictMapper; import com.laowu.mapper.JobDictMapper;
import com.laowu.mapper.JobPhotoMapper;
import com.laowu.mapper.PositionDictMapper; import com.laowu.mapper.PositionDictMapper;
import com.laowu.model.CompanyPhotoDO;
import com.laowu.model.JobDictDO; import com.laowu.model.JobDictDO;
import com.laowu.model.JobPhotoDO;
import com.laowu.service.JobDictService; import com.laowu.service.JobDictService;
import com.laowu.util.ConstantUtils; import com.laowu.util.ConstantUtils;
import com.laowu.util.ExcelUtil; import com.laowu.util.ExcelUtil;
...@@ -39,7 +39,7 @@ import java.util.List; ...@@ -39,7 +39,7 @@ import java.util.List;
public class JobDictServiceImpl extends ServiceImpl<JobDictMapper, JobDictDO> implements JobDictService { public class JobDictServiceImpl extends ServiceImpl<JobDictMapper, JobDictDO> implements JobDictService {
@Autowired @Autowired
private JobPhotoMapper jobPhotoMapper; private CompanyPhotoMapper companyPhotoMapper;
@Autowired @Autowired
private PositionDictMapper positionDictMapper; private PositionDictMapper positionDictMapper;
...@@ -52,10 +52,10 @@ public class JobDictServiceImpl extends ServiceImpl<JobDictMapper, JobDictDO> im ...@@ -52,10 +52,10 @@ public class JobDictServiceImpl extends ServiceImpl<JobDictMapper, JobDictDO> im
public OneJobVO oneJob(JobDictDO jobDictDO) { public OneJobVO oneJob(JobDictDO jobDictDO) {
OneJobVO oneJob = this.baseMapper.oneJob(jobDictDO.getId()); OneJobVO oneJob = this.baseMapper.oneJob(jobDictDO.getId());
List<JobPhotoDO> jobPhotoDOS = jobPhotoMapper.selectList(new QueryWrapper<JobPhotoDO>() List<CompanyPhotoDO> companyPhotoDOS = companyPhotoMapper.selectList(new QueryWrapper<CompanyPhotoDO>()
.lambda() .lambda()
.eq(JobPhotoDO::getJobId, jobDictDO.getId())); .eq(CompanyPhotoDO::getCompanyId, oneJob.getCompanyId()));
oneJob.setJobPhotoDOS(jobPhotoDOS); oneJob.setCompanyPhotoDOS(companyPhotoDOS);
return oneJob; return oneJob;
} }
......
package com.laowu.service.impl;
import com.laowu.model.JobPhotoDO;
import com.laowu.mapper.JobPhotoMapper;
import com.laowu.service.JobPhotoService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;
/**
* <p>
* 公司介绍 服务实现类
* </p>
*
* @author Tuyp
* @since 2023-02-15
*/
@Service
public class JobPhotoServiceImpl extends ServiceImpl<JobPhotoMapper, JobPhotoDO> implements JobPhotoService {
}
package com.laowu.service.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.laowu.mapper.ProvinceDictMapper;
import com.laowu.model.ProvinceDictDO;
import com.laowu.service.ProvinceDictService;
import org.springframework.stereotype.Service;
import java.util.List;
/**
* <p>
* 城市字典表 服务实现类
* </p>
*
* @author Tuyp
* @since 2023-02-15
*/
@Service
public class ProvinceDictServiceImpl extends ServiceImpl<ProvinceDictMapper, ProvinceDictDO> implements ProvinceDictService {
public List<ProvinceDictDO> allProvince() {
return this.baseMapper.selectList(null);
}
}
package com.laowu.vo.city;
import com.laowu.model.CityDictDO;
import lombok.Data;
import java.util.List;
@Data
public class AllCitiesVO extends CityDictDO{
private List<CityDictDO> cityDictDOS;
}
...@@ -10,7 +10,7 @@ public class CompanyVO { ...@@ -10,7 +10,7 @@ public class CompanyVO {
private Long id; private Long id;
private Long placeId; private Long cityId;
private Long businessId; private Long businessId;
...@@ -18,7 +18,7 @@ public class CompanyVO { ...@@ -18,7 +18,7 @@ public class CompanyVO {
private String companyLogo; private String companyLogo;
private String place; private String city;
private String business; private String business;
......
...@@ -27,6 +27,8 @@ public class JobVO { ...@@ -27,6 +27,8 @@ public class JobVO {
private Long cityId; private Long cityId;
private Long cityParentId;
private Long recruitId; private Long recruitId;
private String recruitType; private String recruitType;
...@@ -43,4 +45,6 @@ public class JobVO { ...@@ -43,4 +45,6 @@ public class JobVO {
private Long positionId; private Long positionId;
private Long parentPositionId;
} }
package com.laowu.vo.job; package com.laowu.vo.job;
import com.laowu.model.JobPhotoDO; import com.laowu.model.CompanyPhotoDO;
import lombok.Data; import lombok.Data;
import java.util.List; import java.util.List;
...@@ -14,6 +14,8 @@ public class OneJobVO { ...@@ -14,6 +14,8 @@ public class OneJobVO {
private String jobName; private String jobName;
private Long companyId;
private String companyName; private String companyName;
private String startSalary; private String startSalary;
...@@ -38,5 +40,5 @@ public class OneJobVO { ...@@ -38,5 +40,5 @@ public class OneJobVO {
private String companyDesc; private String companyDesc;
private List<JobPhotoDO> jobPhotoDOS; private List<CompanyPhotoDO> companyPhotoDOS;
} }
laowu.code-message[0]=成功 laowu.code-message[0]=成功
laowu.code-message[10001]=该地点已存在 laowu.code-message[10001]=该地点已存在
laowu.code-message[20001]=该目录已存在 laowu.code-message[20001]=该目录已存在
laowu.code-message[30001]=该公司已存在 laowu.code-message[30001]=该公司已存在
laowu.code-message[40001]=该用户已存在 laowu.code-message[40001]=该用户已存在
laowu.code-message[50001]=账号或密码错误 laowu.code-message[50001]=账号或密码错误
laowu.code-message[60001]=该经营范围已存在 laowu.code-message[60001]=该经营范围已存在
...@@ -8,7 +8,6 @@ ...@@ -8,7 +8,6 @@
<result column="create_date" property="createDate" /> <result column="create_date" property="createDate" />
<result column="update_date" property="updateDate" /> <result column="update_date" property="updateDate" />
<result column="delete_date" property="deleteDate" /> <result column="delete_date" property="deleteDate" />
<result column="province_id" property="provinceId" />
<result column="city" property="city" /> <result column="city" property="city" />
</resultMap> </resultMap>
...@@ -22,13 +21,14 @@ ...@@ -22,13 +21,14 @@
<select id="getCityName" parameterType="long" resultType="string"> <select id="getCityName" parameterType="long" resultType="string">
SELECT SELECT
concat( t2.province, t.city ) AS cityName concat( t2.city, t.city ) AS cityName
FROM FROM
city_dict t city_dict t
LEFT JOIN province_dict t2 ON t.province_id = t2.id LEFT JOIN city_dict t2 ON t.parent_id = t2.id
WHERE WHERE
t.delete_date IS NULL t.delete_date IS NULL
AND t2.delete_date IS NULL AND t2.delete_date IS NULL
and t2.parent_id is null
AND t.id = #{id} AND t.id = #{id}
</select> </select>
</mapper> </mapper>
...@@ -10,10 +10,8 @@ ...@@ -10,10 +10,8 @@
<result column="delete_date" property="deleteDate" /> <result column="delete_date" property="deleteDate" />
<result column="company_name" property="companyName" /> <result column="company_name" property="companyName" />
<result column="place_id" property="placeId" /> <result column="place_id" property="placeId" />
<result column="position_id" property="positionId" />
<result column="company_code" property="companyCode" /> <result column="company_code" property="companyCode" />
<result column="account" property="account" /> <result column="account" property="account" />
<result column="desc" property="desc" />
</resultMap> </resultMap>
<!-- 通用查询结果列 --> <!-- 通用查询结果列 -->
...@@ -27,25 +25,26 @@ ...@@ -27,25 +25,26 @@
<select id="company" resultType="com.laowu.vo.company.CompanyVO"> <select id="company" resultType="com.laowu.vo.company.CompanyVO">
SELECT SELECT
t.id, t.id,
t2.id as place_id, t2.id as city_id,
t3.id as business_id, t3.id as business_id,
t.company_name, t.company_name,
t.company_logo, t.company_logo,
t2.place, t2.city,
t3.business, t3.business,
t.company_code, t.company_code,
t.account, t.account,
t.company_desc t.company_desc
FROM FROM
company_dict t company_dict t
LEFT JOIN place_dict t2 ON t.place_id = t2.id LEFT JOIN city_dict t2 ON t.city_id = t2.id
LEFT JOIN business_dict t3 ON t.business_id = t3.id LEFT JOIN business_dict t3 ON t.business_id = t3.id
WHERE WHERE
t.delete_date IS NULL t.delete_date IS NULL
AND t2.delete_date IS NULL AND t2.delete_date IS NULL
AND t3.delete_date IS NULL AND t3.delete_date IS NULL
<if test="placeId != null and placeId != ''"> and t2.parent_id is null
and t.place_id = #{placeId} <if test="cityId != null and cityId != ''">
and t.city_id = #{cityId}
</if> </if>
<if test="businessId != null and businessId != ''"> <if test="businessId != null and businessId != ''">
and t.business_id = #{businessId} and t.business_id = #{businessId}
......
...@@ -21,14 +21,16 @@ ...@@ -21,14 +21,16 @@
t.recruit_status, t.recruit_status,
t.start_salary, t.start_salary,
t.end_salary, t.end_salary,
t4.province, t4.city as province,
t3.city, t3.city,
t.city_id, t.city_id,
t4.id as city_parent_id,
t.recruit_id, t.recruit_id,
t.job_desc, t.job_desc,
t.job_requirement, t.job_requirement,
t2.recruit_type, t2.recruit_type,
t5.id as position_id, t5.id as position_id,
t6.id as parent_position_id,
t6.position_type AS parentType, t6.position_type AS parentType,
t5.position_type AS sonType, t5.position_type AS sonType,
CONCAT( t6.position_code, t5.position_code, t.job_id ) AS jobId CONCAT( t6.position_code, t5.position_code, t.job_id ) AS jobId
...@@ -36,7 +38,7 @@ ...@@ -36,7 +38,7 @@
job_dict t job_dict t
LEFT JOIN recruit_dict t2 ON t.recruit_id = t2.id LEFT JOIN recruit_dict t2 ON t.recruit_id = t2.id
LEFT JOIN city_dict t3 ON t.city_id = t3.id LEFT JOIN city_dict t3 ON t.city_id = t3.id
LEFT JOIN province_dict t4 ON t3.province_id = t4.id LEFT JOIN city_dict t4 ON t3.parent_id = t4.id
LEFT JOIN position_dict t5 ON t.position_id = t5.id LEFT JOIN position_dict t5 ON t.position_id = t5.id
LEFT JOIN position_dict t6 ON t5.parent_id = t6.id LEFT JOIN position_dict t6 ON t5.parent_id = t6.id
left join company_dict t7 ON t.company_id = t7.id left join company_dict t7 ON t.company_id = t7.id
...@@ -47,12 +49,19 @@ ...@@ -47,12 +49,19 @@
AND t4.delete_date IS NULL AND t4.delete_date IS NULL
AND t5.delete_date IS NULL AND t5.delete_date IS NULL
AND t6.delete_date IS NULL AND t6.delete_date IS NULL
and t4.parent_id is null
and t.job_type = #{jobType} and t.job_type = #{jobType}
<if test="recruitId != null and recruitId != ''"> <if test="recruitId.size>0">
AND t.recruit_id = #{recruitId} AND t.recruit_id in
<foreach collection="recruitId" item="id" index="index" open="(" close=")" separator=",">
#{id}
</foreach>
</if> </if>
<if test="cityId != null and cityId != ''"> <if test="cityId.size>0">
AND t.city_id = #{cityId} AND t.city_id IN
<foreach collection="cityId" item="id" index="index" open="(" close=")" separator=",">
#{id}
</foreach>
</if> </if>
<if test="positions.size >0"> <if test="positions.size >0">
AND t.position_id IN AND t.position_id IN
...@@ -73,10 +82,10 @@ ...@@ -73,10 +82,10 @@
t.id, t.id,
t.position_id, t.position_id,
t.job_name, t.job_name,
t.company_name, t7.company_name,
t.start_salary, t.start_salary,
t.end_salary, t.end_salary,
t4.province, t4.city as province,
t3.city, t3.city,
t2.recruit_type, t2.recruit_type,
t6.position_type AS parentType, t6.position_type AS parentType,
...@@ -84,15 +93,16 @@ ...@@ -84,15 +93,16 @@
CONCAT( t6.position_code, t5.position_code, t.job_id ) AS jobId, CONCAT( t6.position_code, t5.position_code, t.job_id ) AS jobId,
t.job_desc, t.job_desc,
t.job_requirement, t.job_requirement,
t.company_desc t7.company_desc,
t.company_id
FROM FROM
job_dict t job_dict t
LEFT JOIN recruit_dict t2 ON t.recruit_id = t2.id LEFT JOIN recruit_dict t2 ON t.recruit_id = t2.id
LEFT JOIN city_dict t3 ON t.city_id = t3.id LEFT JOIN city_dict t3 ON t.city_id = t3.id
LEFT JOIN province_dict t4 ON t3.province_id = t4.id LEFT JOIN city_dict t4 ON t3.parent_id = t4.id
LEFT JOIN position_dict t5 ON t.position_id = t5.id LEFT JOIN position_dict t5 ON t.position_id = t5.id
LEFT JOIN position_dict t6 ON t5.parent_id = t6.id LEFT JOIN position_dict t6 ON t5.parent_id = t6.id
left join company_name t7 ON t.company_name = t7.id left join company_dict t7 ON t.company_id = t7.id
WHERE WHERE
t.delete_date IS NULL t.delete_date IS NULL
AND t2.delete_date IS NULL AND t2.delete_date IS NULL
...@@ -100,6 +110,7 @@ ...@@ -100,6 +110,7 @@
AND t4.delete_date IS NULL AND t4.delete_date IS NULL
AND t5.delete_date IS NULL AND t5.delete_date IS NULL
AND t6.delete_date IS NULL AND t6.delete_date IS NULL
and t4.parent_id is null
and t.id = #{id} and t.id = #{id}
</select> </select>
...@@ -110,7 +121,7 @@ ...@@ -110,7 +121,7 @@
t7.company_name, t7.company_name,
t.start_salary, t.start_salary,
t.end_salary, t.end_salary,
t4.province, t4.city as province,
t3.city, t3.city,
t2.recruit_type, t2.recruit_type,
t6.position_type AS parentType, t6.position_type AS parentType,
...@@ -120,7 +131,7 @@ ...@@ -120,7 +131,7 @@
job_dict t job_dict t
LEFT JOIN recruit_dict t2 ON t.recruit_id = t2.id LEFT JOIN recruit_dict t2 ON t.recruit_id = t2.id
LEFT JOIN city_dict t3 ON t.city_id = t3.id LEFT JOIN city_dict t3 ON t.city_id = t3.id
LEFT JOIN province_dict t4 ON t3.province_id = t4.id LEFT JOIN city_dict t4 ON t3.parent_id = t4.id
LEFT JOIN position_dict t5 ON t.position_id = t5.id LEFT JOIN position_dict t5 ON t.position_id = t5.id
LEFT JOIN position_dict t6 ON t5.parent_id = t6.id LEFT JOIN position_dict t6 ON t5.parent_id = t6.id
left JOIN company_dict t7 ON t.company_id = t7.id left JOIN company_dict t7 ON t.company_id = t7.id
...@@ -131,7 +142,8 @@ ...@@ -131,7 +142,8 @@
AND t4.delete_date IS NULL AND t4.delete_date IS NULL
AND t5.delete_date IS NULL AND t5.delete_date IS NULL
AND t6.delete_date IS NULL AND t6.delete_date IS NULL
t.position_id =#{positionId} and t4.parent_id is null
and t.position_id =#{positionId}
limit 3 limit 3
</select> </select>
...@@ -142,7 +154,7 @@ ...@@ -142,7 +154,7 @@
t7.company_name, t7.company_name,
t.recruit_status, t.recruit_status,
t.job_name, t.job_name,
t4.province, t4.city as province,
t3.city, t3.city,
t2.recruit_type, t2.recruit_type,
t6.position_type AS parentType, t6.position_type AS parentType,
...@@ -155,7 +167,7 @@ ...@@ -155,7 +167,7 @@
job_dict t job_dict t
LEFT JOIN recruit_dict t2 ON t.recruit_id = t2.id LEFT JOIN recruit_dict t2 ON t.recruit_id = t2.id
LEFT JOIN city_dict t3 ON t.city_id = t3.id LEFT JOIN city_dict t3 ON t.city_id = t3.id
LEFT JOIN province_dict t4 ON t3.province_id = t4.id LEFT JOIN city_dict t4 ON t3.parent_id = t4.id
LEFT JOIN position_dict t5 ON t.position_id = t5.id LEFT JOIN position_dict t5 ON t.position_id = t5.id
LEFT JOIN position_dict t6 ON t5.parent_id = t6.id LEFT JOIN position_dict t6 ON t5.parent_id = t6.id
left join company_dict t7 ON t.company_id = t7.id left join company_dict t7 ON t.company_id = t7.id
...@@ -166,6 +178,7 @@ ...@@ -166,6 +178,7 @@
AND t4.delete_date IS NULL AND t4.delete_date IS NULL
AND t5.delete_date IS NULL AND t5.delete_date IS NULL
AND t6.delete_date IS NULL AND t6.delete_date IS NULL
and t4.parent_id is null
and t.job_type = #{jobType} and t.job_type = #{jobType}
<if test="recruitStatus != null and recruitStatus != ''"> <if test="recruitStatus != null and recruitStatus != ''">
and t.recruit_status = #{recruitStatus} and t.recruit_status = #{recruitStatus}
......
<?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.laowu.mapper.JobPhotoMapper">
<!-- 通用查询映射结果 -->
<resultMap id="BaseResultMap" type="com.laowu.model.JobPhotoDO">
<id column="id" property="id" />
<result column="create_date" property="createDate" />
<result column="update_date" property="updateDate" />
<result column="delete_date" property="deleteDate" />
<result column="company_photos" property="companyPhotos" />
</resultMap>
<!-- 通用查询结果列 -->
<sql id="Base_Column_List">
create_date,
update_date,
delete_date,
id, company_photos
</sql>
</mapper>
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
<select id="jobCode" parameterType="long" resultType="string"> <select id="jobCode" parameterType="long" resultType="string">
SELECT SELECT
CONCAT( t2.position_code, t2.position_code ) AS position_code CONCAT( t2.position_code, t.position_code ) AS position_code
FROM FROM
position_dict t position_dict t
LEFT JOIN position_dict t2 ON t.parent_id = t2.id LEFT JOIN position_dict t2 ON t.parent_id = t2.id
......
<?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.laowu.mapper.ProvinceDictMapper">
<!-- 通用查询映射结果 -->
<resultMap id="BaseResultMap" type="com.laowu.model.ProvinceDictDO">
<id column="id" property="id" />
<result column="create_date" property="createDate" />
<result column="update_date" property="updateDate" />
<result column="delete_date" property="deleteDate" />
<result column="province" property="province" />
</resultMap>
<!-- 通用查询结果列 -->
<sql id="Base_Column_List">
create_date,
update_date,
delete_date,
id, province
</sql>
</mapper>
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!