|  |  |  |  | package congresscontrol | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  | import ( | 
					
						
							|  |  |  |  | 	"flx/Common" | 
					
						
							|  |  |  |  | 	"flx/controller" | 
					
						
							|  |  |  |  | 	"flx/localcache" | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  | 	"github.com/gin-gonic/gin" | 
					
						
							|  |  |  |  | 	log "github.com/sirupsen/logrus" | 
					
						
							|  |  |  |  | ) | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  | /** | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  | * 会议议程类的描述 | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  | * @author miSter | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  | * @email  hdfs010@163.com | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  | * @date   no data | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  | * @link   <a href=http://www.philisense.com>北京飞利信电子技术有限公司</a>
 | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  |  */ | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  | //uuid "github.com/satori/go.uuid"
 | 
					
						
							|  |  |  |  | //"strings"
 | 
					
						
							|  |  |  |  | //"time"
 | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  | func TacitScreenForWeb(c *gin.Context) { | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  | 	defer func() { | 
					
						
							|  |  |  |  | 		if r := recover(); r != nil { | 
					
						
							|  |  |  |  | 			log.Error("TacitScreenForWeb:", r) | 
					
						
							|  |  |  |  | 		} | 
					
						
							|  |  |  |  | 	}() | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  | 	// 先声明map
 | 
					
						
							|  |  |  |  | 	var parametermap map[string]interface{} | 
					
						
							|  |  |  |  | 	// 再使用make函数创建一个非nil的map,nil map不能赋值
 | 
					
						
							|  |  |  |  | 	parametermap = make(map[string]interface{}) | 
					
						
							|  |  |  |  | 	// 先声明map
 | 
					
						
							|  |  |  |  | 	var resultmap map[string]interface{} | 
					
						
							|  |  |  |  | 	// 再使用make函数创建一个非nil的map,nil map不能赋值
 | 
					
						
							|  |  |  |  | 	resultmap = make(map[string]interface{}) | 
					
						
							|  |  |  |  | 	// 最后给已声明的map赋值
 | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  | 	err := controller.DecodeJsonPayload(c, ¶metermap) | 
					
						
							|  |  |  |  | 	if err != nil { | 
					
						
							|  |  |  |  | 		resultmap[Common.DATAMESSAGE] = err.Error() | 
					
						
							|  |  |  |  | 		resultmap[Common.DATASUCCESS] = Common.ERRORFLAG | 
					
						
							|  |  |  |  | 		resultmap[Common.DATAMESSAGE] = Common.QUERY_FAIL_MSG | 
					
						
							|  |  |  |  | 		controller.Response(c, Common.ServerError, Common.GetErrorMessage(Common.ServerError, ""), resultmap) | 
					
						
							|  |  |  |  | 		return | 
					
						
							|  |  |  |  | 	} | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  | 	myvalue := localcache.TacitScreen(parametermap) | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  | 	// resultmap[common.DATARECORD] = myvalue
 | 
					
						
							|  |  |  |  | 	myvalue[Common.DATASUCCESS] = Common.SUCCESSFLAG | 
					
						
							|  |  |  |  | 	myvalue[Common.DATAMESSAGE] = Common.QUERY_SUCCESS_MSG | 
					
						
							|  |  |  |  | 	controller.Response(c, Common.OK, Common.GetErrorMessage(Common.OK, ""), myvalue) | 
					
						
							|  |  |  |  | 	return | 
					
						
							|  |  |  |  | } |