package app import ( "context" v1 "git.5iot.com/iotlcm-public/iotlcm-app/api/app/v1" "git.5iot.com/iotlcm-public/iotlcm-app/internal/service" ) func (c *ControllerV1) CustomerList(ctx context.Context, req *v1.CustomerListReq) (res *v1.CustomerListRes, err error) { items, total, summary, err := service.AppUser().CustomerList(ctx, &req.AppCustomerListParam) if err != nil { return nil, err } return &v1.CustomerListRes{Items: items, Total: total, Summary: summary}, nil } func (c *ControllerV1) CustomerDetail(ctx context.Context, req *v1.CustomerDetailReq) (res *v1.CustomerDetailRes, err error) { customer, err := service.AppUser().CustomerDetail(ctx, &req.AppCustomerDetailParam) if err != nil { return nil, err } return &v1.CustomerDetailRes{Customer: customer}, nil }