Browse Source

Merge branch 'develop' of http://code.dashoo.cn/chengjian/opms_backend into develop

liuyaqi 3 năm trước cách đây
mục cha
commit
e59972f3e1

+ 428 - 0
doc/订单全流程管理平台.pdma.json

@@ -11599,6 +11599,177 @@
         }
       ],
       "fields": [
+        {
+          "defKey": "id",
+          "defName": "主键",
+          "comment": "",
+          "type": "",
+          "len": "",
+          "scale": "",
+          "primaryKey": true,
+          "notNull": true,
+          "autoIncrement": true,
+          "defaultValue": "",
+          "hideInGraph": false,
+          "refDict": "",
+          "extProps": {},
+          "domain": "16120F75-6AA7-4483-868D-F07F511BB081",
+          "id": "F248385B-6E0C-438D-B61B-C307F1204603"
+        },
+        {
+          "defKey": "bus_id",
+          "defName": "关联项目",
+          "comment": "",
+          "type": "",
+          "len": "",
+          "scale": "",
+          "primaryKey": false,
+          "notNull": true,
+          "autoIncrement": false,
+          "defaultValue": "",
+          "hideInGraph": false,
+          "domain": "16120F75-6AA7-4483-868D-F07F511BB081",
+          "refDict": "",
+          "extProps": {},
+          "notes": {},
+          "id": "BD26C064-7BB5-4B2F-B462-0204CF0A0347"
+        },
+        {
+          "defKey": "name",
+          "defName": "产品名称",
+          "comment": "",
+          "type": "",
+          "len": "",
+          "scale": "",
+          "primaryKey": false,
+          "notNull": false,
+          "autoIncrement": false,
+          "defaultValue": "",
+          "hideInGraph": false,
+          "refDict": "",
+          "extProps": {},
+          "domain": "9092C4E0-1A54-4859-ABBB-5B62DBC27573",
+          "id": "A8A38DDB-F1EF-4100-B14A-3B159C840D38"
+        },
+        {
+          "defKey": "category",
+          "defName": "产品类别",
+          "comment": "",
+          "type": "",
+          "len": "",
+          "scale": "",
+          "primaryKey": false,
+          "notNull": false,
+          "autoIncrement": false,
+          "defaultValue": "",
+          "hideInGraph": false,
+          "refDict": "",
+          "extProps": {},
+          "domain": "9092C4E0-1A54-4859-ABBB-5B62DBC27573",
+          "id": "759387D2-9D32-4180-90E9-465E4E59104F"
+        },
+        {
+          "defKey": "unit",
+          "defName": "单位",
+          "comment": "",
+          "type": "",
+          "len": "",
+          "scale": "",
+          "primaryKey": false,
+          "notNull": false,
+          "autoIncrement": false,
+          "defaultValue": "",
+          "hideInGraph": false,
+          "refDict": "",
+          "extProps": {},
+          "domain": "9092C4E0-1A54-4859-ABBB-5B62DBC27573",
+          "id": "4410E2FE-1F3F-42B5-906F-DAD2BC0075F1"
+        },
+        {
+          "defKey": "original_price",
+          "defName": "原价",
+          "comment": "",
+          "type": "",
+          "len": "",
+          "scale": "",
+          "primaryKey": false,
+          "notNull": false,
+          "autoIncrement": false,
+          "defaultValue": "",
+          "hideInGraph": false,
+          "refDict": "",
+          "extProps": {},
+          "domain": "6BC8F04B-6CFA-4995-98D3-318F5CDD774E",
+          "id": "3A8526D9-EBBA-4DA0-A6CD-71B224D17702"
+        },
+        {
+          "defKey": "selling_price",
+          "defName": "售价",
+          "comment": "",
+          "type": "",
+          "len": "",
+          "scale": "",
+          "primaryKey": false,
+          "notNull": false,
+          "autoIncrement": false,
+          "defaultValue": "",
+          "hideInGraph": false,
+          "refDict": "",
+          "extProps": {},
+          "domain": "6BC8F04B-6CFA-4995-98D3-318F5CDD774E",
+          "id": "EA13B6AB-39D6-440F-B7DD-2BFF30F68038"
+        },
+        {
+          "defKey": "quantity",
+          "defName": "数量",
+          "comment": "",
+          "type": "",
+          "len": "",
+          "scale": "",
+          "primaryKey": false,
+          "notNull": false,
+          "autoIncrement": false,
+          "defaultValue": "",
+          "hideInGraph": false,
+          "refDict": "",
+          "extProps": {},
+          "domain": "6BC8F04B-6CFA-4995-98D3-318F5CDD774E",
+          "id": "3645772F-029B-4F2F-9B4B-821C98E34B0A"
+        },
+        {
+          "defKey": "discount",
+          "defName": "折扣",
+          "comment": "",
+          "type": "",
+          "len": "",
+          "scale": "",
+          "primaryKey": false,
+          "notNull": false,
+          "autoIncrement": false,
+          "defaultValue": "",
+          "hideInGraph": false,
+          "refDict": "",
+          "extProps": {},
+          "domain": "6BC8F04B-6CFA-4995-98D3-318F5CDD774E",
+          "id": "DEC06D76-4CEB-49DD-B4A9-29690B3141EE"
+        },
+        {
+          "defKey": "total_price",
+          "defName": "总价",
+          "comment": "",
+          "type": "",
+          "len": "",
+          "scale": "",
+          "primaryKey": false,
+          "notNull": false,
+          "autoIncrement": false,
+          "defaultValue": "",
+          "hideInGraph": false,
+          "refDict": "",
+          "extProps": {},
+          "domain": "6BC8F04B-6CFA-4995-98D3-318F5CDD774E",
+          "id": "94C71517-F3A6-4A1A-B308-7F9E10C23922"
+        },
         {
           "defKey": "remark",
           "defName": "备注",
@@ -11835,6 +12006,109 @@
         }
       ],
       "fields": [
+        {
+          "defKey": "id",
+          "defName": "主键",
+          "comment": "",
+          "type": "",
+          "len": "",
+          "scale": "",
+          "primaryKey": true,
+          "notNull": true,
+          "autoIncrement": true,
+          "defaultValue": "",
+          "hideInGraph": false,
+          "refDict": "",
+          "extProps": {},
+          "domain": "16120F75-6AA7-4483-868D-F07F511BB081",
+          "id": "DA496A4D-B08A-439E-BF59-359EB81AA33E"
+        },
+        {
+          "defKey": "bus_id",
+          "defName": "关联项目",
+          "comment": "",
+          "type": "",
+          "len": "",
+          "scale": "",
+          "primaryKey": false,
+          "notNull": true,
+          "autoIncrement": false,
+          "defaultValue": "",
+          "hideInGraph": false,
+          "domain": "16120F75-6AA7-4483-868D-F07F511BB081",
+          "refDict": "",
+          "extProps": {},
+          "notes": {},
+          "id": "931C6673-449B-4325-B904-FCCD4BF70A15"
+        },
+        {
+          "defKey": "file_name",
+          "defName": "附件名称",
+          "comment": "",
+          "type": "",
+          "len": "",
+          "scale": "",
+          "primaryKey": false,
+          "notNull": false,
+          "autoIncrement": false,
+          "defaultValue": "",
+          "hideInGraph": false,
+          "refDict": "",
+          "extProps": {},
+          "domain": "9092C4E0-1A54-4859-ABBB-5B62DBC27573",
+          "id": "E0C14438-9FA1-4C9F-91A5-4AF45202E341"
+        },
+        {
+          "defKey": "file_size",
+          "defName": "附件大小",
+          "comment": "",
+          "type": "",
+          "len": "",
+          "scale": "",
+          "primaryKey": false,
+          "notNull": false,
+          "autoIncrement": false,
+          "defaultValue": "",
+          "hideInGraph": false,
+          "refDict": "",
+          "extProps": {},
+          "domain": "9092C4E0-1A54-4859-ABBB-5B62DBC27573",
+          "id": "FB9E9663-4064-44E1-97FF-5248FA99D8F3"
+        },
+        {
+          "defKey": "file_source",
+          "defName": "来源",
+          "comment": "",
+          "type": "",
+          "len": "",
+          "scale": "",
+          "primaryKey": false,
+          "notNull": false,
+          "autoIncrement": false,
+          "defaultValue": "",
+          "hideInGraph": false,
+          "refDict": "",
+          "extProps": {},
+          "domain": "9092C4E0-1A54-4859-ABBB-5B62DBC27573",
+          "id": "1E765A43-2650-4934-AEEF-11816F2ECD98"
+        },
+        {
+          "defKey": "file_url",
+          "defName": "附件链接",
+          "comment": "",
+          "type": "",
+          "len": "",
+          "scale": "",
+          "primaryKey": false,
+          "notNull": false,
+          "autoIncrement": false,
+          "defaultValue": "",
+          "hideInGraph": false,
+          "refDict": "",
+          "extProps": {},
+          "domain": "9092C4E0-1A54-4859-ABBB-5B62DBC27573",
+          "id": "75A7A480-37F9-4EE8-80DA-8435D5D93D4E"
+        },
         {
           "defKey": "remark",
           "defName": "备注",
@@ -12071,6 +12345,58 @@
         }
       ],
       "fields": [
+        {
+          "defKey": "id",
+          "defName": "主键",
+          "comment": "",
+          "type": "",
+          "len": "",
+          "scale": "",
+          "primaryKey": true,
+          "notNull": true,
+          "autoIncrement": true,
+          "defaultValue": "",
+          "hideInGraph": false,
+          "refDict": "",
+          "extProps": {},
+          "domain": "16120F75-6AA7-4483-868D-F07F511BB081",
+          "id": "F4C9226A-7B6D-456F-B78E-00AE9DC064C3"
+        },
+        {
+          "defKey": "bus_id",
+          "defName": "关联项目",
+          "comment": "",
+          "type": "",
+          "len": "",
+          "scale": "",
+          "primaryKey": false,
+          "notNull": true,
+          "autoIncrement": false,
+          "defaultValue": "",
+          "hideInGraph": false,
+          "domain": "16120F75-6AA7-4483-868D-F07F511BB081",
+          "refDict": "",
+          "extProps": {},
+          "notes": {},
+          "id": "605EB52B-39D0-41ED-BE8A-05DB414AD4EE"
+        },
+        {
+          "defKey": "contact_id",
+          "defName": "联系人主键",
+          "comment": "",
+          "type": "",
+          "len": "",
+          "scale": "",
+          "primaryKey": false,
+          "notNull": true,
+          "autoIncrement": false,
+          "defaultValue": "",
+          "hideInGraph": false,
+          "refDict": "",
+          "extProps": {},
+          "domain": "6BC8F04B-6CFA-4995-98D3-318F5CDD774E",
+          "id": "92E88135-ADC6-4B5C-8B39-E84072493CE9"
+        },
         {
           "defKey": "remark",
           "defName": "备注",
@@ -12307,6 +12633,108 @@
         }
       ],
       "fields": [
+        {
+          "defKey": "id",
+          "defName": "主键",
+          "comment": "",
+          "type": "",
+          "len": "",
+          "scale": "",
+          "primaryKey": true,
+          "notNull": true,
+          "autoIncrement": true,
+          "defaultValue": "",
+          "hideInGraph": false,
+          "refDict": "",
+          "extProps": {},
+          "domain": "16120F75-6AA7-4483-868D-F07F511BB081",
+          "id": "3DC2F069-178D-4EEA-B5BF-92FCF543F57D"
+        },
+        {
+          "defKey": "bus_id",
+          "defName": "关联项目",
+          "comment": "",
+          "type": "",
+          "len": "",
+          "scale": "",
+          "primaryKey": false,
+          "notNull": true,
+          "autoIncrement": false,
+          "defaultValue": "",
+          "hideInGraph": false,
+          "refDict": "",
+          "extProps": {},
+          "domain": "6BC8F04B-6CFA-4995-98D3-318F5CDD774E",
+          "id": "C4567E2F-2A24-4B0D-8C18-C0D7DF5AF475"
+        },
+        {
+          "defKey": "user_id",
+          "defName": "关联用户",
+          "comment": "",
+          "type": "",
+          "len": "",
+          "scale": "",
+          "primaryKey": false,
+          "notNull": true,
+          "autoIncrement": false,
+          "defaultValue": "",
+          "hideInGraph": false,
+          "refDict": "",
+          "extProps": {},
+          "domain": "6BC8F04B-6CFA-4995-98D3-318F5CDD774E",
+          "id": "C67CCD73-C377-4024-BB13-9542F25D762E"
+        },
+        {
+          "defKey": "role",
+          "defName": "团队角色",
+          "comment": "",
+          "type": "",
+          "len": "",
+          "scale": "",
+          "primaryKey": false,
+          "notNull": false,
+          "autoIncrement": false,
+          "defaultValue": "",
+          "hideInGraph": false,
+          "refDict": "",
+          "extProps": {},
+          "domain": "73FD2BAD-2358-4336-B96D-45DC897BD792",
+          "id": "F809444C-6F74-4AD5-ADBA-054523462524"
+        },
+        {
+          "defKey": "permission",
+          "defName": "权限",
+          "comment": "",
+          "type": "",
+          "len": "",
+          "scale": "",
+          "primaryKey": false,
+          "notNull": false,
+          "autoIncrement": false,
+          "defaultValue": "",
+          "hideInGraph": false,
+          "refDict": "",
+          "extProps": {},
+          "domain": "73FD2BAD-2358-4336-B96D-45DC897BD792",
+          "id": "FB7FBB00-641F-4941-91F3-DF6D4C195853"
+        },
+        {
+          "defKey": "deadline_time",
+          "defName": "截止时间",
+          "comment": "",
+          "type": "",
+          "len": "",
+          "scale": "",
+          "primaryKey": false,
+          "notNull": false,
+          "autoIncrement": false,
+          "defaultValue": "",
+          "hideInGraph": false,
+          "refDict": "",
+          "extProps": {},
+          "domain": "7CFFA0D3-6A93-4DDC-BC10-DF21211064DC",
+          "id": "87286511-FF1B-49B9-BE92-9E3E2D82D405"
+        },
         {
           "defKey": "remark",
           "defName": "备注",

+ 1 - 1
opms_admin/app/handler/menu.go

@@ -131,7 +131,7 @@ func (h *MenuHandler) GetMenuTree(ctx context.Context, req map[string]interface{
 		isAll = true
 	}
 	var list interface{}
-	if menuService.GetCxtUserName() == "dashoo" {
+	if menuService.GetCxtUserName() == "dashoo" || isAll {
 		list, err = menuService.GetMenuTree(isAll)
 	} else {
 		userService, _ := service.NewUserService(ctx)

+ 1 - 1
opms_admin/app/model/sys_dict_type.go

@@ -32,6 +32,6 @@ type SysDictTypeAddReq struct {
 
 type SysDictTypeEditReq struct {
 	SysDictTypeAddReq
-	Id       int64 `json:"id v:required|min:1#主键ID不能为空|主键ID必须为大于0的值"`
+	Id       int64 `json:"id" v:"required|min:1#主键ID不能为空|主键ID必须为大于0的值"`
 	UpdateBy uint64
 }

+ 1 - 1
opms_admin/app/model/sys_group.go

@@ -27,7 +27,7 @@ type SysGroupReq struct {
 	GroupCode string `p:"groupCode" v:"required#用户组编码不能为空"`
 	GroupName string `p:"groupName" v:"required#用户组名称不能为空"`
 	Sort      int    `p:"sort" v:"required#用户组排序不能为空"`
-	Status    string `p:"status" v:"required#状态不能为空"`
+	Status    string `p:"status" v:"required|in:10,20#状态不能为空|状态只能为10或20"`
 	Remark    string `p:"remark"`
 }
 

+ 1 - 1
opms_admin/app/model/sys_post.go

@@ -27,7 +27,7 @@ type SysPostReq struct {
 	PostCode string `p:"postCode" v:"required#岗位编码不能为空"`
 	PostName string `p:"postName" v:"required#岗位名称不能为空"`
 	Sort     int    `p:"sort" v:"required#岗位排序不能为空"`
-	Status   string `p:"status" v:"required#状态不能为空"`
+	Status   string `p:"status" v:"required|in:10,20#状态不能为空|状态只能为10或20"`
 	Remark   string `p:"remark"`
 }
 

+ 8 - 8
opms_admin/app/model/sys_role.go

@@ -15,14 +15,14 @@ type SysRole internal.SysRole
 // Fill with you ideas below.
 
 type SysRoleReq struct {
-	RoleName          string `json:"roleName" v:"required#状态不能为空"` // 角色名称
-	RoleKey           string `json:"roleKey" v:"required#状态不能为空"`  // 角色权限字符串
-	Status            string `json:"status" v:"required#状态不能为空"`   // 角色状态(10正常20停用)
-	MenuCheckStrictly string `json:"menuCheckStrictly"`            // 菜单树选择项是否关联显示
-	DeptCheckStrictly string `json:"deptCheckStrictly"`            // 部门树选择项是否关联显示
-	DataScope         string `json:"dataScope"`                    // 数据范围;(10:全部数据权限 20:自定数据权限 30:本部门数据权限 40:本部门及以下数据权限)
-	Sort              int    `json:"sort"`                         // 显示顺序
-	Remark            string `son:"remark"`                        // 备注
+	RoleName          string `json:"roleName" v:"required#状态不能为空"`                   // 角色名称
+	RoleKey           string `json:"roleKey" v:"required#状态不能为空"`                    // 角色权限字符串
+	Status            string `json:"status" v:"required|in:10,20#状态不能为空|状态只能为10或20"` // 角色状态(10正常20停用)
+	MenuCheckStrictly string `json:"menuCheckStrictly"`                              // 菜单树选择项是否关联显示
+	DeptCheckStrictly string `json:"deptCheckStrictly"`                              // 部门树选择项是否关联显示
+	DataScope         string `json:"dataScope"`                                      // 数据范围;(10:全部数据权限 20:自定数据权限 30:本部门数据权限 40:本部门及以下数据权限)
+	Sort              int    `json:"sort"`                                           // 显示顺序
+	Remark            string `son:"remark"`                                          // 备注
 	MenuIds           []int  `json:"menuIds,omitempty"`
 }
 

+ 2 - 2
opms_admin/app/model/sys_user.go

@@ -53,8 +53,8 @@ type SetUserReq struct {
 	NickName string `p:"nickName" v:"required#用户昵称不能为空"`
 	Email    string `p:"email" v:"email#邮箱格式错误"` //邮箱
 	Phone    string `p:"phone" v:"required|phone#手机号不能为空|手机号格式错误"`
-	Sex      string `p:"sex"`
-	Status   string `p:"status"`
+	Sex      string `p:"sex" v:"in:10,20,30#状态只能为10、20、30"`
+	Status   string `p:"status" v:"required|in:10,20#状态不能为空|状态只能为10或20"`
 	Remark   string `p:"remark"`
 	IsAdmin  int    `p:"isAdmin"` // 是否后台管理员 1 是  0   否
 	RoleIds  []int  `p:"roleIds"`