From a527225f7f3cc93882aa870c20f0985d07d6fe92 Mon Sep 17 00:00:00 2001 From: sunty <suntianyu0923@163.com> Date: 星期四, 22 八月 2019 18:12:03 +0800 Subject: [PATCH] set yn main port 7100 --- controllers/dbtableperson.go | 17 +++++++++++------ 1 files changed, 11 insertions(+), 6 deletions(-) diff --git a/controllers/dbtableperson.go b/controllers/dbtableperson.go index 3278f61..6f4278d 100644 --- a/controllers/dbtableperson.go +++ b/controllers/dbtableperson.go @@ -148,7 +148,6 @@ // @Success 200 {string} json "{"code":200, msg:"鐩綍缁撴瀯鏁版嵁", success:true}" // @Failure 500 {string} json "{"code":500, msg:"杩斿洖閿欒淇℃伅", success:false}" // @Router /data/api-v/dbperson/deleteDbPersonById/{uuid} [POST] - func (dbc DbPersonController) DeleteDbPerson(c *gin.Context) { id := c.Params.ByName("uuid") if id == "" { @@ -164,12 +163,14 @@ } } -// @Summary 鍒犻櫎搴曞簱浜哄憳 -// @Description 鍒犻櫎搴撲汉鍛� +type multiIds []string + +// @Summary 鎵归噺鍒犻櫎搴曞簱浜哄憳 +// @Description 鎵归噺鍒犻櫎搴撲汉鍛� // @Accept json // @Produce json // @Tags dbperson 搴曞簱浜哄憳 -// @Param uuids body []string true "搴曞簱浜哄憳ids " +// @Param uuids body controllers.multiIds true "搴曞簱浜哄憳ids" // @Success 200 {string} json "{"code":200, msg:"鐩綍缁撴瀯鏁版嵁", success:true}" // @Failure 500 {string} json "{"code":500, msg:"杩斿洖閿欒淇℃伅", success:false}" // @Router /data/api-v/dbperson/deleteMoreDbPerson [POST] @@ -195,7 +196,7 @@ // @Accept json // @Produce json // @Tags dbperson 搴曞簱浜哄憳 -// @Param reqMap body map false "{"tableId":"","orderName":"uuid","orderType":"desc","contentValue":"","page":1,"size":8}" +// @Param reqMap body map false "{"tableId":"","orderName":"id","orderType":"desc","contentValue":"","page":1,"size":8}" // @Success 200 {string} json "{"code":200, "msg":"鐩綍缁撴瀯鏁版嵁", "success":true,"data":{}}" // @Failure 500 {string} json "{code:500, msg:"杩斿洖閿欒淇℃伅", success:false,data:{}}" // @Router /data/api-v/dbperson/queryDbPersonsByTbId [POST] @@ -205,6 +206,10 @@ tableId := "" if reqBody["tableId"] != nil { tableId = reqBody["tableId"].(string) + } + if tableId == "" { + util.ResponseFormat(c,code.RequestParamError,"鍙傛暟鏈夎锛屽簳搴搃d涓嶈兘涓虹┖") + return } orderName := "id" if reqBody["orderName"] != nil { @@ -258,7 +263,7 @@ // @Accept json // @Produce json // @Tags dbperson 搴曞簱浜哄憳 -// @Param reqMap body map false "{"tableId":"","orderName":"uuid","orderType":"desc","contentValue":"","page":1,"size":8}" +// @Param reqMap body map false "{"tableId":"","orderName":"id","orderType":"desc","contentValue":"","page":1,"size":8}" // @Success 200 {string} json "{"code":200, "msg":"鐩綍缁撴瀯鏁版嵁", "success":true,"data":{}}" // @Failure 500 {string} json "{code:500, msg:"杩斿洖閿欒淇℃伅", success:false,data:{}}" // @Router /data/api-v/dbperson/queryDbPersonsByCampare [POST] -- Gitblit v1.8.0