mirror of
https://gitee.com/elegant_wings/xiongan-meeting.git
synced 2025-06-21 07:19:36 +08:00
修改了小程序的接口,新增了设备开门的功能
This commit is contained in:
parent
52d615d5a9
commit
5ea57ed52d
@ -154,4 +154,7 @@ public class Reservation extends BaseEntity<Reservation> {
|
|||||||
@TableField(exist = false)
|
@TableField(exist = false)
|
||||||
private RoomContent roomContent;
|
private RoomContent roomContent;
|
||||||
|
|
||||||
|
@TableField(exist = false)
|
||||||
|
private Long equipmentId;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -98,4 +98,12 @@ public class RoomEquipmentServiceImpl extends ServiceImpl<RoomEquipmentMapper, R
|
|||||||
wrapper.eq("equipment_id",id);
|
wrapper.eq("equipment_id",id);
|
||||||
return roomEquipmentMapper.selectOne(wrapper);
|
return roomEquipmentMapper.selectOne(wrapper);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public RoomEquipment selectRoomId(Long roomId) {
|
||||||
|
|
||||||
|
QueryWrapper<RoomEquipment> wrapper = new QueryWrapper<>();
|
||||||
|
wrapper.eq("room_id",roomId);
|
||||||
|
return roomEquipmentMapper.selectOne(wrapper);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -49,6 +49,9 @@ public class RoomContentServiceImpl extends ServiceImpl<RoomContentMapper, RoomC
|
|||||||
@Autowired
|
@Autowired
|
||||||
private IRoomService roomService;
|
private IRoomService roomService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private IRoomEquipmentService roomEquipmentService;
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private IBuildingDetailService buildingDetailService;
|
private IBuildingDetailService buildingDetailService;
|
||||||
|
|
||||||
@ -383,12 +386,15 @@ public class RoomContentServiceImpl extends ServiceImpl<RoomContentMapper, RoomC
|
|||||||
@Override
|
@Override
|
||||||
public List<Reservation> todayMeeting(RoomContent roomContent) {
|
public List<Reservation> todayMeeting(RoomContent roomContent) {
|
||||||
|
|
||||||
|
|
||||||
//查询当前之前以后,当前时间是否包含在会议室
|
//查询当前之前以后,当前时间是否包含在会议室
|
||||||
List<Reservation> reservations = reservationMapper.todayMeeting(roomContent.getId());
|
List<Reservation> reservations = reservationMapper.todayMeeting(roomContent.getId());
|
||||||
for (Reservation reservation : reservations) {
|
for (Reservation reservation : reservations) {
|
||||||
Long userId = reservation.getUserId();
|
Long userId = reservation.getUserId();
|
||||||
IcsCustomerStaff customerStaff = staffService.selectIcsCustomerStaffById(userId);
|
IcsCustomerStaff customerStaff = staffService.selectIcsCustomerStaffById(userId);
|
||||||
reservation.setUserName(customerStaff.getUsername());
|
reservation.setUserName(customerStaff.getUsername());
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
return reservations;
|
return reservations;
|
||||||
}
|
}
|
||||||
|
@ -60,4 +60,6 @@ public interface IRoomEquipmentService extends IService<RoomEquipment> {
|
|||||||
int deleteRoomEquipmentById(Long id);
|
int deleteRoomEquipmentById(Long id);
|
||||||
|
|
||||||
RoomEquipment selectByEquipmentId(Long id);
|
RoomEquipment selectByEquipmentId(Long id);
|
||||||
|
|
||||||
|
RoomEquipment selectRoomId(Long roomId);
|
||||||
}
|
}
|
||||||
|
@ -10,8 +10,8 @@ import java.util.Map;
|
|||||||
|
|
||||||
public class SmallWxOkHttp {
|
public class SmallWxOkHttp {
|
||||||
|
|
||||||
static String APP_ID = "wxd9f93ef41a607dd5";
|
static String APP_ID = "wx5582a07c1fbbcf06";
|
||||||
static String SECRET = "417507767334672bc46bb6eb3bf1c29b";
|
static String SECRET = "ad24130a8919c613efd9538f69abafd3";
|
||||||
|
|
||||||
public static JSONObject sendGet(String url , Map<String, String> map){
|
public static JSONObject sendGet(String url , Map<String, String> map){
|
||||||
OkHttpClient client = new OkHttpClient();
|
OkHttpClient client = new OkHttpClient();
|
||||||
|
@ -107,7 +107,7 @@ public class ApiEquipmentController extends BaseController {
|
|||||||
* 扫描二维码开门 用户id 和设备id
|
* 扫描二维码开门 用户id 和设备id
|
||||||
*/
|
*/
|
||||||
@RequiresPermissions("member:center:view")
|
@RequiresPermissions("member:center:view")
|
||||||
@PostMapping("/scanOpenDoor")
|
@GetMapping("/scanOpenDoor")
|
||||||
public R scanOpenDoor( RoomRecord roomRecord){
|
public R scanOpenDoor( RoomRecord roomRecord){
|
||||||
|
|
||||||
// long currentUserId = getCurrentUserId();
|
// long currentUserId = getCurrentUserId();
|
||||||
|
@ -68,7 +68,7 @@ public class ApiRoomController extends BaseController {
|
|||||||
private IParkService parkService;
|
private IParkService parkService;
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private RoomEquipmentMapper roomEquipmentMapper;
|
private IRoomEquipmentService roomEquipmentService;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -78,7 +78,13 @@ public class ApiRoomController extends BaseController {
|
|||||||
@PostMapping("list")
|
@PostMapping("list")
|
||||||
public R list() {
|
public R list() {
|
||||||
List<RoomContent> roomContents = roomContentService.selectApiRoomList(new RoomContent());
|
List<RoomContent> roomContents = roomContentService.selectApiRoomList(new RoomContent());
|
||||||
|
for (RoomContent roomContent : roomContents) {
|
||||||
|
RoomEquipment roomEquipment = roomEquipmentService.selectRoomId(roomContent.getRoomId());
|
||||||
|
if (null != roomEquipment){
|
||||||
|
roomContent.setEquipmentId(roomEquipment.getEquipmentId());
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
return R.data(roomContents);
|
return R.data(roomContents);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user