mirror of
https://gitee.com/elegant_wings/xiongan-meeting.git
synced 2025-06-21 04:59:36 +08:00
修改了支付的问题,修改了删除房间的问题
This commit is contained in:
parent
c468ceb2eb
commit
6f9d0aaeb3
@ -183,16 +183,17 @@ public class CustomerStaffController extends BaseController {
|
||||
//如果是上海的小程序
|
||||
Long icsCustomerId = icsCustomerStaff.getIcsCustomerId();
|
||||
Customer customer1 = customerService.selectCustomerById(icsCustomerId);
|
||||
log.info("parkId为:",customer1.getParkId().toString());
|
||||
|
||||
if (customer1.getParkId() == 26){
|
||||
IcsCustomerStaff customerStaff = icsCustomerStaffService.selectUserByMobile(icsCustomerStaff.getMobile());
|
||||
if (customerStaff != null){
|
||||
int i = icsCustomerStaffService.updateIcsCustomerStaff(icsCustomerStaff);
|
||||
int i = icsCustomerStaffService.updateIcsCustomerStaff(customerStaff);
|
||||
StaffCustomer staffCustomer = new StaffCustomer();
|
||||
staffCustomer.setIcsCustomerId(icsCustomerStaff.getIcsCustomerId());
|
||||
staffCustomer.setStaffId(customerStaff.getId());
|
||||
List<StaffCustomer> staffCustomers = staffCustomerService.selectStaffCustomerList(staffCustomer);
|
||||
if (staffCustomers.size() == 0) {
|
||||
if (staffCustomers.isEmpty()) {
|
||||
staffCustomerService.insertStaffCustomer(staffCustomer);
|
||||
}
|
||||
return toAjax(i);
|
||||
|
@ -1,11 +1,17 @@
|
||||
package com.ics.admin.controller;
|
||||
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.ics.admin.domain.Customer;
|
||||
import com.ics.admin.domain.Room;
|
||||
import com.ics.admin.domain.meeting.RoomContent;
|
||||
import com.ics.admin.service.ICustomerService;
|
||||
import com.ics.admin.service.IRoomService;
|
||||
import com.ics.admin.service.meeting.IRoomContentService;
|
||||
import com.ics.admin.vo.RoomMapVO;
|
||||
import com.ics.common.core.controller.BaseController;
|
||||
import com.ics.common.core.domain.R;
|
||||
import com.ics.common.utils.DateUtils;
|
||||
import com.ics.common.utils.StringUtils;
|
||||
import com.ics.common.utils.ValidatorUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
@ -26,6 +32,12 @@ public class RoomController extends BaseController {
|
||||
@Autowired
|
||||
private IRoomService roomService;
|
||||
|
||||
@Autowired
|
||||
private ICustomerService customerService;
|
||||
|
||||
@Autowired
|
||||
private IRoomContentService roomContentService;
|
||||
|
||||
|
||||
/**
|
||||
* 查询房间管理
|
||||
@ -74,6 +86,17 @@ public class RoomController extends BaseController {
|
||||
@RequiresPermissions("admin:room:remove")
|
||||
@PostMapping("remove")
|
||||
public R remove(String ids) {
|
||||
String[] idsArray = StrUtil.split(ids,",");
|
||||
for (String id : idsArray) {
|
||||
List<Customer> customers = customerService.selectCustomerByRoomId(Long.valueOf(id));
|
||||
if (customers.size() > 0) {
|
||||
return R.error("该房间下存在企业,请先删除企业");
|
||||
}
|
||||
RoomContent roomContent = roomContentService.selectByRoomId(Long.valueOf(id));
|
||||
if (roomContent != null) {
|
||||
return R.error("该房间下存在会议室,请先删除会议室");
|
||||
}
|
||||
}
|
||||
return toAjax(roomService.deleteRoomByIds(ids));
|
||||
}
|
||||
|
||||
|
@ -63,4 +63,7 @@ public interface ICustomerService extends IService<Customer> {
|
||||
List<Customer> selectByRoomId(Long id,Long parkId);
|
||||
|
||||
Customer selectCustomerByIdAndParkId(Long icsCustomerId, Long parkId);
|
||||
|
||||
List<Customer> selectCustomerByRoomId(Long aLong);
|
||||
|
||||
}
|
@ -108,4 +108,11 @@ public class CustomerServiceImpl extends ServiceImpl<CustomerMapper, Customer> i
|
||||
return customerMapper.selectOne(queryWrapper);
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Customer> selectCustomerByRoomId(Long id) {
|
||||
QueryWrapper<Customer> queryWrapper =new QueryWrapper<>();
|
||||
queryWrapper.like("room_id",id);
|
||||
return customerMapper.selectList(queryWrapper);
|
||||
}
|
||||
}
|
@ -187,7 +187,7 @@ public class WxLoginAPIController extends BaseController {
|
||||
staffOpen1.setTenantId(Long.valueOf(tenantId));
|
||||
staffOpenService.insertStaffOpen(staffOpen1);
|
||||
}
|
||||
|
||||
customerStaff1.setOpenid(openid);
|
||||
icsCustomerStaffService.updateIcsCustomerStaff(customerStaff1);
|
||||
User user = new User();
|
||||
PublishFactory.recordLoginInfo(customerStaff1.getUsername(), Constants.LOGIN_SUCCESS, MessageUtils.message("user.login.success"));
|
||||
@ -302,6 +302,7 @@ public class WxLoginAPIController extends BaseController {
|
||||
icsCustomerStaff.setUsername(phoneNumber);
|
||||
icsCustomerStaff.setGender("0");
|
||||
icsCustomerStaff.setStatus("0");
|
||||
icsCustomerStaff.setOpenid(openid);
|
||||
int i = icsCustomerStaffService.insertIcsCustomerStaff(icsCustomerStaff);
|
||||
|
||||
StaffOpen staffOpen1 = new StaffOpen();
|
||||
|
@ -267,6 +267,7 @@ public class ApiRoomContentController extends BaseController {
|
||||
reservation.setCreateBy(customerStaff.getUsername());
|
||||
}
|
||||
// reservation.setCreateBy();
|
||||
reservation.setCreateTime(new Date());
|
||||
boolean save = reservationService.save(reservation);
|
||||
|
||||
if (save) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user