123456789101112131415161718192021222324 |
- package company_report_permission
- import (
- "errors"
- "hongze/hongze_yb/global"
- "hongze/hongze_yb/utils"
- )
- // GetListByCompany2ProductId 根据
- func GetListByCompany2ProductId(companyId, productId int) (list []*CompanyReportPermission, err error) {
- err = global.DEFAULT_MYSQL.Where("company_id = ? and product_id = ?", companyId, productId).Find(&list).Error
- return
- }
- // GetByWhereMap 根据查询条件map获取信息
- func GetByWhereMap(where map[string]interface{}) (list []*CompanyReportPermission, err error) {
- cond, whereVal, buildErr := utils.WhereBuild(where)
- if buildErr != nil {
- err = errors.New("系统异常,生成查询语句失败")
- return
- }
- err = global.DEFAULT_MYSQL.Where(cond, whereVal...).Find(&list).Error
- return
- }
|