正在显示
12 个修改的文件
包含
40 行增加
和
4 行删除
| @@ -2,9 +2,10 @@ package protocol | @@ -2,9 +2,10 @@ package protocol | ||
| 2 | 2 | ||
| 3 | //ProviderData 成果提供者 | 3 | //ProviderData 成果提供者 |
| 4 | type AchievementProvider struct { | 4 | type AchievementProvider struct { |
| 5 | - UserCompanyId int64 `json:"user_company_id"` //用户的id | ||
| 6 | - UserName string `json:"user_name"` //用户名称 | ||
| 7 | - DepartmentId int64 `json:"department_id"` //部门id | 5 | + UserCompanyId int64 `json:"user_company_id"` //用户的id |
| 6 | + UserName string `json:"user_name"` | ||
| 7 | + DepartmentId int64 `json:"department_id"` //部门id | ||
| 8 | + DepartmentName string `json:"department_name"` | ||
| 8 | UserGraspScore float64 `json:"user_grasp_score"` //把握人得分 | 9 | UserGraspScore float64 `json:"user_grasp_score"` //把握人得分 |
| 9 | } | 10 | } |
| 10 | 11 | ||
| @@ -59,3 +60,22 @@ type AchievementListItem struct { | @@ -59,3 +60,22 @@ type AchievementListItem struct { | ||
| 59 | Status int `json:"status"` | 60 | Status int `json:"status"` |
| 60 | UserGrasp string `json:"user_grasp"` | 61 | UserGrasp string `json:"user_grasp"` |
| 61 | } | 62 | } |
| 63 | + | ||
| 64 | +//ResponseAchievementInfo 成果详情 | ||
| 65 | +type ResponseAchievementInfo struct { | ||
| 66 | + AchievementId int64 `json:"achievement_id"` | ||
| 67 | + ChanceData []AchievementChance `json:"chance_data"` | ||
| 68 | + TypeIdA int `json:"type_id_a"` //机会一级分类 chance_type | ||
| 69 | + TypeNameA string `json:"type_name_a"` | ||
| 70 | + TypeIdB int `json:"type_id_b"` //机会二级分类 | ||
| 71 | + TypeNameB string `json:"type_name_b"` | ||
| 72 | + DepartmentId int64 `json:"department_id"` //把握人的部门 | ||
| 73 | + DeparmentName string `json:"department_name"` | ||
| 74 | + UserCompanyId int64 `json:"user_company_id"` //把握人的id | ||
| 75 | + UserName string `json:"user_name"` | ||
| 76 | + GraspScore float64 `json:"grasp_score"` //把握分 | ||
| 77 | + UserGraspScore float64 `json:"user_grasp_score"` //把握人总得分 | ||
| 78 | + Provider []AchievementProvider `json:"provider"` //机会提供者 | ||
| 79 | + SourceContent string `json:"source_content"` //成果描述文本 | ||
| 80 | + Images []string `json:"image"` //图片 | ||
| 81 | +} |
| @@ -214,7 +214,7 @@ func GetAchievementList(pageIndex int, pageSize int, companyId int64, status int | @@ -214,7 +214,7 @@ func GetAchievementList(pageIndex int, pageSize int, companyId int64, status int | ||
| 214 | if cnt == 0 { | 214 | if cnt == 0 { |
| 215 | return rspData | 215 | return rspData |
| 216 | } | 216 | } |
| 217 | - err = utils.ExecuteQueryOne(&sqldata, dataSql, cond...) | 217 | + err = utils.ExecuteQueryAll(&sqldata, dataSql, cond...) |
| 218 | if err != nil { | 218 | if err != nil { |
| 219 | log.Error("SQL EXECUTE ERR:%s", err) | 219 | log.Error("SQL EXECUTE ERR:%s", err) |
| 220 | return rspData | 220 | return rspData |
| @@ -260,3 +260,19 @@ func GetAchievementList(pageIndex int, pageSize int, companyId int64, status int | @@ -260,3 +260,19 @@ func GetAchievementList(pageIndex int, pageSize int, companyId int64, status int | ||
| 260 | 260 | ||
| 261 | return rspData | 261 | return rspData |
| 262 | } | 262 | } |
| 263 | + | ||
| 264 | +func GetAchievementInfo(id int64, companyId int64) *protocol.ResponseAchievementInfo { | ||
| 265 | + // rspData := &protocol.ResponseAchievementInfo{ | ||
| 266 | + // Images: make([]string, 0), | ||
| 267 | + // Provider: make([]protocol.AchievementProvider, 0), | ||
| 268 | + // ChanceData: make([]protocol.AchievementChance, 0), | ||
| 269 | + // } | ||
| 270 | + // var ( | ||
| 271 | + // achievementData *models.Achievement | ||
| 272 | + // providerData []models.AchievementProvider | ||
| 273 | + // chanceData []models.AchievementChance | ||
| 274 | + // ) | ||
| 275 | + | ||
| 276 | + // models.GetAchievementById(id) | ||
| 277 | + return nil | ||
| 278 | +} |
static/chance_template/图1.jpg
已删除
100644 → 0
24.3 KB
-
请 注册 或 登录 后发表评论