44323
2023-09-23 753145b81710f934c28b29a1feb376ce79d4a965
cloud-server-management/src/main/java/com/dsh/guns/modular/system/controller/code/TCoursePackageController.java
@@ -21,13 +21,11 @@
import com.dsh.guns.modular.system.service.IStoreService;
import com.dsh.guns.modular.system.service.ITSiteService;
import com.dsh.guns.modular.system.util.ResultUtil;
import org.aspectj.weaver.ast.Var;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import java.util.*;
@@ -72,7 +70,27 @@
    /**
     * 根据门店获取课程
     */
    @ResponseBody
    @RequestMapping("/getCoursePackageByStoreId")
    public List<TCoursePackageType> getCoursePackageByStoreId(Integer storeId){
        List<TCoursePackage> list = coursePackageClient.getCoursePackageByStoreId(storeId);
        List<Integer> ids = new ArrayList<>();
        for (TCoursePackage tCoursePackage : list) {
            ids.add(tCoursePackage.getCoursePackageTypeId());
        }
        return coursePackageTypeClient.getByCourseIds(ids);
    }
    /**
     * 根据课包类型获取课包
     */
    @ResponseBody
    @RequestMapping("/getCoursePackageByType")
    public List<TCoursePackage> getCoursePackageByType(Integer storeId){
        return coursePackageClient.getCoursePackageByType(storeId);
    }
    /**
     * 跳转到列表页
     * @param model