123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130 |
- package routers
-
- import (
- "spaceofcheng/services/controllers/bodycheck"
- "spaceofcheng/services/controllers/book"
- "spaceofcheng/services/controllers/booktype"
- "spaceofcheng/services/controllers/calendar"
- "spaceofcheng/services/controllers/card"
- "spaceofcheng/services/controllers/cases"
- "spaceofcheng/services/controllers/coupon"
- "spaceofcheng/services/controllers/course"
- "spaceofcheng/services/controllers/customer"
- "spaceofcheng/services/controllers/customerremark"
- "spaceofcheng/services/controllers/flashbuy"
- "spaceofcheng/services/controllers/goods"
- "spaceofcheng/services/controllers/gymcard"
- "spaceofcheng/services/controllers/luckdraw"
- "spaceofcheng/services/controllers/user"
- "spaceofcheng/services/controllers/vipcard"
-
- "github.com/astaxie/beego"
- )
-
- func getWechatRoutes(prefix string) beego.LinkNamespace {
- return beego.NSNamespace(prefix,
- // 会员
- beego.NSRouter("/customer", &customer.CustomerController{}, "get:GetCustWXByID"),
- beego.NSRouter("/customer/user", &user.UserController{}, "get:GetUserCustomer"),
- beego.NSRouter("/customer/coupon", &coupon.CouponController{}, "get:GetCouponByCustomer"),
- beego.NSRouter("/customer/card", &card.CardController{}, "get:GetCardByCustomer"),
- beego.NSRouter("/customer/coupon/:id", &coupon.CouponController{}, "get:GetCustomerCouponByID"),
- beego.NSRouter("/customer/card/:id", &card.CardController{}, "get:GetCustomerCardByID"),
- beego.NSRouter("/customer/info", &customer.CustomerController{}, "get:GetCustomerInfo"),
-
- beego.NSRouter("/customer/sales/card/:id", &card.CardController{}, "get:GetCustomerCardByCustomerAndSale"),
- beego.NSRouter("/customer/sales/coupon/:id", &coupon.CouponController{}, "get:GetCustomerCouponByCustomerAndSale"),
-
- // 下单
- beego.NSRouter("/order/goods", &goods.GoodsController{}, "post:PostOrder"),
- beego.NSRouter("/order/goods/:ordersid", &goods.GoodsController{}, "put:ConfirmOrders"),
- beego.NSRouter("/order/course", &course.CourseController{}, "post:PostOrder"),
- beego.NSRouter("/order/course/:ordersid", &course.CourseController{}, "put:ConfirmOrders"),
-
- // 课程
- beego.NSRouter("/course/user", &course.CourseController{}, "get:GetCustomerCourse"),
- beego.NSRouter("/course/user/:id", &course.CourseController{}, "get:GetCustomerCourseByID"),
-
- // 商品订单
- beego.NSRouter("/goods/user", &goods.GoodsController{}, "get:GetCustomerOrders"),
-
- // 案场订单数量
- beego.NSRouter("/goods/case/:caseid", &goods.GoodsController{}, "get:GetCaseOrdersNum"),
-
- // 客户游泳健身卡
- beego.NSRouter("/gymcard", &gymcard.GymcardController{}, "get:GetGymcardListByCustomerId"),
- beego.NSRouter("/gymcard/:customerGymId", &gymcard.GymcardController{}, "get:GetCustomerGymDetailById"),
- beego.NSRouter("/gymcard/:gymcardId/:sysuserId", &gymcard.GymcardController{}, "post:SendGymToCustomer"),
- beego.NSRouter("/gymcard/:gymcardId", &gymcard.GymcardController{}, "get:GetGymcardDetailbyId"),
-
- // 禁止人员
- beego.NSRouter("/user/forbid", &user.UserController{}, "get:GetForbidUsers"),
- beego.NSRouter("/user/forbid/:userid/:type", &user.UserController{}, "post:SaveForbidUser"),
- beego.NSRouter("/user/forbid/:userid/:type", &user.UserController{}, "put:OpenForbidUser"),
-
- // 用户
- beego.NSRouter("/user/:type", &user.UserController{}, "get:GetCaseUserByType"),
- beego.NSRouter("/user/detail/:id", &user.UserController{}, "get:GetCaseUserByID"),
- beego.NSRouter("/user/code", &user.UserController{}, "get:GetMyRecommendCode"),
-
- // 优惠券
- beego.NSRouter("/coupon", &coupon.CouponController{}, "get:GetCaseUsableCoupon"),
- beego.NSRouter("/coupon/:id", &coupon.CouponController{}, "get:GetCouponByID"),
- beego.NSRouter("/coupon/detail/:id", &coupon.CouponController{}, "get:GetCouponWithCustomer"),
- beego.NSRouter("/coupon/:id", &coupon.CouponController{}, "post:ReceiveCoupon"),
- beego.NSRouter("/channel/coupon/:id", &coupon.CouponController{}, "post:ChannelReceiveCoupon"),
-
- // 卡
- beego.NSRouter("/card", &card.CardController{}, "get:GetCaseUsableCard"),
- beego.NSRouter("/card/:id", &card.CardController{}, "get:GetCardByID"),
- beego.NSRouter("/card/detail/:id", &card.CardController{}, "get:GetCardWithCustomer"),
- beego.NSRouter("/card/:id", &card.CardController{}, "post:ReceiveCard"),
- beego.NSRouter("/channel/card/:id", &card.CardController{}, "post:ChannelReceiveCard"),
-
- // vip卡
- beego.NSRouter("/vip", &vipcard.VipcardController{}, "get:GetCustomerVips"),
-
- // 体检
- beego.NSRouter("/GetCheckByUser", &bodycheck.BodyCheckController{}, "get:GetCheckByUser"),
-
- // 案场
- beego.NSRouter("/case/conf/:caseid", &cases.CaseController{}, "get:GetCaseConf"),
-
- // 抽奖
- beego.NSRouter("/luckdraw/user/:id", &luckdraw.LuckDrawController{}, "get:GetUserByCode"),
- beego.NSRouter("/luckdraw/:id", &luckdraw.LuckDrawController{}, "get:GetLuckDraw"),
- beego.NSRouter("/luckdraw/:id", &luckdraw.LuckDrawController{}, "post:LuckDraw"),
- beego.NSRouter("/luckdraw/:id/share", &luckdraw.LuckDrawController{}, "post:SaveShareRecord"),
- beego.NSRouter("/luckdraw/record", &luckdraw.LuckDrawController{}, "get:GetRecordByLuckDraw"),
- beego.NSRouter("/user/luckdraw/record", &luckdraw.LuckDrawController{}, "get:GetUserLuckDraw"),
- beego.NSRouter("/user/luckdraw/record/:id", &luckdraw.LuckDrawController{}, "get:GetRecordByID"),
-
- // 抢购
- beego.NSRouter("/flashbuy/flash/:flashBuyId", &flashbuy.FlashBuyController{}, "get:GetWechatFlashBuyById"),
- beego.NSRouter("/flashbuy/customer", &flashbuy.FlashBuyController{}, "get:GetCustomerFlashBuyByCustomerId"),
- beego.NSRouter("/flashbuy/customerFlash/:customerFlashBuyId", &flashbuy.FlashBuyController{}, "get:GetCustomerFlashBuyId"),
- beego.NSRouter("/flashbuy/:id", &flashbuy.FlashBuyController{}, "post:FlashBuy"),
- beego.NSRouter("/flashbuy/customer/:flashBuyId", &flashbuy.FlashBuyController{}, "post:AddNewFlashBuyCustomer"),
- beego.NSRouter("/flashbuy/customer/:flashBuyId", &flashbuy.FlashBuyController{}, "put:UpdateFlashBuyCustomer"),
- beego.NSRouter("/flashbuy/newcustomer", &flashbuy.FlashBuyController{}, "get:IsNewCustomer"),
-
- // 客户备注
- beego.NSRouter("/customerremark/record/:salesId/:customerId", &customerremark.CustomerRemarkController{}, "get:GetCustomerReceiveRecord"),
- beego.NSRouter("/customerremark/:salesId/:customerId", &customerremark.CustomerRemarkController{}, "get:GetCustomerRemarkList"),
- beego.NSRouter("/customerremark/search/:salesId/:customerInfo", &customerremark.CustomerRemarkController{}, "get:SearchCustomer"),
- beego.NSRouter("/customerremark", &customerremark.CustomerRemarkController{}, "post:AddRemark"),
-
- // 日历活动
- beego.NSRouter("/calendar", &calendar.CalendarController{}, "get:GetCalendarListFront"),
- beego.NSRouter("/calendar/:calendarId", &calendar.CalendarController{}, "get:GetCalendarFrontDetailById"),
- beego.NSRouter("/calendar", &calendar.CalendarController{}, "post:AddCalendar"),
- beego.NSRouter("/calendar/isattend/customer", &calendar.CalendarController{}, "get:IsCustomerAttend"),
-
- // 图书管理
- beego.NSRouter("/book/recommend", &book.BookController{}, "get:GetRecommendList"),
- beego.NSRouter("/booktype", &booktype.BooktypeController{}, "get:GetList"),
- beego.NSRouter("/book", &book.BookController{}, "get:GetBookList"),
- beego.NSRouter("/customer/book", &book.BookController{}, "get:GetMineRecord"),
- beego.NSRouter("/book/reserve/:bookid", &book.BookController{}, "post:ReserveBook"),
- )
- }
|