2022-03-01 13:50:13 +08:00
|
|
|
package service
|
|
|
|
|
|
|
|
import (
|
2023-01-18 15:40:27 +08:00
|
|
|
"cutego/modules/core/dao"
|
2022-03-01 13:50:13 +08:00
|
|
|
)
|
|
|
|
|
|
|
|
type UserPostService struct {
|
|
|
|
userPostDao dao.UserPostDao
|
|
|
|
}
|
|
|
|
|
|
|
|
// CountUserPostById 统计岗位数据数量
|
|
|
|
func (s UserPostService) CountUserPostById(ids []int64) int64 {
|
|
|
|
for _, id := range ids {
|
|
|
|
if s.userPostDao.CountById(id) > 0 {
|
|
|
|
return id
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return 0
|
|
|
|
}
|