mirror of
https://codeup.aliyun.com/64f7d6b8ce01efaafef1e678/coal/coal.git
synced 2026-01-25 07:46:40 +08:00
添加员工数量
This commit is contained in:
@@ -5,4 +5,7 @@ import cn.lihongjie.coal.base.dto.OrgCommonDto;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class JobPostDto extends OrgCommonDto {}
|
||||
public class JobPostDto extends OrgCommonDto {
|
||||
|
||||
private Integer empCount;
|
||||
}
|
||||
|
||||
@@ -6,6 +6,12 @@ import jakarta.persistence.Entity;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import org.hibernate.annotations.Formula;
|
||||
|
||||
@Data
|
||||
@Entity
|
||||
public class JobPostEntity extends OrgCommonEntity {}
|
||||
public class JobPostEntity extends OrgCommonEntity {
|
||||
|
||||
@Formula("(select count(*) from t_employee e where e.job_post_id = id)")
|
||||
private Integer empCount;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user