Commit e74cc1db by 吕明尚

增加房间修改套餐连接表

parent 88ee2160
......@@ -82,10 +82,11 @@ public class PackController extends BaseController {
@PreAuthorize("@ss.hasPermi('system:pack:add')")
@Log(title = "套餐", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody SPack SPack) {
public AjaxResult insert(@RequestBody SPack SPack) {
return toAjax(packService.insertPack(SPack));
}
/**
* 修改套餐
*/
......@@ -105,4 +106,14 @@ public class PackController extends BaseController {
public AjaxResult remove(@PathVariable Long[] ids) {
return toAjax(packService.deletePackByIds(ids));
}
/**
* 新增套餐
*/
@PreAuthorize("@ss.hasPermi('system:pack:add')")
@Log(title = "套餐", businessType = BusinessType.INSERT)
@PostMapping("/add")
public R<Long> add(@RequestBody SPack SPack) {
return R.ok(packService.addPack(SPack));
}
}
......@@ -61,4 +61,6 @@ public interface IPackService extends IService<SPack> {
public int deletePackById(Long id);
List<SPack> selectPackListByIds(List<Long> packIds);
Long addPack(SPack sPack);
}
......@@ -51,9 +51,9 @@ public class PackServiceImpl extends ServiceImpl<PackMapper, SPack> implements I
* @return 结果
*/
@Override
public int insertPack(SPack SPack) {
SPack.setCreateTime(DateUtils.getNowDate());
return packMapper.insertPack(SPack);
public int insertPack(SPack sPack) {
sPack.setCreateTime(DateUtils.getNowDate());
return packMapper.insertPack(sPack);
}
/**
......@@ -96,4 +96,11 @@ public class PackServiceImpl extends ServiceImpl<PackMapper, SPack> implements I
queryWrapper.in(SPack::getId, packIds);
return packMapper.selectList(queryWrapper);
}
@Override
public Long addPack(SPack sPack) {
sPack.setCreateTime(DateUtils.getNowDate());
packMapper.insertPack(sPack);
return sPack.getId();
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment