|
@@ -382,31 +382,31 @@ func GetUserMap(userIds string) (rs *[]map[string]interface{}) {
|
|
|
|
|
|
// CheckParticipateManager 验证项目id是否是该管理员企业下的参标项目
|
|
|
func CheckParticipateManager(projectId string, entId int64, valid bool) (flag bool) {
|
|
|
- statusStr := "" // 是否需要验证是正在参标
|
|
|
+ stateStr := "" // 是否需要验证是正在参标
|
|
|
if valid {
|
|
|
- statusStr = " and status=0"
|
|
|
+ stateStr = " and state=0"
|
|
|
}
|
|
|
- query := "SELECT count(id) FROM " + ParticipateUserTable + " where project_id=? and ent_id=?" + statusStr
|
|
|
+ query := "SELECT count(id) FROM " + ParticipateUserTable + " where project_id=? and ent_id=?" + stateStr
|
|
|
return IC.BaseMysql.CountBySql(query, projectId, entId) > 0
|
|
|
}
|
|
|
|
|
|
// CheckParticipateEntUser 验证项目id是否是该企业用户参标的项目
|
|
|
func CheckParticipateEntUser(projectId string, entUserId int64, valid bool) (flag bool) {
|
|
|
- statusStr := "" // 是否需要验证是正在参标
|
|
|
+ stateStr := "" // 是否需要验证是正在参标
|
|
|
if valid {
|
|
|
- statusStr = " and status=0"
|
|
|
+ stateStr = " and state=0"
|
|
|
}
|
|
|
- query := "SELECT count(id) FROM " + ParticipateUserTable + " where project_id=? and ent_user_id=?" + statusStr
|
|
|
+ query := "SELECT count(id) FROM " + ParticipateUserTable + " where project_id=? and ent_user_id=?" + stateStr
|
|
|
return IC.BaseMysql.CountBySql(query, projectId, entUserId) > 0
|
|
|
|
|
|
}
|
|
|
|
|
|
// CheckParticipatePersonal 查询项目id是否是该用户参标项目
|
|
|
func CheckParticipatePersonal(projectId string, positionId int64, valid bool) (flag bool) {
|
|
|
- statusStr := "" // 是否需要验证是正在参标 终止参标的用户还能查看记录,但是不能更新状态
|
|
|
+ stateStr := "" // 是否需要验证是正在参标 终止参标的用户还能查看记录,但是不能更新状态
|
|
|
if valid {
|
|
|
- statusStr = " and status=0"
|
|
|
+ stateStr = " and state=0"
|
|
|
}
|
|
|
- query := "SELECT count(id) FROM " + ParticipateUserTable + " where project_id=? and position_id=?" + statusStr
|
|
|
+ query := "SELECT count(id) FROM " + ParticipateUserTable + " where project_id=? and position_id=?" + stateStr
|
|
|
return IC.BaseMysql.CountBySql(query, projectId, positionId) > 0
|
|
|
}
|