feat: completed development wecom message

This commit is contained in:
zzw
2026-09-18 17:39:48 +08:00
parent dd460f6be2
commit 1ca44d25df
57 changed files with 1754 additions and 1412 deletions
@@ -5,12 +5,12 @@ import (
"lone-services/pkg/modelbase"
"lone-services/pkg/utils"
"lone-services/pkg/validate"
"lone-services/pkg/wecomrpc"
product "lone-services/rpc/product/pb"
"lone-services/services/product/internal/apply"
"lone-services/services/product/internal/dao"
"lone-services/services/product/internal/model"
"lone-services/services/product/internal/svc"
"lone-services/services/product/internal/wecom"
"lone-services/services/product/validator"
"strconv"
"time"
@@ -115,11 +115,18 @@ func (l *EditBaseLogic) EditBase(in *product.EditBaseReq) (*product.Response, er
return failResponse(utils.Fail), nil
}
addEditLog(int(req.Id), dao.EditLogTypeProduct, adminId, adminName, data, old)
wecom.NotifyProduct(wecom.NotifyJob{
ObjId: int(req.Id),
ObjType: dao.EditLogTypeProduct,
Type: wecom.ProductOrdinaryReview,
wecomrpc.CreateReviewChange(l.ctx, l.svcCtx.WecomSvcName, wecomrpc.ReviewChange{
Type: wecomrpc.BizTypeProduct,
BizId: req.Id,
BeforeData: utils.StructToJson(old),
AfterData: utils.StructToJson(data),
AdminId: int64(adminId),
AdminName: adminName,
})
wecomrpc.SendMessage(l.ctx, l.svcCtx.WecomSvcName, wecomrpc.SendMessageJob{
BizId: int(req.Id),
BizType: wecomrpc.BizTypeProduct,
Type: wecomrpc.ProductOrdinaryReview,
})
_ = apply.Del(l.ctx, adminId, int(req.Id))