| | |
| | | // @Success 200 {string} json "{"code":200, msg:"目录结构数据", success:true}" |
| | | // @Failure 500 {string} json "{"code":500, msg:"返回错误信息", success:false}" |
| | | // @Router /data/api-v/dbperson/joinDbTable [POST] |
| | | func (sc *DbPersonController) JoinDbTable(c *gin.Context) { |
| | | func (dbc *DbPersonController) JoinDbTable(c *gin.Context) { |
| | | var reqBody JoinDbTVo |
| | | c.BindJSON(&reqBody) |
| | | if reqBody.CaptureId == "" || len(reqBody.TableIds) ==0 { |
| | |
| | | } |
| | | |
| | | type DbtSearch struct { |
| | | TableId string `json:"tableId"` |
| | | OrderName string `json:"orderName"` |
| | | OrderType string `json:"orderType"` |
| | | TableId string `json:"tableId"` |
| | | OrderName string `json:"orderName"` |
| | | OrderType string `json:"orderType"` |
| | | ContentValue string `json:"contentValue"` |
| | | Page int `json:"page"` |
| | | Size int `json:"size"` |
| | | Page int `json:"page"` |
| | | Size int `json:"size"` |
| | | } |
| | | |
| | | type DbPersonMove struct { |
| | | PersonId string `json:"personId"` |
| | | TableIds []string `json:"tableIds"` |
| | | } |
| | | |
| | | // @Security ApiKeyAuth |
| | | // @Summary 人员移动 |
| | | // @Description 人员移动 |
| | | // @Accept json |
| | | // @Produce json |
| | | // @Tags dbperson 底库人员 |
| | | // @Param obj body controllers.DbPersonMove true "移动参数" |
| | | // @Success 200 {string} json "{"code":200, msg:"", success:true}" |
| | | // @Failure 500 {string} json "{"code":500, msg:"", success:false}" |
| | | // @Router /data/api-v/dbperson/move [POST] |
| | | func (dbc *DbPersonController) Move(c *gin.Context) { |
| | | var reqBody DbPersonMove |
| | | c.BindJSON(&reqBody) |
| | | if reqBody.PersonId == "" || len(reqBody.TableIds) == 0 { |
| | | util.ResponseFormat(c,code.RequestParamError, "参数有误") |
| | | return |
| | | } |
| | | var dbpApi dbapi.DbPersonApi |
| | | b,d := dbpApi.Move(reqBody.PersonId, reqBody.TableIds) |
| | | if b { |
| | | util.ResponseFormat(c,code.Success,d) |
| | | } else { |
| | | util.ResponseFormat(c,code.ComError,"") |
| | | } |
| | | } |
| | | |
| | | // @Security ApiKeyAuth |
| | | // @Summary 人员复制 |
| | | // @Description 人员复制 |
| | | // @Accept json |
| | | // @Produce json |
| | | // @Tags dbperson 底库人员 |
| | | // @Param obj body controllers.DbPersonMove true "复制参数" |
| | | // @Success 200 {string} json "{"code":200, msg:"", success:true}" |
| | | // @Failure 500 {string} json "{"code":500, msg:"", success:false}" |
| | | // @Router /data/api-v/dbperson/copy [POST] |
| | | func (dbc *DbPersonController) Copy(c *gin.Context) { |
| | | var reqBody DbPersonMove |
| | | c.BindJSON(&reqBody) |
| | | if reqBody.PersonId == "" || len(reqBody.TableIds) == 0 { |
| | | util.ResponseFormat(c,code.RequestParamError, "参数有误") |
| | | return |
| | | } |
| | | var dbpApi dbapi.DbPersonApi |
| | | b,d := dbpApi.Copy(reqBody.PersonId, reqBody.TableIds) |
| | | if b { |
| | | util.ResponseFormat(c,code.Success,d) |
| | | } else { |
| | | util.ResponseFormat(c,code.ComError,"") |
| | | } |
| | | } |