Merge branch 'master' of https://gitee.com/wjl2008_admin/nuttyreading-java into zcc
This commit is contained in:
@@ -26,7 +26,8 @@ import java.util.Map;
|
||||
@Slf4j
|
||||
@RestController("masterCourse")
|
||||
@RequestMapping("master/course")
|
||||
public class CourseController {
|
||||
public class
|
||||
CourseController {
|
||||
|
||||
@Autowired
|
||||
private CourseService courseService;
|
||||
|
||||
@@ -0,0 +1,53 @@
|
||||
package com.peanut.modules.master.controller;
|
||||
|
||||
import com.peanut.common.utils.R;
|
||||
import com.peanut.modules.common.entity.MainAdEntity;
|
||||
import com.peanut.modules.master.service.MainAdService;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@Slf4j
|
||||
@RestController("masterMainAdController")
|
||||
@RequestMapping("master/mainAd")
|
||||
public class MainAdController {
|
||||
|
||||
@Autowired
|
||||
private MainAdService mainAdService;
|
||||
|
||||
@RequestMapping("/getMainAdList")
|
||||
public R getMainAdList(){
|
||||
List<MainAdEntity> mainAdList = mainAdService.getMainAdList();
|
||||
return R.ok().put("list",mainAdList);
|
||||
}
|
||||
|
||||
@RequestMapping("/getMainAdDetail")
|
||||
public R getMainAdDetail(@RequestBody Map<String,Integer> map){
|
||||
MainAdEntity mainAdDetail = mainAdService.getMainAdDetail(map.get("id"));
|
||||
return R.ok().put("detail",mainAdDetail);
|
||||
}
|
||||
|
||||
@RequestMapping("/addMainAd")
|
||||
public R addMainAd(@RequestBody MainAdEntity mainAdEntity){
|
||||
mainAdService.getBaseMapper().insert(mainAdEntity);
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
@RequestMapping("/delMainAd")
|
||||
public R delMainAd(@RequestBody Map<String,Integer> map){
|
||||
mainAdService.getBaseMapper().deleteById(map.get("id"));
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
@RequestMapping("/editMainAd")
|
||||
public R editMainAd(@RequestBody MainAdEntity mainAdEntity){
|
||||
mainAdService.getBaseMapper().updateById(mainAdEntity);
|
||||
return R.ok().put("detail",mainAdEntity);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -210,4 +210,10 @@ public class ShopProductController {
|
||||
return shopProductService.unbindProductAndCourse(map.get("productId"),map.get("catalogueId"));
|
||||
}
|
||||
|
||||
@RequestMapping("/getProductForApp")
|
||||
public R getProductForApp(@RequestBody Map<String,Object> map){
|
||||
Page<ShopProduct> productForApp = shopProductService.getProductForApp(Integer.valueOf(map.get("type").toString()), Integer.valueOf(map.get("page").toString()), Integer.valueOf(map.get("limit").toString()),map.get("keywords").toString());
|
||||
return R.ok().put("page",productForApp);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user