wangxingcheng 3 жил өмнө
parent
commit
399b84ecfe

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

@@ -37,6 +37,7 @@ type custCustomerColumns struct {
 	CustLocation string // 所在地区
 	CustAddress  string // 详细地址
 	CustStatus   string // 客户状态(10正常20)
+	CustSource   string // 客户来源
 	IsPublic     string // 公海客户(10是20否)
 	DeptId       string // 所属部门ID
 	DeptName     string // 所属部门
@@ -68,6 +69,7 @@ var (
 			AbbrName:     "abbr_name",
 			CustLocation: "cust_location",
 			CustAddress:  "cust_address",
+			CustSource:   "cust_source",
 			CustStatus:   "cust_status",
 			IsPublic:     "is_public",
 			DeptId:       "dept_id",
@@ -103,6 +105,7 @@ func NewCustCustomerDao(tenant string) CustCustomerDao {
 			CustLevel:    "cust_level",
 			CustAddress:  "cust_address",
 			CustStatus:   "cust_status",
+			CustSource:   "cust_source",
 			IsPublic:     "is_public",
 			DeptId:       "dept_id",
 			DeptName:     "dept_name",

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

@@ -56,6 +56,7 @@ type Customer struct {
 	FollowUpDate *gtime.Time `p:"followUpDate"     json:"followUpDate"   `                    //跟进时间
 	CustIndustry string      `p:"custIndustry"     json:"custIndustry" v:"required#客户行业不能为空"` //客户行业
 	CustLevel    string      `p:"custLevel"     json:"custLevel"       v:"required#客户级别不能为空"` //客户级别
+	CustSource   string      `p:"custSource"     json:"source"       v:"required#客户来源不能为空"`   //客户级别
 	CustDistCode int         `p:"custDistCode" json:"custDistCode"  v:"required#省份不能为空" `     // 省份Id
 	Remark       string      `p:"remark" json:"remark""`                                      //备注
 	SalesName    string      `p:"salesName"       json:"salesName"   `                        //
@@ -84,6 +85,7 @@ type CustList struct {
 	FollowUpDate string `orm:"follow_up_date" json:"followUpDate"` // 最后跟进时间
 	CustIndustry string `orm:"cust_industry"  json:"custIndustry"` // 客户行业
 	CustLevel    string `orm:"cust_level"     json:"custLevel"`    // 客户级别(10 重点客户 20 普通客户 30非优客户)
+	CustSource   string `orm:"cust_soucrce"    json:"source"`      // 客户来源
 	CreatedName  string `orm:"created_name"   json:"createdName"`  // 创建人
 	CreatedTime  string `orm:"created_time"   json:"createdTime"`  // 创建时间
 	SalesId      int    `orm:"sales_id"   json:"salesId"`          //

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

@@ -19,6 +19,7 @@ type CustCustomer struct {
 	CustAddress  string      `orm:"cust_address"   json:"custAddress"`     // 详细地址
 	CustIndustry string      `orm:"cust_industry"   json:"custIndustry"`   //客户行业
 	CustLevel    string      `orm:"cust_level"   json:"custLevel"`         //客户级别(10 重点客户 20 普通客户 30非优客户)
+	CustSource   string      `orm:"cust_source"   json:"source"`           //客户来源
 	CustStatus   string      `orm:"cust_status"    json:"custStatus"`      // 客户状态(10正常20)
 	IsPublic     string      `orm:"is_public"      json:"isPublic"`        // 公海客户(10是20否)
 	DeptId       int         `orm:"dept_id"        json:"deptId"`          // 所属部门ID

+ 3 - 1
opms_parent/app/service/cust/cust_customer.go

@@ -135,6 +135,7 @@ func (c *CustomerService) Create(req *model.Customer) (insertId int64, err error
 		err = gerror.New("该客户信息已存在,不可重复添加")
 		return
 	}
+	g.Log().Info("recordreq----", req.CustSource)
 	if err = gconv.Struct(req, cusTomer); err != nil {
 		return
 	}
@@ -166,12 +167,13 @@ func (c *CustomerService) Create(req *model.Customer) (insertId int64, err error
 			if err != nil {
 				g.Log().Error(err)
 				err = gerror.New("创建失败")
-				
+
 			}
 		}
 
 	}
 	cusTomer.IsPublic = isPublic
+
 	res, err := Model.Insert(cusTomer)
 	if err != nil {
 		g.Log().Error(err)