123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172 |
- package com.bofeng.wx.controller;
- import com.bofeng.entity.Buy;
- import com.bofeng.entity.JmTuangou;
- import com.bofeng.service.BuyService;
- import com.yvan.Model;
- import com.yvan.ModelOps;
- import com.yvan.mvc.Pd;
- import org.springframework.beans.factory.annotation.Autowired;
- import org.springframework.ui.ModelMap;
- import org.springframework.web.bind.annotation.GetMapping;
- import org.springframework.web.bind.annotation.RestController;
- import org.springframework.web.servlet.ModelAndView;
- import java.util.List;
- @RestController
- public class BuyController {
- @Autowired
- private BuyService buyService;
- @GetMapping("/home/home/buyGroup")
- public ModelOps buyGroup(Buy buy) {
- return ModelOps.newSuccess(buyService.buyGroup(buy));
- }
- @GetMapping("/home/buytc.html")
- public ModelAndView buytc(@Pd(name = "userId") Long userId, @Pd(name = "jmId") Long jmId,
- @Pd(name = "type") Integer type, @Pd(name = "tgStatus") Integer tgStatus,
- @Pd(name = "buyId") Long buyId, ModelMap model) {
- model.put("userId", userId);
- model.put("jmId", jmId);
- model.put("type", type);
- model.put("tgStatus", tgStatus);
- model.put("buyId", buyId);
- buyService.updateStatus();
- return new ModelAndView("/home/buytc.ftl", model);
- }
- @GetMapping("/home/buy/group")
- public Model<List<JmTuangou>> group(@Pd(name = "userId") Long userId) {
- return Model.newSuccess(buyService.group(userId));
- }
- @GetMapping("/home/Mygroup/group")
- public Model<List<Buy>> MyGroup(@Pd(name = "userId") Long userId) {
- return Model.newSuccess(buyService.MyGroup(userId));
- }
- @GetMapping("/home/queryGroup/buyGroup")
- public Model<Buy> queryGroup(@Pd(name = "buyId") Long buyId) {
- return Model.newSuccess(buyService.queryGroup(buyId));
- }
- @GetMapping("/home/querysj/buytj")
- public Model<JmTuangou> buytj(@Pd(name = "userId") Long userId, @Pd(name = "jmId") Long jmId, ModelMap model) {
- return Model.newSuccess(buyService.selectGroup(userId, jmId));
- }
- @GetMapping("/home/back/buyBack")
- public ModelOps buyBack(Buy buy) {
- return ModelOps.newSuccess(buyService.buyBack(buy));
- }
- @GetMapping("/query/getAll/status")
- public Model<Buy> status(Buy buy) {
- return Model.newSuccess(buyService.status(buy));
- }
- }
|