This commit is contained in:
wangjinlei
2024-05-21 14:10:01 +08:00
parent ec6a16eb9c
commit 654cf3f6fd
2 changed files with 13 additions and 12 deletions

View File

@@ -161,18 +161,6 @@ public class CourseMedicineMarketController {
return R.ok();
}
/**
* 修改商品和营销标签下的排序权重
* @return
*/
@RequestMapping("/editMarketSort")
public R editMarketSort(@RequestBody Map<String,Integer> map){
CourseToMedicineMarketEntity toMarket = toMarketService.getById(map.get("id"));
toMarket.setSort(map.get("sort"));
toMarketService.updateById(toMarket);
return R.ok().put("result",toMarket);
}
@RequestMapping(path = "/delToMarket")
public R delToMarket(String marketId,String courseId) {
if(StringUtils.isNotEmpty(courseId)){

View File

@@ -116,6 +116,18 @@ public class MedicineLabelAndMarketController {
}
}
/**
* 修改商品和营销标签下的排序权重
* @return
*/
@RequestMapping("/editMarketSort")
public R editMarketSort(@RequestBody Map<String,Integer> map){
ShopProductToMedicineMarket toMarket = toMarketService.getById(map.get("id"));
toMarket.setSort(map.get("sort"));
toMarketService.updateById(toMarket);
return R.ok().put("result",toMarket);
}
@RequestMapping(path = "/delLabel")
public R delLabel(String id) {
ShopProductMedicineLabel label = labelService.getById(id);
@@ -279,6 +291,7 @@ public class MedicineLabelAndMarketController {
if (params.containsKey("medicineMarketId")&&!"".equals(params.get("medicineMarketId").toString())){
wrapper.eq(ShopProductToMedicineMarket::getMedicineMarketId,params.get("medicineMarketId").toString());
}
wrapper.orderByAsc(ShopProductToMedicineMarket::getSort);
Page<ShopProductToMedicineMarket> page = toMarketService.page(new Page<>(
Long.parseLong(params.get("current").toString()), Long.parseLong(params.get("limit").toString())),wrapper);
List<ShopProductToMedicineMarket> res = page.getRecords();