优化mongo,封装count逻辑,处理objectId
This commit is contained in:
@@ -6,7 +6,7 @@ import (
|
||||
"cid/model/dto"
|
||||
"cid/service"
|
||||
|
||||
"gitee.com/red-future---jilin-g/common/http"
|
||||
"gitee.com/red-future---jilin-g/common/beans"
|
||||
)
|
||||
|
||||
type adPosition struct{}
|
||||
@@ -19,13 +19,13 @@ func (c *adPosition) Add(ctx context.Context, req *dto.AddAdPositionReq) (res *d
|
||||
}
|
||||
|
||||
// Update 更新广告位
|
||||
func (c *adPosition) Update(ctx context.Context, req *dto.UpdateAdPositionReq) (res *http.ResponseEmpty, err error) {
|
||||
func (c *adPosition) Update(ctx context.Context, req *dto.UpdateAdPositionReq) (res *beans.ResponseEmpty, err error) {
|
||||
err = service.AdPosition.Update(ctx, req)
|
||||
return
|
||||
}
|
||||
|
||||
// UpdateStatus 更新广告位状态
|
||||
func (c *adPosition) UpdateStatus(ctx context.Context, req *dto.UpdateAdPositionStatusReq) (res *http.ResponseEmpty, err error) {
|
||||
func (c *adPosition) UpdateStatus(ctx context.Context, req *dto.UpdateAdPositionStatusReq) (res *beans.ResponseEmpty, err error) {
|
||||
err = service.AdPosition.UpdateStatus(ctx, req)
|
||||
return
|
||||
}
|
||||
|
||||
@@ -5,7 +5,7 @@ import (
|
||||
"cid/service"
|
||||
"context"
|
||||
|
||||
"gitee.com/red-future---jilin-g/common/http"
|
||||
"gitee.com/red-future---jilin-g/common/beans"
|
||||
)
|
||||
|
||||
type advertisement struct{}
|
||||
@@ -18,19 +18,19 @@ func (c *advertisement) Add(ctx context.Context, req *dto.AddAdvertisementReq) (
|
||||
}
|
||||
|
||||
// Update 更新广告
|
||||
func (c *advertisement) Update(ctx context.Context, req *dto.UpdateAdvertisementReq) (res *http.ResponseEmpty, err error) {
|
||||
func (c *advertisement) Update(ctx context.Context, req *dto.UpdateAdvertisementReq) (res *beans.ResponseEmpty, err error) {
|
||||
err = service.Advertisement.Update(ctx, req)
|
||||
return
|
||||
}
|
||||
|
||||
// UpdateStatus 更新广告状态
|
||||
func (c *advertisement) UpdateStatus(ctx context.Context, req *dto.UpdateAdStatusReq) (res *http.ResponseEmpty, err error) {
|
||||
func (c *advertisement) UpdateStatus(ctx context.Context, req *dto.UpdateAdStatusReq) (res *beans.ResponseEmpty, err error) {
|
||||
err = service.Advertisement.UpdateStatus(ctx, req)
|
||||
return
|
||||
}
|
||||
|
||||
// Audit 审核广告
|
||||
func (c *advertisement) Audit(ctx context.Context, req *dto.AuditAdvertisementReq) (res *http.ResponseEmpty, err error) {
|
||||
func (c *advertisement) Audit(ctx context.Context, req *dto.AuditAdvertisementReq) (res *beans.ResponseEmpty, err error) {
|
||||
err = service.Advertisement.Audit(ctx, req)
|
||||
return
|
||||
}
|
||||
|
||||
@@ -5,7 +5,7 @@ import (
|
||||
"cid/service"
|
||||
"context"
|
||||
|
||||
"gitee.com/red-future---jilin-g/common/http"
|
||||
"gitee.com/red-future---jilin-g/common/beans"
|
||||
)
|
||||
|
||||
type advertiser struct{}
|
||||
@@ -18,31 +18,31 @@ func (c *advertiser) Add(ctx context.Context, req *dto.AddAdvertiserReq) (res *d
|
||||
}
|
||||
|
||||
// Update 更新广告主
|
||||
func (c *advertiser) Update(ctx context.Context, req *dto.UpdateAdvertiserReq) (res *http.ResponseEmpty, err error) {
|
||||
func (c *advertiser) Update(ctx context.Context, req *dto.UpdateAdvertiserReq) (res *beans.ResponseEmpty, err error) {
|
||||
err = service.Advertiser.Update(ctx, req)
|
||||
return
|
||||
}
|
||||
|
||||
// UpdateStatus 更新广告主状态
|
||||
func (c *advertiser) UpdateStatus(ctx context.Context, req *dto.UpdateAdvertiserStatusReq) (res *http.ResponseEmpty, err error) {
|
||||
func (c *advertiser) UpdateStatus(ctx context.Context, req *dto.UpdateAdvertiserStatusReq) (res *beans.ResponseEmpty, err error) {
|
||||
err = service.Advertiser.UpdateStatus(ctx, req)
|
||||
return
|
||||
}
|
||||
|
||||
// Audit 审核广告主
|
||||
func (c *advertiser) Audit(ctx context.Context, req *dto.AuditAdvertiserReq) (res *http.ResponseEmpty, err error) {
|
||||
func (c *advertiser) Audit(ctx context.Context, req *dto.AuditAdvertiserReq) (res *beans.ResponseEmpty, err error) {
|
||||
err = service.Advertiser.Audit(ctx, req)
|
||||
return
|
||||
}
|
||||
|
||||
// Recharge 充值
|
||||
func (c *advertiser) Recharge(ctx context.Context, req *dto.RechargeAdvertiserReq) (res *http.ResponseEmpty, err error) {
|
||||
func (c *advertiser) Recharge(ctx context.Context, req *dto.RechargeAdvertiserReq) (res *beans.ResponseEmpty, err error) {
|
||||
err = service.Advertiser.Recharge(ctx, req)
|
||||
return
|
||||
}
|
||||
|
||||
// UpdateCreditLimit 更新授信额度
|
||||
func (c *advertiser) UpdateCreditLimit(ctx context.Context, req *dto.UpdateCreditLimitReq) (res *http.ResponseEmpty, err error) {
|
||||
func (c *advertiser) UpdateCreditLimit(ctx context.Context, req *dto.UpdateCreditLimitReq) (res *beans.ResponseEmpty, err error) {
|
||||
err = service.Advertiser.UpdateCreditLimit(ctx, req)
|
||||
return
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user