1234567891011121314151617181920 |
- package eta
- import "hongze/hz_crm_eta/global"
- type ChartPermissionChapterMapping struct {
- Id int `gorm:"column:id;primary_key;AUTO_INCREMENT;NOT NULL"`
- ChartPermissionId int `gorm:"column:chart_permission_id;default:0"`
- ReportChapterTypeId int `gorm:"column:report_chapter_type_id;default:0;comment:'report_chapter_type表主键id或research_report表主键id或tactic表主键id'"`
- ResearchType string `gorm:"column:research_type;default:"`
- }
- func (c *ChartPermissionChapterMapping) TableName() string {
- return "chart_permission_chapter_mapping"
- }
- // GetChapterTypeMappingByTypeIdAndResearchType 根据章节类型ID及研报类型获取章节类型权限列表
- func GetChapterTypeMappingByTypeIdAndResearchType(reportChapterTypeId int, researchType string) (items []*ChartPermissionChapterMapping, err error) {
- err = global.MYSQL["rddp"].Model(ChartPermissionChapterMapping{}).Where("report_chapter_type_id = ? and research_type = ?", reportChapterTypeId, researchType).Order("chart_permission_id ASC").Scan(&items).Error
- return
- }
|