|
@@ -8,7 +8,9 @@ import (
|
|
|
"fmt"
|
|
|
"jyBXCore/rpc/bxcore"
|
|
|
IC "jyBXCore/rpc/init"
|
|
|
+ "jyBXCore/rpc/model/es"
|
|
|
"log"
|
|
|
+ "strconv"
|
|
|
"strings"
|
|
|
"time"
|
|
|
)
|
|
@@ -30,7 +32,7 @@ func (in *ParticipateStatistics) PushStatistics(entUserIdArr []string, startTime
|
|
|
//判断是企业、部门还是个人
|
|
|
isAdmin, personArrStr, users := in.PersonHandle(entUserIdArr)
|
|
|
//时间处理
|
|
|
- query := QueryHandle(isAdmin, startTime, endTime, personArrStr, source, -1)
|
|
|
+ query := QueryHandle(isAdmin, startTime, endTime, personArrStr, source, 0)
|
|
|
//推送数据查询
|
|
|
dataList := IC.BaseMysql.SelectBySql(fmt.Sprintf("select * from participate_push_statistics where %s order by ymd", strings.Join(query, " and ")))
|
|
|
if users != nil && len(*users) > 0 {
|
|
@@ -59,6 +61,11 @@ var (
|
|
|
2: "企业自动分发",
|
|
|
3: "企业手动分发",
|
|
|
}
|
|
|
+ SourceMap = map[string]string{
|
|
|
+ "1": "个人订阅",
|
|
|
+ "2": "企业自动分发",
|
|
|
+ "3": "企业手动分发",
|
|
|
+ }
|
|
|
)
|
|
|
|
|
|
// GetSourceItem 获取标讯项目来源筛选项
|
|
@@ -89,12 +96,23 @@ func (in *ParticipateStatistics) GetSourceItem(entId, positionId int) (result []
|
|
|
return
|
|
|
}
|
|
|
for i := 0; i < len(*rs); i++ {
|
|
|
- value := common.IntAll((*rs)[i][""])
|
|
|
- if name, ok := SelectItemMap[value]; ok {
|
|
|
- result = append(result, &bxcore.SourceItem{
|
|
|
- Name: name,
|
|
|
- Value: int64(value),
|
|
|
- })
|
|
|
+ value := common.ObjToString((*rs)[i]["source"])
|
|
|
+ if value == "" {
|
|
|
+ continue
|
|
|
+ }
|
|
|
+ splitSource := strings.Split(value, ",")
|
|
|
+ for j := 0; j < len(splitSource); j++ {
|
|
|
+ sourceValue, err := strconv.Atoi(splitSource[j])
|
|
|
+ if err != nil {
|
|
|
+ log.Println("类型转换错误:", err, splitSource[j])
|
|
|
+ continue
|
|
|
+ }
|
|
|
+ if name, ok := SelectItemMap[sourceValue]; ok {
|
|
|
+ result = append(result, &bxcore.SourceItem{
|
|
|
+ Name: name,
|
|
|
+ Value: int64(sourceValue),
|
|
|
+ })
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
if len(result) > 0 {
|
|
@@ -504,10 +522,345 @@ func QueryHandle(isAdmin bool, startTime, endTime int64, personArrStr string, so
|
|
|
sourceValue += fmt.Sprint(source[i]) + ","
|
|
|
}
|
|
|
sourceValue = sourceValue[:len(sourceValue)-1]
|
|
|
- query = append(query, fmt.Sprintf("source in ( %s )", sourceValue))
|
|
|
+ query = append(query, fmt.Sprintf(" FIND_IN_SET('%s', a.source)", sourceValue))
|
|
|
}
|
|
|
if bidWay != 0 {
|
|
|
query = append(query, fmt.Sprintf("bid_way = %d", bidWay))
|
|
|
}
|
|
|
return query
|
|
|
}
|
|
|
+func (in *ParticipateStatistics) ProjectDetails(entUserIdArr []string, detailReq *bxcore.ProjectDetailsReq) (result bxcore.DetailData) {
|
|
|
+ //判断是企业、部门还是个人
|
|
|
+ isAdmin, personArrStr, _ := in.PersonHandle(entUserIdArr)
|
|
|
+ queryType := GetQueryType(detailReq)
|
|
|
+ query, countQuery := GetDetailQuery(isAdmin, personArrStr, detailReq, queryType)
|
|
|
+ totalCount := IC.BaseMysql.CountBySql(countQuery)
|
|
|
+ if totalCount == 0 {
|
|
|
+ return
|
|
|
+ }
|
|
|
+ // 处理数据 这里只是筛选出项目id和阶段信息
|
|
|
+ dataList := IC.BaseMysql.SelectBySql(query)
|
|
|
+ if dataList == nil || len(*dataList) == 0 {
|
|
|
+ return
|
|
|
+ }
|
|
|
+ // 处理数据 补充项目名称、推送表字段 、格式化数据
|
|
|
+ rs := ProjectDetailHandle(*dataList, in.EntId, int(detailReq.PositionId), int(detailReq.PositionType))
|
|
|
+ result = bxcore.DetailData{
|
|
|
+ List: rs,
|
|
|
+ Total: totalCount,
|
|
|
+ }
|
|
|
+ // 处理数据
|
|
|
+ return
|
|
|
+}
|
|
|
+
|
|
|
+// todo 查询条件待验证
|
|
|
+//
|
|
|
+// 这个查询只用查出符合筛选条件的项目id 以及该项目对应的stage
|
|
|
+// 查询类型 0空搜索 全连接 1查左边 连右表查stage 2只查右表 3内连接
|
|
|
+func GetDetailQuery(isAdmin bool, personArrStr string, req *bxcore.ProjectDetailsReq, queryType int) (string, string) {
|
|
|
+
|
|
|
+ // 这是因为数据库中 0是未参标 1是已参标, 接收参数时和其他默认参数保持一致 0-全部 1 是未参标 2 是已参标
|
|
|
+ req.IsParticipate -= 1
|
|
|
+ if queryType == 0 {
|
|
|
+ // 空搜索调整
|
|
|
+ query1, query2, query3 := []string{}, []string{}, []string{}
|
|
|
+ //没有传时间,默认时间处理
|
|
|
+ var start = time.Now().AddDate(0, 0, -30)
|
|
|
+ query1 = append(query1, fmt.Sprintf(" a.ymd >= %s ", start.Format("20060102")))
|
|
|
+ query2 = append(query2, fmt.Sprintf(" b.update_date >= %s ", start.Format("20060102")))
|
|
|
+ if isAdmin {
|
|
|
+ //是管理员
|
|
|
+ query1 = append(query1, fmt.Sprintf(" a.ent_user_id in (%s) ", personArrStr))
|
|
|
+ query2 = append(query2, fmt.Sprintf(" FIND_IN_SET('%s', b.ent_user_ids) ", personArrStr))
|
|
|
+ query3 = append(query3, fmt.Sprintf(" FIND_IN_SET('%s', b.ent_user_ids) ", personArrStr))
|
|
|
+ } else {
|
|
|
+ //不是管理员
|
|
|
+ query1 = append(query1, fmt.Sprintf(" a.position_id = %s ", personArrStr))
|
|
|
+ query2 = append(query2, fmt.Sprintf(" FIND_IN_SET('%s', b.position_ids) ", personArrStr))
|
|
|
+ query3 = append(query3, fmt.Sprintf(" FIND_IN_SET('%s', b.position_ids) ", personArrStr))
|
|
|
+ }
|
|
|
+ q := `SELECT A.project_id, B.stage
|
|
|
+ FROM
|
|
|
+ (SELECT DISTINCT(project_id)
|
|
|
+ FROM
|
|
|
+ (SELECT project_id FROM participate_push_statistics
|
|
|
+ WHERE %s UNION
|
|
|
+ SELECT project_id
|
|
|
+ FROM participate_stage_statistics
|
|
|
+ WHERE %s)
|
|
|
+ LIMIT %d , %d) A
|
|
|
+ LEFT JOIN
|
|
|
+ participate_stage_statistics B ON A.project_id = B.project_id where %s`
|
|
|
+ q2 := "select distinct(position_id) from participate_push_statistics where %s union select project_id from participate_stage_statistics where %s "
|
|
|
+ q1Str := strings.Join(query1, " and ")
|
|
|
+ q2Str := strings.Join(query2, " and ")
|
|
|
+ q3Str := strings.Join(query3, " and ")
|
|
|
+ return fmt.Sprintf(q, q1Str, q2Str, q3Str), fmt.Sprintf(q2, q1Str, q2Str)
|
|
|
+ }
|
|
|
+ var q, qCount string
|
|
|
+ query := []string{}
|
|
|
+ joinStr := ""
|
|
|
+ if queryType == 1 {
|
|
|
+ if isAdmin {
|
|
|
+ //是管理员
|
|
|
+ query = append(query, fmt.Sprintf(" a.ent_user_id in (%s) ", personArrStr))
|
|
|
+ joinStr = "and a.ent_id = b.ent_id"
|
|
|
+ } else {
|
|
|
+ query = append(query, fmt.Sprintf(" a.position_id = %s ", personArrStr))
|
|
|
+ //不是管理员
|
|
|
+ // 个人版
|
|
|
+ if req.PositionType == 0 {
|
|
|
+ joinStr = "and a.position_id = b.position_ids"
|
|
|
+ } else {
|
|
|
+ // 企业版 个人 因为是查项目的最新状态信息 所以 用ent_id 和项目id连表
|
|
|
+ joinStr = "and a.ent_id = b.ent_id"
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if req.StartTime == 0 && req.EndTime == 0 {
|
|
|
+ //没有传时间,默认时间处理
|
|
|
+ var start = time.Now().AddDate(0, 0, -30)
|
|
|
+ query = append(query, fmt.Sprintf(" a.ymd >= %s ", start.Format("20060102")))
|
|
|
+ }
|
|
|
+ if req.StartTime != 0 {
|
|
|
+ query = append(query, fmt.Sprintf(" a.ymd >= %d ", req.StartTime))
|
|
|
+ }
|
|
|
+ if req.EndTime != 0 {
|
|
|
+ query = append(query, fmt.Sprintf(" a.ymd <= %d ", req.EndTime))
|
|
|
+ }
|
|
|
+ // 标讯/项目来源
|
|
|
+ if len(req.Source) > 0 {
|
|
|
+ sourceValue := ""
|
|
|
+ for i := 0; i < len(req.Source); i++ {
|
|
|
+ if req.Source[i] == 0 {
|
|
|
+ sourceValue += "1,2,"
|
|
|
+ } else {
|
|
|
+ sourceValue += fmt.Sprint(req.Source[i]) + ","
|
|
|
+ }
|
|
|
+ }
|
|
|
+ sourceValue = sourceValue[:len(sourceValue)-1]
|
|
|
+ query = append(query, fmt.Sprintf(" FIND_IN_SET('%s', a.source)", sourceValue))
|
|
|
+ }
|
|
|
+ // 投标类型 投标方式;1:直接投标 2:渠道投标',
|
|
|
+ if req.BidWay != 0 {
|
|
|
+ query = append(query, fmt.Sprintf("a.bid_way = %d", req.BidWay))
|
|
|
+ }
|
|
|
+ //参标状态:-1全部,0未参标、1已参标
|
|
|
+ if req.IsParticipate != -1 {
|
|
|
+ query = append(query, fmt.Sprintf("a.isparticipate = %d", req.IsParticipate))
|
|
|
+ }
|
|
|
+ q = "select distinct(a.project_id),b.stage,a.id,b.id as bid from participate_push_statistics a left join participate_stage_statistics b on(a.project_id=b.project_id %s ) where %s order by a.id desc,b.id desc"
|
|
|
+ qCount = "select count(distinct(a.project_id)) from participate_push_statistics a left join participate_stage_statistics b on(a.project_id=b.project_id %s) where %s"
|
|
|
+ } else if queryType == 2 {
|
|
|
+ if isAdmin {
|
|
|
+ //是管理员
|
|
|
+ query = append(query, fmt.Sprintf(" FIND_IN_SET('%s', b.ent_user_ids) ", personArrStr))
|
|
|
+ } else {
|
|
|
+ //不是管理员
|
|
|
+ query = append(query, fmt.Sprintf(" FIND_IN_SET('%s', b.position_ids)", personArrStr))
|
|
|
+ }
|
|
|
+ // 参标状态更新时间
|
|
|
+ if req.BidUpdateStartTime != "" {
|
|
|
+ query = append(query, fmt.Sprintf("b.update_date > %s", req.BidUpdateStartTime))
|
|
|
+ }
|
|
|
+ if req.BidUpdateEndTime != "" {
|
|
|
+ query = append(query, fmt.Sprintf("b.update_date > %s", req.BidUpdateStartTime))
|
|
|
+ }
|
|
|
+ if req.BidWay != 0 {
|
|
|
+ query = append(query, fmt.Sprintf("b.bid_way = %d", req.BidWay))
|
|
|
+ }
|
|
|
+ //参标状态:-1全部,0未参标、1已参标
|
|
|
+ if req.IsParticipate == 1 {
|
|
|
+ query = append(query, fmt.Sprintf("b.isparticipate = %d", req.IsParticipate))
|
|
|
+ }
|
|
|
+ q = "select distinct(b.project_id),b.stage,a.id,b.id from participate_stage_statistics b where %s %s order by b.id desc"
|
|
|
+ qCount = "select count(b.project_id) from participate_stage_statistics b where %s %s"
|
|
|
+ } else {
|
|
|
+ if isAdmin {
|
|
|
+ //是管理员
|
|
|
+ query = append(query, fmt.Sprintf(" a.ent_user_id in (%s) ", personArrStr))
|
|
|
+ joinStr = "and a.ent_id = b.ent_id"
|
|
|
+ } else {
|
|
|
+ query = append(query, fmt.Sprintf(" a.position_id = %s ", personArrStr))
|
|
|
+ //不是管理员
|
|
|
+ // 个人版
|
|
|
+ if req.PositionType == 0 {
|
|
|
+ joinStr = "and a.position_id = b.position_ids"
|
|
|
+ } else {
|
|
|
+ // 企业版 个人 因为是查项目的最新状态信息 所以 用ent_id 和项目id连表
|
|
|
+ joinStr = "and a.ent_id = b.ent_id"
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if req.StartTime != 0 {
|
|
|
+ query = append(query, fmt.Sprintf(" a.ymd >= %d ", req.StartTime))
|
|
|
+ }
|
|
|
+ if req.EndTime != 0 {
|
|
|
+ query = append(query, fmt.Sprintf(" a.ymd <= %d ", req.EndTime))
|
|
|
+ }
|
|
|
+ if len(req.Source) > 0 {
|
|
|
+ sourceValue := ""
|
|
|
+ for i := 0; i < len(req.Source); i++ {
|
|
|
+ if req.Source[i] == 0 {
|
|
|
+ sourceValue += "1,2," // 选择未分发时 相当于选择个人订阅和企业自动分发
|
|
|
+ } else {
|
|
|
+ sourceValue += fmt.Sprint(req.Source[i]) + ","
|
|
|
+ }
|
|
|
+ }
|
|
|
+ sourceValue = sourceValue[:len(sourceValue)-1]
|
|
|
+ query = append(query, fmt.Sprintf(" FIND_IN_SET('%s', a.source)", sourceValue))
|
|
|
+ }
|
|
|
+ //参标状态:-1全部,0未参标、1已参标
|
|
|
+ if req.IsParticipate != -1 {
|
|
|
+ query = append(query, fmt.Sprintf("a.isparticipate = %d", req.IsParticipate))
|
|
|
+ }
|
|
|
+ // 投标类型 投标方式;1:直接投标 2:渠道投标',
|
|
|
+ if req.BidWay != 0 {
|
|
|
+ query = append(query, fmt.Sprintf("a.bid_way = %d", req.BidWay))
|
|
|
+ }
|
|
|
+ // 参标状态更新时间
|
|
|
+ if req.BidUpdateStartTime != "" {
|
|
|
+ query = append(query, fmt.Sprintf("b.update_date > %s", req.BidUpdateStartTime))
|
|
|
+ }
|
|
|
+ if req.BidUpdateEndTime != "" {
|
|
|
+ query = append(query, fmt.Sprintf("b.update_date > %s", req.BidUpdateStartTime))
|
|
|
+ }
|
|
|
+ q = "select distinct(a.project_id),b.stage,a.id,b.id from participate_push_statistics a inner join participate_stage_statistics b on(b.project_id=a.project_id %s) where %s order by a.id desc,b.id desc"
|
|
|
+ qCount = "select count(distinct(a.project_id)) from participate_push_statistics a inner join participate_stage_statistics b on(b.project_id=a.project_id %s) where %s"
|
|
|
+ }
|
|
|
+ if len(query) > 0 {
|
|
|
+ q = fmt.Sprintf(q, joinStr, strings.Join(query, " and "))
|
|
|
+ qCount = fmt.Sprintf(qCount, joinStr, strings.Join(query, " and "))
|
|
|
+ }
|
|
|
+ // 处理分页
|
|
|
+ if req.PageNum == 0 && req.PageSize == 0 {
|
|
|
+ req.PageNum = 1
|
|
|
+ req.PageSize = 50
|
|
|
+ }
|
|
|
+ q = fmt.Sprintf("%s limit %d,%d", q, (req.PageNum-1)*req.PageSize, req.PageSize)
|
|
|
+ return q, qCount
|
|
|
+}
|
|
|
+
|
|
|
+type PushInfoStruct struct {
|
|
|
+ Source string
|
|
|
+ VisitDate string
|
|
|
+ DisDate string
|
|
|
+ IsDistribute int
|
|
|
+}
|
|
|
+
|
|
|
+func ProjectDetailHandle(dataList []map[string]interface{}, entId int64, positionId, positionType int) []*bxcore.ProjectDetailData {
|
|
|
+ //dataList 里面包含 项目id、各阶段信息
|
|
|
+ // 处理项目名称
|
|
|
+ projectIdList := []string{}
|
|
|
+ for i := 0; i < len(dataList); i++ {
|
|
|
+ projectIdList = append(projectIdList, common.ObjToString(dataList[i]["project_id"]))
|
|
|
+ }
|
|
|
+ // 项目名称处理成map用于后续使用
|
|
|
+ projectNameMap := map[string]string{}
|
|
|
+ projectNameRs := es.GetProjectNameByProjectId(projectIdList)
|
|
|
+ if projectNameRs != nil && len(*projectNameRs) > 0 {
|
|
|
+ for i := 0; i < len(*projectNameRs); i++ {
|
|
|
+ projectId_ := common.ObjToString((*projectNameRs)[i]["_id"])
|
|
|
+ projectName_ := (*projectNameRs)[i]["projectname"]
|
|
|
+ projectNameMap[projectId_] = common.ObjToString(projectName_)
|
|
|
+ }
|
|
|
+ }
|
|
|
+ // 获取推送最新状态
|
|
|
+ newPushInfo := getNewPushInfo(projectIdList, int(entId), positionId, positionType)
|
|
|
+ newPushInfoMap := map[string]PushInfoStruct{}
|
|
|
+ // 处理推送最新状态
|
|
|
+ if newPushInfo != nil && len(*newPushInfo) > 0 {
|
|
|
+ for i := 0; i < len(*newPushInfo); i++ {
|
|
|
+ project_ := common.ObjToString((*newPushInfo)[i]["project_id"])
|
|
|
+ info := PushInfoStruct{
|
|
|
+ Source: common.ObjToString((*newPushInfo)[i]["source"]),
|
|
|
+ VisitDate: common.ObjToString((*newPushInfo)[i]["visit_date"]),
|
|
|
+ DisDate: common.ObjToString((*newPushInfo)[i]["dis_date"]),
|
|
|
+ }
|
|
|
+ newPushInfoMap[project_] = info
|
|
|
+ }
|
|
|
+ }
|
|
|
+ results := []*bxcore.ProjectDetailData{}
|
|
|
+ // 处理成最后的数据
|
|
|
+ for i := 0; i < len(dataList); i++ {
|
|
|
+ projectId := common.ObjToString(dataList[i]["project_id"])
|
|
|
+ tmp := bxcore.ProjectDetailData{
|
|
|
+ ProjectName: projectNameMap[projectId],
|
|
|
+ }
|
|
|
+ isDistribute_ := ""
|
|
|
+ // 处理推送表相关字段
|
|
|
+ if pushInfo_, ok := newPushInfoMap[projectId]; ok {
|
|
|
+ sourceStr := []string{}
|
|
|
+ if pushInfo_.Source != "" {
|
|
|
+ isDistribute_ = "未分发"
|
|
|
+ sourceSplit := strings.Split(pushInfo_.Source, ",")
|
|
|
+ for j := 0; j < len(sourceSplit); j++ {
|
|
|
+ if sourceSplit[j] == "3" {
|
|
|
+ isDistribute_ = "已分发"
|
|
|
+ }
|
|
|
+
|
|
|
+ if sourceName, ok := SourceMap[sourceSplit[j]]; ok {
|
|
|
+ sourceStr = append(sourceStr, sourceName)
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ tmp.Source = strings.Join(sourceStr, ",") // 处理成中文
|
|
|
+ tmp.ViewDate = pushInfo_.VisitDate
|
|
|
+ tmp.IsDistribute = isDistribute_
|
|
|
+ tmp.DisDate = pushInfo_.DisDate
|
|
|
+ } //
|
|
|
+ // 处理阶段勾选信息和参标、终止参标信息
|
|
|
+ if dataList[i]["stage"] != nil {
|
|
|
+ if stage_, err := json.Marshal(dataList[i]["stage"]); err == nil {
|
|
|
+ err := json.Unmarshal(stage_, &tmp.Stage)
|
|
|
+ if err != nil {
|
|
|
+ log.Println("stage 反序列失败", err)
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ results = append(results, &tmp)
|
|
|
+ }
|
|
|
+ return results
|
|
|
+}
|
|
|
+
|
|
|
+// 获取项目的最新推送状态信息
|
|
|
+func getNewPushInfo(projectIds []string, entId int, positionId int, positionType int) *[]map[string]interface{} {
|
|
|
+ s := ""
|
|
|
+ if positionType == 0 {
|
|
|
+ s = fmt.Sprintf("position_id=%d", positionId)
|
|
|
+ } else {
|
|
|
+ s = fmt.Sprintf("ent_id=%d", entId)
|
|
|
+ }
|
|
|
+ sql := `
|
|
|
+SELECT
|
|
|
+ A.project_id, A.source, A.visit_date, A.dis_date, A.is_distribute,A.id,A.ymd,B.ymd
|
|
|
+FROM participate_push_statistics A inner join (SELECT
|
|
|
+ project_id,MAX(ymd) as ymd
|
|
|
+ FROM
|
|
|
+ participate_push_statistics
|
|
|
+ WHERE
|
|
|
+ %s
|
|
|
+ AND project_id IN ( "` + strings.Join(projectIds, "\",\"") + `" )
|
|
|
+ GROUP BY project_id) B on (A.project_id=B.project_id and A.ymd=b.ymd) where A.%s
|
|
|
+`
|
|
|
+ query := fmt.Sprintf(sql, s, s)
|
|
|
+ return IC.BaseMysql.SelectBySql(query)
|
|
|
+}
|
|
|
+
|
|
|
+// GetQueryType 查询类型 0空搜索 全连接 1查左边 连右表查stage 2只查右表 3内连接
|
|
|
+// IsParticipate 接收参数时 0 全部 1 未参标 2已参标 数据库中 未参标是0
|
|
|
+func GetQueryType(in *bxcore.ProjectDetailsReq) int {
|
|
|
+ // TODO 调整
|
|
|
+ if in.BidUpdateStartTime == "" && in.BidUpdateEndTime == "" && in.StartTime == 0 && in.EndTime == 0 && in.IsParticipate == -1 && in.BidWay == 0 && len(in.Source) == 0 {
|
|
|
+ return 0
|
|
|
+ }
|
|
|
+ if in.IsParticipate == 1 {
|
|
|
+ // 未参标只筛选推送表 右表条件无效
|
|
|
+ return 1
|
|
|
+ }
|
|
|
+ if (in.StartTime != 0 || in.EndTime != 0 || len(in.Source) > 0) && (in.BidUpdateStartTime == "" && in.BidUpdateEndTime == "" && in.IsParticipate != 2) {
|
|
|
+ return 1
|
|
|
+ }
|
|
|
+ if (in.StartTime == 0 && in.EndTime == 0 && len(in.Source) == 0) && (in.BidUpdateStartTime != "" || in.BidUpdateEndTime == "" || in.IsParticipate == 2 || in.BidWay != 0) {
|
|
|
+ return 2
|
|
|
+ }
|
|
|
+ return 3
|
|
|
+}
|