Browse Source

更新

master
huangjiajun 1 day ago
parent
commit
8c4c9709d0
6 changed files with 18 additions and 6 deletions
  1. +1
    -1
      src/super/dao/agent_bank_info_dao.go
  2. +1
    -1
      src/super/dao/agent_contact_info_dao.go
  3. +1
    -1
      src/super/dao/agent_list_dao.go
  4. +5
    -1
      src/super/implement/agent_bank_info_db.go
  5. +5
    -1
      src/super/implement/agent_contact_info_db.go
  6. +5
    -1
      src/super/implement/agent_list_implement.go

+ 1
- 1
src/super/dao/agent_bank_info_dao.go View File

@@ -4,7 +4,7 @@ import "code.fnuoos.com/zhimeng/model.git/src/super/model"

type AgentBankInfoDao interface {
GetAgentBankInfoList(agentId int) (medium *model.AgentBankInfo, err error)
FindAgentBankInfoList(uuid, name, state string, page, limit int) (list []AgentBankInfoGroup, total int64, err error)
FindAgentBankInfoList(uuid, name, agentId, state string, page, limit int) (list []AgentBankInfoGroup, total int64, err error)
}
type AgentBankInfoGroup struct {
model.AgentBankInfo `xorm:"extends"`


+ 1
- 1
src/super/dao/agent_contact_info_dao.go View File

@@ -4,7 +4,7 @@ import "code.fnuoos.com/zhimeng/model.git/src/super/model"

type AgentContactInfoDao interface {
GetAgentContactInfoList(agentId int) (medium *model.AgentContactInfo, err error)
FindAgentContactInfoList(uuid, name, state string, page, limit int) (list []AgentContactInfoGroup, total int64, err error)
FindAgentContactInfoList(uuid, name, agentId, state string, page, limit int) (list []AgentContactInfoGroup, total int64, err error)
}
type AgentContactInfoGroup struct {
model.AgentContactInfo `xorm:"extends"`


+ 1
- 1
src/super/dao/agent_list_dao.go View File

@@ -10,6 +10,6 @@ type AgentListDao interface {
GetAgentListBySession(session *xorm.Session, agentId int) (agent *model.AgentList, err error)
AgentListInsert(m *model.AgentList) (int64, error)
UpdateAgentList(m *model.AgentList, columns ...string) (int64, error)
FindAgentList(uuid, name, state string, minState, page, limit int) (list []model.AgentList, total int64, err error)
FindAgentList(uuid, name, agentId, state string, minState, page, limit int) (list []model.AgentList, total int64, err error)
FindAgentListBySettleType(uuid, agentId, settleType string, page, limit int) (list []model.AgentList, total int64, err error)
}

+ 5
- 1
src/super/implement/agent_bank_info_db.go View File

@@ -4,6 +4,7 @@ import (
"code.fnuoos.com/zhimeng/model.git/src/super/dao"
"code.fnuoos.com/zhimeng/model.git/src/super/model"
zhios_order_relate_logx "code.fnuoos.com/zhimeng/model.git/utils/logx"
"strings"
"xorm.io/xorm"
)

@@ -26,8 +27,11 @@ func (a AgentBankInfoDb) GetAgentBankInfoList(agentId int) (medium *model.AgentB
}
return medium, nil
}
func (a AgentBankInfoDb) FindAgentBankInfoList(uuid, name, state string, page, limit int) (list []dao.AgentBankInfoGroup, total int64, err error) {
func (a AgentBankInfoDb) FindAgentBankInfoList(uuid, name, agentId, state string, page, limit int) (list []dao.AgentBankInfoGroup, total int64, err error) {
sess := a.Db.Where("agent_bank_info.state>0").Desc("agent_bank_info.id").Limit(limit, (page-1)*limit)
if agentId != "" {
sess.In("agent_list.agent_id", strings.Split(agentId, ","))
}
if name != "" {
sess.And("agent_list.company_name like ?", "%"+name+"%")
}


+ 5
- 1
src/super/implement/agent_contact_info_db.go View File

@@ -4,6 +4,7 @@ import (
"code.fnuoos.com/zhimeng/model.git/src/super/dao"
"code.fnuoos.com/zhimeng/model.git/src/super/model"
zhios_order_relate_logx "code.fnuoos.com/zhimeng/model.git/utils/logx"
"strings"
"xorm.io/xorm"
)

@@ -26,8 +27,11 @@ func (a AgentContactInfoDb) GetAgentContactInfoList(agentId int) (medium *model.
}
return medium, nil
}
func (a AgentContactInfoDb) FindAgentContactInfoList(uuid, name, state string, page, limit int) (list []dao.AgentContactInfoGroup, total int64, err error) {
func (a AgentContactInfoDb) FindAgentContactInfoList(uuid, name, agentId, state string, page, limit int) (list []dao.AgentContactInfoGroup, total int64, err error) {
sess := a.Db.Where("agent_contact_info.state>0").Desc("agent_contact_info.id").Limit(limit, (page-1)*limit)
if agentId != "" {
sess.In("agent_list.agent_id", strings.Split(agentId, ","))
}
if name != "" {
sess.And("agent_list.company_name like ?", "%"+name+"%")
}


+ 5
- 1
src/super/implement/agent_list_implement.go View File

@@ -52,11 +52,15 @@ func (a AgentListDb) UpdateAgentList(m *model.AgentList, columns ...string) (int
}
return affected, nil
}
func (a AgentListDb) FindAgentList(uuid, name, state string, minState, page, limit int) (list []model.AgentList, total int64, err error) {
func (a AgentListDb) FindAgentList(uuid, name, agentId, state string, minState, page, limit int) (list []model.AgentList, total int64, err error) {
sess := a.Db.Desc("id").Limit(limit, (page-1)*limit)
if agentId != "" {
sess.In("agent_id", strings.Split(agentId, ","))
}
if name != "" {
sess.And("company_name like ?", "%"+name+"%")
}

if state != "" {
sess.And("state = ?", state)
}


Loading…
Cancel
Save