update RoomType

This commit is contained in:
freeebird
2018-10-16 14:32:27 +08:00
parent 128de0cf17
commit 97e522a9f4
8 changed files with 215 additions and 36 deletions

View File

@@ -0,0 +1,26 @@
package cn.mafangui.hotel.controller;
import cn.mafangui.hotel.entity.RoomType;
import cn.mafangui.hotel.service.RoomTypeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
@RestController
@RequestMapping(value = "/roomType")
public class RoomTypeController {
@Autowired
private RoomTypeService roomTypeService;
@RequestMapping(value = "/add")
public int addNewType(int roomType,String typeName,double bookingPrice,double bookingDiscount){
RoomType rt = new RoomType(roomType,typeName,bookingPrice,bookingDiscount);
return roomTypeService.addRoomType(rt);
}
public int delType(int roomType,String typeName){
}
}