Authored by liangyi.chen@yoho.cn

Fix

... ... @@ -27,17 +27,17 @@ public class GrassFindgoodsController {
@RequestMapping("/deleteFindgoods")
@ResponseBody
public ApiResponse deleteFindgoods(@RequestParam("id") Integer id){
logger.info("enter deleteFindgoods.param is {}",id);
grassFindgoodsService.deleteFindgoods(id);
public ApiResponse deleteFindgoods(@RequestBody GrassFindgoodsReq req){
logger.info("enter deleteFindgoods.param is {}",req.getId());
grassFindgoodsService.deleteFindgoods(req.getId());
return new ApiResponse.ApiResponseBuilder().build();
}
@RequestMapping("/updateOrderBy")
@ResponseBody
public ApiResponse updateOrderBy(@RequestParam("id") Integer id,@RequestParam("orderBy") Integer orderBy){
logger.info("enter deleteFindgoods.param is {}",id);
grassFindgoodsService.updateOrderBy(id,orderBy);
public ApiResponse updateOrderBy(@RequestBody GrassFindgoodsReq req){
logger.info("enter deleteFindgoods.param is {}",req.getId());
grassFindgoodsService.updateOrderBy(req.getId(),req.getOrderBy());
return new ApiResponse.ApiResponseBuilder().build();
}
... ...
... ... @@ -79,12 +79,18 @@ public class GrassFindgoodsServiceImpl implements IGrassFindgoodsService {
@Override
public void deleteFindgoods(Integer id) {
if(id == null){
return;
}
logger.info("enter deleteFindgoods, id is {}", id);
grassFindGoodsDAO.deleteById(id);
}
@Override
public void updateOrderBy(Integer id, Integer orderBy) {
if(id == null || orderBy == null){
return;
}
grassFindGoodsDAO.updateOrderBy(id,orderBy);
}
}
... ...