This commit is contained in:
wangjinlei
2024-11-22 17:30:04 +08:00
parent 31a02d6f79
commit d17dca9497
5 changed files with 33 additions and 6 deletions

View File

@@ -26,7 +26,8 @@ import java.util.Map;
@Slf4j
@RestController("masterCourse")
@RequestMapping("master/course")
public class CourseController {
public class
CourseController {
@Autowired
private CourseService courseService;

View File

@@ -7,10 +7,10 @@ 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.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import java.util.List;
import java.util.Map;
@Slf4j
@RestController("masterMainAdController")
@@ -27,8 +27,8 @@ public class MainAdController {
}
@RequestMapping("/getMainAdDetail")
public R getMainAdDetail(@RequestParam Integer id){
MainAdEntity mainAdDetail = mainAdService.getMainAdDetail(id);
public R getMainAdDetail(@RequestBody Map<String,Integer> map){
MainAdEntity mainAdDetail = mainAdService.getMainAdDetail(map.get("id"));
return R.ok().put("detail",mainAdDetail);
}
@@ -39,8 +39,8 @@ public class MainAdController {
}
@RequestMapping("/delMainAd")
public R delMainAd(@RequestParam Integer id){
mainAdService.getBaseMapper().deleteById(id);
public R delMainAd(@RequestBody Map<String,Integer> map){
mainAdService.getBaseMapper().deleteById(map.get("id"));
return R.ok();
}

View File

@@ -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);
}
}