瀏覽代碼

更新

master
huangjiajun 1 月之前
父節點
當前提交
d86cf0dcee
共有 4 個文件被更改,包括 14 次插入6 次删除
  1. +1
    -1
      src/super/dao/medium_bank_info_dao.go
  2. +1
    -1
      src/super/dao/medium_contact_info_dao.go
  3. +6
    -2
      src/super/implement/medium_bank_info_db.go
  4. +6
    -2
      src/super/implement/medium_contact_info_db.go

+ 1
- 1
src/super/dao/medium_bank_info_dao.go 查看文件

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

type MediumBankInfoDao interface {
GetMediumBankInfoList(MediumId int) (medium *model.MediumBankInfo, err error)
FindMediumBankInfoList(uuid, name, state string, page, limit int) (list []MediumBankInfoGroup, total int64, err error)
FindMediumBankInfoList(uuid, name, mediumId, state string, page, limit int) (list []MediumBankInfoGroup, total int64, err error)
}
type MediumBankInfoGroup struct {
model.MediumBankInfo `xorm:"extends"`


+ 1
- 1
src/super/dao/medium_contact_info_dao.go 查看文件

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

type MediumContactInfoDao interface {
GetMediumContactInfoList(MediumId int) (medium *model.MediumContactInfo, err error)
FindMediumContactInfoList(uuid, name, state string, page, limit int) (list []MediumContactInfoGroup, total int64, err error)
FindMediumContactInfoList(uuid, name, mediumId, state string, page, limit int) (list []MediumContactInfoGroup, total int64, err error)
}
type MediumContactInfoGroup struct {
model.MediumContactInfo `xorm:"extends"`


+ 6
- 2
src/super/implement/medium_bank_info_db.go 查看文件

@@ -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,10 +27,13 @@ func (a MediumBankInfoDb) GetMediumBankInfoList(MediumId int) (medium *model.Med
}
return medium, nil
}
func (a MediumBankInfoDb) FindMediumBankInfoList(uuid, name, state string, page, limit int) (list []dao.MediumBankInfoGroup, total int64, err error) {
func (a MediumBankInfoDb) FindMediumBankInfoList(uuid, name, mediumId, state string, page, limit int) (list []dao.MediumBankInfoGroup, total int64, err error) {
sess := a.Db.Where("medium_bank_info.state>0").Desc("medium_bank_info.id").Limit(limit, (page-1)*limit)
if mediumId != "" {
sess.In("medium_list.medium_id", strings.Split(mediumId, ","))
}
if name != "" {
sess.In("medium_list.medium_id", name)
sess.And("medium_list.company_name like ?", "%"+name+"%")
}
if state != "" {
sess.And("medium_bank_info.state = ?", state)


+ 6
- 2
src/super/implement/medium_contact_info_db.go 查看文件

@@ -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,10 +27,13 @@ func (a MediumContactInfoDb) GetMediumContactInfoList(MediumId int) (medium *mod
}
return medium, nil
}
func (a MediumContactInfoDb) FindMediumContactInfoList(uuid, name, state string, page, limit int) (list []dao.MediumContactInfoGroup, total int64, err error) {
func (a MediumContactInfoDb) FindMediumContactInfoList(uuid, name, mediumId, state string, page, limit int) (list []dao.MediumContactInfoGroup, total int64, err error) {
sess := a.Db.Where("medium_contact_info.state>0").Desc("medium_contact_info.id").Limit(limit, (page-1)*limit)
if mediumId != "" {
sess.In("medium_list.medium_id", strings.Split(mediumId, ","))
}
if name != "" {
sess.In("medium_list.medium_id", name)
sess.And("medium_list.company_name like ?", "%"+name+"%")
}
if state != "" {
sess.And("medium_contact_info.state = ?", state)


Loading…
取消
儲存