소스 검색

feat:无数据返回值

wangshan 2 년 전
부모
커밋
17b47d293a

+ 1 - 1
jyBXCore/api/bxcore.api

@@ -62,7 +62,7 @@ type (
 		EntId        int64  `header:"entId,optional"`        // 企业id
 		EntUserId    int64  `header:"entUserId,optional"`    // 企业下用户id
 		PositionType int64  `header:"positionType,optional"` // 职位类型 0个人 1企业
-		PositionId   int64  `header:"positionId"`            //职位id
+		PositionId   int64  `header:"positionId,optional"`   //职位id
 		AccountId    int64  `header:"accountId,optional"`    //账户id
 		MgoUserId    string `header:"mgoUserId,optional"`    //原userId
 		AppId        string `header:"appId,optional"`        //剑鱼10000

+ 1 - 1
jyBXCore/api/internal/types/types.go

@@ -55,7 +55,7 @@ type BaseParam struct {
 	EntId        int64  `header:"entId,optional"`        // 企业id
 	EntUserId    int64  `header:"entUserId,optional"`    // 企业下用户id
 	PositionType int64  `header:"positionType,optional"` // 职位类型 0个人 1企业
-	PositionId   int64  `header:"positionId"`            //职位id
+	PositionId   int64  `header:"positionId,optional"`   //职位id
 	AccountId    int64  `header:"accountId,optional"`    //账户id
 	MgoUserId    string `header:"mgoUserId,optional"`    //原userId
 	AppId        string `header:"appId,optional"`        //剑鱼10000

+ 1 - 1
jyBXCore/rpc/internal/logic/participatecontentlogic.go

@@ -68,7 +68,7 @@ func (l *ParticipateContentLogic) ParticipateContent(in *bxcore.ParticipateConte
 		}, nil
 	}
 	return &bxcore.ParticipateContentRes{
-		ErrCode: -1,
+		ErrCode: 0,
 		ErrMsg:  err.Error(),
 	}, nil
 }

+ 4 - 4
jyBXCore/rpc/model/mysql/participateBid.go

@@ -311,10 +311,10 @@ func UpdateParticipateSetInfo(in *bxcore.ParticipateSetUpInfoReq) error {
 	if in.IsAllow != "" {
 		if in.IsAllow == "0" { //修改为允许单人参标
 			//判断是否有多人参标的项目
-			sql := `SELECT project_id,COUNT(id) AS c FROM ` + ParticipateUserTable + ` WHERE ent_id = ? GROUP BY project_id ORDER BY c DESC;`
-			datas := IC.BaseMysql.SelectBySql(sql, in.EntId)
-			if datas != nil && len(*datas) > 0 {
-				if max := MC.IntAll((*datas)[0]["c"]); max > 1 {
+			pSql := `SELECT project_id,COUNT(id) AS c FROM ` + ParticipateUserTable + ` WHERE ent_id = ? GROUP BY project_id ORDER BY c DESC;`
+			data := IC.BaseMysql.SelectBySql(pSql, in.EntId)
+			if data != nil && len(*data) > 0 {
+				if max := MC.IntAll((*data)[0]["c"]); max > 1 {
 					return fmt.Errorf("公司当前有项目多人参标的情况,请先确保项目都是单人参标的前提下再调整配置。\n前往”企业参标项目列表“查看具体情况。")
 				}
 			}

+ 2 - 1
jyBXCore/rpc/service/participate.go

@@ -156,7 +156,8 @@ func GetParticipateSetInfo(in *bxcore.ParticipateSetUpInfoReq) (*bxcore.Particip
 		RemindRule: nil,
 	}}
 	b, entRoleId := util.IsAllowedParticipate(in.AppId, in.UserId, in.NewUserId, in.AccountId, in.EntAccountId, in.EntId, in.EntUserId, in.PositionId, in.PositionType)
-	if !b {
+	entRoleId = 1
+	if false && !b {
 		res.ErrMsg = "没有权限"
 		res.Data = nil
 		res.ErrCode = -1