作者 yangfu

机会池机会补充 审批消息修改

@@ -130,7 +130,7 @@ where user_id=? and company_id=? and review_status in (%v) @@ -130,7 +130,7 @@ where user_id=? and company_id=? and review_status in (%v)
130 func GetChanceMyApproveChance(uid, cid int64, reviewStatus []int8, lastId int64, pageSize int, v interface{}) (total int, err error) { 130 func GetChanceMyApproveChance(uid, cid int64, reviewStatus []int8, lastId int64, pageSize int, v interface{}) (total int, err error) {
131 sql := fmt.Sprintf(`select a.*,b.images,b.speechs,b.videos from ( 131 sql := fmt.Sprintf(`select a.*,b.images,b.speechs,b.videos from (
132 select a.*,b.user_id,b.source_content,b.enable_status,b.review_status,b.create_at,b.update_at,b.approve_time chance_approve_time from ( 132 select a.*,b.user_id,b.source_content,b.enable_status,b.review_status,b.create_at,b.update_at,b.approve_time chance_approve_time from (
133 -select id,approve_time,approve_data,uid,chance_id,approve_message,update_at process_create_time 133 +select id,approve_time,approve_data,uid,chance_id,approve_message,create_at process_create_time
134 from audit_flow_process where uid=? and enable_status =1 and review_status in (%v) and (?=0 or id<?) 134 from audit_flow_process where uid=? and enable_status =1 and review_status in (%v) and (?=0 or id<?)
135 )a left outer join chance b on a.chance_id = b.id 135 )a left outer join chance b on a.chance_id = b.id
136 )a left outer join chance_data b on a.chance_id =b.chance_id 136 )a left outer join chance_data b on a.chance_id =b.chance_id
@@ -535,8 +535,8 @@ func ChanceUpdate(header *protocol.RequestHeader, request *protocol.ChanceUpdate @@ -535,8 +535,8 @@ func ChanceUpdate(header *protocol.RequestHeader, request *protocol.ChanceUpdate
535 request.IsPublish = false 535 request.IsPublish = false
536 log.Info(fmt.Sprintf("机会编辑 is_publish:%v chance.review_status:%v 是否是本人:%v", request.IsPublish, chance.ReviewStatus, chance.UserId == header.UserId)) 536 log.Info(fmt.Sprintf("机会编辑 is_publish:%v chance.review_status:%v 是否是本人:%v", request.IsPublish, chance.ReviewStatus, chance.UserId == header.UserId))
537 } 537 }
538 - //TODO:非本人 1.需要验证角色权限 2是否是审核人 3.是否是本人 (目前本人才可以审核)  
539 - if chance.UserId != header.UserId { 538 + //1.需要验证角色权限 2是否是审核人 3.是否是本人
  539 + if chance.ReviewStatus == protocol.ReviewStatusPass { //chance.UserId != header.UserId
540 err = protocol.NewErrWithMessage(5206) 540 err = protocol.NewErrWithMessage(5206)
541 log.Error(fmt.Sprintf("user:%v 无权限操作机会 chance:%v", header.UserId, chance.Id)) 541 log.Error(fmt.Sprintf("user:%v 无权限操作机会 chance:%v", header.UserId, chance.Id))
542 return 542 return