作者 yangfu

权限修改

@@ -208,24 +208,24 @@ func (this *ChanceController) ChanceType() { @@ -208,24 +208,24 @@ func (this *ChanceController) ChanceType() {
208 208
209 //Permission 机会权限 209 //Permission 机会权限
210 //@router /permission [post] 210 //@router /permission [post]
211 -func (this *ChanceController) Permission() {  
212 - var msg *protocol.ResponseMessage  
213 - defer func() {  
214 - this.Resp(msg)  
215 - }()  
216 - var request *protocol.ChancePermissionRequest  
217 - if err := json.Unmarshal(this.ByteBody, &request); err != nil {  
218 - log.Error(err)  
219 - msg = protocol.BadRequestParam(1)  
220 - return  
221 - }  
222 - if b, m := this.Valid(request); !b {  
223 - msg = m  
224 - return  
225 - }  
226 - header := controllers.GetRequestHeader(this.Ctx)  
227 - msg = protocol.NewReturnResponse(chance.ChancePermission(header, request))  
228 -} 211 +//func (this *ChanceController) Permission() {
  212 +// var msg *protocol.ResponseMessage
  213 +// defer func() {
  214 +// this.Resp(msg)
  215 +// }()//
  216 +// var request *protocol.ChancePermissionRequest
  217 +// if err := json.Unmarshal(this.ByteBody, &request); err != nil {
  218 +// log.Error(err)
  219 +// msg = protocol.BadRequestParam(1)
  220 +// return
  221 +// }
  222 +// if b, m := this.Valid(request); !b {
  223 +// msg = m
  224 +// return
  225 +// }
  226 +// header := controllers.GetRequestHeader(this.Ctx)
  227 +// msg = protocol.NewReturnResponse(chance.ChancePermission(header, request))
  228 +//}
229 229
230 //Templates 230 //Templates
231 //@router /templates [post] 231 //@router /templates [post]
@@ -173,14 +173,14 @@ type ChancePoolResponse struct { @@ -173,14 +173,14 @@ type ChancePoolResponse struct {
173 } 173 }
174 174
175 /*Permission 机会权限*/ 175 /*Permission 机会权限*/
176 -type ChancePermissionRequest struct {  
177 -}  
178 -type ChancePermissionResponse struct {  
179 - EditScore int `json:"editScore"`  
180 - EditChance int `json:"editChance"`  
181 - EditPublic int `json:"editPublic"`  
182 - CloseChance int `json:"closeChance"`  
183 -} 176 +//type ChancePermissionRequest struct {
  177 +//}
  178 +//type ChancePermissionResponse struct {
  179 +// EditScore int `json:"editScore"`
  180 +// EditChance int `json:"editChance"`
  181 +// EditPublic int `json:"editPublic"`
  182 +// CloseChance int `json:"closeChance"`
  183 +//}
184 184
185 //我的机会列表 185 //我的机会列表
186 type ChanceItemOrm struct { 186 type ChanceItemOrm struct {
@@ -209,14 +209,6 @@ func init() { @@ -209,14 +209,6 @@ func init() {
209 209
210 beego.GlobalControllerRouter["opp/controllers/v1:ChanceController"] = append(beego.GlobalControllerRouter["opp/controllers/v1:ChanceController"], 210 beego.GlobalControllerRouter["opp/controllers/v1:ChanceController"] = append(beego.GlobalControllerRouter["opp/controllers/v1:ChanceController"],
211 beego.ControllerComments{ 211 beego.ControllerComments{
212 - Method: "Permission",  
213 - Router: `/permission`,  
214 - AllowHTTPMethods: []string{"post"},  
215 - MethodParams: param.Make(),  
216 - Params: nil})  
217 -  
218 - beego.GlobalControllerRouter["opp/controllers/v1:ChanceController"] = append(beego.GlobalControllerRouter["opp/controllers/v1:ChanceController"],  
219 - beego.ControllerComments{  
220 Method: "ChanceStatistics", 212 Method: "ChanceStatistics",
221 Router: `/statistics`, 213 Router: `/statistics`,
222 AllowHTTPMethods: []string{"post"}, 214 AllowHTTPMethods: []string{"post"},
@@ -915,17 +915,17 @@ func ChanceCalculateDefautlScore(header *protocol.RequestHeader) (rsp protocol.S @@ -915,17 +915,17 @@ func ChanceCalculateDefautlScore(header *protocol.RequestHeader) (rsp protocol.S
915 } 915 }
916 916
917 //机会权限 917 //机会权限
918 -func ChancePermission(header *protocol.RequestHeader, request *protocol.ChancePermissionRequest) (rsp *protocol.ChancePermissionResponse, err error) {  
919 - var ()  
920 - rsp = &protocol.ChancePermissionResponse{}  
921 - {  
922 - rsp.EditChance = 1  
923 - rsp.EditScore = 1  
924 - rsp.EditPublic = 1  
925 - rsp.CloseChance = 1  
926 - }  
927 - return  
928 -} 918 +//func ChancePermission(header *protocol.RequestHeader, request *protocol.ChancePermissionRequest) (rsp *protocol.ChancePermissionResponse, err error) {
  919 +// var ()
  920 +// rsp = &protocol.ChancePermissionResponse{}
  921 +// {
  922 +// rsp.EditChance = 1
  923 +// rsp.EditScore = 1
  924 +// rsp.EditPublic = 1
  925 +// rsp.CloseChance = 1
  926 +// }
  927 +// return
  928 +//}
929 929
930 //生成审批流-提交记录 930 //生成审批流-提交记录
931 func GenAuditFlowProcess_Submit(userId, chanceId int64, templateId int64, reviewStatus int) (v *models.AuditFlowProcess) { 931 func GenAuditFlowProcess_Submit(userId, chanceId int64, templateId int64, reviewStatus int) (v *models.AuditFlowProcess) {