From 747e890bdae1e5f894a4959d84853e74017ff91b Mon Sep 17 00:00:00 2001
From: wangpengfei <274878379@qq.com>
Date: 星期二, 08 八月 2023 14:28:04 +0800
Subject: [PATCH] fix
---
model/request/salesLeads.go | 71 +
api/v1/salesLeads.go | 351 +++++----
model/salesLeads.go | 347 +++++-----
service/salesLeads.go | 184 +++--
model/request/client.go | 76 +-
pkg/ecode/code.go | 786 +++++++++++-----------
docs/swagger.yaml | 34 +
docs/docs.go | 53 +
docs/swagger.json | 53 +
router/salesLeads.go | 39
10 files changed, 1,100 insertions(+), 894 deletions(-)
diff --git a/api/v1/salesLeads.go b/api/v1/salesLeads.go
index 8af530c..228f6a3 100644
--- a/api/v1/salesLeads.go
+++ b/api/v1/salesLeads.go
@@ -1,164 +1,187 @@
-package v1
-
-import (
- "aps_crm/constvar"
- "aps_crm/model"
- "aps_crm/model/request"
- "aps_crm/model/response"
- "aps_crm/pkg/contextx"
- "aps_crm/pkg/ecode"
- "github.com/gin-gonic/gin"
-)
-
-type SalesLeadsApi struct{}
-
-// Add
-//
-// @Tags SalesLeads
-// @Summary 娣诲姞閿�鍞嚎绱�
-// @Produce application/json
-// @Param object body request.AddSalesLeads true "鏌ヨ鍙傛暟"
-// @Success 200 {object} contextx.Response{}
-// @Router /api/salesLeads/add [post]
-func (s *SalesLeadsApi) Add(c *gin.Context) {
- var params request.AddSalesLeads
- ctx, ok := contextx.NewContext(c, ¶ms)
- if !ok {
- return
- }
-
- errCode, salesLeads := checkSalesLeadsParams(params.SalesLeads)
- if errCode != ecode.OK {
- ctx.Fail(errCode)
- return
- }
-
- errCode = salesLeadsService.AddSalesLeads(&salesLeads)
- if errCode != ecode.OK {
- ctx.Fail(errCode)
- return
- }
-
- ctx.Ok()
-}
-
-// Delete
-//
-// @Tags SalesLeads
-// @Summary 鍒犻櫎閿�鍞嚎绱�
-// @Produce application/json
-// @Param object body request.DeleteSalesLeads true "鏌ヨ鍙傛暟"
-// @Success 200 {object} contextx.Response{}
-// @Router /api/salesLeads/delete [delete]
-func (s *SalesLeadsApi) Delete(c *gin.Context) {
- var params request.DeleteSalesLeads
- ctx, ok := contextx.NewContext(c, ¶ms)
- if !ok {
- return
- }
-
- errCode := salesLeadsService.DeleteSalesLeads(params.Ids)
- if errCode != ecode.OK {
- ctx.Fail(errCode)
- return
- }
-
- ctx.Ok()
-}
-
-// Update
-//
-// @Tags SalesLeads
-// @Summary 鏇存柊閿�鍞嚎绱�
-// @Produce application/json
-// @Param object body request.UpdateSalesLeads true "鏌ヨ鍙傛暟"
-// @Success 200 {object} contextx.Response{}
-// @Router /api/salesLeads/update [put]
-func (s *SalesLeadsApi) Update(c *gin.Context) {
- var params request.UpdateSalesLeads
- ctx, ok := contextx.NewContext(c, ¶ms)
- if !ok {
- return
- }
-
- errCode, salesLeads := checkSalesLeadsParams(params.SalesLeads)
- if errCode != ecode.OK {
- ctx.Fail(errCode)
- return
- }
-
- salesLeads.Id = params.Id
-
- errCode = salesLeadsService.UpdateSalesLeads(&salesLeads)
- if errCode != ecode.OK {
- ctx.Fail(errCode)
- return
- }
-
- ctx.Ok()
-}
-
-func checkSalesLeadsParams(params request.SalesLeads) (errCode int, salesLeads model.SalesLeads) {
- //if params.Name == "" {
- // return ecode.InvalidParams, salesLeads
- //}
- //
- //if params.Number == "" {
- // return ecode.InvalidParams, salesLeads
- //}
- //
- //if params.SalesSourcesId == 0 {
- // return ecode.InvalidParams, salesLeads
- //}
- //
- //if params.MemberId == 0 {
- // return ecode.InvalidParams, salesLeads
- //}
-
- salesLeads = model.SalesLeads{
- Name: params.Name,
- Number: params.Number,
- ContactName: params.ContactName,
- ContactPhone: params.ContactPhone,
- ContactPosition: params.ContactPosition,
- SalesStatus: constvar.SalesStatusNew,
- SalesSourcesId: params.SalesSourcesId,
- MemberId: params.MemberId,
- Desc: params.Desc,
- Address: model.Address{
- ProvinceId: params.ProvinceId,
- CityId: params.CityId,
- RegionId: params.RegionId,
- CountryId: params.CountryId,
- },
- }
-
- return ecode.OK, salesLeads
-}
-
-// List
-//
-// @Tags SalesLeads
-// @Summary 閿�鍞嚎绱㈠垪琛�
-// @Produce application/json
-// @Param object body request.GetSalesLeadsList true "鍙傛暟"
-// @Success 200 {object} contextx.Response{data=response.SalesLeadsResponse}
-// @Router /api/salesLeads/list [post]
-func (s *SalesLeadsApi) List(c *gin.Context) {
- var params request.GetSalesLeadsList
- ctx, ok := contextx.NewContext(c, ¶ms)
- if !ok {
- return
- }
-
- salesLeadss, total, errCode := salesLeadsService.GetSalesLeadsList(params.Page, params.PageSize, params.Keyword)
- if errCode != ecode.OK {
- ctx.Fail(errCode)
- return
- }
-
- ctx.OkWithDetailed(response.SalesLeadsResponse{
- List: salesLeadss,
- Count: int(total),
- })
-}
+package v1
+
+import (
+ "aps_crm/constvar"
+ "aps_crm/model"
+ "aps_crm/model/request"
+ "aps_crm/model/response"
+ "aps_crm/pkg/contextx"
+ "aps_crm/pkg/ecode"
+ "github.com/gin-gonic/gin"
+)
+
+type SalesLeadsApi struct{}
+
+// Add
+//
+// @Tags SalesLeads
+// @Summary 娣诲姞閿�鍞嚎绱�
+// @Produce application/json
+// @Param object body request.AddSalesLeads true "鏌ヨ鍙傛暟"
+// @Success 200 {object} contextx.Response{}
+// @Router /api/salesLeads/add [post]
+func (s *SalesLeadsApi) Add(c *gin.Context) {
+ var params request.AddSalesLeads
+ ctx, ok := contextx.NewContext(c, ¶ms)
+ if !ok {
+ return
+ }
+
+ errCode, salesLeads := checkSalesLeadsParams(params.SalesLeads)
+ if errCode != ecode.OK {
+ ctx.Fail(errCode)
+ return
+ }
+
+ errCode = salesLeadsService.AddSalesLeads(&salesLeads)
+ if errCode != ecode.OK {
+ ctx.Fail(errCode)
+ return
+ }
+
+ ctx.Ok()
+}
+
+// Delete
+//
+// @Tags SalesLeads
+// @Summary 鍒犻櫎閿�鍞嚎绱�
+// @Produce application/json
+// @Param object body request.DeleteSalesLeads true "鏌ヨ鍙傛暟"
+// @Success 200 {object} contextx.Response{}
+// @Router /api/salesLeads/delete [delete]
+func (s *SalesLeadsApi) Delete(c *gin.Context) {
+ var params request.DeleteSalesLeads
+ ctx, ok := contextx.NewContext(c, ¶ms)
+ if !ok {
+ return
+ }
+
+ errCode := salesLeadsService.DeleteSalesLeads(params.Ids)
+ if errCode != ecode.OK {
+ ctx.Fail(errCode)
+ return
+ }
+
+ ctx.Ok()
+}
+
+// Update
+//
+// @Tags SalesLeads
+// @Summary 鏇存柊閿�鍞嚎绱�
+// @Produce application/json
+// @Param object body request.UpdateSalesLeads true "鏌ヨ鍙傛暟"
+// @Success 200 {object} contextx.Response{}
+// @Router /api/salesLeads/update [put]
+func (s *SalesLeadsApi) Update(c *gin.Context) {
+ var params request.UpdateSalesLeads
+ ctx, ok := contextx.NewContext(c, ¶ms)
+ if !ok {
+ return
+ }
+
+ errCode, salesLeads := checkSalesLeadsParams(params.SalesLeads)
+ if errCode != ecode.OK {
+ ctx.Fail(errCode)
+ return
+ }
+
+ salesLeads.Id = params.Id
+
+ errCode = salesLeadsService.UpdateSalesLeads(&salesLeads)
+ if errCode != ecode.OK {
+ ctx.Fail(errCode)
+ return
+ }
+
+ ctx.Ok()
+}
+
+func checkSalesLeadsParams(params request.SalesLeads) (errCode int, salesLeads model.SalesLeads) {
+ //if params.Name == "" {
+ // return ecode.InvalidParams, salesLeads
+ //}
+ //
+ //if params.Number == "" {
+ // return ecode.InvalidParams, salesLeads
+ //}
+ //
+ //if params.SalesSourcesId == 0 {
+ // return ecode.InvalidParams, salesLeads
+ //}
+ //
+ //if params.MemberId == 0 {
+ // return ecode.InvalidParams, salesLeads
+ //}
+
+ salesLeads = model.SalesLeads{
+ Name: params.Name,
+ Number: params.Number,
+ ContactName: params.ContactName,
+ ContactPhone: params.ContactPhone,
+ ContactPosition: params.ContactPosition,
+ SalesStatus: constvar.SalesStatusNew,
+ SalesSourcesId: params.SalesSourcesId,
+ MemberId: params.MemberId,
+ Desc: params.Desc,
+ Address: model.Address{
+ ProvinceId: params.ProvinceId,
+ CityId: params.CityId,
+ RegionId: params.RegionId,
+ CountryId: params.CountryId,
+ },
+ }
+
+ return ecode.OK, salesLeads
+}
+
+// List
+//
+// @Tags SalesLeads
+// @Summary 閿�鍞嚎绱㈠垪琛�
+// @Produce application/json
+// @Param object body request.GetSalesLeadsList true "鍙傛暟"
+// @Success 200 {object} contextx.Response{data=response.SalesLeadsResponse}
+// @Router /api/salesLeads/list [post]
+func (s *SalesLeadsApi) List(c *gin.Context) {
+ var params request.GetSalesLeadsList
+ ctx, ok := contextx.NewContext(c, ¶ms)
+ if !ok {
+ return
+ }
+
+ salesLeadss, total, errCode := salesLeadsService.GetSalesLeadsList(params.Page, params.PageSize, params.Keyword)
+ if errCode != ecode.OK {
+ ctx.Fail(errCode)
+ return
+ }
+
+ ctx.OkWithDetailed(response.SalesLeadsResponse{
+ List: salesLeadss,
+ Count: int(total),
+ })
+}
+
+// Push
+//
+// @Tags SalesLeads
+// @Summary 鎺ㄨ繘閿�鍞嚎绱�
+// @Produce application/json
+// @Param object body request.PushSalesLeads true "鏌ヨ鍙傛暟"
+// @Success 200 {object} contextx.Response{}
+// @Router /api/salesLeads/push [post]
+func (s *SalesLeadsApi) Push(c *gin.Context) {
+ var params request.PushSalesLeads
+ ctx, ok := contextx.NewContext(c, ¶ms)
+ if !ok {
+ return
+ }
+
+ errCode := salesLeadsService.PushSalesLeads(params.Id, params.Step, params.Reason)
+ if errCode != ecode.OK {
+ ctx.Fail(errCode)
+ return
+ }
+ ctx.Ok()
+}
diff --git a/docs/docs.go b/docs/docs.go
index 54c4026..0a3b8b5 100644
--- a/docs/docs.go
+++ b/docs/docs.go
@@ -6682,6 +6682,36 @@
}
}
},
+ "/api/salesLeads/push": {
+ "post": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "SalesLeads"
+ ],
+ "summary": "鎺ㄨ繘閿�鍞嚎绱�",
+ "parameters": [
+ {
+ "description": "鏌ヨ鍙傛暟",
+ "name": "object",
+ "in": "body",
+ "required": true,
+ "schema": {
+ "$ref": "#/definitions/request.PushSalesLeads"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "OK",
+ "schema": {
+ "$ref": "#/definitions/contextx.Response"
+ }
+ }
+ }
+ }
+ },
"/api/salesLeads/update": {
"put": {
"produces": [
@@ -11124,6 +11154,9 @@
"province_id": {
"type": "integer"
},
+ "reason": {
+ "type": "string"
+ },
"region": {
"$ref": "#/definitions/model.Region"
},
@@ -13539,6 +13572,7 @@
"type": "integer"
},
"search_map": {
+ "description": "鎼滅储鏉′欢: map[string]interface{}{\"name\": \"xxx\"}; \"not_contact\": 瓒呰繃15澶╂湭鑱旂郴; \"public_sea\": 鍏捣瀹㈡埛",
"type": "object",
"additionalProperties": true
}
@@ -13907,6 +13941,25 @@
}
}
},
+ "request.PushSalesLeads": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "integer"
+ },
+ "reason": {
+ "type": "string"
+ },
+ "step": {
+ "description": "鍟嗘満鐘舵��: 1: 璺熻繘涓�; -1:澶辫触",
+ "allOf": [
+ {
+ "$ref": "#/definitions/constvar.SalesStatus"
+ }
+ ]
+ }
+ }
+ },
"request.Register": {
"type": "object",
"properties": {
diff --git a/docs/swagger.json b/docs/swagger.json
index 3957900..202697f 100644
--- a/docs/swagger.json
+++ b/docs/swagger.json
@@ -6670,6 +6670,36 @@
}
}
},
+ "/api/salesLeads/push": {
+ "post": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "SalesLeads"
+ ],
+ "summary": "鎺ㄨ繘閿�鍞嚎绱�",
+ "parameters": [
+ {
+ "description": "鏌ヨ鍙傛暟",
+ "name": "object",
+ "in": "body",
+ "required": true,
+ "schema": {
+ "$ref": "#/definitions/request.PushSalesLeads"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "OK",
+ "schema": {
+ "$ref": "#/definitions/contextx.Response"
+ }
+ }
+ }
+ }
+ },
"/api/salesLeads/update": {
"put": {
"produces": [
@@ -11112,6 +11142,9 @@
"province_id": {
"type": "integer"
},
+ "reason": {
+ "type": "string"
+ },
"region": {
"$ref": "#/definitions/model.Region"
},
@@ -13527,6 +13560,7 @@
"type": "integer"
},
"search_map": {
+ "description": "鎼滅储鏉′欢: map[string]interface{}{\"name\": \"xxx\"}; \"not_contact\": 瓒呰繃15澶╂湭鑱旂郴; \"public_sea\": 鍏捣瀹㈡埛",
"type": "object",
"additionalProperties": true
}
@@ -13895,6 +13929,25 @@
}
}
},
+ "request.PushSalesLeads": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "integer"
+ },
+ "reason": {
+ "type": "string"
+ },
+ "step": {
+ "description": "鍟嗘満鐘舵��: 1: 璺熻繘涓�; -1:澶辫触",
+ "allOf": [
+ {
+ "$ref": "#/definitions/constvar.SalesStatus"
+ }
+ ]
+ }
+ }
+ },
"request.Register": {
"type": "object",
"properties": {
diff --git a/docs/swagger.yaml b/docs/swagger.yaml
index f8a7c7f..5022361 100644
--- a/docs/swagger.yaml
+++ b/docs/swagger.yaml
@@ -1189,6 +1189,8 @@
$ref: '#/definitions/model.Province'
province_id:
type: integer
+ reason:
+ type: string
region:
$ref: '#/definitions/model.Region'
region_id:
@@ -2826,6 +2828,8 @@
type: integer
search_map:
additionalProperties: true
+ description: '鎼滅储鏉′欢: map[string]interface{}{"name": "xxx"}; "not_contact":
+ 瓒呰繃15澶╂湭鑱旂郴; "public_sea": 鍏捣瀹㈡埛'
type: object
type: object
request.GetContactList:
@@ -3076,6 +3080,17 @@
type: string
subOrderId:
type: integer
+ type: object
+ request.PushSalesLeads:
+ properties:
+ id:
+ type: integer
+ reason:
+ type: string
+ step:
+ allOf:
+ - $ref: '#/definitions/constvar.SalesStatus'
+ description: '鍟嗘満鐘舵��: 1: 璺熻繘涓�; -1:澶辫触'
type: object
request.Register:
properties:
@@ -9369,6 +9384,25 @@
summary: 閿�鍞嚎绱㈠垪琛�
tags:
- SalesLeads
+ /api/salesLeads/push:
+ post:
+ parameters:
+ - description: 鏌ヨ鍙傛暟
+ in: body
+ name: object
+ required: true
+ schema:
+ $ref: '#/definitions/request.PushSalesLeads'
+ produces:
+ - application/json
+ responses:
+ "200":
+ description: OK
+ schema:
+ $ref: '#/definitions/contextx.Response'
+ summary: 鎺ㄨ繘閿�鍞嚎绱�
+ tags:
+ - SalesLeads
/api/salesLeads/update:
put:
parameters:
diff --git a/model/request/client.go b/model/request/client.go
index 6d2d1f0..c0e723a 100644
--- a/model/request/client.go
+++ b/model/request/client.go
@@ -1,38 +1,38 @@
-package request
-
-type AddClient struct {
- Client
-}
-
-type Client struct {
- Name string `json:"name"` // 鍏徃鍚嶇О
- Number string `json:"number"` // 鍏徃缂栧彿
- ClientStatusId int `json:"client_status_id"` // 瀹㈡埛鐘舵�両D
- ClientTypeId int `json:"client_type_id"` // 瀹㈡埛绫诲瀷ID
- ClientOriginId int `json:"client_origin_id"` // 瀹㈡埛鏉ユ簮ID
- ClientLevelId int `json:"client_level_id"` // 瀹㈡埛绛夌骇ID
- MemberId int `json:"member_id"` // 閿�鍞礋璐d汉ID
- ServiceMemberId int `json:"service_member_id"` // 鏈嶅姟璐熻矗浜篒D
- DetailAddress string `json:"detail_address"` // 璇︾粏鍦板潃
- Remark string `json:"remark"` // 澶囨敞
- NextVisitTime string `json:"next_visit_time"` // 涓嬫鍥炶鏃堕棿
- LatestServiceTime string `json:"latest_service_time"` // 鏈�鏅氭湇鍔℃椂闂�
- Contact Contact `json:"contact"`
- SalesLeadsId int `json:"sales_leads_id"` // 閿�鍞嚎绱D
- Address
- Business
-}
-
-type UpdateClient struct {
- Id int `json:"id"`
- Client
-}
-
-type GetClientList struct {
- PageInfo
- SearchMap map[string]interface{} `json:"search_map"`
-}
-
-type DeleteClient struct {
- Ids []int `json:"ids"`
-}
+package request
+
+type AddClient struct {
+ Client
+}
+
+type Client struct {
+ Name string `json:"name"` // 鍏徃鍚嶇О
+ Number string `json:"number"` // 鍏徃缂栧彿
+ ClientStatusId int `json:"client_status_id"` // 瀹㈡埛鐘舵�両D
+ ClientTypeId int `json:"client_type_id"` // 瀹㈡埛绫诲瀷ID
+ ClientOriginId int `json:"client_origin_id"` // 瀹㈡埛鏉ユ簮ID
+ ClientLevelId int `json:"client_level_id"` // 瀹㈡埛绛夌骇ID
+ MemberId int `json:"member_id"` // 閿�鍞礋璐d汉ID
+ ServiceMemberId int `json:"service_member_id"` // 鏈嶅姟璐熻矗浜篒D
+ DetailAddress string `json:"detail_address"` // 璇︾粏鍦板潃
+ Remark string `json:"remark"` // 澶囨敞
+ NextVisitTime string `json:"next_visit_time"` // 涓嬫鍥炶鏃堕棿
+ LatestServiceTime string `json:"latest_service_time"` // 鏈�鏅氭湇鍔℃椂闂�
+ Contact Contact `json:"contact"`
+ SalesLeadsId int `json:"sales_leads_id"` // 閿�鍞嚎绱D
+ Address
+ Business
+}
+
+type UpdateClient struct {
+ Id int `json:"id"`
+ Client
+}
+
+type GetClientList struct {
+ PageInfo
+ SearchMap map[string]interface{} `json:"search_map"` // 鎼滅储鏉′欢: map[string]interface{}{"name": "xxx"}; "not_contact": 瓒呰繃15澶╂湭鑱旂郴; "public_sea": 鍏捣瀹㈡埛
+}
+
+type DeleteClient struct {
+ Ids []int `json:"ids"`
+}
diff --git a/model/request/salesLeads.go b/model/request/salesLeads.go
index 5f95598..d664c8b 100644
--- a/model/request/salesLeads.go
+++ b/model/request/salesLeads.go
@@ -1,31 +1,40 @@
-package request
-
-type AddSalesLeads struct {
- SalesLeads
-}
-
-type SalesLeads struct {
- Name string `json:"name"` // 鍏徃鍚嶇О
- Number string `json:"number"` // 閿�鍞嚎绱㈢紪鍙�
- ContactName string `json:"contact_name"` // 鑱旂郴浜哄鍚�
- ContactPhone string `json:"contact_phone"` // 鑱旂郴浜虹數璇�
- ContactPosition string `json:"contact_position"` // 鑱旂郴浜鸿亴浣�
- SalesSourcesId int `json:"sales_sources_id"` // 鍟嗘満鏉ユ簮ID
- MemberId int `json:"member_id"` // 閿�鍞礋璐d汉ID
- Desc string `json:"desc"` // 澶囨敞
- Address
-}
-
-type UpdateSalesLeads struct {
- Id int `json:"id"`
- SalesLeads
-}
-
-type GetSalesLeadsList struct {
- PageInfo
- Keyword string `json:"keyword"`
-}
-
-type DeleteSalesLeads struct {
- Ids []int `json:"ids"`
-}
+package request
+
+import "aps_crm/constvar"
+
+type AddSalesLeads struct {
+ SalesLeads
+}
+
+type SalesLeads struct {
+ Name string `json:"name"` // 鍏徃鍚嶇О
+ Number string `json:"number"` // 閿�鍞嚎绱㈢紪鍙�
+ ContactName string `json:"contact_name"` // 鑱旂郴浜哄鍚�
+ ContactPhone string `json:"contact_phone"` // 鑱旂郴浜虹數璇�
+ ContactPosition string `json:"contact_position"` // 鑱旂郴浜鸿亴浣�
+ SalesSourcesId int `json:"sales_sources_id"` // 鍟嗘満鏉ユ簮ID
+ MemberId int `json:"member_id"` // 閿�鍞礋璐d汉ID
+ Desc string `json:"desc"` // 澶囨敞
+ Address
+}
+
+type UpdateSalesLeads struct {
+ Id int `json:"id"`
+ SalesLeads
+}
+
+type GetSalesLeadsList struct {
+ PageInfo
+ Keyword string `json:"keyword"`
+}
+
+type DeleteSalesLeads struct {
+ Ids []int `json:"ids"`
+}
+
+// swagger:model PushSalesLeads
+type PushSalesLeads struct {
+ Id int `json:"id"`
+ Step constvar.SalesStatus `json:"step"` // 鍟嗘満鐘舵��: 1: 璺熻繘涓�; -1:澶辫触
+ Reason string `json:"reason"`
+}
diff --git a/model/salesLeads.go b/model/salesLeads.go
index 80c14f7..6e9f65e 100644
--- a/model/salesLeads.go
+++ b/model/salesLeads.go
@@ -1,173 +1,174 @@
-package model
-
-import (
- "aps_crm/constvar"
- "aps_crm/pkg/mysqlx"
- "gorm.io/gorm"
-)
-
-type (
- SalesLeads struct {
- Id int `json:"id" gorm:"column:id;primary_key;AUTO_INCREMENT"`
- Name string `json:"name" gorm:"column:name;unique;type:varchar(255);comment:鍏徃鍚嶇О"`
- Number string `json:"number" gorm:"column:number;type:varchar(255);comment:閿�鍞嚎绱㈢紪鍙�"`
- ContactName string `json:"contact_name" gorm:"column:contact_name;type:varchar(255);comment:鑱旂郴浜哄鍚�"`
- ContactPhone string `json:"contact_phone" gorm:"column:contact_phone;type:varchar(255);comment:鑱旂郴浜虹數璇�"`
- ContactPosition string `json:"contact_position" gorm:"column:contact_position;type:varchar(255);comment:鑱旂郴浜鸿亴浣�"`
- SalesSourcesId int `json:"sales_sources_id" gorm:"column:sales_sources_id;type:int(11);comment:鍟嗘満鏉ユ簮ID"`
- MemberId int `json:"member_id" gorm:"column:member_id;type:int(11);comment:閿�鍞礋璐d汉ID"`
- SalesStatus constvar.SalesStatus `json:"sales_status" gorm:"column:sales_status;type:int(11);comment:閿�鍞姸鎬�"`
- Desc string `json:"desc" gorm:"column:desc;type:varchar(255);comment:澶囨敞"`
- FollowRecord []FollowRecord `gorm:"foreignKey:SalesLeadsId"`
- Address
- gorm.Model `json:"-"`
- }
-
- SalesLeadsSearch struct {
- SalesLeads
-
- Orm *gorm.DB
- Keyword string
- OrderBy string
- PageNum int
- PageSize int
- }
-)
-
-func (SalesLeads) TableName() string {
- return "sales_leads"
-}
-
-func NewSalesLeadsSearch(db *gorm.DB) *SalesLeadsSearch {
- if db == nil {
- db = mysqlx.GetDB()
- }
-
- return &SalesLeadsSearch{
- Orm: db,
- }
-}
-
-func (slf *SalesLeadsSearch) build() *gorm.DB {
- var db = slf.Orm.Model(&SalesLeads{})
- if slf.Keyword != "" {
- db = db.Where("name LIKE ?", "%"+slf.Keyword+"%")
- }
- if slf.Keyword != "" {
- db = db.Where("name LIKE ?", "%"+slf.Keyword+"%")
- }
- if slf.Id != 0 {
- db = db.Where("id = ?", slf.Id)
- }
- if slf.Name != "" {
- db = db.Where("name = ?", slf.Name)
- }
-
- if slf.Number != "" {
- db = db.Where("number = ?", slf.Number)
- }
-
- if slf.ContactName != "" {
- db = db.Where("contact_name = ?", slf.ContactName)
- }
-
- if slf.ContactPhone != "" {
- db = db.Where("contact_phone = ?", slf.ContactPhone)
- }
-
- if slf.ContactPosition != "" {
- db = db.Where("contact_position = ?", slf.ContactPosition)
- }
-
- if slf.SalesSourcesId != 0 {
- db = db.Where("sales_sources_id = ?", slf.SalesSourcesId)
- }
-
- if slf.MemberId != 0 {
- db = db.Where("member_id = ?", slf.MemberId)
- }
-
- return db
-}
-
-func (slf *SalesLeadsSearch) Create(record *SalesLeads) error {
- var db = slf.build()
- return db.Create(record).Error
-}
-
-func (slf *SalesLeadsSearch) Update(record *SalesLeads) error {
- var db = slf.build()
- return db.Updates(record).Error
-}
-
-func (slf *SalesLeadsSearch) Delete() error {
- var db = slf.build()
- return db.Delete(&SalesLeads{}).Error
-}
-
-func (slf *SalesLeadsSearch) Find() (result []SalesLeads, err error) {
- var db = slf.build()
- err = db.Find(&result).Error
- return
-}
-
-func (slf *SalesLeadsSearch) FindOne() (result SalesLeads, err error) {
- var db = slf.build()
- err = db.First(&result).Error
- return
-}
-
-func (slf *SalesLeadsSearch) FindAll() ([]*SalesLeads, int64, error) {
- var db = slf.build()
- var records = make([]*SalesLeads, 0)
- var total int64
- if err := db.Count(&total).Error; err != nil {
- return records, total, err
- }
- if slf.PageNum > 0 && slf.PageSize > 0 {
- db = db.Limit(slf.PageSize).Offset((slf.PageNum - 1) * slf.PageSize)
- }
-
- err := db.Preload("FollowRecord").Find(&records).Error
- return records, total, err
-}
-
-func (slf *SalesLeadsSearch) SetId(id int) *SalesLeadsSearch {
- slf.Id = id
- return slf
-}
-
-func (slf *SalesLeadsSearch) SetName(name string) *SalesLeadsSearch {
- slf.Name = name
- return slf
-}
-
-func (slf *SalesLeadsSearch) First() (result SalesLeads, err error) {
- var db = slf.build()
- err = db.First(&result).Error
- return
-}
-
-func (slf *SalesLeadsSearch) SetKeyword(keyword string) *SalesLeadsSearch {
- slf.Keyword = keyword
- return slf
-}
-
-func (slf *SalesLeadsSearch) SetPage(page, size int) *SalesLeadsSearch {
- slf.PageNum, slf.PageSize = page, size
- return slf
-}
-
-func (slf *SalesLeadsSearch) SetOrder(order string) *SalesLeadsSearch {
- slf.OrderBy = order
- return slf
-}
-
-func (slf *SalesLeadsSearch) UpdateMap(data map[string]interface{}) error {
- var db = slf.build()
- return db.Updates(data).Error
-}
-func (slf *SalesLeadsSearch) SetIds(ids []int) *SalesLeadsSearch {
- slf.Orm = slf.Orm.Where("id in (?)", ids)
- return slf
-}
+package model
+
+import (
+ "aps_crm/constvar"
+ "aps_crm/pkg/mysqlx"
+ "gorm.io/gorm"
+)
+
+type (
+ SalesLeads struct {
+ Id int `json:"id" gorm:"column:id;primary_key;AUTO_INCREMENT"`
+ Name string `json:"name" gorm:"column:name;unique;type:varchar(255);comment:鍏徃鍚嶇О"`
+ Number string `json:"number" gorm:"column:number;type:varchar(255);comment:閿�鍞嚎绱㈢紪鍙�"`
+ ContactName string `json:"contact_name" gorm:"column:contact_name;type:varchar(255);comment:鑱旂郴浜哄鍚�"`
+ ContactPhone string `json:"contact_phone" gorm:"column:contact_phone;type:varchar(255);comment:鑱旂郴浜虹數璇�"`
+ ContactPosition string `json:"contact_position" gorm:"column:contact_position;type:varchar(255);comment:鑱旂郴浜鸿亴浣�"`
+ SalesSourcesId int `json:"sales_sources_id" gorm:"column:sales_sources_id;type:int(11);comment:鍟嗘満鏉ユ簮ID"`
+ MemberId int `json:"member_id" gorm:"column:member_id;type:int(11);comment:閿�鍞礋璐d汉ID"`
+ SalesStatus constvar.SalesStatus `json:"sales_status" gorm:"column:sales_status;type:int(11);comment:閿�鍞姸鎬�"`
+ Desc string `json:"desc" gorm:"column:desc;type:varchar(255);comment:澶囨敞"`
+ Reason string `json:"reason" gorm:"column:reason;type:text;comment:澶辫触鍘熷洜"`
+ FollowRecord []FollowRecord `gorm:"foreignKey:SalesLeadsId"`
+ Address
+ gorm.Model `json:"-"`
+ }
+
+ SalesLeadsSearch struct {
+ SalesLeads
+
+ Orm *gorm.DB
+ Keyword string
+ OrderBy string
+ PageNum int
+ PageSize int
+ }
+)
+
+func (SalesLeads) TableName() string {
+ return "sales_leads"
+}
+
+func NewSalesLeadsSearch(db *gorm.DB) *SalesLeadsSearch {
+ if db == nil {
+ db = mysqlx.GetDB()
+ }
+
+ return &SalesLeadsSearch{
+ Orm: db,
+ }
+}
+
+func (slf *SalesLeadsSearch) build() *gorm.DB {
+ var db = slf.Orm.Model(&SalesLeads{})
+ if slf.Keyword != "" {
+ db = db.Where("name LIKE ?", "%"+slf.Keyword+"%")
+ }
+ if slf.Keyword != "" {
+ db = db.Where("name LIKE ?", "%"+slf.Keyword+"%")
+ }
+ if slf.Id != 0 {
+ db = db.Where("id = ?", slf.Id)
+ }
+ if slf.Name != "" {
+ db = db.Where("name = ?", slf.Name)
+ }
+
+ if slf.Number != "" {
+ db = db.Where("number = ?", slf.Number)
+ }
+
+ if slf.ContactName != "" {
+ db = db.Where("contact_name = ?", slf.ContactName)
+ }
+
+ if slf.ContactPhone != "" {
+ db = db.Where("contact_phone = ?", slf.ContactPhone)
+ }
+
+ if slf.ContactPosition != "" {
+ db = db.Where("contact_position = ?", slf.ContactPosition)
+ }
+
+ if slf.SalesSourcesId != 0 {
+ db = db.Where("sales_sources_id = ?", slf.SalesSourcesId)
+ }
+
+ if slf.MemberId != 0 {
+ db = db.Where("member_id = ?", slf.MemberId)
+ }
+
+ return db
+}
+
+func (slf *SalesLeadsSearch) Create(record *SalesLeads) error {
+ var db = slf.build()
+ return db.Create(record).Error
+}
+
+func (slf *SalesLeadsSearch) Update(record *SalesLeads) error {
+ var db = slf.build()
+ return db.Updates(record).Error
+}
+
+func (slf *SalesLeadsSearch) Delete() error {
+ var db = slf.build()
+ return db.Delete(&SalesLeads{}).Error
+}
+
+func (slf *SalesLeadsSearch) Find() (result []SalesLeads, err error) {
+ var db = slf.build()
+ err = db.Find(&result).Error
+ return
+}
+
+func (slf *SalesLeadsSearch) FindOne() (result SalesLeads, err error) {
+ var db = slf.build()
+ err = db.First(&result).Error
+ return
+}
+
+func (slf *SalesLeadsSearch) FindAll() ([]*SalesLeads, int64, error) {
+ var db = slf.build()
+ var records = make([]*SalesLeads, 0)
+ var total int64
+ if err := db.Count(&total).Error; err != nil {
+ return records, total, err
+ }
+ if slf.PageNum > 0 && slf.PageSize > 0 {
+ db = db.Limit(slf.PageSize).Offset((slf.PageNum - 1) * slf.PageSize)
+ }
+
+ err := db.Preload("FollowRecord").Find(&records).Error
+ return records, total, err
+}
+
+func (slf *SalesLeadsSearch) SetId(id int) *SalesLeadsSearch {
+ slf.Id = id
+ return slf
+}
+
+func (slf *SalesLeadsSearch) SetName(name string) *SalesLeadsSearch {
+ slf.Name = name
+ return slf
+}
+
+func (slf *SalesLeadsSearch) First() (result SalesLeads, err error) {
+ var db = slf.build()
+ err = db.First(&result).Error
+ return
+}
+
+func (slf *SalesLeadsSearch) SetKeyword(keyword string) *SalesLeadsSearch {
+ slf.Keyword = keyword
+ return slf
+}
+
+func (slf *SalesLeadsSearch) SetPage(page, size int) *SalesLeadsSearch {
+ slf.PageNum, slf.PageSize = page, size
+ return slf
+}
+
+func (slf *SalesLeadsSearch) SetOrder(order string) *SalesLeadsSearch {
+ slf.OrderBy = order
+ return slf
+}
+
+func (slf *SalesLeadsSearch) UpdateMap(data map[string]interface{}) error {
+ var db = slf.build()
+ return db.Updates(data).Error
+}
+func (slf *SalesLeadsSearch) SetIds(ids []int) *SalesLeadsSearch {
+ slf.Orm = slf.Orm.Where("id in (?)", ids)
+ return slf
+}
diff --git a/pkg/ecode/code.go b/pkg/ecode/code.go
index 2bd0aed..a574c94 100644
--- a/pkg/ecode/code.go
+++ b/pkg/ecode/code.go
@@ -1,393 +1,393 @@
-package ecode
-
-const (
- OK = 200
-
- UnknownErr = 2001 // 鏈煡閿欒
- DBErr = 2002 // db閿欒
- RedisErr = 2003 // redis閿欒
- ParamsErr = 2004 // 璇锋眰鍙傛暟閿欒
- UserNotExist = 2005 // 鐢ㄦ埛涓嶅瓨鍦�
- PasswordErr = 2006 // 瀵嗙爜閿欒
- UserForbidden = 2007 // 鐢ㄦ埛琚鐢�
- CaptchaGenerateFailed = 2008 // 楠岃瘉鐮佺敓鎴愬け璐�
- CaptchaErr = 2009 // 楠岃瘉鐮侀敊璇�
- CreateTokenErr = 2010 // 鍒涘缓token澶辫触
- JWTInBlackList = 2011 // JWT鍦ㄧ櫧鍚嶅崟
- JWTDisabled = 2012 // JWT澶辨晥
- JWTEmpty = 2013 // JWT涓虹┖
- JWTExpire = 2014 // JWT杩囨湡
- JWTParseErr = 2015 // JWT瑙f瀽澶辫触
- UserNameExistErr = 2016 // 鐢ㄦ埛鍚嶅凡瀛樺湪
- ChildrenExistErr = 2017 // 瀛樺湪瀛愯彍鍗�
- MenuNotExist = 2018 // 鑿滃崟涓嶅瓨鍦�
- MenuNameExistErr = 2019 // 鑿滃崟鍚嶅凡瀛樺湪
- DeviceIPExistErr = 2020 // 璇ヨ澶嘔P宸插瓨鍦�
- DeviceInstallRancherErr = 2021 // 瀹夎rancher澶辫触
- ClusterNameExistErr = 2022 // 瑭查泦缇ゅ凡缍撳瓨鍦�
- CreateDatabaseErr = 2023 // 鍒涘缓鏁版嵁搴撻敊璇�
- CreateDatabaseUserErr = 2024 // 鍒涘缓鏁版嵁搴撶敤鎴烽敊璇�
- CreateClusterErr = 2025 // 鍒涘缓闆嗙兢澶辫触
- GetClusterErr = 2026 // 鑾峰彇闆嗙兢澶辫触
- GetClusterKubeConfigErr = 2027 // 鑾峰彇kube config澶辫触
- ClusterInstallDockerErr = 2028 // 瀹夎docker澶辫触
- ClusterInstallKubectlErr = 2029 // 瀹夎kubectl澶辫触
- ClusterDeployKubernetesRolesErr = 2030 // 閮ㄧ讲kubernetes瑙掕壊澶辫触
- ClusterGetNodeCommandErr = 2031 // 鑾峰彇node command澶辫触
- UserHasCluster = 2032 // 鍒犻櫎鐢ㄦ埛澶辫触锛岃鐢ㄦ埛涓嬪瓨鍦ㄩ泦缇�
- NoPowerErr = 2033 //銆�娌℃湁鏉冮檺
- UploadImageErr = 2034 //銆�涓婁紶鍥惧儚澶辫触
-
- InvalidParams = 100001 // 璇锋眰鍙傛暟閿欒
-
- CountryExist = 200001 // 鍥藉宸插瓨鍦�
- CountryNotExist = 200002 // 鍥藉涓嶅瓨鍦�
- CountryGetListErr = 200003 // 鑾峰彇鍥藉鍒楄〃澶辫触
-
- ProvinceExist = 300001 // 鐪佷唤宸插瓨鍦�
- ProvinceNotExist = 300002 // 鐪佷唤涓嶅瓨鍦�
- ProvinceGetListErr = 300003 // 鑾峰彇鐪佷唤鍒楄〃澶辫触
- ProvinceSetErr = 300004 // 璁剧疆鐪佷唤澶辫触
-
- CityExist = 400001 // 鍩庡競宸插瓨鍦�
- CityNotExist = 400002 // 鍩庡競涓嶅瓨鍦�
- CityListErr = 400003 // 鑾峰彇鍩庡競鍒楄〃澶辫触
- CitySetErr = 400004 // 璁剧疆鍩庡競澶辫触
- CityDeleteErr = 400005 // 鍒犻櫎鍩庡競澶辫触
-
- RegionExist = 500001 // 鍖哄幙宸插瓨鍦�
- RegionNotExist = 500002 // 鍖哄幙涓嶅瓨鍦�
- RegionListErr = 500003 // 鑾峰彇鍖哄幙鍒楄〃澶辫触
- RegionSetErr = 500004 // 璁剧疆鍖哄幙澶辫触
-
- ContactExist = 600001 // 鑱旂郴浜哄凡瀛樺湪
- ContactNotExist = 600002 // 鑱旂郴浜轰笉瀛樺湪
- ContactListErr = 600003 // 鑾峰彇鑱旂郴浜哄垪琛ㄥけ璐�
- ContactDeleteErr = 600004 // 鍒犻櫎鑱旂郴浜哄け璐�
- ContactUpdateErr = 600005 // 鏇存柊鑱旂郴浜哄け璐�
- ContactAssignErr = 600006 // 鍒嗛厤鑱旂郴浜哄け璐�
-
- ClientExist = 700001 // 瀹㈡埛宸插瓨鍦�
- ClientNotExist = 700002 // 瀹㈡埛涓嶅瓨鍦�
- ClientListErr = 700003 // 鑾峰彇瀹㈡埛鍒楄〃澶辫触
- ClientDeleteErr = 700004 // 鍒犻櫎瀹㈡埛澶辫触
- ClientUpdateErr = 700005 // 鏇存柊瀹㈡埛澶辫触
-
- ClientStatusExist = 800001 // 瀹㈡埛鐘舵�佸凡瀛樺湪
- ClientStatusNotExist = 800002 // 瀹㈡埛鐘舵�佷笉瀛樺湪
- ClientStatusListErr = 800003 // 鑾峰彇瀹㈡埛鐘舵�佸垪琛ㄥけ璐�
- ClientStatusSetErr = 800004 // 璁剧疆瀹㈡埛鐘舵�佸け璐�
-
- ClientTypeExist = 900001 // 瀹㈡埛绫诲瀷宸插瓨鍦�
- ClientTypeNotExist = 900002 // 瀹㈡埛绫诲瀷涓嶅瓨鍦�
- ClientTypeListErr = 900003 // 鑾峰彇瀹㈡埛绫诲瀷鍒楄〃澶辫触
- ClientTypeSetErr = 900004 // 璁剧疆瀹㈡埛绫诲瀷澶辫触
-
- ClientOriginExist = 1000001 // 瀹㈡埛鏉ユ簮宸插瓨鍦�
- ClientOriginNotExist = 1000002 // 瀹㈡埛鏉ユ簮涓嶅瓨鍦�
- ClientOriginListErr = 1000003 // 鑾峰彇瀹㈡埛鏉ユ簮鍒楄〃澶辫触
- ClientOriginSetErr = 1000004 // 璁剧疆瀹㈡埛鏉ユ簮澶辫触
-
- ClientLevelExist = 1100001 // 瀹㈡埛绾у埆宸插瓨鍦�
- ClientLevelNotExist = 1100002 // 瀹㈡埛绾у埆涓嶅瓨鍦�
- ClientLevelListErr = 1100003 // 鑾峰彇瀹㈡埛绾у埆鍒楄〃澶辫触
- ClientLevelSetErr = 1100004 // 璁剧疆瀹㈡埛绾у埆澶辫触
- ClientLevelUpdateErr = 1100005 // 鏇存柊瀹㈡埛绾у埆澶辫触
-
- IndustryExist = 1200001 // 琛屼笟宸插瓨鍦�
- IndustryNotExist = 1200002 // 琛屼笟涓嶅瓨鍦�
- IndustryListErr = 1200003 // 鑾峰彇琛屼笟鍒楄〃澶辫触
- IndustrySetErr = 1200004 // 璁剧疆琛屼笟澶辫触
- IndustryUpdateErr = 1200005 // 鏇存柊琛屼笟澶辫触
-
- EnterpriseNatureExist = 1300001 // 浼佷笟鎬ц川宸插瓨鍦�
- EnterpriseNatureNotExist = 1300002 // 浼佷笟鎬ц川涓嶅瓨鍦�
- EnterpriseNatureListErr = 1300003 // 鑾峰彇浼佷笟鎬ц川鍒楄〃澶辫触
- EnterpriseNatureSetErr = 1300004 // 璁剧疆浼佷笟鎬ц川澶辫触
- EnterpriseNatureUpdateErr = 1300005 // 鏇存柊浼佷笟鎬ц川澶辫触
-
- RegisteredCapitalExist = 1400001 // 娉ㄥ唽璧勬湰宸插瓨鍦�
- RegisteredCapitalNotExist = 1400002 // 娉ㄥ唽璧勬湰涓嶅瓨鍦�
- RegisteredCapitalListErr = 1400003 // 鑾峰彇娉ㄥ唽璧勬湰鍒楄〃澶辫触
- RegisteredCapitalSetErr = 1400004 // 璁剧疆娉ㄥ唽璧勬湰澶辫触
- RegisteredCapitalUpdateErr = 1400005 // 鏇存柊娉ㄥ唽璧勬湰澶辫触
-
- EnterpriseScaleExist = 1500001 // 浼佷笟瑙勬ā宸插瓨鍦�
- EnterpriseScaleNotExist = 1500002 // 浼佷笟瑙勬ā涓嶅瓨鍦�
- EnterpriseScaleListErr = 1500003 // 鑾峰彇浼佷笟瑙勬ā鍒楄〃澶辫触
- EnterpriseScaleSetErr = 1500004 // 璁剧疆浼佷笟瑙勬ā澶辫触
- EnterpriseScaleUpdateErr = 1500005 // 鏇存柊浼佷笟瑙勬ā澶辫触
-
- SalesLeadsExist = 1600001 // 閿�鍞嚎绱㈠凡瀛樺湪
- SalesLeadsNotExist = 1600002 // 閿�鍞嚎绱笉瀛樺湪
- SalesLeadsListErr = 1600003 // 鑾峰彇閿�鍞嚎绱㈠垪琛ㄥけ璐�
- SalesLeadsSetErr = 1600004 // 璁剧疆閿�鍞嚎绱㈠け璐�
- SalesLeadsUpdateErr = 1600005 // 鏇存柊閿�鍞嚎绱㈠け璐�
- SalesLeadsDeleteErr = 1600006 // 鍒犻櫎閿�鍞嚎绱㈠け璐�
-
- SalesSourceExist = 1700001 // 閿�鍞嚎绱㈡潵婧愬凡瀛樺湪
- SalesSourceNotExist = 1700002 // 閿�鍞嚎绱㈡潵婧愪笉瀛樺湪
- SalesSourceListErr = 1700003 // 鑾峰彇閿�鍞嚎绱㈡潵婧愬垪琛ㄥけ璐�
- SalesSourceSetErr = 1700004 // 璁剧疆閿�鍞嚎绱㈡潵婧愬け璐�
- SalesSourceUpdateErr = 1700005 // 鏇存柊閿�鍞嚎绱㈡潵婧愬け璐�
-
- FollowRecordExist = 1800001 // 璺熻繘璁板綍宸插瓨鍦�
- FollowRecordNotExist = 1800002 // 璺熻繘璁板綍涓嶅瓨鍦�
- FollowRecordListErr = 1800003 // 鑾峰彇璺熻繘璁板綍鍒楄〃澶辫触
- FollowRecordSetErr = 1800004 // 璁剧疆璺熻繘璁板綍澶辫触
- FollowRecordUpdateErr = 1800005 // 鏇存柊璺熻繘璁板綍澶辫触
- FollowRecordDeleteErr = 1800006 // 鍒犻櫎璺熻繘璁板綍澶辫触
- FollowRecordAssignErr = 1800007 // 鍒嗛厤璺熻繘璁板綍澶辫触
-
- SaleChanceExist = 1900001 // 閿�鍞満浼氬凡瀛樺湪
- SaleChanceNotExist = 1900002 // 閿�鍞満浼氫笉瀛樺湪
- SaleChanceListErr = 1900003 // 鑾峰彇閿�鍞満浼氬垪琛ㄥけ璐�
- SaleChanceSetErr = 1900004 // 璁剧疆閿�鍞満浼氬け璐�
- SaleChanceUpdateErr = 1900005 // 鏇存柊閿�鍞満浼氬け璐�
- SaleChanceDeleteErr = 1900006 // 鍒犻櫎閿�鍞満浼氬け璐�
-
- SaleStageExist = 2000001 // 閿�鍞樁娈靛凡瀛樺湪
- SaleStageNotExist = 2000002 // 閿�鍞樁娈典笉瀛樺湪
- SaleStageListErr = 2000003 // 鑾峰彇閿�鍞樁娈靛垪琛ㄥけ璐�
- SaleStageSetErr = 2000004 // 璁剧疆閿�鍞樁娈靛け璐�
-
- SaleTypeExist = 2100001 // 閿�鍞被鍨嬪凡瀛樺湪
- SaleTypeNotExist = 2100002 // 閿�鍞被鍨嬩笉瀛樺湪
- SaleTypeListErr = 2100003 // 鑾峰彇閿�鍞被鍨嬪垪琛ㄥけ璐�
- SaleTypeSetErr = 2100004 // 璁剧疆閿�鍞被鍨嬪け璐�
- SaleTypeUpdateErr = 2100005 // 鏇存柊閿�鍞被鍨嬪け璐�
- SaleTypeDeleteErr = 2100006 // 鍒犻櫎閿�鍞被鍨嬪け璐�
-
- RegularCustomersExist = 2200001 // 鍥哄畾瀹㈡埛宸插瓨鍦�
- RegularCustomersNotExist = 2200002 // 鍥哄畾瀹㈡埛涓嶅瓨鍦�
- RegularCustomersListErr = 2200003 // 鑾峰彇鍥哄畾瀹㈡埛鍒楄〃澶辫触
- RegularCustomersSetErr = 2200004 // 璁剧疆鍥哄畾瀹㈡埛澶辫触
- RegularCustomersUpdateErr = 2200005 // 鏇存柊鍥哄畾瀹㈡埛澶辫触
- RegularCustomersDeleteErr = 2200006 // 鍒犻櫎鍥哄畾瀹㈡埛澶辫触
-
- PossibilityExist = 2300001 // 閿�鍞満浼氬彲鑳芥�у凡瀛樺湪
- PossibilityNotExist = 2300002 // 閿�鍞満浼氬彲鑳芥�т笉瀛樺湪
- PossibilityListErr = 2300003 // 鑾峰彇閿�鍞満浼氬彲鑳芥�у垪琛ㄥけ璐�
- PossibilitySetErr = 2300004 // 璁剧疆閿�鍞満浼氬彲鑳芥�уけ璐�
- PossibilityUpdateErr = 2300005 // 鏇存柊閿�鍞満浼氬彲鑳芥�уけ璐�
- PossibilityDeleteErr = 2300006 // 鍒犻櫎閿�鍞満浼氬彲鑳芥�уけ璐�
-
- StatusExist = 2400001 // 閿�鍞満浼氱姸鎬佸凡瀛樺湪
- StatusNotExist = 2400002 // 閿�鍞満浼氱姸鎬佷笉瀛樺湪
- StatusListErr = 2400003 // 鑾峰彇閿�鍞満浼氱姸鎬佸垪琛ㄥけ璐�
- StatusSetErr = 2400004 // 璁剧疆閿�鍞満浼氱姸鎬佸け璐�
- StatusUpdateErr = 2400005 // 鏇存柊閿�鍞満浼氱姸鎬佸け璐�
- StatusDeleteErr = 2400006 // 鍒犻櫎閿�鍞満浼氱姸鎬佸け璐�
-
- QuotationExist = 2500001 // 鎶ヤ环鍗曞凡瀛樺湪
- QuotationNotExist = 2500002 // 鎶ヤ环鍗曚笉瀛樺湪
- QuotationListErr = 2500003 // 鑾峰彇鎶ヤ环鍗曞垪琛ㄥけ璐�
- QuotationSetErr = 2500004 // 璁剧疆鎶ヤ环鍗曞け璐�
- QuotationUpdateErr = 2500005 // 鏇存柊鎶ヤ环鍗曞け璐�
- QuotationDeleteErr = 2500006 // 鍒犻櫎鎶ヤ环鍗曞け璐�
-
- MasterOrderExist = 2600001 // 涓昏鍗曞凡瀛樺湪
- MasterOrderNotExist = 2600002 // 涓昏鍗曚笉瀛樺湪
- MasterOrderListErr = 2600003 // 鑾峰彇涓昏鍗曞垪琛ㄥけ璐�
- MasterOrderSetErr = 2600004 // 璁剧疆涓昏鍗曞け璐�
- MasterOrderUpdateErr = 2600005 // 鏇存柊涓昏鍗曞け璐�
- MasterOrderDeleteErr = 2600006 // 鍒犻櫎涓昏鍗曞け璐�
-
- SubOrderExist = 2700001 // 瀛愯鍗曞凡瀛樺湪
- SubOrderNotExist = 2700002 // 瀛愯鍗曚笉瀛樺湪
- SubOrderListErr = 2700003 // 鑾峰彇瀛愯鍗曞垪琛ㄥけ璐�
- SubOrderSetErr = 2700004 // 璁剧疆瀛愯鍗曞け璐�
- SubOrderUpdateErr = 2700005 // 鏇存柊瀛愯鍗曞け璐�
- SubOrderDeleteErr = 2700006 // 鍒犻櫎瀛愯鍗曞け璐�
-
- SalesDetailsExist = 2800001 // 閿�鍞槑缁嗗凡瀛樺湪
- SalesDetailsNotExist = 2800002 // 閿�鍞槑缁嗕笉瀛樺湪
- SalesDetailsListErr = 2800003 // 鑾峰彇閿�鍞槑缁嗗垪琛ㄥけ璐�
- SalesDetailsSetErr = 2800004 // 璁剧疆閿�鍞槑缁嗗け璐�
- SalesDetailsUpdateErr = 2800005 // 鏇存柊閿�鍞槑缁嗗け璐�
- SalesDetailsDeleteErr = 2800006 // 鍒犻櫎閿�鍞槑缁嗗け璐�
-
- SalesReturnExist = 2900001 // 閿�鍞��璐у崟宸插瓨鍦�
- SalesReturnNotExist = 2900002 // 閿�鍞��璐у崟涓嶅瓨鍦�
- SalesReturnListErr = 2900003 // 鑾峰彇閿�鍞��璐у崟鍒楄〃澶辫触
- SalesReturnSetErr = 2900004 // 璁剧疆閿�鍞��璐у崟澶辫触
- SalesReturnUpdateErr = 2900005 // 鏇存柊閿�鍞��璐у崟澶辫触
- SalesReturnDeleteErr = 2900006 // 鍒犻櫎閿�鍞��璐у崟澶辫触
-
- SalesRefundExist = 3000001 // 閿�鍞��娆惧崟宸插瓨鍦�
- SalesRefundNotExist = 3000002 // 閿�鍞��娆惧崟涓嶅瓨鍦�
- SalesRefundListErr = 3000003 // 鑾峰彇閿�鍞��娆惧崟鍒楄〃澶辫触
- SalesRefundSetErr = 3000004 // 璁剧疆閿�鍞��娆惧崟澶辫触
- SalesRefundUpdateErr = 3000005 // 鏇存柊閿�鍞��娆惧崟澶辫触
- SalesRefundDeleteErr = 3000006 // 鍒犻櫎閿�鍞��娆惧崟澶辫触
-
- ContractExist = 3100001 // 鍚堝悓宸插瓨鍦�
- ContractNotExist = 3100002 // 鍚堝悓涓嶅瓨鍦�
- ContractListErr = 3100003 // 鑾峰彇鍚堝悓鍒楄〃澶辫触
- ContractSetErr = 3100004 // 璁剧疆鍚堝悓澶辫触
- ContractUpdateErr = 3100005 // 鏇存柊鍚堝悓澶辫触
- ContractDeleteErr = 3100006 // 鍒犻櫎鍚堝悓澶辫触
-
- PlanExist = 3200001 // 璁″垝宸插瓨鍦�
- PlanNotExist = 3200002 // 璁″垝涓嶅瓨鍦�
- PlanListErr = 3200003 // 鑾峰彇璁″垝鍒楄〃澶辫触
- PlanSetErr = 3200004 // 璁剧疆璁″垝澶辫触
- PlanUpdateErr = 3200005 // 鏇存柊璁″垝澶辫触
- PlanDeleteErr = 3200006 // 鍒犻櫎璁″垝澶辫触
-
- SContractExist = 3300001 // 鏈嶅姟鍚堝悓宸插瓨鍦�
- SContractNotExist = 3300002 // 鏈嶅姟鍚堝悓涓嶅瓨鍦�
- SContractListErr = 3300003 // 鑾峰彇鏈嶅姟鍚堝悓鍒楄〃澶辫触
- SContractSetErr = 3300004 // 璁剧疆鏈嶅姟鍚堝悓澶辫触
- SContractUpdateErr = 3300005 // 鏇存柊鏈嶅姟鍚堝悓澶辫触
- SContractDeleteErr = 3300006 // 鍒犻櫎鏈嶅姟鍚堝悓澶辫触
-
- OrderManageExist = 3400001 // 璁㈠崟绠$悊宸插瓨鍦�
- OrderManageNotExist = 3400002 // 璁㈠崟绠$悊涓嶅瓨鍦�
- OrderManageListErr = 3400003 // 鑾峰彇璁㈠崟绠$悊鍒楄〃澶辫触
- OrderManageSetErr = 3400004 // 璁剧疆璁㈠崟绠$悊澶辫触
- OrderManageUpdateErr = 3400005 // 鏇存柊璁㈠崟绠$悊澶辫触
- OrderManageDeleteErr = 3400006 // 鍒犻櫎璁㈠崟绠$悊澶辫触
-
- ServiceFollowupExist = 3500001 // 鏈嶅姟璺熻繘宸插瓨鍦�
- ServiceFollowupNotExist = 3500002 // 鏈嶅姟璺熻繘涓嶅瓨鍦�
- ServiceFollowupListErr = 3500003 // 鑾峰彇鏈嶅姟璺熻繘鍒楄〃澶辫触
- ServiceFollowupSetErr = 3500004 // 璁剧疆鏈嶅姟璺熻繘澶辫触
- ServiceFollowupUpdateErr = 3500005 // 鏇存柊鏈嶅姟璺熻繘澶辫触
- ServiceFollowupDeleteErr = 3500006 // 鍒犻櫎鏈嶅姟璺熻繘澶辫触
-
- CustomerServiceSheetExist = 3600001 // 瀹㈡湇鍗曞凡瀛樺湪
- CustomerServiceSheetNotExist = 3600002 // 瀹㈡湇鍗曚笉瀛樺湪
- CustomerServiceSheetListErr = 3600003 // 鑾峰彇瀹㈡湇鍗曞垪琛ㄥけ璐�
- CustomerServiceSheetSetErr = 3600004 // 璁剧疆瀹㈡湇鍗曞け璐�
- CustomerServiceSheetUpdateErr = 3600005 // 鏇存柊瀹㈡湇鍗曞け璐�
- CustomerServiceSheetDeleteErr = 3600006 // 鍒犻櫎瀹㈡湇鍗曞け璐�
-
- ServiceFeeManageExist = 3700001 // 鏈嶅姟璐圭鐞嗗凡瀛樺湪
- ServiceFeeManageNotExist = 3700002 // 鏈嶅姟璐圭鐞嗕笉瀛樺湪
- ServiceFeeManageListErr = 3700003 // 鑾峰彇鏈嶅姟璐圭鐞嗗垪琛ㄥけ璐�
- ServiceFeeManageSetErr = 3700004 // 璁剧疆鏈嶅姟璐圭鐞嗗け璐�
- ServiceFeeManageUpdateErr = 3700005 // 鏇存柊鏈嶅姟璐圭鐞嗗け璐�
- ServiceFeeManageDeleteErr = 3700006 // 鍒犻櫎鏈嶅姟璐圭鐞嗗け璐�
-
- RoleExist = 3800001 // 瑙掕壊宸插瓨鍦�
- RoleNotExist = 3800002 // 瑙掕壊涓嶅瓨鍦�
- RoleListErr = 3800003 // 鑾峰彇瑙掕壊鍒楄〃澶辫触
- RoleSetErr = 3800004 // 璁剧疆瑙掕壊澶辫触
- RoleUpdateErr = 3800005 // 鏇存柊瑙掕壊澶辫触
- RoleDeleteErr = 3800006 // 鍒犻櫎瑙掕壊澶辫触
- RoleDeleteErr1 = 3800007 // 璇ヨ鑹蹭笅瀛樺湪鐢ㄦ埛锛屾棤娉曞垹闄�
-
- MenuListErr = 3900001 // 鑾峰彇鑿滃崟鍒楄〃澶辫触
- SetMenuAuthorityErr = 3900002 // 璁剧疆鑿滃崟鏉冮檺澶辫触
-
- DepartmentExist = 4000001 // 閮ㄩ棬宸插瓨鍦�
- DepartmentNotExist = 4000002 // 閮ㄩ棬涓嶅瓨鍦�
- DepartmentListErr = 4000003 // 鑾峰彇閮ㄩ棬鍒楄〃澶辫触
- DepartmentSetErr = 4000004 // 璁剧疆閮ㄩ棬澶辫触
- DepartmentUpdateErr = 4000005 // 鏇存柊閮ㄩ棬澶辫触
- DepartmentDeleteErr = 4000006 // 鍒犻櫎閮ㄩ棬澶辫触
- DepartmentDeleteErr1 = 4000007 // 璇ラ儴闂ㄤ笅瀛樺湪鐢ㄦ埛锛屾棤娉曞垹闄�
-
- VettingExist = 4100001 // 瀹℃壒宸插瓨鍦�
- VettingNotExist = 4100002 // 瀹℃壒涓嶅瓨鍦�
- VettingListErr = 4100003 // 鑾峰彇瀹℃壒鍒楄〃澶辫触
- VettingSetErr = 4100004 // 璁剧疆瀹℃壒澶辫触
- VettingNotBelongToUser = 4100005 // 瀹℃壒涓嶅睘浜庡綋鍓嶇敤鎴�
-
- SatisfactionExist = 4200001 // 婊℃剰搴﹀凡瀛樺湪
- SatisfactionNotExist = 4200002 // 婊℃剰搴︿笉瀛樺湪
- SatisfactionListErr = 4200003 // 鑾峰彇婊℃剰搴﹀垪琛ㄥけ璐�
- SatisfactionSetErr = 4200004 // 璁剧疆婊℃剰搴﹀け璐�
- SatisfactionUpdateErr = 4200005 // 鏇存柊婊℃剰搴﹀け璐�
-
- TimelyRateExist = 4300001 // 鍙婃椂鐜囧凡瀛樺湪
- TimelyRateNotExist = 4300002 // 鍙婃椂鐜囦笉瀛樺湪
- TimelyRateListErr = 4300003 // 鑾峰彇鍙婃椂鐜囧垪琛ㄥけ璐�
- TimelyRateSetErr = 4300004 // 璁剧疆鍙婃椂鐜囧け璐�
- TimelyRateUpdateErr = 4300005 // 鏇存柊鍙婃椂鐜囧け璐�
-
- SolveRateExist = 4400001 // 瑙e喅鐜囧凡瀛樺湪
- SolveRateNotExist = 4400002 // 瑙e喅鐜囦笉瀛樺湪
- SolveRateListErr = 4400003 // 鑾峰彇瑙e喅鐜囧垪琛ㄥけ璐�
- SolveRateSetErr = 4400004 // 璁剧疆瑙e喅鐜囧け璐�
- SolveRateUpdateErr = 4400005 // 鏇存柊瑙e喅鐜囧け璐�
-
- IsVisitExist = 4500001 // 鏈嶅姟浜哄憳鏄惁鏉ヨ繃宸插瓨鍦�
- IsVisitNotExist = 4500002 // 鏈嶅姟浜哄憳鏄惁鏉ヨ繃涓嶅瓨鍦�
- IsVisitListErr = 4500003 // 鑾峰彇鏈嶅姟浜哄憳鏄惁鏉ヨ繃鍒楄〃澶辫触
- IsVisitSetErr = 4500004 // 璁剧疆鏈嶅姟浜哄憳鏄惁鏉ヨ繃澶辫触
- IsVisitUpdateErr = 4500005 // 鏇存柊鏈嶅姟浜哄憳鏄惁鏉ヨ繃澶辫触
-
- ReportSourceExist = 4600001 // 鎶ヨ〃鏉ユ簮宸插瓨鍦�
- ReportSourceNotExist = 4600002 // 鎶ヨ〃鏉ユ簮涓嶅瓨鍦�
- ReportSourceListErr = 4600003 // 鑾峰彇鎶ヨ〃鏉ユ簮鍒楄〃澶辫触
- ReportSourceSetErr = 4600004 // 璁剧疆鎶ヨ〃鏉ユ簮澶辫触
- ReportSourceUpdateErr = 4600005 // 鏇存柊鎶ヨ〃鏉ユ簮澶辫触
-
- OrderTypeExist = 4700001 // 宸ュ崟绫诲瀷宸插瓨鍦�
- OrderTypeNotExist = 4700002 // 宸ュ崟绫诲瀷涓嶅瓨鍦�
- OrderTypeListErr = 4700003 // 鑾峰彇宸ュ崟绫诲瀷鍒楄〃澶辫触
- OrderTypeSetErr = 4700004 // 璁剧疆宸ュ崟绫诲瀷澶辫触
- OrderTypeUpdateErr = 4700005 // 鏇存柊宸ュ崟绫诲瀷澶辫触
-
- ServiceContractStatusExist = 4800001 // 鏈嶅姟鍚堝悓鐘舵�佸凡瀛樺湪
- ServiceContractStatusNotExist = 4400002 // 鏈嶅姟鍚堝悓鐘舵�佷笉瀛樺湪
- ServiceContractStatusListErr = 4800003 // 鑾峰彇鏈嶅姟鍚堝悓鐘舵�佸垪琛ㄥけ璐�
- ServiceContractStatusSetErr = 4800004 // 璁剧疆鏈嶅姟鍚堝悓鐘舵�佸け璐�
- ServiceContractStatusUpdateErr = 4800005 // 鏇存柊鏈嶅姟鍚堝悓鐘舵�佸け璐�
-
- ServiceContractTypeExist = 4900001 // 鏈嶅姟鍚堝悓绫诲瀷宸插瓨鍦�
- ServiceContractTypeNotExist = 4900002 // 鏈嶅姟鍚堝悓绫诲瀷涓嶅瓨鍦�
- ServiceContractTypeListErr = 4900003 // 鑾峰彇鏈嶅姟鍚堝悓绫诲瀷鍒楄〃澶辫触
- ServiceContractTypeSetErr = 4900004 // 璁剧疆鏈嶅姟鍚堝悓绫诲瀷澶辫触
- ServiceContractTypeUpdateErr = 4900005 // 鏇存柊鏈嶅姟鍚堝悓绫诲瀷澶辫触
-
- RefundMethodExist = 5000001 // 閫�娆炬柟寮忓凡瀛樺湪
- RefundMethodNotExist = 5000002 // 閫�娆炬柟寮忎笉瀛樺湪
- RefundMethodListErr = 5000003 // 鑾峰彇閫�娆炬柟寮忓垪琛ㄥけ璐�
- RefundMethodSetErr = 5000004 // 璁剧疆閫�娆炬柟寮忓け璐�
- RefundMethodUpdateErr = 5000005 // 鏇存柊閫�娆炬柟寮忓け璐�
-
- IsInvoiceExist = 5100001 // 鏄惁寮�绁ㄥ凡瀛樺湪
- IsInvoiceNotExist = 5100002 // 鏄惁寮�绁ㄤ笉瀛樺湪
- IsInvoiceListErr = 5100003 // 鑾峰彇鏄惁寮�绁ㄥ垪琛ㄥけ璐�
- IsInvoiceSetErr = 5100004 // 璁剧疆鏄惁寮�绁ㄥけ璐�
- IsInvoiceUpdateErr = 5100005 // 鏇存柊鏄惁寮�绁ㄥけ璐�
-
- AccountIdExist = 5200001 // 璐︽埛宸插瓨鍦�
- AccountIdNotExist = 5200002 // 璐︽埛涓嶅瓨鍦�
- AccountIdListErr = 5200003 // 鑾峰彇璐︽埛鍒楄〃澶辫触
- AccountIdSetErr = 5200004 // 璁剧疆璐︽埛澶辫触
- AccountIdUpdateErr = 5200005 // 鏇存柊璐︽埛澶辫触
-
- SalesReturnStatusExist = 5300001 // 閫�璐у崟鐘舵�佸凡瀛樺湪
- SalesReturnStatusNotExist = 5300002 // 閫�璐у崟鐘舵�佷笉瀛樺湪
- SalesReturnStatusListErr = 5300003 // 鑾峰彇閫�璐у崟鐘舵�佸垪琛ㄥけ璐�
- SalesReturnStatusSetErr = 5300004 // 璁剧疆閫�璐у崟鐘舵�佸け璐�
- SalesReturnStatusUpdateErr = 5300005 // 鏇存柊閫�璐у崟鐘舵�佸け璐�
-
- RepositoryExist = 5400001 // 閫�璐т粨搴撳凡瀛樺湪
- RepositoryNotExist = 5400002 // 閫�璐т粨搴撲笉瀛樺湪
- RepositoryListErr = 5400003 // 鑾峰彇閫�璐т粨搴撳垪琛ㄥけ璐�
- RepositorySetErr = 5400004 // 璁剧疆閫�璐т粨搴撳け璐�
- RepositoryUpdateErr = 5400005 // 鏇存柊閫�璐т粨搴撳け璐�
-
- QuotationStatusExist = 5500001 // 鎶ヤ环鍗曠姸鎬佸凡瀛樺湪
- QuotationStatusNotExist = 5500002 // 鎶ヤ环鍗曠姸鎬佷笉瀛樺湪
- QuotationStatusListErr = 5500003 // 鑾峰彇鎶ヤ环鍗曠姸鎬佸垪琛ㄥけ璐�
- QuotationStatusSetErr = 5500004 // 璁剧疆鎶ヤ环鍗曠姸鎬佸け璐�
- QuotationStatusUpdateErr = 5500005 // 鏇存柊鎶ヤ环鍗曠姸鎬佸け璐�
-
- CurrencyExist = 5600001 // 甯佺宸插瓨鍦�
- CurrencyNotExist = 5600002 // 甯佺涓嶅瓨鍦�
- CurrencyListErr = 5600003 // 鑾峰彇甯佺鍒楄〃澶辫触
- CurrencySetErr = 5600004 // 璁剧疆甯佺澶辫触
- CurrencyUpdateErr = 5600005 // 鏇存柊甯佺澶辫触
-
- AssignErr = 5700001 // 鍒嗛厤澶辫触
- AssignWrongMemberId = 5700002 // 鍒嗛厤澶辫触锛屽垎閰嶄汉涓虹┖
- AssignWrongId = 5700003 // 鍒嗛厤澶辫触锛屽垎閰嶅璞′负绌�
- AssignWrongModelType = 5700004 // 鍒嗛厤澶辫触锛屽垎閰嶅璞$被鍨嬩负绌�
-
-)
+package ecode
+
+const (
+ OK = 200
+
+ UnknownErr = 2001 // 鏈煡閿欒
+ DBErr = 2002 // db閿欒
+ RedisErr = 2003 // redis閿欒
+ ParamsErr = 2004 // 璇锋眰鍙傛暟閿欒
+ UserNotExist = 2005 // 鐢ㄦ埛涓嶅瓨鍦�
+ PasswordErr = 2006 // 瀵嗙爜閿欒
+ UserForbidden = 2007 // 鐢ㄦ埛琚鐢�
+ CaptchaGenerateFailed = 2008 // 楠岃瘉鐮佺敓鎴愬け璐�
+ CaptchaErr = 2009 // 楠岃瘉鐮侀敊璇�
+ CreateTokenErr = 2010 // 鍒涘缓token澶辫触
+ JWTInBlackList = 2011 // JWT鍦ㄧ櫧鍚嶅崟
+ JWTDisabled = 2012 // JWT澶辨晥
+ JWTEmpty = 2013 // JWT涓虹┖
+ JWTExpire = 2014 // JWT杩囨湡
+ JWTParseErr = 2015 // JWT瑙f瀽澶辫触
+ UserNameExistErr = 2016 // 鐢ㄦ埛鍚嶅凡瀛樺湪
+ ChildrenExistErr = 2017 // 瀛樺湪瀛愯彍鍗�
+ MenuNotExist = 2018 // 鑿滃崟涓嶅瓨鍦�
+ MenuNameExistErr = 2019 // 鑿滃崟鍚嶅凡瀛樺湪
+ DeviceIPExistErr = 2020 // 璇ヨ澶嘔P宸插瓨鍦�
+ DeviceInstallRancherErr = 2021 // 瀹夎rancher澶辫触
+ ClusterNameExistErr = 2022 // 瑭查泦缇ゅ凡缍撳瓨鍦�
+ CreateDatabaseErr = 2023 // 鍒涘缓鏁版嵁搴撻敊璇�
+ CreateDatabaseUserErr = 2024 // 鍒涘缓鏁版嵁搴撶敤鎴烽敊璇�
+ CreateClusterErr = 2025 // 鍒涘缓闆嗙兢澶辫触
+ GetClusterErr = 2026 // 鑾峰彇闆嗙兢澶辫触
+ GetClusterKubeConfigErr = 2027 // 鑾峰彇kube config澶辫触
+ ClusterInstallDockerErr = 2028 // 瀹夎docker澶辫触
+ ClusterInstallKubectlErr = 2029 // 瀹夎kubectl澶辫触
+ ClusterDeployKubernetesRolesErr = 2030 // 閮ㄧ讲kubernetes瑙掕壊澶辫触
+ ClusterGetNodeCommandErr = 2031 // 鑾峰彇node command澶辫触
+ UserHasCluster = 2032 // 鍒犻櫎鐢ㄦ埛澶辫触锛岃鐢ㄦ埛涓嬪瓨鍦ㄩ泦缇�
+ NoPowerErr = 2033 //銆�娌℃湁鏉冮檺
+ UploadImageErr = 2034 //銆�涓婁紶鍥惧儚澶辫触
+
+ InvalidParams = 100001 // 璇锋眰鍙傛暟閿欒
+
+ CountryExist = 200001 // 鍥藉宸插瓨鍦�
+ CountryNotExist = 200002 // 鍥藉涓嶅瓨鍦�
+ CountryGetListErr = 200003 // 鑾峰彇鍥藉鍒楄〃澶辫触
+
+ ProvinceExist = 300001 // 鐪佷唤宸插瓨鍦�
+ ProvinceNotExist = 300002 // 鐪佷唤涓嶅瓨鍦�
+ ProvinceGetListErr = 300003 // 鑾峰彇鐪佷唤鍒楄〃澶辫触
+ ProvinceSetErr = 300004 // 璁剧疆鐪佷唤澶辫触
+
+ CityExist = 400001 // 鍩庡競宸插瓨鍦�
+ CityNotExist = 400002 // 鍩庡競涓嶅瓨鍦�
+ CityListErr = 400003 // 鑾峰彇鍩庡競鍒楄〃澶辫触
+ CitySetErr = 400004 // 璁剧疆鍩庡競澶辫触
+ CityDeleteErr = 400005 // 鍒犻櫎鍩庡競澶辫触
+
+ RegionExist = 500001 // 鍖哄幙宸插瓨鍦�
+ RegionNotExist = 500002 // 鍖哄幙涓嶅瓨鍦�
+ RegionListErr = 500003 // 鑾峰彇鍖哄幙鍒楄〃澶辫触
+ RegionSetErr = 500004 // 璁剧疆鍖哄幙澶辫触
+
+ ContactExist = 600001 // 鑱旂郴浜哄凡瀛樺湪
+ ContactNotExist = 600002 // 鑱旂郴浜轰笉瀛樺湪
+ ContactListErr = 600003 // 鑾峰彇鑱旂郴浜哄垪琛ㄥけ璐�
+ ContactDeleteErr = 600004 // 鍒犻櫎鑱旂郴浜哄け璐�
+ ContactUpdateErr = 600005 // 鏇存柊鑱旂郴浜哄け璐�
+ ContactAssignErr = 600006 // 鍒嗛厤鑱旂郴浜哄け璐�
+
+ ClientExist = 700001 // 瀹㈡埛宸插瓨鍦�
+ ClientNotExist = 700002 // 瀹㈡埛涓嶅瓨鍦�
+ ClientListErr = 700003 // 鑾峰彇瀹㈡埛鍒楄〃澶辫触
+ ClientDeleteErr = 700004 // 鍒犻櫎瀹㈡埛澶辫触
+ ClientUpdateErr = 700005 // 鏇存柊瀹㈡埛澶辫触
+
+ ClientStatusExist = 800001 // 瀹㈡埛鐘舵�佸凡瀛樺湪
+ ClientStatusNotExist = 800002 // 瀹㈡埛鐘舵�佷笉瀛樺湪
+ ClientStatusListErr = 800003 // 鑾峰彇瀹㈡埛鐘舵�佸垪琛ㄥけ璐�
+ ClientStatusSetErr = 800004 // 璁剧疆瀹㈡埛鐘舵�佸け璐�
+
+ ClientTypeExist = 900001 // 瀹㈡埛绫诲瀷宸插瓨鍦�
+ ClientTypeNotExist = 900002 // 瀹㈡埛绫诲瀷涓嶅瓨鍦�
+ ClientTypeListErr = 900003 // 鑾峰彇瀹㈡埛绫诲瀷鍒楄〃澶辫触
+ ClientTypeSetErr = 900004 // 璁剧疆瀹㈡埛绫诲瀷澶辫触
+
+ ClientOriginExist = 1000001 // 瀹㈡埛鏉ユ簮宸插瓨鍦�
+ ClientOriginNotExist = 1000002 // 瀹㈡埛鏉ユ簮涓嶅瓨鍦�
+ ClientOriginListErr = 1000003 // 鑾峰彇瀹㈡埛鏉ユ簮鍒楄〃澶辫触
+ ClientOriginSetErr = 1000004 // 璁剧疆瀹㈡埛鏉ユ簮澶辫触
+
+ ClientLevelExist = 1100001 // 瀹㈡埛绾у埆宸插瓨鍦�
+ ClientLevelNotExist = 1100002 // 瀹㈡埛绾у埆涓嶅瓨鍦�
+ ClientLevelListErr = 1100003 // 鑾峰彇瀹㈡埛绾у埆鍒楄〃澶辫触
+ ClientLevelSetErr = 1100004 // 璁剧疆瀹㈡埛绾у埆澶辫触
+ ClientLevelUpdateErr = 1100005 // 鏇存柊瀹㈡埛绾у埆澶辫触
+
+ IndustryExist = 1200001 // 琛屼笟宸插瓨鍦�
+ IndustryNotExist = 1200002 // 琛屼笟涓嶅瓨鍦�
+ IndustryListErr = 1200003 // 鑾峰彇琛屼笟鍒楄〃澶辫触
+ IndustrySetErr = 1200004 // 璁剧疆琛屼笟澶辫触
+ IndustryUpdateErr = 1200005 // 鏇存柊琛屼笟澶辫触
+
+ EnterpriseNatureExist = 1300001 // 浼佷笟鎬ц川宸插瓨鍦�
+ EnterpriseNatureNotExist = 1300002 // 浼佷笟鎬ц川涓嶅瓨鍦�
+ EnterpriseNatureListErr = 1300003 // 鑾峰彇浼佷笟鎬ц川鍒楄〃澶辫触
+ EnterpriseNatureSetErr = 1300004 // 璁剧疆浼佷笟鎬ц川澶辫触
+ EnterpriseNatureUpdateErr = 1300005 // 鏇存柊浼佷笟鎬ц川澶辫触
+
+ RegisteredCapitalExist = 1400001 // 娉ㄥ唽璧勬湰宸插瓨鍦�
+ RegisteredCapitalNotExist = 1400002 // 娉ㄥ唽璧勬湰涓嶅瓨鍦�
+ RegisteredCapitalListErr = 1400003 // 鑾峰彇娉ㄥ唽璧勬湰鍒楄〃澶辫触
+ RegisteredCapitalSetErr = 1400004 // 璁剧疆娉ㄥ唽璧勬湰澶辫触
+ RegisteredCapitalUpdateErr = 1400005 // 鏇存柊娉ㄥ唽璧勬湰澶辫触
+
+ EnterpriseScaleExist = 1500001 // 浼佷笟瑙勬ā宸插瓨鍦�
+ EnterpriseScaleNotExist = 1500002 // 浼佷笟瑙勬ā涓嶅瓨鍦�
+ EnterpriseScaleListErr = 1500003 // 鑾峰彇浼佷笟瑙勬ā鍒楄〃澶辫触
+ EnterpriseScaleSetErr = 1500004 // 璁剧疆浼佷笟瑙勬ā澶辫触
+ EnterpriseScaleUpdateErr = 1500005 // 鏇存柊浼佷笟瑙勬ā澶辫触
+
+ SalesLeadsExist = 1600001 // 閿�鍞嚎绱㈠凡瀛樺湪
+ SalesLeadsNotExist = 1600002 // 閿�鍞嚎绱笉瀛樺湪
+ SalesLeadsListErr = 1600003 // 鑾峰彇閿�鍞嚎绱㈠垪琛ㄥけ璐�
+ SalesLeadsStatusErr = 1600004 // 閿�鍞嚎绱㈢姸鎬侀敊璇�
+ SalesLeadsUpdateErr = 1600005 // 鏇存柊閿�鍞嚎绱㈠け璐�
+ SalesLeadsDeleteErr = 1600006 // 鍒犻櫎閿�鍞嚎绱㈠け璐�
+
+ SalesSourceExist = 1700001 // 閿�鍞嚎绱㈡潵婧愬凡瀛樺湪
+ SalesSourceNotExist = 1700002 // 閿�鍞嚎绱㈡潵婧愪笉瀛樺湪
+ SalesSourceListErr = 1700003 // 鑾峰彇閿�鍞嚎绱㈡潵婧愬垪琛ㄥけ璐�
+ SalesSourceSetErr = 1700004 // 璁剧疆閿�鍞嚎绱㈡潵婧愬け璐�
+ SalesSourceUpdateErr = 1700005 // 鏇存柊閿�鍞嚎绱㈡潵婧愬け璐�
+
+ FollowRecordExist = 1800001 // 璺熻繘璁板綍宸插瓨鍦�
+ FollowRecordNotExist = 1800002 // 璺熻繘璁板綍涓嶅瓨鍦�
+ FollowRecordListErr = 1800003 // 鑾峰彇璺熻繘璁板綍鍒楄〃澶辫触
+ FollowRecordSetErr = 1800004 // 璁剧疆璺熻繘璁板綍澶辫触
+ FollowRecordUpdateErr = 1800005 // 鏇存柊璺熻繘璁板綍澶辫触
+ FollowRecordDeleteErr = 1800006 // 鍒犻櫎璺熻繘璁板綍澶辫触
+ FollowRecordAssignErr = 1800007 // 鍒嗛厤璺熻繘璁板綍澶辫触
+
+ SaleChanceExist = 1900001 // 閿�鍞満浼氬凡瀛樺湪
+ SaleChanceNotExist = 1900002 // 閿�鍞満浼氫笉瀛樺湪
+ SaleChanceListErr = 1900003 // 鑾峰彇閿�鍞満浼氬垪琛ㄥけ璐�
+ SaleChanceSetErr = 1900004 // 璁剧疆閿�鍞満浼氬け璐�
+ SaleChanceUpdateErr = 1900005 // 鏇存柊閿�鍞満浼氬け璐�
+ SaleChanceDeleteErr = 1900006 // 鍒犻櫎閿�鍞満浼氬け璐�
+
+ SaleStageExist = 2000001 // 閿�鍞樁娈靛凡瀛樺湪
+ SaleStageNotExist = 2000002 // 閿�鍞樁娈典笉瀛樺湪
+ SaleStageListErr = 2000003 // 鑾峰彇閿�鍞樁娈靛垪琛ㄥけ璐�
+ SaleStageSetErr = 2000004 // 璁剧疆閿�鍞樁娈靛け璐�
+
+ SaleTypeExist = 2100001 // 閿�鍞被鍨嬪凡瀛樺湪
+ SaleTypeNotExist = 2100002 // 閿�鍞被鍨嬩笉瀛樺湪
+ SaleTypeListErr = 2100003 // 鑾峰彇閿�鍞被鍨嬪垪琛ㄥけ璐�
+ SaleTypeSetErr = 2100004 // 璁剧疆閿�鍞被鍨嬪け璐�
+ SaleTypeUpdateErr = 2100005 // 鏇存柊閿�鍞被鍨嬪け璐�
+ SaleTypeDeleteErr = 2100006 // 鍒犻櫎閿�鍞被鍨嬪け璐�
+
+ RegularCustomersExist = 2200001 // 鍥哄畾瀹㈡埛宸插瓨鍦�
+ RegularCustomersNotExist = 2200002 // 鍥哄畾瀹㈡埛涓嶅瓨鍦�
+ RegularCustomersListErr = 2200003 // 鑾峰彇鍥哄畾瀹㈡埛鍒楄〃澶辫触
+ RegularCustomersSetErr = 2200004 // 璁剧疆鍥哄畾瀹㈡埛澶辫触
+ RegularCustomersUpdateErr = 2200005 // 鏇存柊鍥哄畾瀹㈡埛澶辫触
+ RegularCustomersDeleteErr = 2200006 // 鍒犻櫎鍥哄畾瀹㈡埛澶辫触
+
+ PossibilityExist = 2300001 // 閿�鍞満浼氬彲鑳芥�у凡瀛樺湪
+ PossibilityNotExist = 2300002 // 閿�鍞満浼氬彲鑳芥�т笉瀛樺湪
+ PossibilityListErr = 2300003 // 鑾峰彇閿�鍞満浼氬彲鑳芥�у垪琛ㄥけ璐�
+ PossibilitySetErr = 2300004 // 璁剧疆閿�鍞満浼氬彲鑳芥�уけ璐�
+ PossibilityUpdateErr = 2300005 // 鏇存柊閿�鍞満浼氬彲鑳芥�уけ璐�
+ PossibilityDeleteErr = 2300006 // 鍒犻櫎閿�鍞満浼氬彲鑳芥�уけ璐�
+
+ StatusExist = 2400001 // 閿�鍞満浼氱姸鎬佸凡瀛樺湪
+ StatusNotExist = 2400002 // 閿�鍞満浼氱姸鎬佷笉瀛樺湪
+ StatusListErr = 2400003 // 鑾峰彇閿�鍞満浼氱姸鎬佸垪琛ㄥけ璐�
+ StatusSetErr = 2400004 // 璁剧疆閿�鍞満浼氱姸鎬佸け璐�
+ StatusUpdateErr = 2400005 // 鏇存柊閿�鍞満浼氱姸鎬佸け璐�
+ StatusDeleteErr = 2400006 // 鍒犻櫎閿�鍞満浼氱姸鎬佸け璐�
+
+ QuotationExist = 2500001 // 鎶ヤ环鍗曞凡瀛樺湪
+ QuotationNotExist = 2500002 // 鎶ヤ环鍗曚笉瀛樺湪
+ QuotationListErr = 2500003 // 鑾峰彇鎶ヤ环鍗曞垪琛ㄥけ璐�
+ QuotationSetErr = 2500004 // 璁剧疆鎶ヤ环鍗曞け璐�
+ QuotationUpdateErr = 2500005 // 鏇存柊鎶ヤ环鍗曞け璐�
+ QuotationDeleteErr = 2500006 // 鍒犻櫎鎶ヤ环鍗曞け璐�
+
+ MasterOrderExist = 2600001 // 涓昏鍗曞凡瀛樺湪
+ MasterOrderNotExist = 2600002 // 涓昏鍗曚笉瀛樺湪
+ MasterOrderListErr = 2600003 // 鑾峰彇涓昏鍗曞垪琛ㄥけ璐�
+ MasterOrderSetErr = 2600004 // 璁剧疆涓昏鍗曞け璐�
+ MasterOrderUpdateErr = 2600005 // 鏇存柊涓昏鍗曞け璐�
+ MasterOrderDeleteErr = 2600006 // 鍒犻櫎涓昏鍗曞け璐�
+
+ SubOrderExist = 2700001 // 瀛愯鍗曞凡瀛樺湪
+ SubOrderNotExist = 2700002 // 瀛愯鍗曚笉瀛樺湪
+ SubOrderListErr = 2700003 // 鑾峰彇瀛愯鍗曞垪琛ㄥけ璐�
+ SubOrderSetErr = 2700004 // 璁剧疆瀛愯鍗曞け璐�
+ SubOrderUpdateErr = 2700005 // 鏇存柊瀛愯鍗曞け璐�
+ SubOrderDeleteErr = 2700006 // 鍒犻櫎瀛愯鍗曞け璐�
+
+ SalesDetailsExist = 2800001 // 閿�鍞槑缁嗗凡瀛樺湪
+ SalesDetailsNotExist = 2800002 // 閿�鍞槑缁嗕笉瀛樺湪
+ SalesDetailsListErr = 2800003 // 鑾峰彇閿�鍞槑缁嗗垪琛ㄥけ璐�
+ SalesDetailsSetErr = 2800004 // 璁剧疆閿�鍞槑缁嗗け璐�
+ SalesDetailsUpdateErr = 2800005 // 鏇存柊閿�鍞槑缁嗗け璐�
+ SalesDetailsDeleteErr = 2800006 // 鍒犻櫎閿�鍞槑缁嗗け璐�
+
+ SalesReturnExist = 2900001 // 閿�鍞��璐у崟宸插瓨鍦�
+ SalesReturnNotExist = 2900002 // 閿�鍞��璐у崟涓嶅瓨鍦�
+ SalesReturnListErr = 2900003 // 鑾峰彇閿�鍞��璐у崟鍒楄〃澶辫触
+ SalesReturnSetErr = 2900004 // 璁剧疆閿�鍞��璐у崟澶辫触
+ SalesReturnUpdateErr = 2900005 // 鏇存柊閿�鍞��璐у崟澶辫触
+ SalesReturnDeleteErr = 2900006 // 鍒犻櫎閿�鍞��璐у崟澶辫触
+
+ SalesRefundExist = 3000001 // 閿�鍞��娆惧崟宸插瓨鍦�
+ SalesRefundNotExist = 3000002 // 閿�鍞��娆惧崟涓嶅瓨鍦�
+ SalesRefundListErr = 3000003 // 鑾峰彇閿�鍞��娆惧崟鍒楄〃澶辫触
+ SalesRefundSetErr = 3000004 // 璁剧疆閿�鍞��娆惧崟澶辫触
+ SalesRefundUpdateErr = 3000005 // 鏇存柊閿�鍞��娆惧崟澶辫触
+ SalesRefundDeleteErr = 3000006 // 鍒犻櫎閿�鍞��娆惧崟澶辫触
+
+ ContractExist = 3100001 // 鍚堝悓宸插瓨鍦�
+ ContractNotExist = 3100002 // 鍚堝悓涓嶅瓨鍦�
+ ContractListErr = 3100003 // 鑾峰彇鍚堝悓鍒楄〃澶辫触
+ ContractSetErr = 3100004 // 璁剧疆鍚堝悓澶辫触
+ ContractUpdateErr = 3100005 // 鏇存柊鍚堝悓澶辫触
+ ContractDeleteErr = 3100006 // 鍒犻櫎鍚堝悓澶辫触
+
+ PlanExist = 3200001 // 璁″垝宸插瓨鍦�
+ PlanNotExist = 3200002 // 璁″垝涓嶅瓨鍦�
+ PlanListErr = 3200003 // 鑾峰彇璁″垝鍒楄〃澶辫触
+ PlanSetErr = 3200004 // 璁剧疆璁″垝澶辫触
+ PlanUpdateErr = 3200005 // 鏇存柊璁″垝澶辫触
+ PlanDeleteErr = 3200006 // 鍒犻櫎璁″垝澶辫触
+
+ SContractExist = 3300001 // 鏈嶅姟鍚堝悓宸插瓨鍦�
+ SContractNotExist = 3300002 // 鏈嶅姟鍚堝悓涓嶅瓨鍦�
+ SContractListErr = 3300003 // 鑾峰彇鏈嶅姟鍚堝悓鍒楄〃澶辫触
+ SContractSetErr = 3300004 // 璁剧疆鏈嶅姟鍚堝悓澶辫触
+ SContractUpdateErr = 3300005 // 鏇存柊鏈嶅姟鍚堝悓澶辫触
+ SContractDeleteErr = 3300006 // 鍒犻櫎鏈嶅姟鍚堝悓澶辫触
+
+ OrderManageExist = 3400001 // 璁㈠崟绠$悊宸插瓨鍦�
+ OrderManageNotExist = 3400002 // 璁㈠崟绠$悊涓嶅瓨鍦�
+ OrderManageListErr = 3400003 // 鑾峰彇璁㈠崟绠$悊鍒楄〃澶辫触
+ OrderManageSetErr = 3400004 // 璁剧疆璁㈠崟绠$悊澶辫触
+ OrderManageUpdateErr = 3400005 // 鏇存柊璁㈠崟绠$悊澶辫触
+ OrderManageDeleteErr = 3400006 // 鍒犻櫎璁㈠崟绠$悊澶辫触
+
+ ServiceFollowupExist = 3500001 // 鏈嶅姟璺熻繘宸插瓨鍦�
+ ServiceFollowupNotExist = 3500002 // 鏈嶅姟璺熻繘涓嶅瓨鍦�
+ ServiceFollowupListErr = 3500003 // 鑾峰彇鏈嶅姟璺熻繘鍒楄〃澶辫触
+ ServiceFollowupSetErr = 3500004 // 璁剧疆鏈嶅姟璺熻繘澶辫触
+ ServiceFollowupUpdateErr = 3500005 // 鏇存柊鏈嶅姟璺熻繘澶辫触
+ ServiceFollowupDeleteErr = 3500006 // 鍒犻櫎鏈嶅姟璺熻繘澶辫触
+
+ CustomerServiceSheetExist = 3600001 // 瀹㈡湇鍗曞凡瀛樺湪
+ CustomerServiceSheetNotExist = 3600002 // 瀹㈡湇鍗曚笉瀛樺湪
+ CustomerServiceSheetListErr = 3600003 // 鑾峰彇瀹㈡湇鍗曞垪琛ㄥけ璐�
+ CustomerServiceSheetSetErr = 3600004 // 璁剧疆瀹㈡湇鍗曞け璐�
+ CustomerServiceSheetUpdateErr = 3600005 // 鏇存柊瀹㈡湇鍗曞け璐�
+ CustomerServiceSheetDeleteErr = 3600006 // 鍒犻櫎瀹㈡湇鍗曞け璐�
+
+ ServiceFeeManageExist = 3700001 // 鏈嶅姟璐圭鐞嗗凡瀛樺湪
+ ServiceFeeManageNotExist = 3700002 // 鏈嶅姟璐圭鐞嗕笉瀛樺湪
+ ServiceFeeManageListErr = 3700003 // 鑾峰彇鏈嶅姟璐圭鐞嗗垪琛ㄥけ璐�
+ ServiceFeeManageSetErr = 3700004 // 璁剧疆鏈嶅姟璐圭鐞嗗け璐�
+ ServiceFeeManageUpdateErr = 3700005 // 鏇存柊鏈嶅姟璐圭鐞嗗け璐�
+ ServiceFeeManageDeleteErr = 3700006 // 鍒犻櫎鏈嶅姟璐圭鐞嗗け璐�
+
+ RoleExist = 3800001 // 瑙掕壊宸插瓨鍦�
+ RoleNotExist = 3800002 // 瑙掕壊涓嶅瓨鍦�
+ RoleListErr = 3800003 // 鑾峰彇瑙掕壊鍒楄〃澶辫触
+ RoleSetErr = 3800004 // 璁剧疆瑙掕壊澶辫触
+ RoleUpdateErr = 3800005 // 鏇存柊瑙掕壊澶辫触
+ RoleDeleteErr = 3800006 // 鍒犻櫎瑙掕壊澶辫触
+ RoleDeleteErr1 = 3800007 // 璇ヨ鑹蹭笅瀛樺湪鐢ㄦ埛锛屾棤娉曞垹闄�
+
+ MenuListErr = 3900001 // 鑾峰彇鑿滃崟鍒楄〃澶辫触
+ SetMenuAuthorityErr = 3900002 // 璁剧疆鑿滃崟鏉冮檺澶辫触
+
+ DepartmentExist = 4000001 // 閮ㄩ棬宸插瓨鍦�
+ DepartmentNotExist = 4000002 // 閮ㄩ棬涓嶅瓨鍦�
+ DepartmentListErr = 4000003 // 鑾峰彇閮ㄩ棬鍒楄〃澶辫触
+ DepartmentSetErr = 4000004 // 璁剧疆閮ㄩ棬澶辫触
+ DepartmentUpdateErr = 4000005 // 鏇存柊閮ㄩ棬澶辫触
+ DepartmentDeleteErr = 4000006 // 鍒犻櫎閮ㄩ棬澶辫触
+ DepartmentDeleteErr1 = 4000007 // 璇ラ儴闂ㄤ笅瀛樺湪鐢ㄦ埛锛屾棤娉曞垹闄�
+
+ VettingExist = 4100001 // 瀹℃壒宸插瓨鍦�
+ VettingNotExist = 4100002 // 瀹℃壒涓嶅瓨鍦�
+ VettingListErr = 4100003 // 鑾峰彇瀹℃壒鍒楄〃澶辫触
+ VettingSetErr = 4100004 // 璁剧疆瀹℃壒澶辫触
+ VettingNotBelongToUser = 4100005 // 瀹℃壒涓嶅睘浜庡綋鍓嶇敤鎴�
+
+ SatisfactionExist = 4200001 // 婊℃剰搴﹀凡瀛樺湪
+ SatisfactionNotExist = 4200002 // 婊℃剰搴︿笉瀛樺湪
+ SatisfactionListErr = 4200003 // 鑾峰彇婊℃剰搴﹀垪琛ㄥけ璐�
+ SatisfactionSetErr = 4200004 // 璁剧疆婊℃剰搴﹀け璐�
+ SatisfactionUpdateErr = 4200005 // 鏇存柊婊℃剰搴﹀け璐�
+
+ TimelyRateExist = 4300001 // 鍙婃椂鐜囧凡瀛樺湪
+ TimelyRateNotExist = 4300002 // 鍙婃椂鐜囦笉瀛樺湪
+ TimelyRateListErr = 4300003 // 鑾峰彇鍙婃椂鐜囧垪琛ㄥけ璐�
+ TimelyRateSetErr = 4300004 // 璁剧疆鍙婃椂鐜囧け璐�
+ TimelyRateUpdateErr = 4300005 // 鏇存柊鍙婃椂鐜囧け璐�
+
+ SolveRateExist = 4400001 // 瑙e喅鐜囧凡瀛樺湪
+ SolveRateNotExist = 4400002 // 瑙e喅鐜囦笉瀛樺湪
+ SolveRateListErr = 4400003 // 鑾峰彇瑙e喅鐜囧垪琛ㄥけ璐�
+ SolveRateSetErr = 4400004 // 璁剧疆瑙e喅鐜囧け璐�
+ SolveRateUpdateErr = 4400005 // 鏇存柊瑙e喅鐜囧け璐�
+
+ IsVisitExist = 4500001 // 鏈嶅姟浜哄憳鏄惁鏉ヨ繃宸插瓨鍦�
+ IsVisitNotExist = 4500002 // 鏈嶅姟浜哄憳鏄惁鏉ヨ繃涓嶅瓨鍦�
+ IsVisitListErr = 4500003 // 鑾峰彇鏈嶅姟浜哄憳鏄惁鏉ヨ繃鍒楄〃澶辫触
+ IsVisitSetErr = 4500004 // 璁剧疆鏈嶅姟浜哄憳鏄惁鏉ヨ繃澶辫触
+ IsVisitUpdateErr = 4500005 // 鏇存柊鏈嶅姟浜哄憳鏄惁鏉ヨ繃澶辫触
+
+ ReportSourceExist = 4600001 // 鎶ヨ〃鏉ユ簮宸插瓨鍦�
+ ReportSourceNotExist = 4600002 // 鎶ヨ〃鏉ユ簮涓嶅瓨鍦�
+ ReportSourceListErr = 4600003 // 鑾峰彇鎶ヨ〃鏉ユ簮鍒楄〃澶辫触
+ ReportSourceSetErr = 4600004 // 璁剧疆鎶ヨ〃鏉ユ簮澶辫触
+ ReportSourceUpdateErr = 4600005 // 鏇存柊鎶ヨ〃鏉ユ簮澶辫触
+
+ OrderTypeExist = 4700001 // 宸ュ崟绫诲瀷宸插瓨鍦�
+ OrderTypeNotExist = 4700002 // 宸ュ崟绫诲瀷涓嶅瓨鍦�
+ OrderTypeListErr = 4700003 // 鑾峰彇宸ュ崟绫诲瀷鍒楄〃澶辫触
+ OrderTypeSetErr = 4700004 // 璁剧疆宸ュ崟绫诲瀷澶辫触
+ OrderTypeUpdateErr = 4700005 // 鏇存柊宸ュ崟绫诲瀷澶辫触
+
+ ServiceContractStatusExist = 4800001 // 鏈嶅姟鍚堝悓鐘舵�佸凡瀛樺湪
+ ServiceContractStatusNotExist = 4400002 // 鏈嶅姟鍚堝悓鐘舵�佷笉瀛樺湪
+ ServiceContractStatusListErr = 4800003 // 鑾峰彇鏈嶅姟鍚堝悓鐘舵�佸垪琛ㄥけ璐�
+ ServiceContractStatusSetErr = 4800004 // 璁剧疆鏈嶅姟鍚堝悓鐘舵�佸け璐�
+ ServiceContractStatusUpdateErr = 4800005 // 鏇存柊鏈嶅姟鍚堝悓鐘舵�佸け璐�
+
+ ServiceContractTypeExist = 4900001 // 鏈嶅姟鍚堝悓绫诲瀷宸插瓨鍦�
+ ServiceContractTypeNotExist = 4900002 // 鏈嶅姟鍚堝悓绫诲瀷涓嶅瓨鍦�
+ ServiceContractTypeListErr = 4900003 // 鑾峰彇鏈嶅姟鍚堝悓绫诲瀷鍒楄〃澶辫触
+ ServiceContractTypeSetErr = 4900004 // 璁剧疆鏈嶅姟鍚堝悓绫诲瀷澶辫触
+ ServiceContractTypeUpdateErr = 4900005 // 鏇存柊鏈嶅姟鍚堝悓绫诲瀷澶辫触
+
+ RefundMethodExist = 5000001 // 閫�娆炬柟寮忓凡瀛樺湪
+ RefundMethodNotExist = 5000002 // 閫�娆炬柟寮忎笉瀛樺湪
+ RefundMethodListErr = 5000003 // 鑾峰彇閫�娆炬柟寮忓垪琛ㄥけ璐�
+ RefundMethodSetErr = 5000004 // 璁剧疆閫�娆炬柟寮忓け璐�
+ RefundMethodUpdateErr = 5000005 // 鏇存柊閫�娆炬柟寮忓け璐�
+
+ IsInvoiceExist = 5100001 // 鏄惁寮�绁ㄥ凡瀛樺湪
+ IsInvoiceNotExist = 5100002 // 鏄惁寮�绁ㄤ笉瀛樺湪
+ IsInvoiceListErr = 5100003 // 鑾峰彇鏄惁寮�绁ㄥ垪琛ㄥけ璐�
+ IsInvoiceSetErr = 5100004 // 璁剧疆鏄惁寮�绁ㄥけ璐�
+ IsInvoiceUpdateErr = 5100005 // 鏇存柊鏄惁寮�绁ㄥけ璐�
+
+ AccountIdExist = 5200001 // 璐︽埛宸插瓨鍦�
+ AccountIdNotExist = 5200002 // 璐︽埛涓嶅瓨鍦�
+ AccountIdListErr = 5200003 // 鑾峰彇璐︽埛鍒楄〃澶辫触
+ AccountIdSetErr = 5200004 // 璁剧疆璐︽埛澶辫触
+ AccountIdUpdateErr = 5200005 // 鏇存柊璐︽埛澶辫触
+
+ SalesReturnStatusExist = 5300001 // 閫�璐у崟鐘舵�佸凡瀛樺湪
+ SalesReturnStatusNotExist = 5300002 // 閫�璐у崟鐘舵�佷笉瀛樺湪
+ SalesReturnStatusListErr = 5300003 // 鑾峰彇閫�璐у崟鐘舵�佸垪琛ㄥけ璐�
+ SalesReturnStatusSetErr = 5300004 // 璁剧疆閫�璐у崟鐘舵�佸け璐�
+ SalesReturnStatusUpdateErr = 5300005 // 鏇存柊閫�璐у崟鐘舵�佸け璐�
+
+ RepositoryExist = 5400001 // 閫�璐т粨搴撳凡瀛樺湪
+ RepositoryNotExist = 5400002 // 閫�璐т粨搴撲笉瀛樺湪
+ RepositoryListErr = 5400003 // 鑾峰彇閫�璐т粨搴撳垪琛ㄥけ璐�
+ RepositorySetErr = 5400004 // 璁剧疆閫�璐т粨搴撳け璐�
+ RepositoryUpdateErr = 5400005 // 鏇存柊閫�璐т粨搴撳け璐�
+
+ QuotationStatusExist = 5500001 // 鎶ヤ环鍗曠姸鎬佸凡瀛樺湪
+ QuotationStatusNotExist = 5500002 // 鎶ヤ环鍗曠姸鎬佷笉瀛樺湪
+ QuotationStatusListErr = 5500003 // 鑾峰彇鎶ヤ环鍗曠姸鎬佸垪琛ㄥけ璐�
+ QuotationStatusSetErr = 5500004 // 璁剧疆鎶ヤ环鍗曠姸鎬佸け璐�
+ QuotationStatusUpdateErr = 5500005 // 鏇存柊鎶ヤ环鍗曠姸鎬佸け璐�
+
+ CurrencyExist = 5600001 // 甯佺宸插瓨鍦�
+ CurrencyNotExist = 5600002 // 甯佺涓嶅瓨鍦�
+ CurrencyListErr = 5600003 // 鑾峰彇甯佺鍒楄〃澶辫触
+ CurrencySetErr = 5600004 // 璁剧疆甯佺澶辫触
+ CurrencyUpdateErr = 5600005 // 鏇存柊甯佺澶辫触
+
+ AssignErr = 5700001 // 鍒嗛厤澶辫触
+ AssignWrongMemberId = 5700002 // 鍒嗛厤澶辫触锛屽垎閰嶄汉涓虹┖
+ AssignWrongId = 5700003 // 鍒嗛厤澶辫触锛屽垎閰嶅璞′负绌�
+ AssignWrongModelType = 5700004 // 鍒嗛厤澶辫触锛屽垎閰嶅璞$被鍨嬩负绌�
+
+)
diff --git a/router/salesLeads.go b/router/salesLeads.go
index 252764c..d7ee1cb 100644
--- a/router/salesLeads.go
+++ b/router/salesLeads.go
@@ -1,19 +1,20 @@
-package router
-
-import (
- v1 "aps_crm/api/v1"
- "github.com/gin-gonic/gin"
-)
-
-type SalesLeadsRouter struct{}
-
-func (s *SalesLeadsRouter) InitSalesLeadsRouter(router *gin.RouterGroup) {
- salesLeadsRouter := router.Group("salesLeads")
- salesLeadsApi := v1.ApiGroup.SalesLeadsApi
- {
- salesLeadsRouter.POST("add", salesLeadsApi.Add) // 娣诲姞閿�鍞嚎绱�
- salesLeadsRouter.DELETE("delete", salesLeadsApi.Delete) // 鍒犻櫎閿�鍞嚎绱�
- salesLeadsRouter.PUT("update", salesLeadsApi.Update) // 鏇存柊閿�鍞嚎绱�
- salesLeadsRouter.POST("list", salesLeadsApi.List) // 鑾峰彇閿�鍞嚎绱㈠垪琛�
- }
-}
\ No newline at end of file
+package router
+
+import (
+ v1 "aps_crm/api/v1"
+ "github.com/gin-gonic/gin"
+)
+
+type SalesLeadsRouter struct{}
+
+func (s *SalesLeadsRouter) InitSalesLeadsRouter(router *gin.RouterGroup) {
+ salesLeadsRouter := router.Group("salesLeads")
+ salesLeadsApi := v1.ApiGroup.SalesLeadsApi
+ {
+ salesLeadsRouter.POST("add", salesLeadsApi.Add) // 娣诲姞閿�鍞嚎绱�
+ salesLeadsRouter.DELETE("delete", salesLeadsApi.Delete) // 鍒犻櫎閿�鍞嚎绱�
+ salesLeadsRouter.PUT("update", salesLeadsApi.Update) // 鏇存柊閿�鍞嚎绱�
+ salesLeadsRouter.POST("list", salesLeadsApi.List) // 鑾峰彇閿�鍞嚎绱㈠垪琛�
+ salesLeadsRouter.POST("push", salesLeadsApi.Push) // 鎺ㄨ繘閿�鍞嚎绱�
+ }
+}
diff --git a/service/salesLeads.go b/service/salesLeads.go
index fc960e3..f43236b 100644
--- a/service/salesLeads.go
+++ b/service/salesLeads.go
@@ -1,76 +1,108 @@
-package service
-
-import (
- "aps_crm/model"
- "aps_crm/pkg/ecode"
-)
-
-type SalesLeadsService struct{}
-
-func (SalesLeadsService) AddSalesLeads(salesLeads *model.SalesLeads) int {
- err := model.NewSalesLeadsSearch(nil).Create(salesLeads)
- if err != nil {
- return ecode.SalesLeadsExist
- }
- return ecode.OK
-}
-
-func (SalesLeadsService) UpdateSalesLeads(salesLeads *model.SalesLeads) int {
- // update salesLeads
- err := model.NewSalesLeadsSearch(nil).SetId(salesLeads.Id).Update(salesLeads)
- if err != nil {
- return ecode.SalesLeadsUpdateErr
- }
-
- return ecode.OK
-}
-
-// CheckSalesLeadsExist check salesLeads exist
-func CheckSalesLeadsExist(id int) int {
- tmp, err := model.NewSalesLeadsSearch(nil).SetId(id).Find()
- if err != nil {
- return ecode.SalesLeadsNotExist
- }
-
- if len(tmp) == 0 {
- return ecode.SalesLeadsNotExist
- }
-
- return ecode.OK
-}
-
-func (SalesLeadsService) GetSalesLeadsList(page, pageSize int, keyword string) ([]*model.SalesLeads, int64, int) {
- // get contact list
- contacts, total, err := model.NewSalesLeadsSearch(nil).SetKeyword(keyword).SetPage(page, pageSize).FindAll()
- if err != nil {
- return nil, 0, ecode.SalesLeadsListErr
- }
- return contacts, total, ecode.OK
-}
-
-func (SalesLeadsService) Assign(ids []int, memberId int) int {
- // check salesLeads exist
- //errCode := CheckSalesLeadsExist(id)
- //if errCode != ecode.OK {
- // return errCode
- //}
-
- // update salesLeads
- err := model.NewSalesLeadsSearch(nil).SetIds(ids).UpdateMap(map[string]interface{}{
- "member_id": memberId,
- })
- if err != nil {
- return ecode.SalesLeadsUpdateErr
- }
-
- return ecode.OK
-}
-
-func (SalesLeadsService) DeleteSalesLeads(ids []int) int {
- // delete client
- err := model.NewSalesLeadsSearch(nil).SetIds(ids).Delete()
- if err != nil {
- return ecode.SalesLeadsDeleteErr
- }
- return ecode.OK
-}
+package service
+
+import (
+ "aps_crm/constvar"
+ "aps_crm/model"
+ "aps_crm/pkg/ecode"
+)
+
+type SalesLeadsService struct{}
+
+func (SalesLeadsService) AddSalesLeads(salesLeads *model.SalesLeads) int {
+ err := model.NewSalesLeadsSearch(nil).Create(salesLeads)
+ if err != nil {
+ return ecode.SalesLeadsExist
+ }
+ return ecode.OK
+}
+
+func (SalesLeadsService) UpdateSalesLeads(salesLeads *model.SalesLeads) int {
+ // update salesLeads
+ err := model.NewSalesLeadsSearch(nil).SetId(salesLeads.Id).Update(salesLeads)
+ if err != nil {
+ return ecode.SalesLeadsUpdateErr
+ }
+
+ return ecode.OK
+}
+
+// CheckSalesLeadsExist check salesLeads exist
+func CheckSalesLeadsExist(id int) int {
+ tmp, err := model.NewSalesLeadsSearch(nil).SetId(id).Find()
+ if err != nil {
+ return ecode.SalesLeadsNotExist
+ }
+
+ if len(tmp) == 0 {
+ return ecode.SalesLeadsNotExist
+ }
+
+ return ecode.OK
+}
+
+func (SalesLeadsService) GetSalesLeadsList(page, pageSize int, keyword string) ([]*model.SalesLeads, int64, int) {
+ // get contact list
+ contacts, total, err := model.NewSalesLeadsSearch(nil).SetKeyword(keyword).SetPage(page, pageSize).FindAll()
+ if err != nil {
+ return nil, 0, ecode.SalesLeadsListErr
+ }
+ return contacts, total, ecode.OK
+}
+
+func (SalesLeadsService) Assign(ids []int, memberId int) int {
+ // check salesLeads exist
+ //errCode := CheckSalesLeadsExist(id)
+ //if errCode != ecode.OK {
+ // return errCode
+ //}
+
+ // update salesLeads
+ err := model.NewSalesLeadsSearch(nil).SetIds(ids).UpdateMap(map[string]interface{}{
+ "member_id": memberId,
+ })
+ if err != nil {
+ return ecode.SalesLeadsUpdateErr
+ }
+
+ return ecode.OK
+}
+
+func (SalesLeadsService) DeleteSalesLeads(ids []int) int {
+ // delete client
+ err := model.NewSalesLeadsSearch(nil).SetIds(ids).Delete()
+ if err != nil {
+ return ecode.SalesLeadsDeleteErr
+ }
+ return ecode.OK
+}
+
+func (SalesLeadsService) PushSalesLeads(id int, step constvar.SalesStatus, txt string) int {
+ // check salesLeads exist
+ errCode := CheckSalesLeadsExist(id)
+ if errCode != ecode.OK {
+ return errCode
+ }
+
+ switch step {
+ case constvar.SalesStatusFail:
+ err := model.NewSalesLeadsSearch(nil).SetId(id).UpdateMap(map[string]interface{}{
+ "sales_status": constvar.SalesStatusFail,
+ "reason": txt,
+ })
+ if err != nil {
+ return ecode.SalesLeadsUpdateErr
+ }
+ case constvar.SalesStatusIng:
+ err := model.NewSalesLeadsSearch(nil).SetId(id).UpdateMap(map[string]interface{}{
+ "sales_status": constvar.SalesStatusIng,
+ })
+ if err != nil {
+ return ecode.SalesLeadsUpdateErr
+ }
+ return ecode.OK
+ default:
+ return ecode.SalesLeadsStatusErr
+ }
+
+ return ecode.OK
+}
--
Gitblit v1.8.0