梁俊景 4 years ago
parent
commit
cb3adddce1

+ 3 - 3
server/api/v1/sys_operation_record.go

@@ -36,7 +36,7 @@ func CreateSysOperationRecord(c *gin.Context) {
 // @Security ApiKeyAuth
 // @accept application/json
 // @Produce application/json
-// @Param data body request.GetByIdUnit true "SysOperationRecord模型"
+// @Param data body request.GetByIdUint true "SysOperationRecord模型"
 // @Success 200 {string} string "{"success":true,"data":{},"msg":"删除成功"}"
 // @Router /sysOperationRecord/deleteSysOperationRecord [delete]
 func DeleteSysOperationRecord(c *gin.Context) {
@@ -74,11 +74,11 @@ func DeleteSysOperationRecordByIds(c *gin.Context) {
 // @Security ApiKeyAuth
 // @accept application/json
 // @Produce application/json
-// @Param data query request.GetByIdUnit false "编号"
+// @Param data query request.GetByIdUint false "编号"
 // @Success 200 {string} string "{"success":true,"data":{},"msg":"查询成功"}"
 // @Router /sysOperationRecord/findSysOperationRecord [get]
 func FindSysOperationRecord(c *gin.Context) {
-	var sysOperationRecord request.GetByIdUnit
+	var sysOperationRecord request.GetByIdUint
 	_ = c.ShouldBindQuery(&sysOperationRecord)
 	if err := utils.Verify(sysOperationRecord, utils.IdVerify); err != nil {
 		response.FailWithMessage(err.Error(), c)

+ 1 - 1
server/model/request/common.go

@@ -12,7 +12,7 @@ type GetById struct {
 }
 
 // Find by id structure
-type GetByIdUnit struct {
+type GetByIdUint struct {
 	Id uint `json:"id" form:"id"`
 }
 

+ 3 - 3
server/resource/template/server/api.go.tpl

@@ -34,7 +34,7 @@ func Create{{.StructName}}(c *gin.Context) {
 // @Security ApiKeyAuth
 // @accept application/json
 // @Produce application/json
-// @Param data body request.GetByIdUnit true "删除{{.StructName}}"
+// @Param data body request.GetByIdUint true "删除{{.StructName}}"
 // @Success 200 {string} string "{"success":true,"data":{},"msg":"删除成功"}"
 // @Router /{{.Abbreviation}}/delete{{.StructName}} [delete]
 func Delete{{.StructName}}(c *gin.Context) {
@@ -99,11 +99,11 @@ func Update{{.StructName}}(c *gin.Context) {
 // @Security ApiKeyAuth
 // @accept application/json
 // @Produce application/json
-// @Param data query request.GetByIdUnit true "用id查询{{.StructName}}"
+// @Param data query request.GetByIdUint true "用id查询{{.StructName}}"
 // @Success 200 {string} string "{"success":true,"data":{},"msg":"查询成功"}"
 // @Router /{{.Abbreviation}}/find{{.StructName}} [get]
 func Find{{.StructName}}(c *gin.Context) {
-	var {{.Abbreviation}} request.GetByIdUnit
+	var {{.Abbreviation}} request.GetByIdUint
 	_ = c.ShouldBindQuery(&{{.Abbreviation}})
 	if err, re{{.Abbreviation}} := service.Get{{.StructName}}({{.Abbreviation}}.Id); err != nil {
         global.GVA_LOG.Error("查询失败!", zap.Any("err", err))