23 lines
466 B
Go
23 lines
466 B
Go
package service
|
|
|
|
import (
|
|
"case-open-api/api/dao"
|
|
)
|
|
|
|
type CaseService struct {
|
|
}
|
|
|
|
// CheckCasePlatform 检测病例平台关系
|
|
func (r *CaseService) CheckCasePlatform(caseId, platformId int64) (b bool, err error) {
|
|
casePlatformDao := dao.CasePlatformDao{}
|
|
maps := make(map[string]interface{})
|
|
maps["case_id"] = caseId
|
|
maps["platform_id"] = platformId
|
|
_, err = casePlatformDao.GetCasePlatform(maps)
|
|
if err != nil {
|
|
return false, err
|
|
}
|
|
|
|
return true, nil
|
|
}
|