| | |
| | | return ecode.OK
|
| | | }
|
| | |
|
| | |
|
| | | // CheckClientExist check client exist
|
| | | func CheckClientExist(id int) int {
|
| | | _, err := model.NewClientSearch(nil).SetId(id).First()
|
| | |
| | | return ecode.OK
|
| | | }
|
| | |
|
| | | func (ClientService) GetClientList(page, pageSize int, keyword string) ([]*model.Client, int64, int) {
|
| | | func (ClientService) GetClientList(page, pageSize int, data map[string]interface{}) ([]*model.Client, int64, int) { |
| | | // get contact list
|
| | | contacts, total, err := model.NewClientSearch(nil).SetKeyword(keyword).SetPage(page, pageSize).Find()
|
| | | contacts, total, err := model.NewClientSearch(nil).SetPage(page, pageSize).SetSearchMap(data).Find() |
| | | if err != nil {
|
| | | return nil, 0, ecode.ClientListErr
|
| | | }
|