This commit is contained in:
parent
bcf167dc1e
commit
716af36fd7
|
@ -63,8 +63,8 @@ public class SysLoginService
|
|||
*/
|
||||
public String login(String username, String password, String code, String uuid)
|
||||
{
|
||||
// 验证码校验
|
||||
validateCaptcha(username, code, uuid);
|
||||
// // 验证码校验
|
||||
// validateCaptcha(username, code, uuid);
|
||||
// 登录前置校验
|
||||
loginPreCheck(username, password);
|
||||
// 用户验证
|
||||
|
|
|
@ -0,0 +1,104 @@
|
|||
package com.ruoyi.system.controller.controller;
|
||||
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.PutMapping;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import com.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.system.domain.Room;
|
||||
import com.ruoyi.system.service.IRoomService;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 房价信息Controller
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2024-12-03
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/system/room")
|
||||
public class RoomController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IRoomService roomService;
|
||||
|
||||
/**
|
||||
* 查询房价信息列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:room:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(Room room)
|
||||
{
|
||||
startPage();
|
||||
List<Room> list = roomService.selectRoomList(room);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出房价信息列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:room:export')")
|
||||
@Log(title = "房价信息", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, Room room)
|
||||
{
|
||||
List<Room> list = roomService.selectRoomList(room);
|
||||
ExcelUtil<Room> util = new ExcelUtil<Room>(Room.class);
|
||||
util.exportExcel(response, list, "房价信息数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取房价信息详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:room:query')")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||
{
|
||||
return success(roomService.selectRoomById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增房价信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:room:add')")
|
||||
@Log(title = "房价信息", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody Room room)
|
||||
{
|
||||
return toAjax(roomService.insertRoom(room));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改房价信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:room:edit')")
|
||||
@Log(title = "房价信息", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody Room room)
|
||||
{
|
||||
return toAjax(roomService.updateRoom(room));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除房价信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:room:remove')")
|
||||
@Log(title = "房价信息", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids)
|
||||
{
|
||||
return toAjax(roomService.deleteRoomByIds(ids));
|
||||
}
|
||||
}
|
|
@ -1,104 +0,0 @@
|
|||
package com.ruoyi.system.controller.controller;
|
||||
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.PutMapping;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import com.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.system.domain.TicketInformation;
|
||||
import com.ruoyi.system.service.ITicketInformationService;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 11212Controller
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2024-12-03
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/system/information")
|
||||
public class TicketInformationController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private ITicketInformationService ticketInformationService;
|
||||
|
||||
/**
|
||||
* 查询11212列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:information:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(TicketInformation ticketInformation)
|
||||
{
|
||||
startPage();
|
||||
List<TicketInformation> list = ticketInformationService.selectTicketInformationList(ticketInformation);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出11212列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:information:export')")
|
||||
@Log(title = "11212", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, TicketInformation ticketInformation)
|
||||
{
|
||||
List<TicketInformation> list = ticketInformationService.selectTicketInformationList(ticketInformation);
|
||||
ExcelUtil<TicketInformation> util = new ExcelUtil<TicketInformation>(TicketInformation.class);
|
||||
util.exportExcel(response, list, "11212数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取11212详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:information:query')")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||
{
|
||||
return success(ticketInformationService.selectTicketInformationById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增11212
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:information:add')")
|
||||
@Log(title = "11212", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody TicketInformation ticketInformation)
|
||||
{
|
||||
return toAjax(ticketInformationService.insertTicketInformation(ticketInformation));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改11212
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:information:edit')")
|
||||
@Log(title = "11212", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody TicketInformation ticketInformation)
|
||||
{
|
||||
return toAjax(ticketInformationService.updateTicketInformation(ticketInformation));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除11212
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:information:remove')")
|
||||
@Log(title = "11212", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids)
|
||||
{
|
||||
return toAjax(ticketInformationService.deleteTicketInformationByIds(ids));
|
||||
}
|
||||
}
|
|
@ -0,0 +1,79 @@
|
|||
package com.ruoyi.system.domain;
|
||||
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
import com.ruoyi.common.annotation.Excel;
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 房价信息对象 room
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2024-12-03
|
||||
*/
|
||||
public class Room extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** id */
|
||||
private Long id;
|
||||
|
||||
/** 房价类型 */
|
||||
@Excel(name = "房价类型")
|
||||
private String room;
|
||||
|
||||
/** 价格 */
|
||||
@Excel(name = "价格")
|
||||
private String price;
|
||||
|
||||
/** 详细信息 */
|
||||
@Excel(name = "详细信息")
|
||||
private String detail;
|
||||
|
||||
public void setId(Long id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
public void setRoom(String room)
|
||||
{
|
||||
this.room = room;
|
||||
}
|
||||
|
||||
public String getRoom()
|
||||
{
|
||||
return room;
|
||||
}
|
||||
public void setPrice(String price)
|
||||
{
|
||||
this.price = price;
|
||||
}
|
||||
|
||||
public String getPrice()
|
||||
{
|
||||
return price;
|
||||
}
|
||||
public void setDetail(String detail)
|
||||
{
|
||||
this.detail = detail;
|
||||
}
|
||||
|
||||
public String getDetail()
|
||||
{
|
||||
return detail;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("room", getRoom())
|
||||
.append("price", getPrice())
|
||||
.append("detail", getDetail())
|
||||
.toString();
|
||||
}
|
||||
}
|
|
@ -1,79 +0,0 @@
|
|||
package com.ruoyi.system.domain;
|
||||
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
import com.ruoyi.common.annotation.Excel;
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 11212对象 ticket_information
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2024-12-03
|
||||
*/
|
||||
public class TicketInformation extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** id */
|
||||
private Long id;
|
||||
|
||||
/** 图片 */
|
||||
@Excel(name = "图片")
|
||||
private String img;
|
||||
|
||||
/** 票价 */
|
||||
@Excel(name = "票价")
|
||||
private String Fee;
|
||||
|
||||
/** 信息 */
|
||||
@Excel(name = "信息")
|
||||
private String imformation;
|
||||
|
||||
public void setId(Long id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
public void setImg(String img)
|
||||
{
|
||||
this.img = img;
|
||||
}
|
||||
|
||||
public String getImg()
|
||||
{
|
||||
return img;
|
||||
}
|
||||
public void setFee(String Fee)
|
||||
{
|
||||
this.Fee = Fee;
|
||||
}
|
||||
|
||||
public String getFee()
|
||||
{
|
||||
return Fee;
|
||||
}
|
||||
public void setImformation(String imformation)
|
||||
{
|
||||
this.imformation = imformation;
|
||||
}
|
||||
|
||||
public String getImformation()
|
||||
{
|
||||
return imformation;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("img", getImg())
|
||||
.append("Fee", getFee())
|
||||
.append("imformation", getImformation())
|
||||
.toString();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,61 @@
|
|||
package com.ruoyi.system.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.system.domain.Room;
|
||||
|
||||
/**
|
||||
* 房价信息Mapper接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2024-12-03
|
||||
*/
|
||||
public interface RoomMapper
|
||||
{
|
||||
/**
|
||||
* 查询房价信息
|
||||
*
|
||||
* @param id 房价信息主键
|
||||
* @return 房价信息
|
||||
*/
|
||||
public Room selectRoomById(Long id);
|
||||
|
||||
/**
|
||||
* 查询房价信息列表
|
||||
*
|
||||
* @param room 房价信息
|
||||
* @return 房价信息集合
|
||||
*/
|
||||
public List<Room> selectRoomList(Room room);
|
||||
|
||||
/**
|
||||
* 新增房价信息
|
||||
*
|
||||
* @param room 房价信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertRoom(Room room);
|
||||
|
||||
/**
|
||||
* 修改房价信息
|
||||
*
|
||||
* @param room 房价信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateRoom(Room room);
|
||||
|
||||
/**
|
||||
* 删除房价信息
|
||||
*
|
||||
* @param id 房价信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteRoomById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除房价信息
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteRoomByIds(Long[] ids);
|
||||
}
|
|
@ -1,61 +0,0 @@
|
|||
package com.ruoyi.system.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.system.domain.TicketInformation;
|
||||
|
||||
/**
|
||||
* 11212Mapper接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2024-12-03
|
||||
*/
|
||||
public interface TicketInformationMapper
|
||||
{
|
||||
/**
|
||||
* 查询11212
|
||||
*
|
||||
* @param id 11212主键
|
||||
* @return 11212
|
||||
*/
|
||||
public TicketInformation selectTicketInformationById(Long id);
|
||||
|
||||
/**
|
||||
* 查询11212列表
|
||||
*
|
||||
* @param ticketInformation 11212
|
||||
* @return 11212集合
|
||||
*/
|
||||
public List<TicketInformation> selectTicketInformationList(TicketInformation ticketInformation);
|
||||
|
||||
/**
|
||||
* 新增11212
|
||||
*
|
||||
* @param ticketInformation 11212
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertTicketInformation(TicketInformation ticketInformation);
|
||||
|
||||
/**
|
||||
* 修改11212
|
||||
*
|
||||
* @param ticketInformation 11212
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateTicketInformation(TicketInformation ticketInformation);
|
||||
|
||||
/**
|
||||
* 删除11212
|
||||
*
|
||||
* @param id 11212主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteTicketInformationById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除11212
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteTicketInformationByIds(Long[] ids);
|
||||
}
|
|
@ -0,0 +1,61 @@
|
|||
package com.ruoyi.system.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.system.domain.Room;
|
||||
|
||||
/**
|
||||
* 房价信息Service接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2024-12-03
|
||||
*/
|
||||
public interface IRoomService
|
||||
{
|
||||
/**
|
||||
* 查询房价信息
|
||||
*
|
||||
* @param id 房价信息主键
|
||||
* @return 房价信息
|
||||
*/
|
||||
public Room selectRoomById(Long id);
|
||||
|
||||
/**
|
||||
* 查询房价信息列表
|
||||
*
|
||||
* @param room 房价信息
|
||||
* @return 房价信息集合
|
||||
*/
|
||||
public List<Room> selectRoomList(Room room);
|
||||
|
||||
/**
|
||||
* 新增房价信息
|
||||
*
|
||||
* @param room 房价信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertRoom(Room room);
|
||||
|
||||
/**
|
||||
* 修改房价信息
|
||||
*
|
||||
* @param room 房价信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateRoom(Room room);
|
||||
|
||||
/**
|
||||
* 批量删除房价信息
|
||||
*
|
||||
* @param ids 需要删除的房价信息主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteRoomByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 删除房价信息信息
|
||||
*
|
||||
* @param id 房价信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteRoomById(Long id);
|
||||
}
|
|
@ -1,61 +0,0 @@
|
|||
package com.ruoyi.system.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.system.domain.TicketInformation;
|
||||
|
||||
/**
|
||||
* 11212Service接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2024-12-03
|
||||
*/
|
||||
public interface ITicketInformationService
|
||||
{
|
||||
/**
|
||||
* 查询11212
|
||||
*
|
||||
* @param id 11212主键
|
||||
* @return 11212
|
||||
*/
|
||||
public TicketInformation selectTicketInformationById(Long id);
|
||||
|
||||
/**
|
||||
* 查询11212列表
|
||||
*
|
||||
* @param ticketInformation 11212
|
||||
* @return 11212集合
|
||||
*/
|
||||
public List<TicketInformation> selectTicketInformationList(TicketInformation ticketInformation);
|
||||
|
||||
/**
|
||||
* 新增11212
|
||||
*
|
||||
* @param ticketInformation 11212
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertTicketInformation(TicketInformation ticketInformation);
|
||||
|
||||
/**
|
||||
* 修改11212
|
||||
*
|
||||
* @param ticketInformation 11212
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateTicketInformation(TicketInformation ticketInformation);
|
||||
|
||||
/**
|
||||
* 批量删除11212
|
||||
*
|
||||
* @param ids 需要删除的11212主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteTicketInformationByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 删除11212信息
|
||||
*
|
||||
* @param id 11212主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteTicketInformationById(Long id);
|
||||
}
|
|
@ -0,0 +1,93 @@
|
|||
package com.ruoyi.system.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.ruoyi.system.mapper.RoomMapper;
|
||||
import com.ruoyi.system.domain.Room;
|
||||
import com.ruoyi.system.service.IRoomService;
|
||||
|
||||
/**
|
||||
* 房价信息Service业务层处理
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2024-12-03
|
||||
*/
|
||||
@Service
|
||||
public class RoomServiceImpl implements IRoomService
|
||||
{
|
||||
@Autowired
|
||||
private RoomMapper roomMapper;
|
||||
|
||||
/**
|
||||
* 查询房价信息
|
||||
*
|
||||
* @param id 房价信息主键
|
||||
* @return 房价信息
|
||||
*/
|
||||
@Override
|
||||
public Room selectRoomById(Long id)
|
||||
{
|
||||
return roomMapper.selectRoomById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询房价信息列表
|
||||
*
|
||||
* @param room 房价信息
|
||||
* @return 房价信息
|
||||
*/
|
||||
@Override
|
||||
public List<Room> selectRoomList(Room room)
|
||||
{
|
||||
return roomMapper.selectRoomList(room);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增房价信息
|
||||
*
|
||||
* @param room 房价信息
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertRoom(Room room)
|
||||
{
|
||||
return roomMapper.insertRoom(room);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改房价信息
|
||||
*
|
||||
* @param room 房价信息
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateRoom(Room room)
|
||||
{
|
||||
return roomMapper.updateRoom(room);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除房价信息
|
||||
*
|
||||
* @param ids 需要删除的房价信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteRoomByIds(Long[] ids)
|
||||
{
|
||||
return roomMapper.deleteRoomByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除房价信息信息
|
||||
*
|
||||
* @param id 房价信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteRoomById(Long id)
|
||||
{
|
||||
return roomMapper.deleteRoomById(id);
|
||||
}
|
||||
}
|
|
@ -1,93 +0,0 @@
|
|||
package com.ruoyi.system.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.ruoyi.system.mapper.TicketInformationMapper;
|
||||
import com.ruoyi.system.domain.TicketInformation;
|
||||
import com.ruoyi.system.service.ITicketInformationService;
|
||||
|
||||
/**
|
||||
* 11212Service业务层处理
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2024-12-03
|
||||
*/
|
||||
@Service
|
||||
public class TicketInformationServiceImpl implements ITicketInformationService
|
||||
{
|
||||
@Autowired
|
||||
private TicketInformationMapper ticketInformationMapper;
|
||||
|
||||
/**
|
||||
* 查询11212
|
||||
*
|
||||
* @param id 11212主键
|
||||
* @return 11212
|
||||
*/
|
||||
@Override
|
||||
public TicketInformation selectTicketInformationById(Long id)
|
||||
{
|
||||
return ticketInformationMapper.selectTicketInformationById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询11212列表
|
||||
*
|
||||
* @param ticketInformation 11212
|
||||
* @return 11212
|
||||
*/
|
||||
@Override
|
||||
public List<TicketInformation> selectTicketInformationList(TicketInformation ticketInformation)
|
||||
{
|
||||
return ticketInformationMapper.selectTicketInformationList(ticketInformation);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增11212
|
||||
*
|
||||
* @param ticketInformation 11212
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertTicketInformation(TicketInformation ticketInformation)
|
||||
{
|
||||
return ticketInformationMapper.insertTicketInformation(ticketInformation);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改11212
|
||||
*
|
||||
* @param ticketInformation 11212
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateTicketInformation(TicketInformation ticketInformation)
|
||||
{
|
||||
return ticketInformationMapper.updateTicketInformation(ticketInformation);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除11212
|
||||
*
|
||||
* @param ids 需要删除的11212主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteTicketInformationByIds(Long[] ids)
|
||||
{
|
||||
return ticketInformationMapper.deleteTicketInformationByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除11212信息
|
||||
*
|
||||
* @param id 11212主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteTicketInformationById(Long id)
|
||||
{
|
||||
return ticketInformationMapper.deleteTicketInformationById(id);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,66 @@
|
|||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.ruoyi.system.mapper.RoomMapper">
|
||||
|
||||
<resultMap type="Room" id="RoomResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="room" column="room" />
|
||||
<result property="price" column="price" />
|
||||
<result property="detail" column="detail" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectRoomVo">
|
||||
select id, room, price, detail from room
|
||||
</sql>
|
||||
|
||||
<select id="selectRoomList" parameterType="Room" resultMap="RoomResult">
|
||||
<include refid="selectRoomVo"/>
|
||||
<where>
|
||||
<if test="room != null and room != ''"> and room = #{room}</if>
|
||||
<if test="price != null and price != ''"> and price = #{price}</if>
|
||||
<if test="detail != null and detail != ''"> and detail = #{detail}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectRoomById" parameterType="Long" resultMap="RoomResult">
|
||||
<include refid="selectRoomVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertRoom" parameterType="Room" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into room
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="room != null">room,</if>
|
||||
<if test="price != null">price,</if>
|
||||
<if test="detail != null">detail,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="room != null">#{room},</if>
|
||||
<if test="price != null">#{price},</if>
|
||||
<if test="detail != null">#{detail},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateRoom" parameterType="Room">
|
||||
update room
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="room != null">room = #{room},</if>
|
||||
<if test="price != null">price = #{price},</if>
|
||||
<if test="detail != null">detail = #{detail},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteRoomById" parameterType="Long">
|
||||
delete from room where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteRoomByIds" parameterType="String">
|
||||
delete from room where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
|
@ -1,66 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.ruoyi.system.mapper.TicketInformationMapper">
|
||||
|
||||
<resultMap type="TicketInformation" id="TicketInformationResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="img" column="img" />
|
||||
<result property="fee" column="Fee" />
|
||||
<result property="imformation" column="imformation" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectTicketInformationVo">
|
||||
select id, img, Fee, imformation from ticket_information
|
||||
</sql>
|
||||
|
||||
<select id="selectTicketInformationList" parameterType="TicketInformation" resultMap="TicketInformationResult">
|
||||
<include refid="selectTicketInformationVo"/>
|
||||
<where>
|
||||
<if test="img != null and img != ''"> and img = #{img}</if>
|
||||
<if test="Fee != null and Fee != ''"> and Fee = #{Fee}</if>
|
||||
<if test="imformation != null and imformation != ''"> and imformation = #{imformation}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectTicketInformationById" parameterType="Long" resultMap="TicketInformationResult">
|
||||
<include refid="selectTicketInformationVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertTicketInformation" parameterType="TicketInformation" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into ticket_information
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="img != null">img,</if>
|
||||
<if test="Fee != null">Fee,</if>
|
||||
<if test="imformation != null">imformation,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="img != null">#{img},</if>
|
||||
<if test="Fee != null">#{Fee},</if>
|
||||
<if test="imformation != null">#{imformation},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateTicketInformation" parameterType="TicketInformation">
|
||||
update ticket_information
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="img != null">img = #{img},</if>
|
||||
<if test="Fee != null">Fee = #{Fee},</if>
|
||||
<if test="imformation != null">imformation = #{imformation},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteTicketInformationById" parameterType="Long">
|
||||
delete from ticket_information where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteTicketInformationByIds" parameterType="String">
|
||||
delete from ticket_information where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
Loading…
Reference in New Issue