2024-01-29 09:02:58 +00:00
|
|
|
package controller
|
2024-01-30 09:39:04 +00:00
|
|
|
|
|
|
|
import (
|
|
|
|
"context"
|
|
|
|
"exhibition-register/pb/exhibition"
|
|
|
|
"exhibition-register/pkg/msg"
|
|
|
|
)
|
|
|
|
|
2024-02-01 10:56:19 +00:00
|
|
|
func (e *ExhibitionProvider) CheckPhone(_ context.Context, req *exhibition.RegisterInfo) (rep *exhibition.CheckPhoneResp, err error) {
|
|
|
|
if rep, err = e.registerLogic.CheckByPhone(req); err != nil {
|
2024-01-30 09:39:04 +00:00
|
|
|
return nil, err
|
|
|
|
}
|
2024-02-01 10:56:19 +00:00
|
|
|
rep.Msg = msg.Success
|
|
|
|
return rep, nil
|
|
|
|
}
|
|
|
|
|
2024-02-23 03:24:24 +00:00
|
|
|
func (e *ExhibitionProvider) CheckIdCard(_ context.Context, req *exhibition.RegisterInfo) (rep *exhibition.CheckIdCardResp, err error) {
|
|
|
|
if rep, err = e.registerLogic.CheckIdCard(req); err != nil {
|
|
|
|
return rep, err
|
|
|
|
}
|
|
|
|
rep.Msg = msg.Success
|
|
|
|
return rep, nil
|
|
|
|
}
|
|
|
|
|
2024-02-01 10:56:19 +00:00
|
|
|
func (e *ExhibitionProvider) SaveRegisterRecord(_ context.Context, req *exhibition.RegisterInfo) (rep *exhibition.SaveRegisterRecordResp, err error) {
|
|
|
|
if rep, err = e.registerLogic.SaveRegisterRecord(req); err != nil {
|
|
|
|
return nil, err
|
|
|
|
}
|
|
|
|
rep.Msg = msg.Success
|
|
|
|
return rep, nil
|
|
|
|
}
|
|
|
|
|
|
|
|
func (e *ExhibitionProvider) RegisterRecordList(_ context.Context, req *exhibition.RecordListReq) (rep *exhibition.RecordListResp, err error) {
|
|
|
|
if rep, err = e.registerLogic.RegisterRecordList(req); err != nil {
|
|
|
|
return nil, err
|
|
|
|
}
|
|
|
|
rep.Msg = msg.Success
|
|
|
|
rep.Page = req.Page
|
|
|
|
rep.PageSize = req.PageSize
|
|
|
|
return rep, nil
|
|
|
|
}
|
|
|
|
|
|
|
|
func (e *ExhibitionProvider) ExportRegisterRecord(_ context.Context, req *exhibition.ExportRecordReq) (rep *exhibition.ExportRecordResp, err error) {
|
|
|
|
if rep, err = e.registerLogic.FindAllRecord(); err != nil {
|
|
|
|
return nil, err
|
|
|
|
}
|
|
|
|
rep.Msg = msg.Success
|
|
|
|
return rep, nil
|
2024-01-30 09:39:04 +00:00
|
|
|
}
|