|
@@ -27,6 +27,10 @@ func NewUpdateContactLogic(ctx context.Context, svcCtx *svc.ServiceContext) *Upd
|
|
|
|
|
|
func (l *UpdateContactLogic) UpdateContact(req *types.ContactInfo) (*types.BaseMsgResp, error) {
|
|
|
organizationId := l.ctx.Value("organizationId").(uint64)
|
|
|
+ cage := 0
|
|
|
+ if req.Cage != nil && *req.Cage > 0 {
|
|
|
+ cage = *req.Cage
|
|
|
+ }
|
|
|
err := l.svcCtx.DB.Contact.UpdateOneID(*req.Id).
|
|
|
Where(contact.OrganizationID(organizationId)).
|
|
|
SetNotNilStatus(req.Status).
|
|
@@ -47,7 +51,7 @@ func (l *UpdateContactLogic) UpdateContact(req *types.ContactInfo) (*types.BaseM
|
|
|
SetNotNilV3(req.V3).
|
|
|
SetNotNilCname(req.Cname).
|
|
|
SetNotNilCarea(req.Carea).
|
|
|
- SetNotNilCage(req.Cage).
|
|
|
+ SetNotNilCage(&cage).
|
|
|
SetNotNilCbirthday(req.Cbirthday).
|
|
|
SetNotNilCbirtharea(req.Cbirtharea).
|
|
|
SetNotNilCc(req.Cc).
|