Bladeren bron

update

master
shenjiachi 1 week geleden
bovenliggende
commit
c50b79ab74
4 gewijzigde bestanden met toevoegingen van 15 en 7 verwijderingen
  1. +1
    -0
      app/md/im/md_customer_service.go
  2. +6
    -5
      app/md/im/md_emoticon.go
  3. +4
    -1
      app/svc/im/svc_customer_service.go
  4. +4
    -1
      app/svc/im/svc_emoticon.go

+ 1
- 0
app/md/im/md_customer_service.go Bestand weergeven

@@ -5,6 +5,7 @@ type PageCustomerServiceReq struct {
PageSize int `json:"page_size"`
State int `json:"state"` //状态
Memo string `json:"memo" example:"备注"`
Phone string `json:"phone"` // 手机号
}

type PageCustomerServiceResp struct {


+ 6
- 5
app/md/im/md_emoticon.go Bestand weergeven

@@ -5,6 +5,7 @@ type PageEmoticonReq struct {
PageSize int `json:"page_size"`
State int `json:"state"` //状态
Memo string `json:"memo" example:"备注"`
Name string `json:"name"` // 表情名称
}

type PageEmoticonResp struct {
@@ -15,9 +16,9 @@ type PageEmoticonResp struct {
Id int64 `json:"id"` //记录id
Name string `json:"name" example:"名称"`
ImgUrl string `json:"img_url" example:"图片地址"`
Sort int `json:"Sort"` // 排序
State int `json:"state"` // 状态0关闭,1开启
Memo string `json:"memo" example:"备注"` // 备注
Sort int `json:"Sort"` // 排序
State int `json:"state"` // 状态0关闭,1开启
Memo string `json:"memo" example:"备注"` // 备注
CreateAt string `json:"create_at" example:"创建时间"` // 创建时间
UpdateAt string `json:"update_at" example:"更新时间"` // 更新时间
} `json:"list"`
@@ -27,7 +28,7 @@ type AddEmoticonReq struct {
Name string `json:"name" example:"名称"`
ImgUrl string `json:"img_url" example:"图片地址"`
Memo string `json:"memo" example:"备注"` // 备注
Sort int `json:"sort"` // 排序
Sort int `json:"sort"` // 排序
}

type SetEmoticonStateReq struct {
@@ -40,7 +41,7 @@ type UpdateEmoticonReq struct {
Name string `json:"name" example:"名称"`
ImgUrl string `json:"img_url" example:"图片地址"`
Memo string `json:"memo" example:"备注"` // 备注
Sort int `json:"sort"` // 排序
Sort int `json:"sort"` // 排序
}

type DeleteEmoticonReq struct {


+ 4
- 1
app/svc/im/svc_customer_service.go Bestand weergeven

@@ -14,7 +14,10 @@ func PageCustomerService(req md.PageCustomerServiceReq) (err error, resp md.Page
sess.And("memo LIKE ?", "%"+req.Memo+"%")
}
if req.State != 0 {
sess.And("memo = ?", req.State)
sess.And("state = ?", req.State)
}
if req.Phone != "" {
sess.And("phone = ?", req.Phone)
}
var mm []*model.CustomerService
resp.Total, err = sess.Limit(req.PageSize, (req.Page-1)*req.PageSize).Asc("id").FindAndCount(&mm)


+ 4
- 1
app/svc/im/svc_emoticon.go Bestand weergeven

@@ -14,7 +14,10 @@ func PageEmoticon(req md.PageEmoticonReq) (err error, resp md.PageEmoticonResp)
sess.And("memo LIKE ?", "%"+req.Memo+"%")
}
if req.State != 0 {
sess.And("memo = ?", req.State)
sess.And("state = ?", req.State)
}
if req.Name != "" {
sess.And("name LIKE ?", "%"+req.Name+"%")
}
var mm []*model.Emoticon
resp.Total, err = sess.Limit(req.PageSize, (req.Page-1)*req.PageSize).Desc("id").FindAndCount(&mm)


Laden…
Annuleren
Opslaan