提交代码
This commit is contained in:
parent
421593c0ba
commit
c11314630a
9
pom.xml
9
pom.xml
@ -205,6 +205,14 @@
|
||||
<version>${ruoyi.version}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- 拼车小程序模块 -->
|
||||
<dependency>
|
||||
<groupId>com.ruoyi</groupId>
|
||||
<artifactId>ruiyi-carpool</artifactId>
|
||||
<version>${ruoyi.version}</version>
|
||||
</dependency>
|
||||
|
||||
|
||||
</dependencies>
|
||||
</dependencyManagement>
|
||||
|
||||
@ -215,6 +223,7 @@
|
||||
<module>ruoyi-quartz</module>
|
||||
<module>ruoyi-generator</module>
|
||||
<module>ruoyi-common</module>
|
||||
<module>ruiyi-carpool</module>
|
||||
</modules>
|
||||
<packaging>pom</packaging>
|
||||
|
||||
|
40
ruiyi-carpool/pom.xml
Normal file
40
ruiyi-carpool/pom.xml
Normal file
@ -0,0 +1,40 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<parent>
|
||||
<artifactId>ruoyi</artifactId>
|
||||
<groupId>com.ruoyi</groupId>
|
||||
<version>3.7.0</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<artifactId>ruiyi-carpool</artifactId>
|
||||
|
||||
<description>
|
||||
拼车小程序
|
||||
</description>
|
||||
|
||||
<dependencies>
|
||||
<!--velocity代码生成使用模板 -->
|
||||
<dependency>
|
||||
<groupId>org.apache.velocity</groupId>
|
||||
<artifactId>velocity</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- collections工具类 -->
|
||||
<dependency>
|
||||
<groupId>commons-collections</groupId>
|
||||
<artifactId>commons-collections</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- 通用工具-->
|
||||
<dependency>
|
||||
<groupId>com.ruoyi</groupId>
|
||||
<artifactId>ruoyi-common</artifactId>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
|
||||
</project>
|
@ -0,0 +1,105 @@
|
||||
package com.ruoyi.carpool.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.carpool.domain.PBlacklist;
|
||||
import com.ruoyi.carpool.service.IPBlacklistService;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 黑名单Controller
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2021-12-03
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/carpool/blacklist")
|
||||
public class PBlacklistController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IPBlacklistService pBlacklistService;
|
||||
|
||||
/**
|
||||
* 查询黑名单列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('carpool:blacklist:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(PBlacklist pBlacklist)
|
||||
{
|
||||
startPage();
|
||||
List<PBlacklist> list = pBlacklistService.selectPBlacklistList(pBlacklist);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出黑名单列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('carpool:blacklist:export')")
|
||||
@Log(title = "黑名单", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, PBlacklist pBlacklist)
|
||||
{
|
||||
List<PBlacklist> list = pBlacklistService.selectPBlacklistList(pBlacklist);
|
||||
ExcelUtil<PBlacklist> util = new ExcelUtil<PBlacklist>(PBlacklist.class);
|
||||
util.exportExcel(response, list, "黑名单数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取黑名单详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('carpool:blacklist:query')")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||
{
|
||||
return AjaxResult.success(pBlacklistService.selectPBlacklistById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增黑名单
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('carpool:blacklist:add')")
|
||||
@Log(title = "黑名单", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody PBlacklist pBlacklist)
|
||||
{
|
||||
return toAjax(pBlacklistService.insertPBlacklist(pBlacklist));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改黑名单
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('carpool:blacklist:edit')")
|
||||
@Log(title = "黑名单", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody PBlacklist pBlacklist)
|
||||
{
|
||||
return toAjax(pBlacklistService.updatePBlacklist(pBlacklist));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除黑名单
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('carpool:blacklist:remove')")
|
||||
@Log(title = "黑名单", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable String[] ids)
|
||||
{
|
||||
return toAjax(pBlacklistService.deletePBlacklistByIds(ids));
|
||||
}
|
||||
}
|
@ -0,0 +1,108 @@
|
||||
package com.ruoyi.carpool.controller;
|
||||
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import com.ruoyi.common.utils.uuid.IdUtils;
|
||||
import com.ruoyi.common.utils.uuid.UUID;
|
||||
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.carpool.domain.PDriver;
|
||||
import com.ruoyi.carpool.service.IPDriverService;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 司机信息Controller
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2021-12-03
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/carpool/driver")
|
||||
public class PDriverController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IPDriverService pDriverService;
|
||||
|
||||
/**
|
||||
* 查询司机信息列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('carpool:driver:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(PDriver pDriver)
|
||||
{
|
||||
startPage();
|
||||
List<PDriver> list = pDriverService.selectPDriverList(pDriver);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出司机信息列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('carpool:driver:export')")
|
||||
@Log(title = "司机信息", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, PDriver pDriver)
|
||||
{
|
||||
List<PDriver> list = pDriverService.selectPDriverList(pDriver);
|
||||
ExcelUtil<PDriver> util = new ExcelUtil<PDriver>(PDriver.class);
|
||||
util.exportExcel(response, list, "司机信息数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取司机信息详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('carpool:driver:query')")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||
{
|
||||
return AjaxResult.success(pDriverService.selectPDriverById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增司机信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('carpool:driver:add')")
|
||||
@Log(title = "司机信息", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody PDriver pDriver)
|
||||
{
|
||||
pDriver.setDriverId(IdUtils.randomUUID());
|
||||
return toAjax(pDriverService.insertPDriver(pDriver));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改司机信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('carpool:driver:edit')")
|
||||
@Log(title = "司机信息", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody PDriver pDriver)
|
||||
{
|
||||
return toAjax(pDriverService.updatePDriver(pDriver));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除司机信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('carpool:driver:remove')")
|
||||
@Log(title = "司机信息", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids)
|
||||
{
|
||||
return toAjax(pDriverService.deletePDriverByIds(ids));
|
||||
}
|
||||
}
|
@ -0,0 +1,121 @@
|
||||
package com.ruoyi.carpool.controller;
|
||||
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import com.ruoyi.common.utils.DateUtils;
|
||||
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.carpool.domain.POrder;
|
||||
import com.ruoyi.carpool.service.IPOrderService;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 订单信息Controller
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2021-12-03
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/carpool/order")
|
||||
public class POrderController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IPOrderService pOrderService;
|
||||
|
||||
/**
|
||||
* 查询订单信息列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('carpool:order:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(POrder pOrder)
|
||||
{
|
||||
startPage();
|
||||
List<POrder> list = pOrderService.selectPOrderList(pOrder);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出订单信息列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('carpool:order:export')")
|
||||
@Log(title = "订单信息", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, POrder pOrder)
|
||||
{
|
||||
List<POrder> list = pOrderService.selectPOrderList(pOrder);
|
||||
ExcelUtil<POrder> util = new ExcelUtil<POrder>(POrder.class);
|
||||
util.exportExcel(response, list, "订单信息数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取订单信息详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('carpool:order:query')")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||
{
|
||||
return AjaxResult.success(pOrderService.selectPOrderById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增订单信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('carpool:order:add')")
|
||||
@Log(title = "订单信息", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody POrder pOrder)
|
||||
{
|
||||
String orderNum = DateUtils.dateTimeNow();
|
||||
pOrder.setOrderNum("carpool_"+orderNum);
|
||||
return toAjax(pOrderService.insertPOrder(pOrder));
|
||||
}
|
||||
/**
|
||||
* 司机接单
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('carpool:order:add')")
|
||||
@Log(title = "订单信息", businessType = BusinessType.INSERT)
|
||||
@PostMapping("/takeOrder")
|
||||
public AjaxResult takeOrder(@RequestBody POrder pOrder)
|
||||
{
|
||||
return toAjax(pOrderService.takeOrder(pOrder));
|
||||
}
|
||||
/**
|
||||
* 修改订单信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('carpool:order:edit')")
|
||||
@Log(title = "订单信息", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody POrder pOrder)
|
||||
{
|
||||
return toAjax(pOrderService.updatePOrder(pOrder));
|
||||
}
|
||||
/**
|
||||
* 删除订单信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('carpool:order:remove')")
|
||||
@Log(title = "订单信息", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids)
|
||||
{
|
||||
return toAjax(pOrderService.deletePOrderByIds(ids));
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,107 @@
|
||||
package com.ruoyi.carpool.controller;
|
||||
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import com.ruoyi.common.utils.uuid.IdUtils;
|
||||
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.carpool.domain.PPassenger;
|
||||
import com.ruoyi.carpool.service.IPPassengerService;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 乘客信息Controller
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2021-12-03
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/carpool/passenger")
|
||||
public class PPassengerController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IPPassengerService pPassengerService;
|
||||
|
||||
/**
|
||||
* 查询乘客信息列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('carpool:passenger:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(PPassenger pPassenger)
|
||||
{
|
||||
startPage();
|
||||
List<PPassenger> list = pPassengerService.selectPPassengerList(pPassenger);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出乘客信息列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('carpool:passenger:export')")
|
||||
@Log(title = "乘客信息", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, PPassenger pPassenger)
|
||||
{
|
||||
List<PPassenger> list = pPassengerService.selectPPassengerList(pPassenger);
|
||||
ExcelUtil<PPassenger> util = new ExcelUtil<PPassenger>(PPassenger.class);
|
||||
util.exportExcel(response, list, "乘客信息数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取乘客信息详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('carpool:passenger:query')")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||
{
|
||||
return AjaxResult.success(pPassengerService.selectPPassengerById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增乘客信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('carpool:passenger:add')")
|
||||
@Log(title = "乘客信息", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody PPassenger pPassenger)
|
||||
{
|
||||
pPassenger.setCustId(IdUtils.randomUUID());
|
||||
return toAjax(pPassengerService.insertPPassenger(pPassenger));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改乘客信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('carpool:passenger:edit')")
|
||||
@Log(title = "乘客信息", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody PPassenger pPassenger)
|
||||
{
|
||||
return toAjax(pPassengerService.updatePPassenger(pPassenger));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除乘客信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('carpool:passenger:remove')")
|
||||
@Log(title = "乘客信息", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids)
|
||||
{
|
||||
return toAjax(pPassengerService.deletePPassengerByIds(ids));
|
||||
}
|
||||
}
|
@ -0,0 +1,124 @@
|
||||
package com.ruoyi.carpool.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;
|
||||
|
||||
/**
|
||||
* 黑名单对象 p_blacklist
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2021-12-03
|
||||
*/
|
||||
public class PBlacklist extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** autoID */
|
||||
private Long id;
|
||||
|
||||
/** 平台唯一ID */
|
||||
@Excel(name = "平台唯一ID")
|
||||
private String userId;
|
||||
|
||||
/** 用户名 */
|
||||
@Excel(name = "用户名")
|
||||
private String name;
|
||||
|
||||
/** 电话 */
|
||||
@Excel(name = "电话")
|
||||
private String phone;
|
||||
|
||||
/** 年龄 */
|
||||
@Excel(name = "年龄")
|
||||
private Integer age;
|
||||
|
||||
/** 所在城市 */
|
||||
@Excel(name = "所在城市")
|
||||
private String city;
|
||||
|
||||
/** 用户类型:1乘客;2:司机 */
|
||||
@Excel(name = "用户类型")
|
||||
private String type;
|
||||
|
||||
public void setId(Long id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
public void setUserId(String userId)
|
||||
{
|
||||
this.userId = userId;
|
||||
}
|
||||
|
||||
public String getUserId()
|
||||
{
|
||||
return userId;
|
||||
}
|
||||
public void setName(String name)
|
||||
{
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getName()
|
||||
{
|
||||
return name;
|
||||
}
|
||||
public void setPhone(String phone)
|
||||
{
|
||||
this.phone = phone;
|
||||
}
|
||||
|
||||
public String getPhone()
|
||||
{
|
||||
return phone;
|
||||
}
|
||||
public void setAge(Integer age)
|
||||
{
|
||||
this.age = age;
|
||||
}
|
||||
|
||||
public Integer getAge()
|
||||
{
|
||||
return age;
|
||||
}
|
||||
public void setCity(String city)
|
||||
{
|
||||
this.city = city;
|
||||
}
|
||||
|
||||
public String getCity()
|
||||
{
|
||||
return city;
|
||||
}
|
||||
public void setType(String type)
|
||||
{
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
public String getType()
|
||||
{
|
||||
return type;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("userId", getUserId())
|
||||
.append("name", getName())
|
||||
.append("phone", getPhone())
|
||||
.append("age", getAge())
|
||||
.append("city", getCity())
|
||||
.append("type", getType())
|
||||
.append("remark", getRemark())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("updateTime", getUpdateTime())
|
||||
.toString();
|
||||
}
|
||||
}
|
@ -0,0 +1,179 @@
|
||||
package com.ruoyi.carpool.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;
|
||||
|
||||
/**
|
||||
* 司机信息对象 p_driver
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2021-12-03
|
||||
*/
|
||||
public class PDriver extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** autoID */
|
||||
private Long id;
|
||||
|
||||
/** 平台唯一ID */
|
||||
@Excel(name = "平台唯一ID")
|
||||
private String driverId;
|
||||
|
||||
/** 司机姓名 */
|
||||
@Excel(name = "司机姓名")
|
||||
private String name;
|
||||
|
||||
/** 性别:0女性1男性 */
|
||||
@Excel(name = "性别:0女性1男性")
|
||||
private String sex;
|
||||
|
||||
/** 身份证号码 */
|
||||
@Excel(name = "身份证号码")
|
||||
private String idCard;
|
||||
|
||||
/** 年龄 */
|
||||
@Excel(name = "年龄")
|
||||
private Integer age;
|
||||
|
||||
/** 手机号码 */
|
||||
@Excel(name = "手机号码")
|
||||
private String phone;
|
||||
|
||||
/** 所在城市 */
|
||||
@Excel(name = "所在城市")
|
||||
private String city;
|
||||
|
||||
/** 所在省份 */
|
||||
@Excel(name = "所在省份")
|
||||
private String province;
|
||||
|
||||
/** 所在国家 */
|
||||
@Excel(name = "所在国家")
|
||||
private String country;
|
||||
|
||||
/** 是否黑名单用户:0否,1是 */
|
||||
@Excel(name = "是否黑名单用户:0否,1是")
|
||||
private String isBlacklist;
|
||||
|
||||
public void setId(Long id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
public void setDriverId(String driverId)
|
||||
{
|
||||
this.driverId = driverId;
|
||||
}
|
||||
|
||||
public String getDriverId()
|
||||
{
|
||||
return driverId;
|
||||
}
|
||||
public void setName(String name)
|
||||
{
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getName()
|
||||
{
|
||||
return name;
|
||||
}
|
||||
public void setSex(String sex)
|
||||
{
|
||||
this.sex = sex;
|
||||
}
|
||||
|
||||
public String getSex()
|
||||
{
|
||||
return sex;
|
||||
}
|
||||
public void setIdCard(String idCard)
|
||||
{
|
||||
this.idCard = idCard;
|
||||
}
|
||||
|
||||
public String getIdCard()
|
||||
{
|
||||
return idCard;
|
||||
}
|
||||
public void setAge(Integer age)
|
||||
{
|
||||
this.age = age;
|
||||
}
|
||||
|
||||
public Integer getAge()
|
||||
{
|
||||
return age;
|
||||
}
|
||||
public void setPhone(String phone)
|
||||
{
|
||||
this.phone = phone;
|
||||
}
|
||||
|
||||
public String getPhone()
|
||||
{
|
||||
return phone;
|
||||
}
|
||||
public void setCity(String city)
|
||||
{
|
||||
this.city = city;
|
||||
}
|
||||
|
||||
public String getCity()
|
||||
{
|
||||
return city;
|
||||
}
|
||||
public void setProvince(String province)
|
||||
{
|
||||
this.province = province;
|
||||
}
|
||||
|
||||
public String getProvince()
|
||||
{
|
||||
return province;
|
||||
}
|
||||
public void setCountry(String country)
|
||||
{
|
||||
this.country = country;
|
||||
}
|
||||
|
||||
public String getCountry()
|
||||
{
|
||||
return country;
|
||||
}
|
||||
public void setIsBlacklist(String isBlacklist)
|
||||
{
|
||||
this.isBlacklist = isBlacklist;
|
||||
}
|
||||
|
||||
public String getIsBlacklist()
|
||||
{
|
||||
return isBlacklist;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("driverId", getDriverId())
|
||||
.append("name", getName())
|
||||
.append("sex", getSex())
|
||||
.append("idCard", getIdCard())
|
||||
.append("age", getAge())
|
||||
.append("phone", getPhone())
|
||||
.append("city", getCity())
|
||||
.append("province", getProvince())
|
||||
.append("country", getCountry())
|
||||
.append("isBlacklist", getIsBlacklist())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("updateTime", getUpdateTime())
|
||||
.toString();
|
||||
}
|
||||
}
|
204
ruiyi-carpool/src/main/java/com/ruoyi/carpool/domain/POrder.java
Normal file
204
ruiyi-carpool/src/main/java/com/ruoyi/carpool/domain/POrder.java
Normal file
@ -0,0 +1,204 @@
|
||||
package com.ruoyi.carpool.domain;
|
||||
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
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;
|
||||
|
||||
/**
|
||||
* 订单信息对象 p_order
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2021-12-03
|
||||
*/
|
||||
public class POrder extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** autoID */
|
||||
private Long id;
|
||||
|
||||
/** 订单号 */
|
||||
@Excel(name = "订单号")
|
||||
private String orderNum;
|
||||
|
||||
/** 出发地 */
|
||||
@Excel(name = "出发地")
|
||||
private String departure;
|
||||
|
||||
/** 目的地 */
|
||||
@Excel(name = "目的地")
|
||||
private String destination;
|
||||
|
||||
/** 出发时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@Excel(name = "出发时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date departureTime;
|
||||
|
||||
/** 当前人数 */
|
||||
@Excel(name = "当前人数")
|
||||
private Integer member;
|
||||
|
||||
/** 订单当前的状态,0:拼单中;1:拼单完成;2:取消拼单 */
|
||||
@Excel(name = "订单当前的状态,0:拼单中;1:拼单完成;2:取消拼单")
|
||||
private String state;
|
||||
|
||||
/** 逻辑删除:1:删除 */
|
||||
@Excel(name = "逻辑删除:1:删除")
|
||||
private String isdelete;
|
||||
|
||||
/** 用户唯一平台ID */
|
||||
@Excel(name = "用户唯一平台ID")
|
||||
private String createUser;
|
||||
|
||||
/** 订单更新人ID,使用逗号分割 */
|
||||
@Excel(name = "订单更新人ID,使用逗号分割")
|
||||
private String updateUser;
|
||||
|
||||
@Excel(name = "是否接单")
|
||||
private String isTake;
|
||||
|
||||
@Excel(name = "司机平台ID")
|
||||
private String driverId;
|
||||
|
||||
@Excel(name = "司机姓名")
|
||||
private String driverName;
|
||||
|
||||
public void setId(Long id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
public void setOrderNum(String orderNum)
|
||||
{
|
||||
this.orderNum = orderNum;
|
||||
}
|
||||
|
||||
public String getOrderNum()
|
||||
{
|
||||
return orderNum;
|
||||
}
|
||||
public void setDeparture(String departure)
|
||||
{
|
||||
this.departure = departure;
|
||||
}
|
||||
|
||||
public String getDeparture()
|
||||
{
|
||||
return departure;
|
||||
}
|
||||
public void setDestination(String destination)
|
||||
{
|
||||
this.destination = destination;
|
||||
}
|
||||
|
||||
public String getDestination()
|
||||
{
|
||||
return destination;
|
||||
}
|
||||
public void setDepartureTime(Date departureTime)
|
||||
{
|
||||
this.departureTime = departureTime;
|
||||
}
|
||||
|
||||
public Date getDepartureTime()
|
||||
{
|
||||
return departureTime;
|
||||
}
|
||||
public void setMember(Integer member)
|
||||
{
|
||||
this.member = member;
|
||||
}
|
||||
|
||||
public Integer getMember()
|
||||
{
|
||||
return member;
|
||||
}
|
||||
public void setState(String state)
|
||||
{
|
||||
this.state = state;
|
||||
}
|
||||
|
||||
public String getState()
|
||||
{
|
||||
return state;
|
||||
}
|
||||
public void setIsdelete(String isdelete)
|
||||
{
|
||||
this.isdelete = isdelete;
|
||||
}
|
||||
|
||||
public String getIsdelete()
|
||||
{
|
||||
return isdelete;
|
||||
}
|
||||
public void setCreateUser(String createUser)
|
||||
{
|
||||
this.createUser = createUser;
|
||||
}
|
||||
|
||||
public String getCreateUser()
|
||||
{
|
||||
return createUser;
|
||||
}
|
||||
public void setUpdateUser(String updateUser)
|
||||
{
|
||||
this.updateUser = updateUser;
|
||||
}
|
||||
|
||||
public String getUpdateUser()
|
||||
{
|
||||
return updateUser;
|
||||
}
|
||||
|
||||
public String getIsTake() {
|
||||
return isTake;
|
||||
}
|
||||
|
||||
public void setIsTake(String isTake) {
|
||||
this.isTake = isTake;
|
||||
}
|
||||
|
||||
public String getDriverId() {
|
||||
return driverId;
|
||||
}
|
||||
|
||||
public void setDriverId(String driverId) {
|
||||
this.driverId = driverId;
|
||||
}
|
||||
|
||||
public String getDriverName() {
|
||||
return driverName;
|
||||
}
|
||||
|
||||
public void setDriverName(String driverName) {
|
||||
this.driverName = driverName;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("orderNum", getOrderNum())
|
||||
.append("departure", getDeparture())
|
||||
.append("destination", getDestination())
|
||||
.append("departureTime", getDepartureTime())
|
||||
.append("member", getMember())
|
||||
.append("state", getState())
|
||||
.append("isdelete", getIsdelete())
|
||||
.append("isTake", getIsTake())
|
||||
.append("driverID", getDriverId())
|
||||
.append("driverName", getDriverName())
|
||||
.append("createUser", getCreateUser())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("updateUser", getUpdateUser())
|
||||
.append("updateTime", getUpdateTime())
|
||||
.toString();
|
||||
}
|
||||
}
|
@ -0,0 +1,196 @@
|
||||
package com.ruoyi.carpool.domain;
|
||||
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
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;
|
||||
import org.omg.CORBA.INTERNAL;
|
||||
|
||||
/**
|
||||
* 乘客信息对象 p_passenger
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2021-12-03
|
||||
*/
|
||||
public class PPassenger extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** autoID */
|
||||
private Long id;
|
||||
|
||||
/** 用户平台唯一ID */
|
||||
@Excel(name = "用户平台唯一ID")
|
||||
private String custId;
|
||||
|
||||
/** 用户名 */
|
||||
@Excel(name = "用户名")
|
||||
private String custName;
|
||||
|
||||
/** 微信昵称 */
|
||||
@Excel(name = "微信昵称")
|
||||
private String nickName;
|
||||
|
||||
/** 微信用户唯一标识 */
|
||||
@Excel(name = "微信用户唯一标识")
|
||||
private String openId;
|
||||
|
||||
/** 用户手机号码 */
|
||||
@Excel(name = "用户手机号码")
|
||||
private String custPhone;
|
||||
|
||||
/** 性别:1男性,0女性 */
|
||||
@Excel(name = "性别:1男性,0女性")
|
||||
private String sex;
|
||||
|
||||
/** 生日 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "生日", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date birthday;
|
||||
|
||||
/** 所在城市 */
|
||||
@Excel(name = "所在城市")
|
||||
private String city;
|
||||
|
||||
/** 年龄 */
|
||||
@Excel(name = "年龄")
|
||||
private Integer age;
|
||||
|
||||
/** 所在省份 */
|
||||
@Excel(name = "所在省份")
|
||||
private String province;
|
||||
|
||||
/** 是否黑名单用户:0否,1是s */
|
||||
@Excel(name = "是否黑名单用户:0否,1是s")
|
||||
private String isBlacklist;
|
||||
|
||||
public void setId(Long id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
public void setCustId(String custId)
|
||||
{
|
||||
this.custId = custId;
|
||||
}
|
||||
|
||||
public String getCustId()
|
||||
{
|
||||
return custId;
|
||||
}
|
||||
public void setCustName(String custName)
|
||||
{
|
||||
this.custName = custName;
|
||||
}
|
||||
|
||||
public String getCustName()
|
||||
{
|
||||
return custName;
|
||||
}
|
||||
public void setNickName(String nickName)
|
||||
{
|
||||
this.nickName = nickName;
|
||||
}
|
||||
|
||||
public String getNickName()
|
||||
{
|
||||
return nickName;
|
||||
}
|
||||
public void setOpenId(String openId)
|
||||
{
|
||||
this.openId = openId;
|
||||
}
|
||||
|
||||
public String getOpenId()
|
||||
{
|
||||
return openId;
|
||||
}
|
||||
public void setCustPhone(String custPhone)
|
||||
{
|
||||
this.custPhone = custPhone;
|
||||
}
|
||||
|
||||
public String getCustPhone()
|
||||
{
|
||||
return custPhone;
|
||||
}
|
||||
public void setSex(String sex)
|
||||
{
|
||||
this.sex = sex;
|
||||
}
|
||||
|
||||
public String getSex()
|
||||
{
|
||||
return sex;
|
||||
}
|
||||
public void setBirthday(Date birthday)
|
||||
{
|
||||
this.birthday = birthday;
|
||||
}
|
||||
|
||||
public Date getBirthday()
|
||||
{
|
||||
return birthday;
|
||||
}
|
||||
public void setCity(String city)
|
||||
{
|
||||
this.city = city;
|
||||
}
|
||||
|
||||
public String getCity()
|
||||
{
|
||||
return city;
|
||||
}
|
||||
public void setProvince(String province)
|
||||
{
|
||||
this.province = province;
|
||||
}
|
||||
|
||||
public String getProvince()
|
||||
{
|
||||
return province;
|
||||
}
|
||||
public void setIsBlacklist(String isBlacklist)
|
||||
{
|
||||
this.isBlacklist = isBlacklist;
|
||||
}
|
||||
|
||||
public String getIsBlacklist()
|
||||
{
|
||||
return isBlacklist;
|
||||
}
|
||||
|
||||
public Integer getAge() {
|
||||
return age;
|
||||
}
|
||||
|
||||
public void setAge(Integer age) {
|
||||
this.age = age;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("custId", getCustId())
|
||||
.append("custName", getCustName())
|
||||
.append("nickName", getNickName())
|
||||
.append("openId", getOpenId())
|
||||
.append("custPhone", getCustPhone())
|
||||
.append("sex", getSex())
|
||||
.append("birthday", getBirthday())
|
||||
.append("city", getCity())
|
||||
.append("province", getProvince())
|
||||
.append("isBlacklist", getIsBlacklist())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("updateTime", getUpdateTime())
|
||||
.append("age", getAge())
|
||||
.toString();
|
||||
}
|
||||
}
|
@ -0,0 +1,111 @@
|
||||
package com.ruoyi.carpool.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.carpool.domain.PBlacklist;
|
||||
|
||||
/**
|
||||
* 黑名单Mapper接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2021-12-03
|
||||
*/
|
||||
public interface PBlacklistMapper
|
||||
{
|
||||
/**
|
||||
* 查询黑名单
|
||||
*
|
||||
* @param id 黑名单主键
|
||||
* @return 黑名单
|
||||
*/
|
||||
public PBlacklist selectPBlacklistById(Long id);
|
||||
|
||||
/**
|
||||
* 查询黑名单列表
|
||||
*
|
||||
* @param pBlacklist 黑名单
|
||||
* @return 黑名单集合
|
||||
*/
|
||||
public List<PBlacklist> selectPBlacklistList(PBlacklist pBlacklist);
|
||||
|
||||
/**
|
||||
* 查询黑名单列表-乘客
|
||||
*
|
||||
* @param pBlacklist 黑名单
|
||||
* @return 黑名单集合
|
||||
*/
|
||||
public List<PBlacklist> selectPBlacklistListPassenger(PBlacklist pBlacklist);
|
||||
|
||||
/**
|
||||
* 查询黑名单列表-司机
|
||||
*
|
||||
* @param pBlacklist 黑名单
|
||||
* @return 黑名单集合
|
||||
*/
|
||||
public List<PBlacklist> selectPBlacklistListDriver(PBlacklist pBlacklist);
|
||||
|
||||
/**
|
||||
* 新增黑名单
|
||||
*
|
||||
* @param pBlacklist 黑名单
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertPBlacklist(PBlacklist pBlacklist);
|
||||
/**
|
||||
* 新增黑名单
|
||||
*
|
||||
* @param pBlacklist 黑名单
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertPBlacklistDriver(PBlacklist pBlacklist);
|
||||
/**
|
||||
* 新增黑名单
|
||||
*
|
||||
* @param pBlacklist 黑名单
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertPBlacklistPassenger(PBlacklist pBlacklist);
|
||||
|
||||
/**
|
||||
* 修改黑名单
|
||||
*
|
||||
* @param pBlacklist 黑名单
|
||||
* @return 结果
|
||||
*/
|
||||
public int updatePBlacklist(PBlacklist pBlacklist);
|
||||
|
||||
/**
|
||||
* 删除黑名单
|
||||
*
|
||||
* @param id 黑名单主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deletePBlacklistById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除黑名单
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deletePBlacklistByIds(Long[] ids);
|
||||
|
||||
|
||||
/**
|
||||
* 批量删除黑名单
|
||||
*
|
||||
* @param userID 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deletePBlacklistByIdDriver(String userID);
|
||||
|
||||
|
||||
/**
|
||||
* 批量删除黑名单
|
||||
*
|
||||
* @param userID 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deletePBlacklistByIdPassenger(String userID);
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,61 @@
|
||||
package com.ruoyi.carpool.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.carpool.domain.PDriver;
|
||||
|
||||
/**
|
||||
* 司机信息Mapper接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2021-12-03
|
||||
*/
|
||||
public interface PDriverMapper
|
||||
{
|
||||
/**
|
||||
* 查询司机信息
|
||||
*
|
||||
* @param id 司机信息主键
|
||||
* @return 司机信息
|
||||
*/
|
||||
public PDriver selectPDriverById(Long id);
|
||||
|
||||
/**
|
||||
* 查询司机信息列表
|
||||
*
|
||||
* @param pDriver 司机信息
|
||||
* @return 司机信息集合
|
||||
*/
|
||||
public List<PDriver> selectPDriverList(PDriver pDriver);
|
||||
|
||||
/**
|
||||
* 新增司机信息
|
||||
*
|
||||
* @param pDriver 司机信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertPDriver(PDriver pDriver);
|
||||
|
||||
/**
|
||||
* 修改司机信息
|
||||
*
|
||||
* @param pDriver 司机信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int updatePDriver(PDriver pDriver);
|
||||
|
||||
/**
|
||||
* 删除司机信息
|
||||
*
|
||||
* @param id 司机信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deletePDriverById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除司机信息
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deletePDriverByIds(Long[] ids);
|
||||
}
|
@ -0,0 +1,69 @@
|
||||
package com.ruoyi.carpool.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.carpool.domain.POrder;
|
||||
|
||||
/**
|
||||
* 订单信息Mapper接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2021-12-03
|
||||
*/
|
||||
public interface POrderMapper
|
||||
{
|
||||
/**
|
||||
* 查询订单信息
|
||||
*
|
||||
* @param id 订单信息主键
|
||||
* @return 订单信息
|
||||
*/
|
||||
public POrder selectPOrderById(Long id);
|
||||
|
||||
/**
|
||||
* 查询订单信息列表
|
||||
*
|
||||
* @param pOrder 订单信息
|
||||
* @return 订单信息集合
|
||||
*/
|
||||
public List<POrder> selectPOrderList(POrder pOrder);
|
||||
|
||||
/**
|
||||
* 新增订单信息
|
||||
*
|
||||
* @param pOrder 订单信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertPOrder(POrder pOrder);
|
||||
|
||||
/**
|
||||
* 修改订单信息
|
||||
*
|
||||
* @param pOrder 订单信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int updatePOrder(POrder pOrder);
|
||||
|
||||
/**
|
||||
* 删除订单信息
|
||||
*
|
||||
* @param id 订单信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deletePOrderById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除订单信息
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deletePOrderByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 司机接单
|
||||
*
|
||||
* @param pOrder 订单信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int takeOrderById (POrder pOrder);
|
||||
}
|
@ -0,0 +1,61 @@
|
||||
package com.ruoyi.carpool.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.carpool.domain.PPassenger;
|
||||
|
||||
/**
|
||||
* 乘客信息Mapper接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2021-12-03
|
||||
*/
|
||||
public interface PPassengerMapper
|
||||
{
|
||||
/**
|
||||
* 查询乘客信息
|
||||
*
|
||||
* @param id 乘客信息主键
|
||||
* @return 乘客信息
|
||||
*/
|
||||
public PPassenger selectPPassengerById(Long id);
|
||||
|
||||
/**
|
||||
* 查询乘客信息列表
|
||||
*
|
||||
* @param pPassenger 乘客信息
|
||||
* @return 乘客信息集合
|
||||
*/
|
||||
public List<PPassenger> selectPPassengerList(PPassenger pPassenger);
|
||||
|
||||
/**
|
||||
* 新增乘客信息
|
||||
*
|
||||
* @param pPassenger 乘客信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertPPassenger(PPassenger pPassenger);
|
||||
|
||||
/**
|
||||
* 修改乘客信息
|
||||
*
|
||||
* @param pPassenger 乘客信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int updatePPassenger(PPassenger pPassenger);
|
||||
|
||||
/**
|
||||
* 删除乘客信息
|
||||
*
|
||||
* @param id 乘客信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deletePPassengerById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除乘客信息
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deletePPassengerByIds(Long[] ids);
|
||||
}
|
@ -0,0 +1,61 @@
|
||||
package com.ruoyi.carpool.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.carpool.domain.PBlacklist;
|
||||
|
||||
/**
|
||||
* 黑名单Service接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2021-12-03
|
||||
*/
|
||||
public interface IPBlacklistService
|
||||
{
|
||||
/**
|
||||
* 查询黑名单
|
||||
*
|
||||
* @param id 黑名单主键
|
||||
* @return 黑名单
|
||||
*/
|
||||
public PBlacklist selectPBlacklistById(Long id);
|
||||
|
||||
/**
|
||||
* 查询黑名单列表
|
||||
*
|
||||
* @param pBlacklist 黑名单
|
||||
* @return 黑名单集合
|
||||
*/
|
||||
public List<PBlacklist> selectPBlacklistList(PBlacklist pBlacklist);
|
||||
|
||||
/**
|
||||
* 新增黑名单
|
||||
*
|
||||
* @param pBlacklist 黑名单
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertPBlacklist(PBlacklist pBlacklist);
|
||||
|
||||
/**
|
||||
* 修改黑名单
|
||||
*
|
||||
* @param pBlacklist 黑名单
|
||||
* @return 结果
|
||||
*/
|
||||
public int updatePBlacklist(PBlacklist pBlacklist);
|
||||
|
||||
/**
|
||||
* 批量删除黑名单
|
||||
*
|
||||
* @param ids 需要删除的黑名单主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deletePBlacklistByIds(String[] ids);
|
||||
|
||||
/**
|
||||
* 删除黑名单信息
|
||||
*
|
||||
* @param id 黑名单主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deletePBlacklistById(Long id);
|
||||
}
|
@ -0,0 +1,61 @@
|
||||
package com.ruoyi.carpool.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.carpool.domain.PDriver;
|
||||
|
||||
/**
|
||||
* 司机信息Service接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2021-12-03
|
||||
*/
|
||||
public interface IPDriverService
|
||||
{
|
||||
/**
|
||||
* 查询司机信息
|
||||
*
|
||||
* @param id 司机信息主键
|
||||
* @return 司机信息
|
||||
*/
|
||||
public PDriver selectPDriverById(Long id);
|
||||
|
||||
/**
|
||||
* 查询司机信息列表
|
||||
*
|
||||
* @param pDriver 司机信息
|
||||
* @return 司机信息集合
|
||||
*/
|
||||
public List<PDriver> selectPDriverList(PDriver pDriver);
|
||||
|
||||
/**
|
||||
* 新增司机信息
|
||||
*
|
||||
* @param pDriver 司机信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertPDriver(PDriver pDriver);
|
||||
|
||||
/**
|
||||
* 修改司机信息
|
||||
*
|
||||
* @param pDriver 司机信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int updatePDriver(PDriver pDriver);
|
||||
|
||||
/**
|
||||
* 批量删除司机信息
|
||||
*
|
||||
* @param ids 需要删除的司机信息主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deletePDriverByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 删除司机信息信息
|
||||
*
|
||||
* @param id 司机信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deletePDriverById(Long id);
|
||||
}
|
@ -0,0 +1,69 @@
|
||||
package com.ruoyi.carpool.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.carpool.domain.POrder;
|
||||
|
||||
/**
|
||||
* 订单信息Service接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2021-12-03
|
||||
*/
|
||||
public interface IPOrderService
|
||||
{
|
||||
/**
|
||||
* 查询订单信息
|
||||
*
|
||||
* @param id 订单信息主键
|
||||
* @return 订单信息
|
||||
*/
|
||||
public POrder selectPOrderById(Long id);
|
||||
|
||||
/**
|
||||
* 查询订单信息列表
|
||||
*
|
||||
* @param pOrder 订单信息
|
||||
* @return 订单信息集合
|
||||
*/
|
||||
public List<POrder> selectPOrderList(POrder pOrder);
|
||||
|
||||
/**
|
||||
* 新增订单信息
|
||||
*
|
||||
* @param pOrder 订单信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertPOrder(POrder pOrder);
|
||||
|
||||
/**
|
||||
* 修改订单信息
|
||||
*
|
||||
* @param pOrder 订单信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int updatePOrder(POrder pOrder);
|
||||
|
||||
/**
|
||||
* 批量删除订单信息
|
||||
*
|
||||
* @param ids 需要删除的订单信息主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deletePOrderByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 删除订单信息信息
|
||||
*
|
||||
* @param id 订单信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deletePOrderById(Long id);
|
||||
|
||||
/**
|
||||
* 司机接单
|
||||
*
|
||||
* @param pOrder 订单信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int takeOrder(POrder pOrder);
|
||||
}
|
@ -0,0 +1,61 @@
|
||||
package com.ruoyi.carpool.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.carpool.domain.PPassenger;
|
||||
|
||||
/**
|
||||
* 乘客信息Service接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2021-12-03
|
||||
*/
|
||||
public interface IPPassengerService
|
||||
{
|
||||
/**
|
||||
* 查询乘客信息
|
||||
*
|
||||
* @param id 乘客信息主键
|
||||
* @return 乘客信息
|
||||
*/
|
||||
public PPassenger selectPPassengerById(Long id);
|
||||
|
||||
/**
|
||||
* 查询乘客信息列表
|
||||
*
|
||||
* @param pPassenger 乘客信息
|
||||
* @return 乘客信息集合
|
||||
*/
|
||||
public List<PPassenger> selectPPassengerList(PPassenger pPassenger);
|
||||
|
||||
/**
|
||||
* 新增乘客信息
|
||||
*
|
||||
* @param pPassenger 乘客信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertPPassenger(PPassenger pPassenger);
|
||||
|
||||
/**
|
||||
* 修改乘客信息
|
||||
*
|
||||
* @param pPassenger 乘客信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int updatePPassenger(PPassenger pPassenger);
|
||||
|
||||
/**
|
||||
* 批量删除乘客信息
|
||||
*
|
||||
* @param ids 需要删除的乘客信息主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deletePPassengerByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 删除乘客信息信息
|
||||
*
|
||||
* @param id 乘客信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deletePPassengerById(Long id);
|
||||
}
|
@ -0,0 +1,126 @@
|
||||
package com.ruoyi.carpool.service.impl;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import com.ruoyi.common.utils.DateUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.ruoyi.carpool.mapper.PBlacklistMapper;
|
||||
import com.ruoyi.carpool.domain.PBlacklist;
|
||||
import com.ruoyi.carpool.service.IPBlacklistService;
|
||||
|
||||
/**
|
||||
* 黑名单Service业务层处理
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2021-12-03
|
||||
*/
|
||||
@Service
|
||||
public class PBlacklistServiceImpl implements IPBlacklistService
|
||||
{
|
||||
@Autowired
|
||||
private PBlacklistMapper pBlacklistMapper;
|
||||
|
||||
/**
|
||||
* 查询黑名单
|
||||
*
|
||||
* @param id 黑名单主键
|
||||
* @return 黑名单
|
||||
*/
|
||||
@Override
|
||||
public PBlacklist selectPBlacklistById(Long id)
|
||||
{
|
||||
return pBlacklistMapper.selectPBlacklistById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询黑名单列表
|
||||
*
|
||||
* @param pBlacklist 黑名单
|
||||
* @return 黑名单
|
||||
*/
|
||||
@Override
|
||||
public List<PBlacklist> selectPBlacklistList(PBlacklist pBlacklist)
|
||||
{
|
||||
/*查询黑名单列表*/
|
||||
List<PBlacklist> pBlacklists = new ArrayList<>();
|
||||
if("1".equals(pBlacklist.getType())){
|
||||
pBlacklists = pBlacklistMapper.selectPBlacklistListPassenger(pBlacklist);
|
||||
}else if ("2".equals(pBlacklist.getType())){
|
||||
pBlacklists = pBlacklistMapper.selectPBlacklistListDriver(pBlacklist);
|
||||
}else {
|
||||
pBlacklists = pBlacklistMapper.selectPBlacklistList(pBlacklist);
|
||||
}
|
||||
return pBlacklists;
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增黑名单
|
||||
*
|
||||
* @param pBlacklist 黑名单
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertPBlacklist(PBlacklist pBlacklist)
|
||||
{
|
||||
/*添加黑名单*/
|
||||
String type = pBlacklist.getType();
|
||||
pBlacklist.setUpdateTime(DateUtils.getNowDate());
|
||||
if("1".equals(type)){
|
||||
return pBlacklistMapper.insertPBlacklistPassenger(pBlacklist);
|
||||
}else {
|
||||
return pBlacklistMapper.insertPBlacklistDriver(pBlacklist);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改黑名单
|
||||
*
|
||||
* @param pBlacklist 黑名单
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updatePBlacklist(PBlacklist pBlacklist)
|
||||
{
|
||||
pBlacklist.setUpdateTime(DateUtils.getNowDate());
|
||||
return pBlacklistMapper.updatePBlacklist(pBlacklist);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除黑名单
|
||||
*
|
||||
* @param userIDs 需要删除的黑名单主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deletePBlacklistByIds(String[] userIDs)
|
||||
{
|
||||
PBlacklist pBlacklist = new PBlacklist();
|
||||
int flag = 0 ;
|
||||
for (int i = 0; i < userIDs.length; i++) {
|
||||
pBlacklist.setUserId(userIDs[i]);
|
||||
List<PBlacklist> pBlacklists = pBlacklistMapper.selectPBlacklistList(pBlacklist);
|
||||
if(pBlacklists.size() > 0){
|
||||
if("1".equals(pBlacklists.get(0).getType())){
|
||||
flag = pBlacklistMapper.deletePBlacklistByIdPassenger(pBlacklists.get(0).getUserId());
|
||||
}else {
|
||||
flag = pBlacklistMapper.deletePBlacklistByIdDriver(pBlacklists.get(0).getUserId());
|
||||
}
|
||||
}
|
||||
}
|
||||
return flag;
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除黑名单信息
|
||||
*
|
||||
* @param id 黑名单主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deletePBlacklistById(Long id)
|
||||
{
|
||||
return pBlacklistMapper.deletePBlacklistById(id);
|
||||
}
|
||||
}
|
@ -0,0 +1,96 @@
|
||||
package com.ruoyi.carpool.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.common.utils.DateUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.ruoyi.carpool.mapper.PDriverMapper;
|
||||
import com.ruoyi.carpool.domain.PDriver;
|
||||
import com.ruoyi.carpool.service.IPDriverService;
|
||||
|
||||
/**
|
||||
* 司机信息Service业务层处理
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2021-12-03
|
||||
*/
|
||||
@Service
|
||||
public class PDriverServiceImpl implements IPDriverService
|
||||
{
|
||||
@Autowired
|
||||
private PDriverMapper pDriverMapper;
|
||||
|
||||
/**
|
||||
* 查询司机信息
|
||||
*
|
||||
* @param id 司机信息主键
|
||||
* @return 司机信息
|
||||
*/
|
||||
@Override
|
||||
public PDriver selectPDriverById(Long id)
|
||||
{
|
||||
return pDriverMapper.selectPDriverById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询司机信息列表
|
||||
*
|
||||
* @param pDriver 司机信息
|
||||
* @return 司机信息
|
||||
*/
|
||||
@Override
|
||||
public List<PDriver> selectPDriverList(PDriver pDriver)
|
||||
{
|
||||
return pDriverMapper.selectPDriverList(pDriver);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增司机信息
|
||||
*
|
||||
* @param pDriver 司机信息
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertPDriver(PDriver pDriver)
|
||||
{
|
||||
pDriver.setCreateTime(DateUtils.getNowDate());
|
||||
return pDriverMapper.insertPDriver(pDriver);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改司机信息
|
||||
*
|
||||
* @param pDriver 司机信息
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updatePDriver(PDriver pDriver)
|
||||
{
|
||||
pDriver.setUpdateTime(DateUtils.getNowDate());
|
||||
return pDriverMapper.updatePDriver(pDriver);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除司机信息
|
||||
*
|
||||
* @param ids 需要删除的司机信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deletePDriverByIds(Long[] ids)
|
||||
{
|
||||
return pDriverMapper.deletePDriverByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除司机信息信息
|
||||
*
|
||||
* @param id 司机信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deletePDriverById(Long id)
|
||||
{
|
||||
return pDriverMapper.deletePDriverById(id);
|
||||
}
|
||||
}
|
@ -0,0 +1,111 @@
|
||||
package com.ruoyi.carpool.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.common.utils.DateUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.ruoyi.carpool.mapper.POrderMapper;
|
||||
import com.ruoyi.carpool.domain.POrder;
|
||||
import com.ruoyi.carpool.service.IPOrderService;
|
||||
|
||||
/**
|
||||
* 订单信息Service业务层处理
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2021-12-03
|
||||
*/
|
||||
@Service
|
||||
public class POrderServiceImpl implements IPOrderService
|
||||
{
|
||||
@Autowired
|
||||
private POrderMapper pOrderMapper;
|
||||
|
||||
/**
|
||||
* 查询订单信息
|
||||
*
|
||||
* @param id 订单信息主键
|
||||
* @return 订单信息
|
||||
*/
|
||||
@Override
|
||||
public POrder selectPOrderById(Long id)
|
||||
{
|
||||
return pOrderMapper.selectPOrderById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询订单信息列表
|
||||
*
|
||||
* @param pOrder 订单信息
|
||||
* @return 订单信息
|
||||
*/
|
||||
@Override
|
||||
public List<POrder> selectPOrderList(POrder pOrder)
|
||||
{
|
||||
return pOrderMapper.selectPOrderList(pOrder);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增订单信息
|
||||
*
|
||||
* @param pOrder 订单信息
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertPOrder(POrder pOrder)
|
||||
{
|
||||
pOrder.setCreateTime(DateUtils.getNowDate());
|
||||
return pOrderMapper.insertPOrder(pOrder);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改订单信息
|
||||
*
|
||||
* @param pOrder 订单信息
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updatePOrder(POrder pOrder)
|
||||
{
|
||||
pOrder.setUpdateTime(DateUtils.getNowDate());
|
||||
return pOrderMapper.updatePOrder(pOrder);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除订单信息
|
||||
*
|
||||
* @param ids 需要删除的订单信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deletePOrderByIds(Long[] ids)
|
||||
{
|
||||
return pOrderMapper.deletePOrderByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除订单信息信息
|
||||
*
|
||||
* @param id 订单信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deletePOrderById(Long id)
|
||||
{
|
||||
return pOrderMapper.deletePOrderById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除订单信息信息
|
||||
*
|
||||
* @param id 订单信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int takeOrder(POrder pOrder)
|
||||
{
|
||||
pOrder.setIsTake("1");
|
||||
return pOrderMapper.takeOrderById(pOrder);
|
||||
}
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,96 @@
|
||||
package com.ruoyi.carpool.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.common.utils.DateUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.ruoyi.carpool.mapper.PPassengerMapper;
|
||||
import com.ruoyi.carpool.domain.PPassenger;
|
||||
import com.ruoyi.carpool.service.IPPassengerService;
|
||||
|
||||
/**
|
||||
* 乘客信息Service业务层处理
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2021-12-03
|
||||
*/
|
||||
@Service
|
||||
public class PPassengerServiceImpl implements IPPassengerService
|
||||
{
|
||||
@Autowired
|
||||
private PPassengerMapper pPassengerMapper;
|
||||
|
||||
/**
|
||||
* 查询乘客信息
|
||||
*
|
||||
* @param id 乘客信息主键
|
||||
* @return 乘客信息
|
||||
*/
|
||||
@Override
|
||||
public PPassenger selectPPassengerById(Long id)
|
||||
{
|
||||
return pPassengerMapper.selectPPassengerById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询乘客信息列表
|
||||
*
|
||||
* @param pPassenger 乘客信息
|
||||
* @return 乘客信息
|
||||
*/
|
||||
@Override
|
||||
public List<PPassenger> selectPPassengerList(PPassenger pPassenger)
|
||||
{
|
||||
return pPassengerMapper.selectPPassengerList(pPassenger);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增乘客信息
|
||||
*
|
||||
* @param pPassenger 乘客信息
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertPPassenger(PPassenger pPassenger)
|
||||
{
|
||||
pPassenger.setCreateTime(DateUtils.getNowDate());
|
||||
return pPassengerMapper.insertPPassenger(pPassenger);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改乘客信息
|
||||
*
|
||||
* @param pPassenger 乘客信息
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updatePPassenger(PPassenger pPassenger)
|
||||
{
|
||||
pPassenger.setUpdateTime(DateUtils.getNowDate());
|
||||
return pPassengerMapper.updatePPassenger(pPassenger);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除乘客信息
|
||||
*
|
||||
* @param ids 需要删除的乘客信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deletePPassengerByIds(Long[] ids)
|
||||
{
|
||||
return pPassengerMapper.deletePPassengerByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除乘客信息信息
|
||||
*
|
||||
* @param id 乘客信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deletePPassengerById(Long id)
|
||||
{
|
||||
return pPassengerMapper.deletePPassengerById(id);
|
||||
}
|
||||
}
|
@ -0,0 +1,187 @@
|
||||
<?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.carpool.mapper.PBlacklistMapper">
|
||||
|
||||
<resultMap type="PBlacklist" id="PBlacklistResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="userId" column="user_id" />
|
||||
<result property="name" column="name" />
|
||||
<result property="phone" column="phone" />
|
||||
<result property="age" column="age" />
|
||||
<result property="city" column="city" />
|
||||
<result property="type" column="type" />
|
||||
<result property="remark" column="remark" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectPBlacklistVo">
|
||||
select id, user_id, name, phone, age, city, type, remark, create_time, update_time from p_blacklist
|
||||
</sql>
|
||||
|
||||
<select id="selectPBlacklistList" parameterType="PBlacklist" resultMap="PBlacklistResult">
|
||||
<!-- <include refid="selectPBlacklistVo"/>-->
|
||||
<!-- <where> -->
|
||||
<!-- <if test="userId != null and userId != ''"> and user_id = #{userId}</if>-->
|
||||
<!-- <if test="name != null and name != ''"> and name like concat('%', #{name}, '%')</if>-->
|
||||
<!-- <if test="phone != null and phone != ''"> and phone = #{phone}</if>-->
|
||||
<!-- <if test="age != null "> and age = #{age}</if>-->
|
||||
<!-- <if test="city != null and city != ''"> and city = #{city}</if>-->
|
||||
<!-- <if test="type != null "> and type = #{type}</if>-->
|
||||
<!-- </where>-->
|
||||
SELECT
|
||||
cust_id as user_id,
|
||||
cust_name as name,
|
||||
cust_phone as phone,
|
||||
age as age ,
|
||||
city as city,
|
||||
1 as type
|
||||
FROM p_passenger
|
||||
WHERE is_blacklist = 1
|
||||
<if test="userId != null and userId != ''"> and cust_id = #{userId}</if>
|
||||
<if test="name != null and name != ''"> and cust_name like concat('%', #{name}, '%')</if>
|
||||
<if test="phone != null and phone != ''"> and cust_phone = #{phone}</if>
|
||||
<if test="age != null "> and age = #{age}</if>
|
||||
<if test="city != null and city != ''"> and city = #{city}</if>
|
||||
UNION ALL
|
||||
SELECT
|
||||
driver_id as user_id,
|
||||
name as name,
|
||||
phone as phone,
|
||||
age as age ,
|
||||
city as city,
|
||||
2 as type
|
||||
FROM p_driver
|
||||
WHERE is_blacklist = 1
|
||||
<if test="userId != null and userId != ''"> and driver_id = #{userId}</if>
|
||||
<if test="name != null and name != ''"> and name like concat('%', #{name}, '%')</if>
|
||||
<if test="phone != null and phone != ''"> and phone = #{phone}</if>
|
||||
<if test="age != null "> and age = #{age}</if>
|
||||
<if test="city != null and city != ''"> and city = #{city}</if>
|
||||
</select>
|
||||
|
||||
|
||||
<select id="selectPBlacklistListPassenger" parameterType="PBlacklist" resultMap="PBlacklistResult">
|
||||
SELECT
|
||||
cust_id as user_id,
|
||||
cust_name as name,
|
||||
cust_phone as phone,
|
||||
age as age ,
|
||||
city as city,
|
||||
1 as type
|
||||
FROM p_passenger
|
||||
WHERE is_blacklist = 1
|
||||
<if test="userId != null and userId != ''"> and cust_id = #{userId}</if>
|
||||
<if test="name != null and name != ''"> and cust_name like concat('%', #{name}, '%')</if>
|
||||
<if test="phone != null and phone != ''"> and cust_phone = #{phone}</if>
|
||||
<if test="age != null "> and age = #{age}</if>
|
||||
<if test="city != null and city != ''"> and city = #{city}</if>
|
||||
</select>
|
||||
|
||||
|
||||
<select id="selectPBlacklistListDriver" parameterType="PBlacklist" resultMap="PBlacklistResult">
|
||||
SELECT
|
||||
driver_id as user_id,
|
||||
name as name,
|
||||
phone as phone,
|
||||
age as age ,
|
||||
city as city,
|
||||
2 as type
|
||||
FROM p_driver
|
||||
WHERE is_blacklist = 1
|
||||
<if test="userId != null and userId != ''"> and driver_id = #{userId}</if>
|
||||
<if test="name != null and name != ''"> and name like concat('%', #{name}, '%')</if>
|
||||
<if test="phone != null and phone != ''"> and phone = #{phone}</if>
|
||||
<if test="age != null "> and age = #{age}</if>
|
||||
<if test="city != null and city != ''"> and city = #{city}</if>
|
||||
</select>
|
||||
|
||||
|
||||
|
||||
|
||||
<select id="selectPBlacklistById" parameterType="Long" resultMap="PBlacklistResult">
|
||||
<include refid="selectPBlacklistVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertPBlacklist" parameterType="PBlacklist">
|
||||
insert into p_blacklist
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">id,</if>
|
||||
<if test="userId != null">user_id,</if>
|
||||
<if test="name != null">name,</if>
|
||||
<if test="phone != null">phone,</if>
|
||||
<if test="age != null">age,</if>
|
||||
<if test="city != null">city,</if>
|
||||
<if test="type != null">type,</if>
|
||||
<if test="remark != null">remark,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">#{id},</if>
|
||||
<if test="userId != null">#{userId},</if>
|
||||
<if test="name != null">#{name},</if>
|
||||
<if test="phone != null">#{phone},</if>
|
||||
<if test="age != null">#{age},</if>
|
||||
<if test="city != null">#{city},</if>
|
||||
<if test="type != null">#{type},</if>
|
||||
<if test="remark != null">#{remark},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
|
||||
|
||||
<update id="insertPBlacklistDriver" parameterType="PBlacklist">
|
||||
update p_driver set is_blacklist = 1 , update_time = #{updateTime} where driver_id = #{userId}
|
||||
</update>
|
||||
|
||||
|
||||
<update id="insertPBlacklistPassenger" parameterType="PBlacklist">
|
||||
update p_passenger set is_blacklist = 1 , update_time = #{updateTime} where cust_id = #{userId}
|
||||
</update>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<update id="updatePBlacklist" parameterType="PBlacklist">
|
||||
update p_blacklist
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="userId != null">user_id = #{userId},</if>
|
||||
<if test="name != null">name = #{name},</if>
|
||||
<if test="phone != null">phone = #{phone},</if>
|
||||
<if test="age != null">age = #{age},</if>
|
||||
<if test="city != null">city = #{city},</if>
|
||||
<if test="type != null">type = #{type},</if>
|
||||
<if test="remark != null">remark = #{remark},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<update id="deletePBlacklistByIdDriver" parameterType="String">
|
||||
update p_driver set is_blacklist = 0 where driver_id = #{userID}
|
||||
</update>
|
||||
|
||||
<update id="deletePBlacklistByIdPassenger" parameterType="String">
|
||||
update p_passenger set is_blacklist = 0 where cust_id = #{userID}
|
||||
</update>
|
||||
|
||||
<delete id="deletePBlacklistById" parameterType="Long">
|
||||
delete from p_blacklist where driver_id = #{id}
|
||||
</delete>
|
||||
|
||||
|
||||
<delete id="deletePBlacklistByIds" parameterType="String">
|
||||
delete from p_blacklist where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
@ -61,6 +61,11 @@
|
||||
<artifactId>ruoyi-generator</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.ruoyi</groupId>
|
||||
<artifactId>ruiyi-carpool</artifactId>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
|
Loading…
x
Reference in New Issue
Block a user