改变路由层级,模块化
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
package service
|
||||
|
||||
import (
|
||||
"cutego/modules/core/dao"
|
||||
)
|
||||
|
||||
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
|
||||
}
|
||||
Reference in New Issue
Block a user