package controller import ( "github.com/gin-gonic/gin" "github.com/sirupsen/logrus" "youngee_b_api/app/service" ) type CommonController struct{} // 获取合作平台列表 func (t CommonController) CooperationPlatform(c *gin.Context) { result, err := service.CommonService{}.CooperationPlatform() if err != nil { logrus.Errorf("[CooperationPlatform] call Show err:%+v\n", err) returnError(c, 40000, err.Error()) return } returnSuccess(c, 20000, result) } // 获取商品类目 func (t CommonController) ProductCategory(c *gin.Context) { result, err := service.ProductService{}.GetProductCategorys() if err != nil { logrus.Errorf("[ProductCategory] call Show err:%+v\n", err) returnError(c, 40000, err.Error()) return } returnSuccess(c, 20000, result) }