浏览代码

feature: 清理客户表字段

liuyaqi 2 年之前
父节点
当前提交
5e14eb5117

+ 0 - 6
opms_parent/app/dao/cust/internal/cust_customer.go

@@ -32,8 +32,6 @@ type custCustomerColumns struct {
 	CustCode       string // 客户编号
 	CustName       string // 客户名称
 	AbbrName       string // 助记名
-	CustDistCode   string // 客户所在省级ID
-	CustLocation   string // 所在地区
 	CustAddress    string // 详细地址
 	CustProvinceId string // 所在省ID
 	CustProvince   string // 所在省
@@ -73,8 +71,6 @@ var (
 			CustCode:       "cust_code",
 			CustName:       "cust_name",
 			AbbrName:       "abbr_name",
-			CustDistCode:   "cust_dist_code",
-			CustLocation:   "cust_location",
 			CustAddress:    "cust_address",
 			CustProvinceId: "cust_province_id",
 			CustProvince:   "cust_province",
@@ -116,8 +112,6 @@ func NewCustCustomerDao(tenant string) CustCustomerDao {
 			CustCode:       "cust_code",
 			CustName:       "cust_name",
 			AbbrName:       "abbr_name",
-			CustDistCode:   "cust_dist_code",
-			CustLocation:   "cust_location",
 			CustAddress:    "cust_address",
 			CustProvinceId: "cust_province_id",
 			CustProvince:   "cust_province",

+ 0 - 2
opms_parent/app/model/cust/internal/cust_customer.go

@@ -14,8 +14,6 @@ type CustCustomer struct {
 	CustCode       string      `orm:"cust_code"        json:"custCode"`       // 客户编号
 	CustName       string      `orm:"cust_name"        json:"custName"`       // 客户名称
 	AbbrName       string      `orm:"abbr_name"        json:"abbrName"`       // 助记名
-	CustDistCode   int         `orm:"cust_dist_code"   json:"custDistCode"`   // 客户所在省级ID
-	CustLocation   string      `orm:"cust_location"    json:"custLocation"`   // 所在地区
 	CustAddress    string      `orm:"cust_address"     json:"custAddress"`    // 详细地址
 	CustProvinceId int         `orm:"cust_province_id" json:"custProvinceId"` // 所在省ID
 	CustProvince   string      `orm:"cust_province"    json:"custProvince"`   // 所在省

+ 3 - 3
opms_parent/app/service/contract/ctr_contract_test.go

@@ -42,15 +42,15 @@ func TestContractApplyApproval(t *testing.T) {
 	ctx := fakeCtx(context.Background(), testTenant)
 
 	instance := modelWorkflow.PlatWorkflow{}
-	err := g.DB(testTenant).Table("plat_workflow").Where("id = ?", 47).Struct(&instance)
+	err := g.DB(testTenant).Table("plat_workflow").Where("id = ?", 85).Struct(&instance)
 	if err != nil {
 		panic(err)
 	}
 	err = ContractApplyApproval(ctx, &instance, &message.MixMessage{
 		ProcessType: "finish",
 		// ProcessType: "terminate",
-		// Result: "agree",
-		Result: "refuse",
+		Result: "agree",
+		// Result: "refuse",
 	})
 	if err != nil {
 		panic(err)

+ 3 - 3
opms_parent/schema/customer.sql

@@ -3,8 +3,8 @@ CREATE TABLE `cust_customer` (
     `cust_code` varchar(32) NOT NULL COMMENT '客户编号',
     `cust_name` varchar(90) NOT NULL COMMENT '客户名称',
     `abbr_name` varchar(90) NOT NULL COMMENT '助记名',
-    `cust_dist_code` int(11) NOT NULL COMMENT ' 客户所在省级ID',
-    `cust_location` varchar(32) DEFAULT NULL COMMENT '所在地区',
+    -- `cust_dist_code` int(11) NOT NULL COMMENT ' 客户所在省级ID',
+    -- `cust_location` varchar(32) DEFAULT NULL COMMENT '所在地区',
     `cust_address` varchar(255) DEFAULT NULL COMMENT '详细地址',
     `cust_province_id` INT(11) COMMENT '所在省ID',
     `cust_province` VARCHAR(90) COMMENT '所在省',
@@ -32,4 +32,4 @@ CREATE TABLE `cust_customer` (
     `updated_time` datetime DEFAULT NULL COMMENT '更新时间',
     `deleted_time` datetime DEFAULT NULL COMMENT '删除时间',
     PRIMARY KEY (`id`)
-) ENGINE = InnoDB AUTO_INCREMENT = 118 DEFAULT CHARSET = utf8mb4 COMMENT = '客户信息'
+) ENGINE = InnoDB AUTO_INCREMENT = 118 DEFAULT CHARSET = utf8mb4 COMMENT = '客户信息'

+ 3 - 0
opms_parent/schema/tmp.sql

@@ -19,3 +19,6 @@ alter table ctr_contract  add `cust_city_id` INT(11) COMMENT '所在市ID' after
 alter table ctr_contract  add `cust_city` VARCHAR(90) COMMENT '所在市' after cust_city_id;
 
 alter table ctr_contract  add  `product_line` varchar(4) NOT NULL COMMENT '产品线' after cust_name;
+
+alter table cust_customer drop column  cust_dist_code;
+alter table cust_customer drop column  cust_location;