This commit is contained in:
wangjinlei
2024-05-21 10:34:39 +08:00
parent 40c0d0e862
commit 009f0ea12c
3 changed files with 24 additions and 3 deletions

View File

@@ -79,6 +79,19 @@ public class BookLabelAndMarketController {
return R.ok().put("result", marketTopList);
}
/**
* 编辑商品和营销标签的排序权重
* @param map
* @return
*/
@RequestMapping("/editMarketSort")
public R editMarketSort(@RequestBody Map<String,Integer> map){
ShopProductToBookMarket toMarket = toMarketService.getById(map.get("id"));
toMarket.setSort(map.get("sort"));
toMarketService.updateById(toMarket);
return R.ok().put("result",toMarket);
}
@RequestMapping(path = "/getLabelById")
public R getLabelById(String id) {
return R.ok().put("result",labelService.getById(id));

View File

@@ -49,7 +49,7 @@ public class CourseSociologyMarketController {
@RequestMapping("/addSociologyMarket")
public R addSociologyMarket(@RequestBody CourseSociologyMarketEntity courseSociologyMarketEntity){
marketService.save(courseSociologyMarketEntity);
return R.ok();
return R.ok().put("market",courseSociologyMarketEntity);
}
@RequestMapping("/editSociologyMarket")
@@ -68,8 +68,8 @@ public class CourseSociologyMarketController {
return R.error("请先清空绑定的课程后,再操作");
}
}
marketService.save(courseSociologyMarketEntity);
return R.ok();
marketService.updateById(courseSociologyMarketEntity);
return R.ok().put("market",courseSociologyMarketEntity);
}
@RequestMapping(path = "/delMarket")

View File

@@ -226,6 +226,14 @@ public class SociologyLabelAndMarketController {
return R.ok().put("result", page);
}
@RequestMapping("/editMarketSort")
public R editMarketSort(@RequestBody Map<String,Integer> map){
ShopProductToSociologyMarket toMarket = toMarketService.getById(map.get("id"));
toMarket.setSort(map.get("sort"));
toMarketService.updateById(toMarket);
return R.ok().put("market",toMarket);
}
/**
* 获取书标签列表
*/