fix
This commit is contained in:
@@ -0,0 +1,188 @@
|
||||
package admin_complaint
|
||||
|
||||
import (
|
||||
"context"
|
||||
"encoding/json"
|
||||
"strconv"
|
||||
"ycc-server/app/main/api/internal/svc"
|
||||
"ycc-server/app/main/api/internal/types"
|
||||
"ycc-server/app/main/model"
|
||||
"ycc-server/common/xerr"
|
||||
"ycc-server/pkg/lzkit/lzUtils"
|
||||
|
||||
"github.com/pkg/errors"
|
||||
"github.com/zeromicro/go-zero/core/logx"
|
||||
)
|
||||
|
||||
type AdminGetComplaintDetailLogic struct {
|
||||
logx.Logger
|
||||
ctx context.Context
|
||||
svcCtx *svc.ServiceContext
|
||||
}
|
||||
|
||||
func NewAdminGetComplaintDetailLogic(ctx context.Context, svcCtx *svc.ServiceContext) *AdminGetComplaintDetailLogic {
|
||||
return &AdminGetComplaintDetailLogic{
|
||||
Logger: logx.WithContext(ctx),
|
||||
ctx: ctx,
|
||||
svcCtx: svcCtx,
|
||||
}
|
||||
}
|
||||
|
||||
func (l *AdminGetComplaintDetailLogic) AdminGetComplaintDetail(req *types.AdminGetComplaintDetailReq) (resp *types.AdminGetComplaintDetailResp, err error) {
|
||||
// 获取投诉主表信息
|
||||
complaint, err := l.svcCtx.ComplaintMainModel.FindOne(l.ctx, req.Id)
|
||||
if err != nil {
|
||||
return nil, errors.Wrapf(xerr.NewErrCode(xerr.DB_ERROR), "AdminGetComplaintDetail, 查询投诉失败 err: %v", err)
|
||||
}
|
||||
|
||||
// 构建响应
|
||||
resp = &types.AdminGetComplaintDetailResp{
|
||||
Id: complaint.Id,
|
||||
Type: complaint.Type,
|
||||
OrderId: lzUtils.NullStringToString(complaint.OrderId),
|
||||
Name: lzUtils.NullStringToString(complaint.Name),
|
||||
Contact: lzUtils.NullStringToString(complaint.Contact),
|
||||
Content: lzUtils.NullStringToString(complaint.Content),
|
||||
Status: lzUtils.NullStringToString(complaint.Status),
|
||||
StatusDescription: lzUtils.NullStringToString(complaint.StatusDescription),
|
||||
Remark: lzUtils.NullStringToString(complaint.Remark),
|
||||
HandlerId: lzUtils.NullStringToString(complaint.HandlerId),
|
||||
CreateTime: complaint.CreateTime.Format("2006-01-02 15:04:05"),
|
||||
UpdateTime: complaint.UpdateTime.Format("2006-01-02 15:04:05"),
|
||||
}
|
||||
|
||||
if complaint.HandleTime.Valid {
|
||||
resp.HandleTime = complaint.HandleTime.Time.Format("2006-01-02 15:04:05")
|
||||
}
|
||||
|
||||
// 获取支付宝投诉详情
|
||||
if complaint.Type == "alipay" {
|
||||
alipayBuilder := l.svcCtx.ComplaintAlipayModel.SelectBuilder().
|
||||
Where("complaint_id = ?", complaint.Id)
|
||||
alipayComplaints, err := l.svcCtx.ComplaintAlipayModel.FindAll(l.ctx, alipayBuilder, "")
|
||||
if err != nil && !errors.Is(err, model.ErrNotFound) {
|
||||
return nil, errors.Wrapf(xerr.NewErrCode(xerr.DB_ERROR), "AdminGetComplaintDetail, 查询支付宝投诉失败 err: %v", err)
|
||||
}
|
||||
|
||||
if len(alipayComplaints) > 0 {
|
||||
alipayComplaint := alipayComplaints[0]
|
||||
alipayDetail := &types.AlipayComplaintDetail{
|
||||
Id: alipayComplaint.Id,
|
||||
AlipayId: alipayComplaint.AlipayId,
|
||||
TaskId: alipayComplaint.TaskId,
|
||||
OppositePid: lzUtils.NullStringToString(alipayComplaint.OppositePid),
|
||||
OppositeName: lzUtils.NullStringToString(alipayComplaint.OppositeName),
|
||||
ComplainContent: lzUtils.NullStringToString(alipayComplaint.ComplainContent),
|
||||
TradeNo: lzUtils.NullStringToString(alipayComplaint.TradeNo),
|
||||
Status: lzUtils.NullStringToString(alipayComplaint.Status),
|
||||
StatusDescription: lzUtils.NullStringToString(alipayComplaint.StatusDescription),
|
||||
ProcessCode: lzUtils.NullStringToString(alipayComplaint.ProcessCode),
|
||||
ProcessMessage: lzUtils.NullStringToString(alipayComplaint.ProcessMessage),
|
||||
ProcessRemark: lzUtils.NullStringToString(alipayComplaint.ProcessRemark),
|
||||
ComplainUrl: lzUtils.NullStringToString(alipayComplaint.ComplainUrl),
|
||||
}
|
||||
|
||||
if alipayComplaint.ComplainAmount.Valid {
|
||||
alipayDetail.ComplainAmount = strconv.FormatFloat(alipayComplaint.ComplainAmount.Float64, 'f', -1, 64)
|
||||
}
|
||||
if alipayComplaint.GmtComplain.Valid {
|
||||
alipayDetail.GmtComplain = alipayComplaint.GmtComplain.Time.Format("2006-01-02 15:04:05")
|
||||
}
|
||||
if alipayComplaint.GmtProcess.Valid {
|
||||
alipayDetail.GmtProcess = alipayComplaint.GmtProcess.Time.Format("2006-01-02 15:04:05")
|
||||
}
|
||||
if alipayComplaint.GmtOverdue.Valid {
|
||||
alipayDetail.GmtOverdue = alipayComplaint.GmtOverdue.Time.Format("2006-01-02 15:04:05")
|
||||
}
|
||||
if alipayComplaint.GmtRiskFinishTime.Valid {
|
||||
alipayDetail.GmtRiskFinishTime = alipayComplaint.GmtRiskFinishTime.Time.Format("2006-01-02 15:04:05")
|
||||
}
|
||||
|
||||
// 解析图片列表
|
||||
if alipayComplaint.ProcessImgUrlList.Valid {
|
||||
var imgList []string
|
||||
if err := json.Unmarshal([]byte(alipayComplaint.ProcessImgUrlList.String), &imgList); err == nil {
|
||||
alipayDetail.ProcessImgUrlList = imgList
|
||||
}
|
||||
}
|
||||
if alipayComplaint.CertifyInfo.Valid {
|
||||
var certifyList []string
|
||||
if err := json.Unmarshal([]byte(alipayComplaint.CertifyInfo.String), &certifyList); err == nil {
|
||||
alipayDetail.CertifyInfo = certifyList
|
||||
}
|
||||
}
|
||||
|
||||
// 获取交易信息列表
|
||||
tradeBuilder := l.svcCtx.ComplaintAlipayTradeModel.SelectBuilder().
|
||||
Where("complaint_alipay_id = ?", alipayComplaint.Id)
|
||||
trades, err := l.svcCtx.ComplaintAlipayTradeModel.FindAll(l.ctx, tradeBuilder, "")
|
||||
if err != nil && !errors.Is(err, model.ErrNotFound) {
|
||||
return nil, errors.Wrapf(xerr.NewErrCode(xerr.DB_ERROR), "AdminGetComplaintDetail, 查询交易信息失败 err: %v", err)
|
||||
}
|
||||
|
||||
alipayDetail.TradeInfoList = make([]types.AlipayComplaintTradeInfo, 0, len(trades))
|
||||
for _, trade := range trades {
|
||||
tradeInfo := types.AlipayComplaintTradeInfo{
|
||||
Id: trade.Id,
|
||||
TradeNo: lzUtils.NullStringToString(trade.TradeNo),
|
||||
OutNo: lzUtils.NullStringToString(trade.OutNo),
|
||||
Status: lzUtils.NullStringToString(trade.Status),
|
||||
StatusDescription: lzUtils.NullStringToString(trade.StatusDescription),
|
||||
}
|
||||
|
||||
if trade.AlipayTradeId.Valid {
|
||||
tradeInfo.AlipayTradeId = strconv.FormatInt(trade.AlipayTradeId.Int64, 10)
|
||||
}
|
||||
if trade.AlipayComplaintRecordId.Valid {
|
||||
tradeInfo.AlipayComplaintRecordId = strconv.FormatInt(trade.AlipayComplaintRecordId.Int64, 10)
|
||||
}
|
||||
if trade.GmtTrade.Valid {
|
||||
tradeInfo.GmtTrade = trade.GmtTrade.Time.Format("2006-01-02 15:04:05")
|
||||
}
|
||||
if trade.GmtRefund.Valid {
|
||||
tradeInfo.GmtRefund = trade.GmtRefund.Time.Format("2006-01-02 15:04:05")
|
||||
}
|
||||
if trade.Amount.Valid {
|
||||
tradeInfo.Amount = strconv.FormatFloat(trade.Amount.Float64, 'f', -1, 64)
|
||||
}
|
||||
|
||||
alipayDetail.TradeInfoList = append(alipayDetail.TradeInfoList, tradeInfo)
|
||||
}
|
||||
|
||||
resp.AlipayComplaint = alipayDetail
|
||||
}
|
||||
}
|
||||
|
||||
// 获取主动投诉详情
|
||||
if complaint.Type == "manual" {
|
||||
manualBuilder := l.svcCtx.ComplaintManualModel.SelectBuilder().
|
||||
Where("complaint_id = ?", complaint.Id)
|
||||
manualComplaints, err := l.svcCtx.ComplaintManualModel.FindAll(l.ctx, manualBuilder, "")
|
||||
if err != nil && !errors.Is(err, model.ErrNotFound) {
|
||||
return nil, errors.Wrapf(xerr.NewErrCode(xerr.DB_ERROR), "AdminGetComplaintDetail, 查询主动投诉失败 err: %v", err)
|
||||
}
|
||||
|
||||
if len(manualComplaints) > 0 {
|
||||
manualComplaint := manualComplaints[0]
|
||||
manualDetail := &types.ManualComplaintDetail{
|
||||
Id: manualComplaint.Id,
|
||||
UserId: lzUtils.NullStringToString(manualComplaint.UserId),
|
||||
Subject: lzUtils.NullStringToString(manualComplaint.Subject),
|
||||
Priority: lzUtils.NullStringToString(manualComplaint.Priority),
|
||||
Source: lzUtils.NullStringToString(manualComplaint.Source),
|
||||
}
|
||||
|
||||
// 解析附件URL列表
|
||||
if manualComplaint.AttachmentUrls.Valid {
|
||||
var urlList []string
|
||||
if err := json.Unmarshal([]byte(manualComplaint.AttachmentUrls.String), &urlList); err == nil {
|
||||
manualDetail.AttachmentUrls = urlList
|
||||
}
|
||||
}
|
||||
|
||||
resp.ManualComplaint = manualDetail
|
||||
}
|
||||
}
|
||||
|
||||
return resp, nil
|
||||
}
|
||||
@@ -0,0 +1,174 @@
|
||||
package admin_complaint
|
||||
|
||||
import (
|
||||
"context"
|
||||
"strconv"
|
||||
"ycc-server/app/main/api/internal/svc"
|
||||
"ycc-server/app/main/api/internal/types"
|
||||
"ycc-server/app/main/model"
|
||||
"ycc-server/common/xerr"
|
||||
"ycc-server/pkg/lzkit/lzUtils"
|
||||
|
||||
"github.com/Masterminds/squirrel"
|
||||
"github.com/pkg/errors"
|
||||
"github.com/zeromicro/go-zero/core/logx"
|
||||
"github.com/zeromicro/go-zero/core/mr"
|
||||
)
|
||||
|
||||
type AdminGetComplaintListLogic struct {
|
||||
logx.Logger
|
||||
ctx context.Context
|
||||
svcCtx *svc.ServiceContext
|
||||
}
|
||||
|
||||
func NewAdminGetComplaintListLogic(ctx context.Context, svcCtx *svc.ServiceContext) *AdminGetComplaintListLogic {
|
||||
return &AdminGetComplaintListLogic{
|
||||
Logger: logx.WithContext(ctx),
|
||||
ctx: ctx,
|
||||
svcCtx: svcCtx,
|
||||
}
|
||||
}
|
||||
|
||||
func (l *AdminGetComplaintListLogic) AdminGetComplaintList(req *types.AdminGetComplaintListReq) (resp *types.AdminGetComplaintListResp, err error) {
|
||||
// 构建查询条件
|
||||
builder := l.svcCtx.ComplaintMainModel.SelectBuilder()
|
||||
if req.Type != "" {
|
||||
builder = builder.Where("type = ?", req.Type)
|
||||
}
|
||||
if req.Status != "" {
|
||||
builder = builder.Where("status = ?", req.Status)
|
||||
}
|
||||
if req.Name != "" {
|
||||
builder = builder.Where("name LIKE ?", "%"+req.Name+"%")
|
||||
}
|
||||
if req.Contact != "" {
|
||||
builder = builder.Where("contact LIKE ?", "%"+req.Contact+"%")
|
||||
}
|
||||
if req.OrderId != "" {
|
||||
builder = builder.Where("order_id = ?", req.OrderId)
|
||||
}
|
||||
// 时间范围查询
|
||||
if req.CreateTimeStart != "" {
|
||||
builder = builder.Where("create_time >= ?", req.CreateTimeStart)
|
||||
}
|
||||
if req.CreateTimeEnd != "" {
|
||||
builder = builder.Where("create_time <= ?", req.CreateTimeEnd)
|
||||
}
|
||||
if req.HandleTimeStart != "" {
|
||||
builder = builder.Where("handle_time >= ?", req.HandleTimeStart)
|
||||
}
|
||||
if req.HandleTimeEnd != "" {
|
||||
builder = builder.Where("handle_time <= ?", req.HandleTimeEnd)
|
||||
}
|
||||
|
||||
// 并发获取总数和列表
|
||||
var total int64
|
||||
var complaints []*model.ComplaintMain
|
||||
err = mr.Finish(func() error {
|
||||
var err error
|
||||
total, err = l.svcCtx.ComplaintMainModel.FindCount(l.ctx, builder, "id")
|
||||
if err != nil {
|
||||
return errors.Wrapf(xerr.NewErrCode(xerr.DB_ERROR), "AdminGetComplaintList, 查询投诉总数失败 err: %v", err)
|
||||
}
|
||||
return nil
|
||||
}, func() error {
|
||||
var err error
|
||||
complaints, err = l.svcCtx.ComplaintMainModel.FindPageListByPage(l.ctx, builder, req.Page, req.PageSize, "create_time DESC")
|
||||
if err != nil {
|
||||
return errors.Wrapf(xerr.NewErrCode(xerr.DB_ERROR), "AdminGetComplaintList, 查询投诉列表失败 err: %v", err)
|
||||
}
|
||||
return nil
|
||||
})
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
// 构建响应
|
||||
resp = &types.AdminGetComplaintListResp{
|
||||
Total: total,
|
||||
Items: make([]types.ComplaintListItem, 0, len(complaints)),
|
||||
}
|
||||
|
||||
// 批量获取支付宝投诉和主动投诉的详细信息
|
||||
complaintIds := make([]string, 0, len(complaints))
|
||||
for _, complaint := range complaints {
|
||||
complaintIds = append(complaintIds, complaint.Id)
|
||||
}
|
||||
|
||||
// 获取支付宝投诉信息
|
||||
alipayComplaintMap := make(map[string]*model.ComplaintAlipay)
|
||||
if len(complaintIds) > 0 {
|
||||
alipayBuilder := l.svcCtx.ComplaintAlipayModel.SelectBuilder().
|
||||
Where(squirrel.Eq{"complaint_id": complaintIds})
|
||||
alipayComplaints, err := l.svcCtx.ComplaintAlipayModel.FindAll(l.ctx, alipayBuilder, "")
|
||||
if err != nil && !errors.Is(err, model.ErrNotFound) {
|
||||
return nil, errors.Wrapf(xerr.NewErrCode(xerr.DB_ERROR), "AdminGetComplaintList, 批量查询支付宝投诉失败 err: %v", err)
|
||||
}
|
||||
for _, alipayComplaint := range alipayComplaints {
|
||||
alipayComplaintMap[alipayComplaint.ComplaintId] = alipayComplaint
|
||||
}
|
||||
}
|
||||
|
||||
// 获取主动投诉信息
|
||||
manualComplaintMap := make(map[string]*model.ComplaintManual)
|
||||
if len(complaintIds) > 0 {
|
||||
manualBuilder := l.svcCtx.ComplaintManualModel.SelectBuilder().
|
||||
Where(squirrel.Eq{"complaint_id": complaintIds})
|
||||
manualComplaints, err := l.svcCtx.ComplaintManualModel.FindAll(l.ctx, manualBuilder, "")
|
||||
if err != nil && !errors.Is(err, model.ErrNotFound) {
|
||||
return nil, errors.Wrapf(xerr.NewErrCode(xerr.DB_ERROR), "AdminGetComplaintList, 批量查询主动投诉失败 err: %v", err)
|
||||
}
|
||||
for _, manualComplaint := range manualComplaints {
|
||||
manualComplaintMap[manualComplaint.ComplaintId] = manualComplaint
|
||||
}
|
||||
}
|
||||
|
||||
// 构建列表项
|
||||
for _, complaint := range complaints {
|
||||
item := types.ComplaintListItem{
|
||||
Id: complaint.Id,
|
||||
Type: complaint.Type,
|
||||
OrderId: lzUtils.NullStringToString(complaint.OrderId),
|
||||
Name: lzUtils.NullStringToString(complaint.Name),
|
||||
Contact: lzUtils.NullStringToString(complaint.Contact),
|
||||
Content: lzUtils.NullStringToString(complaint.Content),
|
||||
Status: lzUtils.NullStringToString(complaint.Status),
|
||||
StatusDescription: lzUtils.NullStringToString(complaint.StatusDescription),
|
||||
Remark: lzUtils.NullStringToString(complaint.Remark),
|
||||
HandlerId: lzUtils.NullStringToString(complaint.HandlerId),
|
||||
CreateTime: complaint.CreateTime.Format("2006-01-02 15:04:05"),
|
||||
UpdateTime: complaint.UpdateTime.Format("2006-01-02 15:04:05"),
|
||||
}
|
||||
|
||||
if complaint.HandleTime.Valid {
|
||||
item.HandleTime = complaint.HandleTime.Time.Format("2006-01-02 15:04:05")
|
||||
}
|
||||
|
||||
// 填充支付宝投诉特有字段
|
||||
if complaint.Type == "alipay" {
|
||||
if alipayComplaint, ok := alipayComplaintMap[complaint.Id]; ok {
|
||||
item.TaskId = alipayComplaint.TaskId
|
||||
item.TradeNo = lzUtils.NullStringToString(alipayComplaint.TradeNo)
|
||||
if alipayComplaint.ComplainAmount.Valid {
|
||||
item.ComplainAmount = strconv.FormatFloat(alipayComplaint.ComplainAmount.Float64, 'f', -1, 64)
|
||||
}
|
||||
if alipayComplaint.GmtComplain.Valid {
|
||||
item.GmtComplain = alipayComplaint.GmtComplain.Time.Format("2006-01-02 15:04:05")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 填充主动投诉特有字段
|
||||
if complaint.Type == "manual" {
|
||||
if manualComplaint, ok := manualComplaintMap[complaint.Id]; ok {
|
||||
item.Subject = lzUtils.NullStringToString(manualComplaint.Subject)
|
||||
item.Priority = lzUtils.NullStringToString(manualComplaint.Priority)
|
||||
item.Source = lzUtils.NullStringToString(manualComplaint.Source)
|
||||
}
|
||||
}
|
||||
|
||||
resp.Items = append(resp.Items, item)
|
||||
}
|
||||
|
||||
return resp, nil
|
||||
}
|
||||
@@ -0,0 +1,47 @@
|
||||
package admin_complaint
|
||||
|
||||
import (
|
||||
"context"
|
||||
"ycc-server/app/main/api/internal/svc"
|
||||
"ycc-server/app/main/api/internal/types"
|
||||
"ycc-server/common/xerr"
|
||||
"ycc-server/pkg/lzkit/lzUtils"
|
||||
|
||||
"github.com/pkg/errors"
|
||||
"github.com/zeromicro/go-zero/core/logx"
|
||||
)
|
||||
|
||||
type AdminUpdateComplaintRemarkLogic struct {
|
||||
logx.Logger
|
||||
ctx context.Context
|
||||
svcCtx *svc.ServiceContext
|
||||
}
|
||||
|
||||
func NewAdminUpdateComplaintRemarkLogic(ctx context.Context, svcCtx *svc.ServiceContext) *AdminUpdateComplaintRemarkLogic {
|
||||
return &AdminUpdateComplaintRemarkLogic{
|
||||
Logger: logx.WithContext(ctx),
|
||||
ctx: ctx,
|
||||
svcCtx: svcCtx,
|
||||
}
|
||||
}
|
||||
|
||||
func (l *AdminUpdateComplaintRemarkLogic) AdminUpdateComplaintRemark(req *types.AdminUpdateComplaintRemarkReq) (resp *types.AdminUpdateComplaintRemarkResp, err error) {
|
||||
// 获取投诉主表信息
|
||||
complaint, err := l.svcCtx.ComplaintMainModel.FindOne(l.ctx, req.Id)
|
||||
if err != nil {
|
||||
return nil, errors.Wrapf(xerr.NewErrCode(xerr.DB_ERROR), "AdminUpdateComplaintRemark, 查询投诉失败 err: %v", err)
|
||||
}
|
||||
|
||||
// 更新备注
|
||||
complaint.Remark = lzUtils.StringToNullString(req.Remark)
|
||||
|
||||
// 更新数据库
|
||||
err = l.svcCtx.ComplaintMainModel.UpdateWithVersion(l.ctx, nil, complaint)
|
||||
if err != nil {
|
||||
return nil, errors.Wrapf(xerr.NewErrCode(xerr.DB_ERROR), "AdminUpdateComplaintRemark, 更新投诉备注失败 err: %v", err)
|
||||
}
|
||||
|
||||
return &types.AdminUpdateComplaintRemarkResp{
|
||||
Success: true,
|
||||
}, nil
|
||||
}
|
||||
@@ -0,0 +1,55 @@
|
||||
package admin_complaint
|
||||
|
||||
import (
|
||||
"context"
|
||||
"time"
|
||||
"ycc-server/app/main/api/internal/svc"
|
||||
"ycc-server/app/main/api/internal/types"
|
||||
"ycc-server/common/xerr"
|
||||
"ycc-server/pkg/lzkit/lzUtils"
|
||||
|
||||
"github.com/pkg/errors"
|
||||
"github.com/zeromicro/go-zero/core/logx"
|
||||
)
|
||||
|
||||
type AdminUpdateComplaintStatusLogic struct {
|
||||
logx.Logger
|
||||
ctx context.Context
|
||||
svcCtx *svc.ServiceContext
|
||||
}
|
||||
|
||||
func NewAdminUpdateComplaintStatusLogic(ctx context.Context, svcCtx *svc.ServiceContext) *AdminUpdateComplaintStatusLogic {
|
||||
return &AdminUpdateComplaintStatusLogic{
|
||||
Logger: logx.WithContext(ctx),
|
||||
ctx: ctx,
|
||||
svcCtx: svcCtx,
|
||||
}
|
||||
}
|
||||
|
||||
func (l *AdminUpdateComplaintStatusLogic) AdminUpdateComplaintStatus(req *types.AdminUpdateComplaintStatusReq) (resp *types.AdminUpdateComplaintStatusResp, err error) {
|
||||
// 获取投诉主表信息
|
||||
complaint, err := l.svcCtx.ComplaintMainModel.FindOne(l.ctx, req.Id)
|
||||
if err != nil {
|
||||
return nil, errors.Wrapf(xerr.NewErrCode(xerr.DB_ERROR), "AdminUpdateComplaintStatus, 查询投诉失败 err: %v", err)
|
||||
}
|
||||
|
||||
// 更新状态
|
||||
complaint.Status = lzUtils.StringToNullString(req.Status)
|
||||
if req.StatusDescription != "" {
|
||||
complaint.StatusDescription = lzUtils.StringToNullString(req.StatusDescription)
|
||||
}
|
||||
if req.HandlerId != "" {
|
||||
complaint.HandlerId = lzUtils.StringToNullString(req.HandlerId)
|
||||
complaint.HandleTime = lzUtils.TimeToNullTime(time.Now())
|
||||
}
|
||||
|
||||
// 更新数据库
|
||||
err = l.svcCtx.ComplaintMainModel.UpdateWithVersion(l.ctx, nil, complaint)
|
||||
if err != nil {
|
||||
return nil, errors.Wrapf(xerr.NewErrCode(xerr.DB_ERROR), "AdminUpdateComplaintStatus, 更新投诉状态失败 err: %v", err)
|
||||
}
|
||||
|
||||
return &types.AdminUpdateComplaintStatusResp{
|
||||
Success: true,
|
||||
}, nil
|
||||
}
|
||||
Reference in New Issue
Block a user