You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

65 lines
1.5 KiB
Go

1 month ago
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的mapnil map不能赋值
parametermap = make(map[string]interface{})
// 先声明map
var resultmap map[string]interface{}
// 再使用make函数创建一个非nil的mapnil map不能赋值
resultmap = make(map[string]interface{})
// 最后给已声明的map赋值
err := controller.DecodeJsonPayload(c, &parametermap)
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
}