菜品dishesId
This commit is contained in:
parent
3212a16544
commit
ef43aef4af
|
|
@ -68,9 +68,9 @@ public class MenuCollectionDishesController extends BaseController {
|
||||||
*/
|
*/
|
||||||
@ApiOperation(value = "获取菜品收藏详细信息")
|
@ApiOperation(value = "获取菜品收藏详细信息")
|
||||||
//@RequiresPermissions("menu:dishes:query")
|
//@RequiresPermissions("menu:dishes:query")
|
||||||
@GetMapping(value = "/{id}")
|
@GetMapping(value = "/{dishesId}")
|
||||||
public AjaxResult getInfo(@PathVariable("id") Long id) {
|
public AjaxResult getInfo(@PathVariable("dishesId") Long dishesId) {
|
||||||
return success(menuCollectionDishesService.selectMenuCollectionDishesById(id));
|
return success(menuCollectionDishesService.selectMenuCollectionDishesById(dishesId));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -112,8 +112,8 @@ public class MenuCollectionDishesController extends BaseController {
|
||||||
//@PreventRepeatSubmit
|
//@PreventRepeatSubmit
|
||||||
//@RequiresPermissions("menu:dishes:remove")
|
//@RequiresPermissions("menu:dishes:remove")
|
||||||
@SysLog(title = "菜品收藏", businessType = OperaType.DELETE, logType = 1,module = "仓储管理->删除菜品收藏")
|
@SysLog(title = "菜品收藏", businessType = OperaType.DELETE, logType = 1,module = "仓储管理->删除菜品收藏")
|
||||||
@PostMapping("/del/{ids}")
|
@PostMapping("/del/{dishesIds}")
|
||||||
public AjaxResult remove(@PathVariable Long[] ids) {
|
public AjaxResult remove(@PathVariable Long[] dishesIds) {
|
||||||
return toAjax(menuCollectionDishesService.deleteMenuCollectionDishesByIds(ids));
|
return toAjax(menuCollectionDishesService.deleteMenuCollectionDishesByIds(dishesIds));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -13,10 +13,10 @@ public interface MenuCollectionDishesMapper {
|
||||||
/**
|
/**
|
||||||
* 查询菜品收藏
|
* 查询菜品收藏
|
||||||
*
|
*
|
||||||
* @param id 菜品收藏主键
|
* @param dishesId 菜品收藏主键
|
||||||
* @return 菜品收藏
|
* @return 菜品收藏
|
||||||
*/
|
*/
|
||||||
public MenuCollectionDishes selectMenuCollectionDishesById(Long id);
|
public MenuCollectionDishes selectMenuCollectionDishesById(Long dishesId);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询菜品收藏列表
|
* 查询菜品收藏列表
|
||||||
|
|
@ -45,16 +45,16 @@ public interface MenuCollectionDishesMapper {
|
||||||
/**
|
/**
|
||||||
* 删除菜品收藏
|
* 删除菜品收藏
|
||||||
*
|
*
|
||||||
* @param id 菜品收藏主键
|
* @param dishesId 菜品收藏主键
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
public int deleteMenuCollectionDishesById(Long id);
|
public int deleteMenuCollectionDishesById(Long dishesId);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 批量删除菜品收藏
|
* 批量删除菜品收藏
|
||||||
*
|
*
|
||||||
* @param ids 需要删除的数据主键集合
|
* @param dishesIds 需要删除的数据主键集合
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
public int deleteMenuCollectionDishesByIds(Long[] ids);
|
public int deleteMenuCollectionDishesByIds(Long[] dishesIds);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -13,10 +13,10 @@ public interface IMenuCollectionDishesService {
|
||||||
/**
|
/**
|
||||||
* 查询菜品收藏
|
* 查询菜品收藏
|
||||||
*
|
*
|
||||||
* @param id 菜品收藏主键
|
* @param dishesId 菜品收藏主键
|
||||||
* @return 菜品收藏
|
* @return 菜品收藏
|
||||||
*/
|
*/
|
||||||
public MenuCollectionDishes selectMenuCollectionDishesById(Long id);
|
public MenuCollectionDishes selectMenuCollectionDishesById(Long dishesId);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询菜品收藏列表
|
* 查询菜品收藏列表
|
||||||
|
|
@ -45,16 +45,16 @@ public interface IMenuCollectionDishesService {
|
||||||
/**
|
/**
|
||||||
* 批量删除菜品收藏
|
* 批量删除菜品收藏
|
||||||
*
|
*
|
||||||
* @param ids 需要删除的菜品收藏主键集合
|
* @param dishesIds 需要删除的菜品收藏主键集合
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
public int deleteMenuCollectionDishesByIds(Long[] ids);
|
public int deleteMenuCollectionDishesByIds(Long[] dishesIds);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 删除菜品收藏信息
|
* 删除菜品收藏信息
|
||||||
*
|
*
|
||||||
* @param id 菜品收藏主键
|
* @param dishesId 菜品收藏主键
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
public int deleteMenuCollectionDishesById(Long id);
|
public int deleteMenuCollectionDishesById(Long dishesId);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -23,12 +23,12 @@ public class MenuCollectionDishesServiceImpl implements IMenuCollectionDishesSer
|
||||||
/**
|
/**
|
||||||
* 查询菜品收藏
|
* 查询菜品收藏
|
||||||
*
|
*
|
||||||
* @param id 菜品收藏主键
|
* @param dishesId 菜品收藏主键
|
||||||
* @return 菜品收藏
|
* @return 菜品收藏
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public MenuCollectionDishes selectMenuCollectionDishesById(Long id) {
|
public MenuCollectionDishes selectMenuCollectionDishesById(Long dishesId) {
|
||||||
return menuCollectionDishesMapper.selectMenuCollectionDishesById(id);
|
return menuCollectionDishesMapper.selectMenuCollectionDishesById(dishesId);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -40,7 +40,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
|
|
||||||
<select id="selectMenuCollectionDishesById" parameterType="Long" resultMap="MenuCollectionDishesResult">
|
<select id="selectMenuCollectionDishesById" parameterType="Long" resultMap="MenuCollectionDishesResult">
|
||||||
<include refid="selectMenuCollectionDishesVo"/>
|
<include refid="selectMenuCollectionDishesVo"/>
|
||||||
where mcd.id = #{id}
|
where mcd.dishes_id = #{dishesId}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<insert id="insertMenuCollectionDishes" parameterType="com.bonus.canteen.core.menu.domain.MenuCollectionDishes" useGeneratedKeys="true" keyProperty="id">
|
<insert id="insertMenuCollectionDishes" parameterType="com.bonus.canteen.core.menu.domain.MenuCollectionDishes" useGeneratedKeys="true" keyProperty="id">
|
||||||
|
|
@ -82,17 +82,17 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<if test="updateBy != null">update_by = #{updateBy},</if>
|
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||||
</trim>
|
</trim>
|
||||||
where id = #{id}
|
where dishes_id = #{dishesId}
|
||||||
</update>
|
</update>
|
||||||
|
|
||||||
<delete id="deleteMenuCollectionDishesById" parameterType="Long">
|
<delete id="deleteMenuCollectionDishesById" parameterType="Long">
|
||||||
delete from menu_collection_dishes where id = #{id}
|
delete from menu_collection_dishes where dishes_id = #{dishesId}
|
||||||
</delete>
|
</delete>
|
||||||
|
|
||||||
<delete id="deleteMenuCollectionDishesByIds" parameterType="String">
|
<delete id="deleteMenuCollectionDishesByIds" parameterType="String">
|
||||||
delete from menu_collection_dishes where id in
|
delete from menu_collection_dishes where dishes_id in
|
||||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||||
#{id}
|
#{dishesId}
|
||||||
</foreach>
|
</foreach>
|
||||||
</delete>
|
</delete>
|
||||||
</mapper>
|
</mapper>
|
||||||
Loading…
Reference in New Issue