feat: add Flutter mobile clients and staff delivery API
This commit is contained in:
@@ -92,6 +92,21 @@ func ListTickets(ctx *gin.Context) {
|
||||
infra.Response.Success(ctx, base.ResourceResponse(list))
|
||||
}
|
||||
|
||||
// GetTicket 按公开 identity 返回当前工作人员被分派的单一工单。
|
||||
func GetTicket(ctx *gin.Context) {
|
||||
account, ok := clientcommon.StaffAccount(ctx)
|
||||
if !ok {
|
||||
return
|
||||
}
|
||||
var ticket models.CsTicket
|
||||
if impl.DBService.Where("identity = ? AND staff_account_id = ? AND status <> ?", ctx.Param("identity"), account.ID, base.StatusArchived).
|
||||
First(&ticket).Error != nil {
|
||||
infra.Response.Error(ctx, errcode.ErrRecordNotFound)
|
||||
return
|
||||
}
|
||||
infra.Response.Success(ctx, base.ResourceResponse(ticket))
|
||||
}
|
||||
|
||||
// StartTicket 将本人已分派工单置为处理中。
|
||||
func StartTicket(ctx *gin.Context) {
|
||||
updateTicketStatus(ctx, 18, 11, nil)
|
||||
|
||||
Reference in New Issue
Block a user