添加员工数量

This commit is contained in:
2024-03-17 10:31:34 +08:00
parent fca3e7ee95
commit 4303fa40d8
2 changed files with 11 additions and 2 deletions

View File

@@ -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;
}

View File

@@ -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;
}