Browse Source

Merge branch 'region_type' into debug

# Conflicts:
#	controllers/company.go
zwxi 1 year ago
parent
commit
61cf6efb58
2 changed files with 13 additions and 0 deletions
  1. 7 0
      controllers/company.go
  2. 6 0
      controllers/english_report/english_company.go

+ 7 - 0
controllers/company.go

@@ -462,6 +462,7 @@ func (this *CompanyController) List() {
 	address := this.GetString("Address")
 	province := this.GetString("Province")
 	city := this.GetString("City")
+	regionType := this.GetString("RegionType")
 	keyWord = strings.Trim(keyWord, " ")
 	keyWord = strings.Replace(keyWord, "'", "", -1)
 	todoStatus := this.GetString("TodoStatus")      //任务状态
@@ -580,6 +581,12 @@ func (this *CompanyController) List() {
 		citySql = strings.TrimRight(citySql, ",")
 		condition += ` AND a.city IN (` + citySql + `) `
 	}
+	
+	if regionType != "" {
+		condition += ` AND a.region_type =? `
+		pars = append(pars, regionType)
+	}
+	
 	//是否签约过
 
 	if isSigning == 0 || isSigning == 1 {

+ 6 - 0
controllers/english_report/english_company.go

@@ -58,6 +58,7 @@ func (this *EnglishCompanyController) List() {
 	sortType, _ := this.GetInt("SortType", 0)
 	sortParam := this.GetString("SortParam", "")
 	strPermissionIds := this.GetString("EnPermissionIds", "")
+	sellers := this.GetString("Sellers", "")
 
 	var cond, order string
 	var pars []interface{}
@@ -84,6 +85,11 @@ func (this *EnglishCompanyController) List() {
 		cond += fmt.Sprintf(` AND c.company_id IN (%s) `, utils.GetOrmInReplace(len(companyIds)))
 		pars = append(pars, companyIds)
 	}
+
+	if sellers != "" {
+		cond += fmt.Sprintf(` AND c.seller_id IN (%s) `, utils.GetOrmInReplace(len(sellers)))
+		pars = append(pars, sellers)
+	}
 	// 品种权限
 	if strPermissionIds != "" {
 		permissionIdArr := strings.Split(strPermissionIds, ",")