23 lines
469 B
Go
23 lines
469 B
Go
package store
|
|
|
|
import (
|
|
"context"
|
|
"server/internal/model"
|
|
"server/internal/service"
|
|
|
|
"server/api/store/v1"
|
|
)
|
|
|
|
func (c *ControllerV1) UpdateIp(ctx context.Context, req *v1.UpdateIpReq) (res *v1.UpdateIpRes, err error) {
|
|
out, err := service.Store().UpdateIP(ctx, &model.IPUpdateIn{
|
|
Id: req.Id,
|
|
Ip: req.Ip,
|
|
Remark: req.Remark,
|
|
//StoreId: int(req.StoreId),
|
|
})
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return &v1.UpdateIpRes{Success: out.Success}, nil
|
|
}
|