package com.bofeng.wx.controller;

import com.bofeng.service.ShShopMatService;
import com.bofeng.service.ShShopService;
import com.yvan.platform.JsonWapper;
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;

@RestController
public class ShopController {

//    @Autowired
//    private HomeService homeService;
//
//    @Autowired
//    private QzTaskService qzTaskService;
//
//    @Autowired
//    private QzTaskReplyService qzTaskReplyService;

    @Autowired
    private ShShopService shShopService;
    @Autowired
    private ShShopMatService shShopMatService;


    @GetMapping("/shop/home.html")
    public ModelAndView home(ModelMap model) {
        //UserOpen userOpen = homeService.getUserOpen();
        model.put("user", new JsonWapper("{\"www\": \"er\"}"));
        return new ModelAndView("/shop/home.ftl", model);
    }


//    //家庭求助
//    @GetMapping("/home/home/addFimaly")
//    public ModelOps family(@Pd(name = "taskTitle") String taskTitle,
//                           @Pd(name = "taskTarget") String taskTarget,
//                           @Pd(name = "remark") String remark) {
//        return ModelOps.newSuccess(qzTaskService.addHelp(taskTitle, taskTarget, remark));
//    }
//
//    //我的在求助的展示
//    @GetMapping("/home/home/queryQzTask")
//    public Model<List<QzTask>> queryQzTask(@Pd(name = "taskStatus", required = false) Integer taskStatus) {
//        return Model.newSuccess(qzTaskService.queryQzTask(taskStatus));
//    }
//
//    //小区求助的查看
//    @GetMapping("/home/home/taskQuery")
//    public Model<List<QzTaskReply>> taskQuery(@Pd(name = "taskId") Long taskId) {
//        return Model.newSuccess(qzTaskReplyService.taskQuery(taskId));
//    }
//
//    @GetMapping("/home/home_new.html")
//    public ModelAndView hmoe_new(ModelMap model) {
//        model.put("user", new JsonWapper("{\"www\": \"er\"}"));
//        return new ModelAndView("/home/home_new.ftl", model);
//    }
}
