34 lines
836 B
Go
34 lines
836 B
Go
package handler
|
|
|
|
import (
|
|
"dianshang/pkg/response"
|
|
|
|
"github.com/gin-gonic/gin"
|
|
)
|
|
|
|
// BusinessHandler 商家信息处理器
|
|
type BusinessHandler struct{}
|
|
|
|
// NewBusinessHandler 创建商家信息处理器
|
|
func NewBusinessHandler() *BusinessHandler {
|
|
return &BusinessHandler{}
|
|
}
|
|
|
|
// BusinessTimeResponse 商家营业时间响应
|
|
type BusinessTimeResponse struct {
|
|
BusinessTime []string `json:"business_time"`
|
|
Phone string `json:"phone"`
|
|
SaasID string `json:"saas_id"`
|
|
}
|
|
|
|
// GetBusinessTime 获取商家营业时间
|
|
func (h *BusinessHandler) GetBusinessTime(c *gin.Context) {
|
|
// 返回默认的商家营业时间信息
|
|
businessTime := BusinessTimeResponse{
|
|
BusinessTime: []string{"周一至周日: 9:00-18:00"},
|
|
Phone: "400-000-0000",
|
|
SaasID: "88888888",
|
|
}
|
|
|
|
response.Success(c, businessTime)
|
|
} |