V2.5.2beta (#1101)
* fix: zap无法在运行时进行切割日志, config.docker.yaml与config.yaml同步 #1094 * feat: 为定时任务增加秒级控制 * feat: 调整代码结构,err更改为后置 * css 样式调整 Co-authored-by: SliverHorn <503551462@qq.com> Co-authored-by: songzhibin97 <718428482@qq.com>
This commit is contained in:
@@ -47,9 +47,9 @@ func (exa *CustomerService) UpdateExaCustomer(e *example.ExaCustomer) (err error
|
||||
//@function: GetExaCustomer
|
||||
//@description: 获取客户信息
|
||||
//@param: id uint
|
||||
//@return: err error, customer model.ExaCustomer
|
||||
//@return: customer model.ExaCustomer, err error
|
||||
|
||||
func (exa *CustomerService) GetExaCustomer(id uint) (err error, customer example.ExaCustomer) {
|
||||
func (exa *CustomerService) GetExaCustomer(id uint) (customer example.ExaCustomer, err error) {
|
||||
err = global.GVA_DB.Where("id = ?", id).First(&customer).Error
|
||||
return
|
||||
}
|
||||
@@ -58,15 +58,15 @@ func (exa *CustomerService) GetExaCustomer(id uint) (err error, customer example
|
||||
//@function: GetCustomerInfoList
|
||||
//@description: 分页获取客户列表
|
||||
//@param: sysUserAuthorityID string, info request.PageInfo
|
||||
//@return: err error, list interface{}, total int64
|
||||
//@return: list interface{}, total int64, err error
|
||||
|
||||
func (exa *CustomerService) GetCustomerInfoList(sysUserAuthorityID string, info request.PageInfo) (err error, list interface{}, total int64) {
|
||||
func (exa *CustomerService) GetCustomerInfoList(sysUserAuthorityID string, info request.PageInfo) (list interface{}, total int64, err error) {
|
||||
limit := info.PageSize
|
||||
offset := info.PageSize * (info.Page - 1)
|
||||
db := global.GVA_DB.Model(&example.ExaCustomer{})
|
||||
var a system.SysAuthority
|
||||
a.AuthorityId = sysUserAuthorityID
|
||||
err, auth := systemService.AuthorityServiceApp.GetAuthorityInfo(a)
|
||||
auth, err := systemService.AuthorityServiceApp.GetAuthorityInfo(a)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
@@ -77,9 +77,9 @@ func (exa *CustomerService) GetCustomerInfoList(sysUserAuthorityID string, info
|
||||
var CustomerList []example.ExaCustomer
|
||||
err = db.Where("sys_user_authority_id in ?", dataId).Count(&total).Error
|
||||
if err != nil {
|
||||
return err, CustomerList, total
|
||||
return CustomerList, total, err
|
||||
} else {
|
||||
err = db.Limit(limit).Offset(offset).Preload("SysUser").Where("sys_user_authority_id in ?", dataId).Find(&CustomerList).Error
|
||||
}
|
||||
return err, CustomerList, total
|
||||
return CustomerList, total, err
|
||||
}
|
||||
|
Reference in New Issue
Block a user