正在显示
1 个修改的文件
包含
47 行增加
和
47 行删除
@@ -17,7 +17,7 @@ import ( | @@ -17,7 +17,7 @@ import ( | ||
17 | "time" | 17 | "time" |
18 | ) | 18 | ) |
19 | 19 | ||
20 | -//点赞/收藏列表 | 20 | +// 点赞/收藏列表 |
21 | func Favorite(header *protocol.RequestHeader, request *protocol.FavoriteRequest) (rsp *protocol.FavoriteResponse, err error) { | 21 | func Favorite(header *protocol.RequestHeader, request *protocol.FavoriteRequest) (rsp *protocol.FavoriteResponse, err error) { |
22 | var ( | 22 | var ( |
23 | favorites []*models.ChanceFavorite | 23 | favorites []*models.ChanceFavorite |
@@ -59,7 +59,7 @@ func Favorite(header *protocol.RequestHeader, request *protocol.FavoriteRequest) | @@ -59,7 +59,7 @@ func Favorite(header *protocol.RequestHeader, request *protocol.FavoriteRequest) | ||
59 | return | 59 | return |
60 | } | 60 | } |
61 | 61 | ||
62 | -//点赞/收藏 取消点赞/收藏 | 62 | +// 点赞/收藏 取消点赞/收藏 |
63 | func SympathyAction(header *protocol.RequestHeader, request *protocol.SympathyActionRequest) (rsp *protocol.SympathyActionResponse, err error) { | 63 | func SympathyAction(header *protocol.RequestHeader, request *protocol.SympathyActionRequest) (rsp *protocol.SympathyActionResponse, err error) { |
64 | var ( | 64 | var ( |
65 | exists bool | 65 | exists bool |
@@ -181,7 +181,7 @@ END: | @@ -181,7 +181,7 @@ END: | ||
181 | return | 181 | return |
182 | } | 182 | } |
183 | 183 | ||
184 | -//机会类型 | 184 | +// 机会类型 |
185 | func ChanceType(header *protocol.RequestHeader, request *protocol.ChanceTypeRequest) (rsp *protocol.ChanceTypeResponse, err error) { | 185 | func ChanceType(header *protocol.RequestHeader, request *protocol.ChanceTypeRequest) (rsp *protocol.ChanceTypeResponse, err error) { |
186 | var ( | 186 | var ( |
187 | list []*models.ChanceType | 187 | list []*models.ChanceType |
@@ -216,7 +216,7 @@ func ChanceType(header *protocol.RequestHeader, request *protocol.ChanceTypeRequ | @@ -216,7 +216,7 @@ func ChanceType(header *protocol.RequestHeader, request *protocol.ChanceTypeRequ | ||
216 | return | 216 | return |
217 | } | 217 | } |
218 | 218 | ||
219 | -//机会储备类型 | 219 | +// 机会储备类型 |
220 | func ChanceReserveType(header *protocol.RequestHeader, request *protocol.ChanceReserveTypeRequest) (rsp *protocol.ChanceReserveTypeResponse, err error) { | 220 | func ChanceReserveType(header *protocol.RequestHeader, request *protocol.ChanceReserveTypeRequest) (rsp *protocol.ChanceReserveTypeResponse, err error) { |
221 | var ( | 221 | var ( |
222 | v []*models.ChanceReserveType | 222 | v []*models.ChanceReserveType |
@@ -229,7 +229,7 @@ func ChanceReserveType(header *protocol.RequestHeader, request *protocol.ChanceR | @@ -229,7 +229,7 @@ func ChanceReserveType(header *protocol.RequestHeader, request *protocol.ChanceR | ||
229 | return | 229 | return |
230 | } | 230 | } |
231 | 231 | ||
232 | -//获取机会对应的模板列表 | 232 | +// 获取机会对应的模板列表 |
233 | func Templates(header *protocol.RequestHeader, request *protocol.TemplatesRequest) (rsp *protocol.TemplatesResponse, err error) { | 233 | func Templates(header *protocol.RequestHeader, request *protocol.TemplatesRequest) (rsp *protocol.TemplatesResponse, err error) { |
234 | var ( | 234 | var ( |
235 | templates []*models.AuditTemplate | 235 | templates []*models.AuditTemplate |
@@ -290,7 +290,7 @@ func Templates(header *protocol.RequestHeader, request *protocol.TemplatesReques | @@ -290,7 +290,7 @@ func Templates(header *protocol.RequestHeader, request *protocol.TemplatesReques | ||
290 | return | 290 | return |
291 | } | 291 | } |
292 | 292 | ||
293 | -//模板详情 | 293 | +// 模板详情 |
294 | func Template(header *protocol.RequestHeader, request *protocol.TemplateRequest) (rsp *protocol.TemplateResponse, err error) { | 294 | func Template(header *protocol.RequestHeader, request *protocol.TemplateRequest) (rsp *protocol.TemplateResponse, err error) { |
295 | var ( | 295 | var ( |
296 | templates *models.AuditTemplate | 296 | templates *models.AuditTemplate |
@@ -414,7 +414,7 @@ func checkTemplateIsVisible(header *protocol.RequestHeader, template *models.Aud | @@ -414,7 +414,7 @@ func checkTemplateIsVisible(header *protocol.RequestHeader, template *models.Aud | ||
414 | return | 414 | return |
415 | } | 415 | } |
416 | 416 | ||
417 | -//模板示例 | 417 | +// 模板示例 |
418 | func ChanceExample(header *protocol.RequestHeader, request *protocol.ChanceExampleRequest) (rsp *protocol.ChanceExampleResponse, err error) { | 418 | func ChanceExample(header *protocol.RequestHeader, request *protocol.ChanceExampleRequest) (rsp *protocol.ChanceExampleResponse, err error) { |
419 | var ( | 419 | var ( |
420 | example string | 420 | example string |
@@ -435,7 +435,7 @@ func ChanceExample(header *protocol.RequestHeader, request *protocol.ChanceExamp | @@ -435,7 +435,7 @@ func ChanceExample(header *protocol.RequestHeader, request *protocol.ChanceExamp | ||
435 | return | 435 | return |
436 | } | 436 | } |
437 | 437 | ||
438 | -//提交机会 | 438 | +// 提交机会 |
439 | func ChanceSubmit(header *protocol.RequestHeader, request *protocol.ChanceSubmitRequest) (rsp *protocol.ChanceSubmitResponse, err error) { | 439 | func ChanceSubmit(header *protocol.RequestHeader, request *protocol.ChanceSubmitRequest) (rsp *protocol.ChanceSubmitResponse, err error) { |
440 | var ( | 440 | var ( |
441 | template *models.AuditTemplate | 441 | template *models.AuditTemplate |
@@ -575,7 +575,7 @@ func ChanceSubmit(header *protocol.RequestHeader, request *protocol.ChanceSubmit | @@ -575,7 +575,7 @@ func ChanceSubmit(header *protocol.RequestHeader, request *protocol.ChanceSubmit | ||
575 | return | 575 | return |
576 | } | 576 | } |
577 | 577 | ||
578 | -//设置机会自动通过 | 578 | +// 设置机会自动通过 |
579 | func setChanceAutoPass(header *protocol.RequestHeader, chance *models.Chance, orm orm.Ormer, chanceType *models.ChanceType) (err error) { | 579 | func setChanceAutoPass(header *protocol.RequestHeader, chance *models.Chance, orm orm.Ormer, chanceType *models.ChanceType) (err error) { |
580 | var ( | 580 | var ( |
581 | approveData protocol.ApproveData | 581 | approveData protocol.ApproveData |
@@ -604,7 +604,7 @@ func setChanceAutoPass(header *protocol.RequestHeader, chance *models.Chance, or | @@ -604,7 +604,7 @@ func setChanceAutoPass(header *protocol.RequestHeader, chance *models.Chance, or | ||
604 | return | 604 | return |
605 | } | 605 | } |
606 | 606 | ||
607 | -//机会编辑 | 607 | +// 机会编辑 |
608 | func ChanceUpdate(header *protocol.RequestHeader, request *protocol.ChanceUpdateRequest) (rsp *protocol.ChanceUpdateResponse, err error) { | 608 | func ChanceUpdate(header *protocol.RequestHeader, request *protocol.ChanceUpdateRequest) (rsp *protocol.ChanceUpdateResponse, err error) { |
609 | var ( | 609 | var ( |
610 | template *models.AuditTemplate | 610 | template *models.AuditTemplate |
@@ -820,7 +820,7 @@ func ChanceUpdate(header *protocol.RequestHeader, request *protocol.ChanceUpdate | @@ -820,7 +820,7 @@ func ChanceUpdate(header *protocol.RequestHeader, request *protocol.ChanceUpdate | ||
820 | return | 820 | return |
821 | } | 821 | } |
822 | 822 | ||
823 | -//检查机会更新 | 823 | +// 检查机会更新 |
824 | func CheckChanceDifferent(header *protocol.RequestHeader, chance *models.Chance, request *protocol.ChanceUpdateRequest) { | 824 | func CheckChanceDifferent(header *protocol.RequestHeader, chance *models.Chance, request *protocol.ChanceUpdateRequest) { |
825 | defer func() { | 825 | defer func() { |
826 | if p := recover(); p != nil { | 826 | if p := recover(); p != nil { |
@@ -992,7 +992,7 @@ func CheckChanceDifferent(header *protocol.RequestHeader, chance *models.Chance, | @@ -992,7 +992,7 @@ func CheckChanceDifferent(header *protocol.RequestHeader, chance *models.Chance, | ||
992 | } | 992 | } |
993 | } | 993 | } |
994 | 994 | ||
995 | -//保存机会变更日志 | 995 | +// 保存机会变更日志 |
996 | func SaveChanceReviseLog(header *protocol.RequestHeader, chance *models.Chance, modifyLog protocol.ChanceReviseLog) (err error) { | 996 | func SaveChanceReviseLog(header *protocol.RequestHeader, chance *models.Chance, modifyLog protocol.ChanceReviseLog) (err error) { |
997 | var ( | 997 | var ( |
998 | chanceReviseLog *models.ChanceReviseLog | 998 | chanceReviseLog *models.ChanceReviseLog |
@@ -1041,7 +1041,7 @@ func SaveChanceReviseLog(header *protocol.RequestHeader, chance *models.Chance, | @@ -1041,7 +1041,7 @@ func SaveChanceReviseLog(header *protocol.RequestHeader, chance *models.Chance, | ||
1041 | return | 1041 | return |
1042 | } | 1042 | } |
1043 | 1043 | ||
1044 | -//修改公开状态 | 1044 | +// 修改公开状态 |
1045 | func ChanceChangePublish(header *protocol.RequestHeader, request *protocol.ChanceChangePublishRequest) (rsp *protocol.ChanceChangePublishResponse, err error) { | 1045 | func ChanceChangePublish(header *protocol.RequestHeader, request *protocol.ChanceChangePublishRequest) (rsp *protocol.ChanceChangePublishResponse, err error) { |
1046 | var ( | 1046 | var ( |
1047 | chance *models.Chance | 1047 | chance *models.Chance |
@@ -1106,7 +1106,7 @@ func ChanceChangePublish(header *protocol.RequestHeader, request *protocol.Chanc | @@ -1106,7 +1106,7 @@ func ChanceChangePublish(header *protocol.RequestHeader, request *protocol.Chanc | ||
1106 | return | 1106 | return |
1107 | } | 1107 | } |
1108 | 1108 | ||
1109 | -//发送审核日志 | 1109 | +// 发送审核日志 |
1110 | func saveApproveMsgChangePublic(header *protocol.RequestHeader, orm orm.Ormer, chance *models.Chance, approveData protocol.PublicData) (err error) { | 1110 | func saveApproveMsgChangePublic(header *protocol.RequestHeader, orm orm.Ormer, chance *models.Chance, approveData protocol.PublicData) (err error) { |
1111 | var ( | 1111 | var ( |
1112 | parames = make([]interface{}, 0) | 1112 | parames = make([]interface{}, 0) |
@@ -1131,7 +1131,7 @@ func saveApproveMsgChangePublic(header *protocol.RequestHeader, orm orm.Ormer, c | @@ -1131,7 +1131,7 @@ func saveApproveMsgChangePublic(header *protocol.RequestHeader, orm orm.Ormer, c | ||
1131 | return | 1131 | return |
1132 | } | 1132 | } |
1133 | 1133 | ||
1134 | -//修改评分 | 1134 | +// 修改评分 |
1135 | func ChanceChangeScore(header *protocol.RequestHeader, request *protocol.ChanceChangeScoreRequest) (rsp *protocol.ChanceChangeScoreResponse, err error) { | 1135 | func ChanceChangeScore(header *protocol.RequestHeader, request *protocol.ChanceChangeScoreRequest) (rsp *protocol.ChanceChangeScoreResponse, err error) { |
1136 | var ( | 1136 | var ( |
1137 | chance *models.Chance | 1137 | chance *models.Chance |
@@ -1191,7 +1191,7 @@ func ChanceChangeScore(header *protocol.RequestHeader, request *protocol.ChanceC | @@ -1191,7 +1191,7 @@ func ChanceChangeScore(header *protocol.RequestHeader, request *protocol.ChanceC | ||
1191 | return | 1191 | return |
1192 | } | 1192 | } |
1193 | 1193 | ||
1194 | -//计算发现分 | 1194 | +// 计算发现分 |
1195 | func ChanceCalculateScore(header *protocol.RequestHeader, request *protocol.ChanceCalculateScoreRequest) (rsp *protocol.ChanceCalculateScoreResponse, err error) { | 1195 | func ChanceCalculateScore(header *protocol.RequestHeader, request *protocol.ChanceCalculateScoreRequest) (rsp *protocol.ChanceCalculateScoreResponse, err error) { |
1196 | var ( | 1196 | var ( |
1197 | config *models.SysConfig | 1197 | config *models.SysConfig |
@@ -1250,7 +1250,7 @@ func ChanceCalculateScore(header *protocol.RequestHeader, request *protocol.Chan | @@ -1250,7 +1250,7 @@ func ChanceCalculateScore(header *protocol.RequestHeader, request *protocol.Chan | ||
1250 | return | 1250 | return |
1251 | } | 1251 | } |
1252 | 1252 | ||
1253 | -//计算默认发现分 | 1253 | +// 计算默认发现分 |
1254 | func ChanceCalculateDefautlScore(header *protocol.RequestHeader) (rsp protocol.Score, err error) { | 1254 | func ChanceCalculateDefautlScore(header *protocol.RequestHeader) (rsp protocol.Score, err error) { |
1255 | var ( | 1255 | var ( |
1256 | config *models.SysConfig | 1256 | config *models.SysConfig |
@@ -1293,7 +1293,7 @@ func ChanceCalculateDefautlScore(header *protocol.RequestHeader) (rsp protocol.S | @@ -1293,7 +1293,7 @@ func ChanceCalculateDefautlScore(header *protocol.RequestHeader) (rsp protocol.S | ||
1293 | // return | 1293 | // return |
1294 | //} | 1294 | //} |
1295 | 1295 | ||
1296 | -//生成审批流-提交记录 | 1296 | +// 生成审批流-提交记录 |
1297 | func GenAuditFlowProcess_Submit(userId, chanceId int64, templateId int64, reviewStatus int) (v *models.AuditFlowProcess) { | 1297 | func GenAuditFlowProcess_Submit(userId, chanceId int64, templateId int64, reviewStatus int) (v *models.AuditFlowProcess) { |
1298 | v = &models.AuditFlowProcess{ | 1298 | v = &models.AuditFlowProcess{ |
1299 | Id: idgen.Next(), | 1299 | Id: idgen.Next(), |
@@ -1315,7 +1315,7 @@ func GenAuditFlowProcess_Submit(userId, chanceId int64, templateId int64, review | @@ -1315,7 +1315,7 @@ func GenAuditFlowProcess_Submit(userId, chanceId int64, templateId int64, review | ||
1315 | return | 1315 | return |
1316 | } | 1316 | } |
1317 | 1317 | ||
1318 | -//生成审批流 | 1318 | +// 生成审批流 |
1319 | func GenAuditFlowProcess(header *protocol.RequestHeader, chanceId int64, relatedDeparmentId int64, templateId int64, auditConfig *protocol.AuditConfig) (v []*models.AuditFlowProcess, err error) { | 1319 | func GenAuditFlowProcess(header *protocol.RequestHeader, chanceId int64, relatedDeparmentId int64, templateId int64, auditConfig *protocol.AuditConfig) (v []*models.AuditFlowProcess, err error) { |
1320 | var ( | 1320 | var ( |
1321 | configs []*models.AuditFlowConfig | 1321 | configs []*models.AuditFlowConfig |
@@ -1504,7 +1504,7 @@ func resolveActionType(t uint) string { | @@ -1504,7 +1504,7 @@ func resolveActionType(t uint) string { | ||
1504 | return fmt.Sprintf("%v", t) | 1504 | return fmt.Sprintf("%v", t) |
1505 | } | 1505 | } |
1506 | 1506 | ||
1507 | -//获取部门长用户列表 | 1507 | +// 获取部门长用户列表 |
1508 | func getDepartmentors(header *protocol.RequestHeader, relatedDeparmentId int64) (ids []int64, err error) { | 1508 | func getDepartmentors(header *protocol.RequestHeader, relatedDeparmentId int64) (ids []int64, err error) { |
1509 | var ( | 1509 | var ( |
1510 | departments *models.Department | 1510 | departments *models.Department |
@@ -1559,7 +1559,7 @@ func getDepartmentors(header *protocol.RequestHeader, relatedDeparmentId int64) | @@ -1559,7 +1559,7 @@ func getDepartmentors(header *protocol.RequestHeader, relatedDeparmentId int64) | ||
1559 | return | 1559 | return |
1560 | } | 1560 | } |
1561 | 1561 | ||
1562 | -//获取角色ids | 1562 | +// 获取角色ids |
1563 | func getRoleUsers(header *protocol.RequestHeader, roleId int) (ids []int64, err error) { | 1563 | func getRoleUsers(header *protocol.RequestHeader, roleId int) (ids []int64, err error) { |
1564 | var ( | 1564 | var ( |
1565 | userRole []*models.UserRole | 1565 | userRole []*models.UserRole |
@@ -1580,7 +1580,7 @@ func getRoleUsers(header *protocol.RequestHeader, roleId int) (ids []int64, err | @@ -1580,7 +1580,7 @@ func getRoleUsers(header *protocol.RequestHeader, roleId int) (ids []int64, err | ||
1580 | return | 1580 | return |
1581 | } | 1581 | } |
1582 | 1582 | ||
1583 | -//递归寻找上一级部门长 | 1583 | +// 递归寻找上一级部门长 |
1584 | func getParentDepartmentors(pid int64) (ids []int64) { | 1584 | func getParentDepartmentors(pid int64) (ids []int64) { |
1585 | var ( | 1585 | var ( |
1586 | department *models.Department | 1586 | department *models.Department |
@@ -1601,9 +1601,9 @@ func getParentDepartmentors(pid int64) (ids []int64) { | @@ -1601,9 +1601,9 @@ func getParentDepartmentors(pid int64) (ids []int64) { | ||
1601 | return getParentDepartmentors(department.ParentId) | 1601 | return getParentDepartmentors(department.ParentId) |
1602 | } | 1602 | } |
1603 | 1603 | ||
1604 | -//首页机会池统计 | 1604 | +// 首页机会池统计 |
1605 | func ChanceStatistics(header *protocol.RequestHeader, request *protocol.ChanceStatisticsRequest) (rsp *protocol.ChanceStatisticsResponse, err error) { | 1605 | func ChanceStatistics(header *protocol.RequestHeader, request *protocol.ChanceStatisticsRequest) (rsp *protocol.ChanceStatisticsResponse, err error) { |
1606 | - var ( | 1606 | + /*var ( |
1607 | chanceType []*models.ChanceType | 1607 | chanceType []*models.ChanceType |
1608 | total int | 1608 | total int |
1609 | sum int | 1609 | sum int |
@@ -1611,9 +1611,9 @@ func ChanceStatistics(header *protocol.RequestHeader, request *protocol.ChanceSt | @@ -1611,9 +1611,9 @@ func ChanceStatistics(header *protocol.RequestHeader, request *protocol.ChanceSt | ||
1611 | if chanceType, err = models.GetChanceTypeAll(header.CompanyId); err != nil { | 1611 | if chanceType, err = models.GetChanceTypeAll(header.CompanyId); err != nil { |
1612 | log.Error(err) | 1612 | log.Error(err) |
1613 | return | 1613 | return |
1614 | - } | 1614 | + }*/ |
1615 | rsp = &protocol.ChanceStatisticsResponse{} | 1615 | rsp = &protocol.ChanceStatisticsResponse{} |
1616 | - for i := range chanceType { | 1616 | + /*for i := range chanceType { |
1617 | item := chanceType[i] | 1617 | item := chanceType[i] |
1618 | if total, err = agg.GetChancePool(header.UserId, header.CompanyId, models.NewChancePoolOption(item.Id, []int{}, models.ChancePool, 0), 0, false, 0, 0, nil); err != nil { | 1618 | if total, err = agg.GetChancePool(header.UserId, header.CompanyId, models.NewChancePoolOption(item.Id, []int{}, models.ChancePool, 0), 0, false, 0, 0, nil); err != nil { |
1619 | log.Error(err) | 1619 | log.Error(err) |
@@ -1629,11 +1629,11 @@ func ChanceStatistics(header *protocol.RequestHeader, request *protocol.ChanceSt | @@ -1629,11 +1629,11 @@ func ChanceStatistics(header *protocol.RequestHeader, request *protocol.ChanceSt | ||
1629 | Total: total, | 1629 | Total: total, |
1630 | }) | 1630 | }) |
1631 | } | 1631 | } |
1632 | - rsp.ChanceTotal = sum | 1632 | + rsp.ChanceTotal = sum*/ |
1633 | return | 1633 | return |
1634 | } | 1634 | } |
1635 | 1635 | ||
1636 | -//我提交的机会 | 1636 | +// 我提交的机会 |
1637 | func MySubmitChance(header *protocol.RequestHeader, request *protocol.MySubmitChanceRequest) (rsp *protocol.MySubmitChanceResponse, err error) { | 1637 | func MySubmitChance(header *protocol.RequestHeader, request *protocol.MySubmitChanceRequest) (rsp *protocol.MySubmitChanceResponse, err error) { |
1638 | var ( | 1638 | var ( |
1639 | ormItems []protocol.CommChanceItemOrm | 1639 | ormItems []protocol.CommChanceItemOrm |
@@ -1673,7 +1673,7 @@ func MySubmitChance(header *protocol.RequestHeader, request *protocol.MySubmitCh | @@ -1673,7 +1673,7 @@ func MySubmitChance(header *protocol.RequestHeader, request *protocol.MySubmitCh | ||
1673 | return | 1673 | return |
1674 | } | 1674 | } |
1675 | 1675 | ||
1676 | -//机会池 | 1676 | +// 机会池 |
1677 | func ChancePool(header *protocol.RequestHeader, request *protocol.ChancePoolRequest) (rsp *protocol.ChancePoolResponse, err error) { | 1677 | func ChancePool(header *protocol.RequestHeader, request *protocol.ChancePoolRequest) (rsp *protocol.ChancePoolResponse, err error) { |
1678 | var ( | 1678 | var ( |
1679 | chanceItems []protocol.ChancePoolItemOrm | 1679 | chanceItems []protocol.ChancePoolItemOrm |
@@ -1737,7 +1737,7 @@ func ChancePool(header *protocol.RequestHeader, request *protocol.ChancePoolRequ | @@ -1737,7 +1737,7 @@ func ChancePool(header *protocol.RequestHeader, request *protocol.ChancePoolRequ | ||
1737 | return | 1737 | return |
1738 | } | 1738 | } |
1739 | 1739 | ||
1740 | -//我审核的机会 | 1740 | +// 我审核的机会 |
1741 | func MyApproveChance(header *protocol.RequestHeader, request *protocol.MyApproveChanceRequest) (rsp *protocol.MyApproveChanceResponse, err error) { | 1741 | func MyApproveChance(header *protocol.RequestHeader, request *protocol.MyApproveChanceRequest) (rsp *protocol.MyApproveChanceResponse, err error) { |
1742 | var ( | 1742 | var ( |
1743 | ormItems []protocol.ChanceApproveItemOrm | 1743 | ormItems []protocol.ChanceApproveItemOrm |
@@ -1868,7 +1868,7 @@ func MyCollectChance(header *protocol.RequestHeader, request *protocol.MyCollect | @@ -1868,7 +1868,7 @@ func MyCollectChance(header *protocol.RequestHeader, request *protocol.MyCollect | ||
1868 | return | 1868 | return |
1869 | } | 1869 | } |
1870 | 1870 | ||
1871 | -//我点赞的机会 | 1871 | +// 我点赞的机会 |
1872 | func MyThumbUpChance(header *protocol.RequestHeader, request *protocol.MyThumbUpChanceRequest) (rsp *protocol.MyThumbUpChanceResponse, err error) { | 1872 | func MyThumbUpChance(header *protocol.RequestHeader, request *protocol.MyThumbUpChanceRequest) (rsp *protocol.MyThumbUpChanceResponse, err error) { |
1873 | var ( | 1873 | var ( |
1874 | ormItems []protocol.ChanceThumbUpItemOrm | 1874 | ormItems []protocol.ChanceThumbUpItemOrm |
@@ -1929,7 +1929,7 @@ func MyThumbUpChance(header *protocol.RequestHeader, request *protocol.MyThumbUp | @@ -1929,7 +1929,7 @@ func MyThumbUpChance(header *protocol.RequestHeader, request *protocol.MyThumbUp | ||
1929 | return | 1929 | return |
1930 | } | 1930 | } |
1931 | 1931 | ||
1932 | -//我的评论 | 1932 | +// 我的评论 |
1933 | func MyComment(header *protocol.RequestHeader, request *protocol.MyCommentRequest) (rsp *protocol.MyCommentResponse, err error) { | 1933 | func MyComment(header *protocol.RequestHeader, request *protocol.MyCommentRequest) (rsp *protocol.MyCommentResponse, err error) { |
1934 | var ( | 1934 | var ( |
1935 | ormItems []protocol.ChanceCommentItemOrm | 1935 | ormItems []protocol.ChanceCommentItemOrm |
@@ -1979,7 +1979,7 @@ func MyComment(header *protocol.RequestHeader, request *protocol.MyCommentReques | @@ -1979,7 +1979,7 @@ func MyComment(header *protocol.RequestHeader, request *protocol.MyCommentReques | ||
1979 | return | 1979 | return |
1980 | } | 1980 | } |
1981 | 1981 | ||
1982 | -//获取机会点赞/收藏状态 | 1982 | +// 获取机会点赞/收藏状态 |
1983 | func getChanceMarkFlag(header *protocol.RequestHeader, chanceId int64) (isThumbsUp, isCollect bool, err error) { | 1983 | func getChanceMarkFlag(header *protocol.RequestHeader, chanceId int64) (isThumbsUp, isCollect bool, err error) { |
1984 | var flag int | 1984 | var flag int |
1985 | if flag, err = agg.GetChanceMarkData(header.UserId, header.CompanyId, chanceId); err != nil { | 1985 | if flag, err = agg.GetChanceMarkData(header.UserId, header.CompanyId, chanceId); err != nil { |
@@ -1991,7 +1991,7 @@ func getChanceMarkFlag(header *protocol.RequestHeader, chanceId int64) (isThumbs | @@ -1991,7 +1991,7 @@ func getChanceMarkFlag(header *protocol.RequestHeader, chanceId int64) (isThumbs | ||
1991 | return | 1991 | return |
1992 | } | 1992 | } |
1993 | 1993 | ||
1994 | -//获取机会点赞/收藏状态 | 1994 | +// 获取机会点赞/收藏状态 |
1995 | func getMarkFlag(header *protocol.RequestHeader, sourceId int64, sourceType int) (isThumbsUp, isCollect bool, err error) { | 1995 | func getMarkFlag(header *protocol.RequestHeader, sourceId int64, sourceType int) (isThumbsUp, isCollect bool, err error) { |
1996 | var flag int | 1996 | var flag int |
1997 | if flag, err = agg.GetMarkData(header.UserId, header.CompanyId, sourceId, sourceType); err != nil { | 1997 | if flag, err = agg.GetMarkData(header.UserId, header.CompanyId, sourceId, sourceType); err != nil { |
@@ -2003,7 +2003,7 @@ func getMarkFlag(header *protocol.RequestHeader, sourceId int64, sourceType int) | @@ -2003,7 +2003,7 @@ func getMarkFlag(header *protocol.RequestHeader, sourceId int64, sourceType int) | ||
2003 | return | 2003 | return |
2004 | } | 2004 | } |
2005 | 2005 | ||
2006 | -//获取模板 | 2006 | +// 获取模板 |
2007 | func getTemplate(templateId int) protocol.NameItem { | 2007 | func getTemplate(templateId int) protocol.NameItem { |
2008 | if template, e := models.GetAuditTemplateById(int64(templateId)); e == nil { | 2008 | if template, e := models.GetAuditTemplateById(int64(templateId)); e == nil { |
2009 | item := protocol.NameItem{ | 2009 | item := protocol.NameItem{ |
@@ -2017,7 +2017,7 @@ func getTemplate(templateId int) protocol.NameItem { | @@ -2017,7 +2017,7 @@ func getTemplate(templateId int) protocol.NameItem { | ||
2017 | return protocol.NameItem{} | 2017 | return protocol.NameItem{} |
2018 | } | 2018 | } |
2019 | 2019 | ||
2020 | -//获取机会一级分类 | 2020 | +// 获取机会一级分类 |
2021 | func getChanceType(chanceTypeId int) protocol.NameItem { | 2021 | func getChanceType(chanceTypeId int) protocol.NameItem { |
2022 | if template, e := models.GetChanceTypeById(chanceTypeId); e == nil { | 2022 | if template, e := models.GetChanceTypeById(chanceTypeId); e == nil { |
2023 | item := protocol.NameItem{ | 2023 | item := protocol.NameItem{ |
@@ -2040,7 +2040,7 @@ func jsonUnmarshal(jsonData string, v interface{}) { | @@ -2040,7 +2040,7 @@ func jsonUnmarshal(jsonData string, v interface{}) { | ||
2040 | } | 2040 | } |
2041 | } | 2041 | } |
2042 | 2042 | ||
2043 | -//清楚未填写的表单数据 | 2043 | +// 清楚未填写的表单数据 |
2044 | func clearEmptyForm(inputFormList []*protocol.Form) (FormList []*protocol.Form) { | 2044 | func clearEmptyForm(inputFormList []*protocol.Form) (FormList []*protocol.Form) { |
2045 | if len(inputFormList) == 0 { | 2045 | if len(inputFormList) == 0 { |
2046 | return | 2046 | return |
@@ -2054,7 +2054,7 @@ func clearEmptyForm(inputFormList []*protocol.Form) (FormList []*protocol.Form) | @@ -2054,7 +2054,7 @@ func clearEmptyForm(inputFormList []*protocol.Form) (FormList []*protocol.Form) | ||
2054 | return | 2054 | return |
2055 | } | 2055 | } |
2056 | 2056 | ||
2057 | -//机会详情 | 2057 | +// 机会详情 |
2058 | func ChanceDetail(header *protocol.RequestHeader, request *protocol.ChanceDetailRequest) (rsp *protocol.ChanceDetailResponse, err error) { | 2058 | func ChanceDetail(header *protocol.RequestHeader, request *protocol.ChanceDetailRequest) (rsp *protocol.ChanceDetailResponse, err error) { |
2059 | var ( | 2059 | var ( |
2060 | chance *models.Chance | 2060 | chance *models.Chance |
@@ -2208,7 +2208,7 @@ func ChanceDraftDetail(header *protocol.RequestHeader, request *protocol.ChanceD | @@ -2208,7 +2208,7 @@ func ChanceDraftDetail(header *protocol.RequestHeader, request *protocol.ChanceD | ||
2208 | return | 2208 | return |
2209 | } | 2209 | } |
2210 | 2210 | ||
2211 | -//机会删除 | 2211 | +// 机会删除 |
2212 | func ChanceDelete(header *protocol.RequestHeader, request *protocol.ChanceDeleteRequest) (rsp *protocol.ChanceDeleteResponse, err error) { | 2212 | func ChanceDelete(header *protocol.RequestHeader, request *protocol.ChanceDeleteRequest) (rsp *protocol.ChanceDeleteResponse, err error) { |
2213 | var ( | 2213 | var ( |
2214 | chance *models.Chance | 2214 | chance *models.Chance |
@@ -2260,7 +2260,7 @@ func ChanceDelete(header *protocol.RequestHeader, request *protocol.ChanceDelete | @@ -2260,7 +2260,7 @@ func ChanceDelete(header *protocol.RequestHeader, request *protocol.ChanceDelete | ||
2260 | return | 2260 | return |
2261 | } | 2261 | } |
2262 | 2262 | ||
2263 | -//用户机会权限 | 2263 | +// 用户机会权限 |
2264 | func Permission(header *protocol.RequestHeader, request *protocol.PermissionRequest) (rsp *protocol.PermissionResponse, err error) { | 2264 | func Permission(header *protocol.RequestHeader, request *protocol.PermissionRequest) (rsp *protocol.PermissionResponse, err error) { |
2265 | var ( | 2265 | var ( |
2266 | op *agg.OptionOpportunity | 2266 | op *agg.OptionOpportunity |
@@ -2396,7 +2396,7 @@ func Permission(header *protocol.RequestHeader, request *protocol.PermissionRequ | @@ -2396,7 +2396,7 @@ func Permission(header *protocol.RequestHeader, request *protocol.PermissionRequ | ||
2396 | return | 2396 | return |
2397 | } | 2397 | } |
2398 | 2398 | ||
2399 | -//机会补充详情 | 2399 | +// 机会补充详情 |
2400 | func ChanceReviseDetail(header *protocol.RequestHeader, request *protocol.ChanceReviseDetailRequest) (rsp *protocol.ChanceReviseDetailResponse, err error) { | 2400 | func ChanceReviseDetail(header *protocol.RequestHeader, request *protocol.ChanceReviseDetailRequest) (rsp *protocol.ChanceReviseDetailResponse, err error) { |
2401 | var ( | 2401 | var ( |
2402 | detail *models.ChanceReviseLog | 2402 | detail *models.ChanceReviseLog |
@@ -2427,7 +2427,7 @@ func ChanceReviseDetail(header *protocol.RequestHeader, request *protocol.Chance | @@ -2427,7 +2427,7 @@ func ChanceReviseDetail(header *protocol.RequestHeader, request *protocol.Chance | ||
2427 | return | 2427 | return |
2428 | } | 2428 | } |
2429 | 2429 | ||
2430 | -//自查问题列表 | 2430 | +// 自查问题列表 |
2431 | func CheckQuestions(header *protocol.RequestHeader, request *protocol.CheckQuestionsRequest) (rsp *protocol.CheckQuestionsResponse, err error) { | 2431 | func CheckQuestions(header *protocol.RequestHeader, request *protocol.CheckQuestionsRequest) (rsp *protocol.CheckQuestionsResponse, err error) { |
2432 | var () | 2432 | var () |
2433 | rsp = &protocol.CheckQuestionsResponse{} | 2433 | rsp = &protocol.CheckQuestionsResponse{} |
@@ -2458,7 +2458,7 @@ func CheckQuestions(header *protocol.RequestHeader, request *protocol.CheckQuest | @@ -2458,7 +2458,7 @@ func CheckQuestions(header *protocol.RequestHeader, request *protocol.CheckQuest | ||
2458 | return | 2458 | return |
2459 | } | 2459 | } |
2460 | 2460 | ||
2461 | -//机会保存到草稿箱 | 2461 | +// 机会保存到草稿箱 |
2462 | func DraftSaveChance(header *protocol.RequestHeader, request *protocol.DraftSaveChanceRequest) (rsp *protocol.DraftSaveChanceResponse, err error) { | 2462 | func DraftSaveChance(header *protocol.RequestHeader, request *protocol.DraftSaveChanceRequest) (rsp *protocol.DraftSaveChanceResponse, err error) { |
2463 | var ( | 2463 | var ( |
2464 | template *models.AuditTemplate | 2464 | template *models.AuditTemplate |
@@ -2549,7 +2549,7 @@ func DraftSaveChance(header *protocol.RequestHeader, request *protocol.DraftSave | @@ -2549,7 +2549,7 @@ func DraftSaveChance(header *protocol.RequestHeader, request *protocol.DraftSave | ||
2549 | return | 2549 | return |
2550 | } | 2550 | } |
2551 | 2551 | ||
2552 | -//草稿删除(清空) | 2552 | +// 草稿删除(清空) |
2553 | func DraftDelete(header *protocol.RequestHeader, request *protocol.DraftDeleteRequest) (rsp *protocol.DraftDeleteResponse, err error) { | 2553 | func DraftDelete(header *protocol.RequestHeader, request *protocol.DraftDeleteRequest) (rsp *protocol.DraftDeleteResponse, err error) { |
2554 | var ( | 2554 | var ( |
2555 | sql string | 2555 | sql string |
@@ -2567,7 +2567,7 @@ func DraftDelete(header *protocol.RequestHeader, request *protocol.DraftDeleteRe | @@ -2567,7 +2567,7 @@ func DraftDelete(header *protocol.RequestHeader, request *protocol.DraftDeleteRe | ||
2567 | return | 2567 | return |
2568 | } | 2568 | } |
2569 | 2569 | ||
2570 | -//草稿箱-机会列表 | 2570 | +// 草稿箱-机会列表 |
2571 | func DraftByChance(header *protocol.RequestHeader, request *protocol.DraftByChanceRequest) (rsp *protocol.DraftByChanceResponse, err error) { | 2571 | func DraftByChance(header *protocol.RequestHeader, request *protocol.DraftByChanceRequest) (rsp *protocol.DraftByChanceResponse, err error) { |
2572 | var ( | 2572 | var ( |
2573 | ormItems []protocol.DraftChanceItemOrm | 2573 | ormItems []protocol.DraftChanceItemOrm |
@@ -2608,7 +2608,7 @@ func DraftByChance(header *protocol.RequestHeader, request *protocol.DraftByChan | @@ -2608,7 +2608,7 @@ func DraftByChance(header *protocol.RequestHeader, request *protocol.DraftByChan | ||
2608 | return | 2608 | return |
2609 | } | 2609 | } |
2610 | 2610 | ||
2611 | -//获取最新的表单列表 | 2611 | +// 获取最新的表单列表 |
2612 | func GetNewestFormList(header *protocol.RequestHeader, chanceType, tpId int, old []*protocol.Form) []*protocol.Form { | 2612 | func GetNewestFormList(header *protocol.RequestHeader, chanceType, tpId int, old []*protocol.Form) []*protocol.Form { |
2613 | var ( | 2613 | var ( |
2614 | new []*protocol.Form | 2614 | new []*protocol.Form |
@@ -2634,7 +2634,7 @@ func getNewestFormList(new []*protocol.Form, old []*protocol.Form) []*protocol.F | @@ -2634,7 +2634,7 @@ func getNewestFormList(new []*protocol.Form, old []*protocol.Form) []*protocol.F | ||
2634 | return new | 2634 | return new |
2635 | } | 2635 | } |
2636 | 2636 | ||
2637 | -//获取最新的自查列表 | 2637 | +// 获取最新的自查列表 |
2638 | func GetNewestCheckQuestions(tpId int64, old []protocol.SelfCheck) []*protocol.CheckQuestion { | 2638 | func GetNewestCheckQuestions(tpId int64, old []protocol.SelfCheck) []*protocol.CheckQuestion { |
2639 | var rsp = []*protocol.CheckQuestion{} | 2639 | var rsp = []*protocol.CheckQuestion{} |
2640 | if questions, err := agg.GetCheckQuestionsByTemplateId(tpId); err != nil { | 2640 | if questions, err := agg.GetCheckQuestionsByTemplateId(tpId); err != nil { |
-
请 注册 或 登录 后发表评论