add order module
This commit is contained in:
parent
ca19749012
commit
6a2259d048
|
|
@ -15,6 +15,7 @@
|
|||
<module>zlpt-file</module>
|
||||
<module>zlpt-home</module>
|
||||
<module>zlpt-bigScreen</module>
|
||||
<module>zlpt-order</module>
|
||||
</modules>
|
||||
|
||||
<artifactId>zlpt-modules</artifactId>
|
||||
|
|
|
|||
|
|
@ -0,0 +1,105 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<parent>
|
||||
<groupId>com.bonus.zlpt</groupId>
|
||||
<artifactId>zlpt-modules</artifactId>
|
||||
<version>3.6.3</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<artifactId>zlpt-modules-order</artifactId>
|
||||
|
||||
<description>
|
||||
zlpt-modules-order订单模块
|
||||
</description>
|
||||
|
||||
<dependencies>
|
||||
|
||||
<!-- SpringCloud Alibaba Nacos -->
|
||||
<dependency>
|
||||
<groupId>com.alibaba.cloud</groupId>
|
||||
<artifactId>spring-cloud-starter-alibaba-nacos-discovery</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- SpringCloud Alibaba Nacos Config -->
|
||||
<dependency>
|
||||
<groupId>com.alibaba.cloud</groupId>
|
||||
<artifactId>spring-cloud-starter-alibaba-nacos-config</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- SpringCloud Alibaba Sentinel -->
|
||||
<dependency>
|
||||
<groupId>com.alibaba.cloud</groupId>
|
||||
<artifactId>spring-cloud-starter-alibaba-sentinel</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- SpringBoot Actuator -->
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-actuator</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- Swagger UI -->
|
||||
<dependency>
|
||||
<groupId>io.springfox</groupId>
|
||||
<artifactId>springfox-swagger-ui</artifactId>
|
||||
<version>${swagger.fox.version}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- Mysql Connector -->
|
||||
<dependency>
|
||||
<groupId>com.mysql</groupId>
|
||||
<artifactId>mysql-connector-j</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- RuoYi Common DataSource -->
|
||||
<dependency>
|
||||
<groupId>com.bonus.zlpt</groupId>
|
||||
<artifactId>zlpt-common-datasource</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- RuoYi Common DataScope -->
|
||||
<dependency>
|
||||
<groupId>com.bonus.zlpt</groupId>
|
||||
<artifactId>zlpt-common-datascope</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- RuoYi Common Log -->
|
||||
<dependency>
|
||||
<groupId>com.bonus.zlpt</groupId>
|
||||
<artifactId>zlpt-common-log</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.bonus.zlpt</groupId>
|
||||
<artifactId>zlpt-common-log</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.bonus.zlpt</groupId>
|
||||
<artifactId>zlpt-common-swagger</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- RuoYi Common Swagger -->
|
||||
|
||||
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<finalName>${project.artifactId}</finalName>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-maven-plugin</artifactId>
|
||||
<executions>
|
||||
<execution>
|
||||
<goals>
|
||||
<goal>repackage</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
</project>
|
||||
|
|
@ -0,0 +1,35 @@
|
|||
package com.bonus.zlpt.order;
|
||||
|
||||
import com.bonus.zlpt.common.security.annotation.EnableCustomConfig;
|
||||
import com.bonus.zlpt.common.security.annotation.EnableRyFeignClients;
|
||||
import com.bonus.zlpt.common.swagger.annotation.EnableCustomSwagger2;
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
|
||||
/**
|
||||
* 订单模块
|
||||
*
|
||||
* @author xsheng
|
||||
* @date 2023-12-01
|
||||
*/
|
||||
@EnableCustomConfig
|
||||
@EnableCustomSwagger2
|
||||
@EnableRyFeignClients
|
||||
@SpringBootApplication
|
||||
public class ZlptOrderApplication
|
||||
{
|
||||
public static void main(String[] args)
|
||||
{
|
||||
SpringApplication.run(ZlptOrderApplication.class, args);
|
||||
System.out.println("(♥◠‿◠)ノ゙ 订单模块启动成功 ლ(´ڡ`ლ)゙ \n" +
|
||||
" .-------. ____ __ \n" +
|
||||
" | _ _ \\ \\ \\ / / \n" +
|
||||
" | ( ' ) | \\ _. / ' \n" +
|
||||
" |(_ o _) / _( )_ .' \n" +
|
||||
" | (_,_).' __ ___(_ o _)' \n" +
|
||||
" | |\\ \\ | || |(_,_)' \n" +
|
||||
" | | \\ `' /| `-' / \n" +
|
||||
" | | \\ / \\ / \n" +
|
||||
" ''-' `'-' `-..-' ");
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,104 @@
|
|||
package com.bonus.zlpt.order.controller;
|
||||
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import com.bonus.zlpt.common.core.utils.poi.ExcelUtil;
|
||||
import com.bonus.zlpt.common.core.web.controller.BaseController;
|
||||
import com.bonus.zlpt.common.core.web.domain.AjaxResult;
|
||||
import com.bonus.zlpt.common.core.web.page.TableDataInfo;
|
||||
import com.bonus.zlpt.common.log.annotation.Log;
|
||||
import com.bonus.zlpt.common.log.enums.BusinessType;
|
||||
import com.bonus.zlpt.common.security.annotation.RequiresPermissions;
|
||||
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.bonus.zlpt.order.domain.OrderDetails;
|
||||
import com.bonus.zlpt.order.service.IOrderDetailsService;
|
||||
|
||||
/**
|
||||
* 订单详细Controller
|
||||
*
|
||||
* @author xsheng
|
||||
* @date 2023-12-01
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/details")
|
||||
public class OrderDetailsController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IOrderDetailsService orderDetailsService;
|
||||
|
||||
/**
|
||||
* 查询订单详细列表
|
||||
*/
|
||||
@RequiresPermissions("order:details:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(OrderDetails orderDetails)
|
||||
{
|
||||
startPage();
|
||||
List<OrderDetails> list = orderDetailsService.selectOrderDetailsList(orderDetails);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出订单详细列表
|
||||
*/
|
||||
@RequiresPermissions("order:details:export")
|
||||
@Log(title = "订单详细", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, OrderDetails orderDetails)
|
||||
{
|
||||
List<OrderDetails> list = orderDetailsService.selectOrderDetailsList(orderDetails);
|
||||
ExcelUtil<OrderDetails> util = new ExcelUtil<OrderDetails>(OrderDetails.class);
|
||||
util.exportExcel(response, list, "订单详细数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取订单详细详细信息
|
||||
*/
|
||||
@RequiresPermissions("order:details:query")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||
{
|
||||
return success(orderDetailsService.selectOrderDetailsById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增订单详细
|
||||
*/
|
||||
@RequiresPermissions("order:details:add")
|
||||
@Log(title = "订单详细", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody OrderDetails orderDetails)
|
||||
{
|
||||
return toAjax(orderDetailsService.insertOrderDetails(orderDetails));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改订单详细
|
||||
*/
|
||||
@RequiresPermissions("order:details:edit")
|
||||
@Log(title = "订单详细", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody OrderDetails orderDetails)
|
||||
{
|
||||
return toAjax(orderDetailsService.updateOrderDetails(orderDetails));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除订单详细
|
||||
*/
|
||||
@RequiresPermissions("order:details:remove")
|
||||
@Log(title = "订单详细", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids)
|
||||
{
|
||||
return toAjax(orderDetailsService.deleteOrderDetailsByIds(ids));
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,104 @@
|
|||
package com.bonus.zlpt.order.controller;
|
||||
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import com.bonus.zlpt.common.core.utils.poi.ExcelUtil;
|
||||
import com.bonus.zlpt.common.core.web.controller.BaseController;
|
||||
import com.bonus.zlpt.common.core.web.domain.AjaxResult;
|
||||
import com.bonus.zlpt.common.core.web.page.TableDataInfo;
|
||||
import com.bonus.zlpt.common.log.annotation.Log;
|
||||
import com.bonus.zlpt.common.log.enums.BusinessType;
|
||||
import com.bonus.zlpt.common.security.annotation.RequiresPermissions;
|
||||
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.bonus.zlpt.order.domain.OrderInfo;
|
||||
import com.bonus.zlpt.order.service.IOrderInfoService;
|
||||
/**
|
||||
* 订单信息Controller
|
||||
*
|
||||
* @author xsheng
|
||||
* @date 2023-12-01
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/info")
|
||||
public class OrderInfoController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IOrderInfoService orderInfoService;
|
||||
|
||||
/**
|
||||
* 查询订单信息列表
|
||||
*/
|
||||
@RequiresPermissions("order:info:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(OrderInfo orderInfo)
|
||||
{
|
||||
startPage();
|
||||
List<OrderInfo> list = orderInfoService.selectOrderInfoList(orderInfo);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出订单信息列表
|
||||
*/
|
||||
@RequiresPermissions("order:info:export")
|
||||
@Log(title = "订单信息", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, OrderInfo orderInfo)
|
||||
{
|
||||
List<OrderInfo> list = orderInfoService.selectOrderInfoList(orderInfo);
|
||||
ExcelUtil<OrderInfo> util = new ExcelUtil<OrderInfo>(OrderInfo.class);
|
||||
util.exportExcel(response, list, "订单信息数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取订单信息详细信息
|
||||
*/
|
||||
@RequiresPermissions("order:info:query")
|
||||
@GetMapping(value = "/{orderId}")
|
||||
public AjaxResult getInfo(@PathVariable("orderId") Long orderId)
|
||||
{
|
||||
return success(orderInfoService.selectOrderInfoByOrderId(orderId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增订单信息
|
||||
*/
|
||||
@RequiresPermissions("order:info:add")
|
||||
@Log(title = "订单信息", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody OrderInfo orderInfo)
|
||||
{
|
||||
return toAjax(orderInfoService.insertOrderInfo(orderInfo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改订单信息
|
||||
*/
|
||||
@RequiresPermissions("order:info:edit")
|
||||
@Log(title = "订单信息", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody OrderInfo orderInfo)
|
||||
{
|
||||
return toAjax(orderInfoService.updateOrderInfo(orderInfo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除订单信息
|
||||
*/
|
||||
@RequiresPermissions("order:info:remove")
|
||||
@Log(title = "订单信息", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{orderIds}")
|
||||
public AjaxResult remove(@PathVariable Long[] orderIds)
|
||||
{
|
||||
return toAjax(orderInfoService.deleteOrderInfoByOrderIds(orderIds));
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,102 @@
|
|||
package com.bonus.zlpt.order.domain;
|
||||
|
||||
import com.bonus.zlpt.common.core.annotation.Excel;
|
||||
import com.bonus.zlpt.common.core.web.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
import lombok.ToString;
|
||||
|
||||
/**
|
||||
* 订单详细对象 ma_order_details
|
||||
*
|
||||
* @author xsheng
|
||||
* @date 2023-12-01
|
||||
*/
|
||||
@Data
|
||||
@ToString
|
||||
public class OrderDetails extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** $column.columnComment */
|
||||
private Long id;
|
||||
|
||||
/** 订单id */
|
||||
@Excel(name = "订单id")
|
||||
private Long orderId;
|
||||
|
||||
/** 需求单位 */
|
||||
@Excel(name = "需求单位")
|
||||
private String needCompany;
|
||||
|
||||
/** 设备计划进场时间 */
|
||||
@Excel(name = "设备计划进场时间")
|
||||
private String planStartTime;
|
||||
|
||||
/** 是否需要机手 */
|
||||
@Excel(name = "是否需要机手")
|
||||
private String isMachinist;
|
||||
|
||||
/** 详细地址 */
|
||||
@Excel(name = "详细地址")
|
||||
private String address;
|
||||
|
||||
/** 工期时长 */
|
||||
@Excel(name = "工期时长")
|
||||
private String duration;
|
||||
|
||||
/** 发票类型 */
|
||||
@Excel(name = "发票类型")
|
||||
private String invoiceType;
|
||||
|
||||
/** 项目说明 */
|
||||
@Excel(name = "项目说明")
|
||||
private String description;
|
||||
|
||||
/** 设备id */
|
||||
@Excel(name = "设备id")
|
||||
private Long maId;
|
||||
|
||||
/** 租赁类型 */
|
||||
@Excel(name = "租赁类型")
|
||||
private Long leaseType;
|
||||
|
||||
/** 租赁单价 */
|
||||
@Excel(name = "租赁单价")
|
||||
private String leasePrice;
|
||||
|
||||
/** 机手单价 */
|
||||
@Excel(name = "机手单价")
|
||||
private String machinistPrice;
|
||||
|
||||
/** 订单合同 */
|
||||
@Excel(name = "订单合同")
|
||||
private String orderContract;
|
||||
|
||||
/** 机手姓名 */
|
||||
@Excel(name = "机手姓名")
|
||||
private String machinistName;
|
||||
|
||||
/** 联系电话 */
|
||||
@Excel(name = "联系电话")
|
||||
private String phone;
|
||||
|
||||
/** 物流司机电话 */
|
||||
@Excel(name = "物流司机电话")
|
||||
private String logisticsPhone;
|
||||
|
||||
/** 设备实际进场时间 */
|
||||
@Excel(name = "设备实际进场时间")
|
||||
private String realStartTime;
|
||||
|
||||
/** 租方进场确认人 */
|
||||
@Excel(name = "租方进场确认人")
|
||||
private String rentalName;
|
||||
|
||||
/** 出租方进场确认人 */
|
||||
@Excel(name = "出租方进场确认人")
|
||||
private String tenantName;
|
||||
|
||||
/** 进场附件 */
|
||||
@Excel(name = "进场附件")
|
||||
private String entryAttachment;
|
||||
}
|
||||
|
|
@ -0,0 +1,65 @@
|
|||
package com.bonus.zlpt.order.domain;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
import com.bonus.zlpt.common.core.annotation.Excel;
|
||||
import com.bonus.zlpt.common.core.web.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
import lombok.ToString;
|
||||
|
||||
/**
|
||||
* 订单信息对象 ma_order_info
|
||||
*
|
||||
* @author xsheng
|
||||
* @date 2023-12-01
|
||||
*/
|
||||
@Data
|
||||
@ToString
|
||||
public class OrderInfo extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** $column.columnComment */
|
||||
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
|
||||
private Long orderId;
|
||||
|
||||
/** 父id(续租原订单) */
|
||||
@Excel(name = "父id", readConverterExp = "续=租原订单")
|
||||
private Long pId;
|
||||
|
||||
/** 订单编号 */
|
||||
@Excel(name = "订单编号")
|
||||
private String code;
|
||||
|
||||
/** 订单日期 */
|
||||
@Excel(name = "订单日期")
|
||||
private String time;
|
||||
|
||||
/** 订金 */
|
||||
@Excel(name = "订金")
|
||||
private BigDecimal deposit;
|
||||
|
||||
/** 订单金额 */
|
||||
@Excel(name = "订单金额")
|
||||
private BigDecimal cost;
|
||||
|
||||
/** 结算周期 */
|
||||
@Excel(name = "结算周期")
|
||||
private String payType;
|
||||
|
||||
/** 供应商id */
|
||||
@Excel(name = "供应商id")
|
||||
private String supplier;
|
||||
|
||||
/** 订单状态(待确认,待上传合同,待发货,已退货,待收货,进行中,临期,超期,驳回,退租申请,续租申请,完结) */
|
||||
@Excel(name = "订单状态", readConverterExp = "待=确认,待上传合同,待发货,已退货,待收货,进行中,临期,超期,驳回,退租申请,续租申请,完结")
|
||||
private String orderStatus;
|
||||
|
||||
/** 下单用户id */
|
||||
@Excel(name = "下单用户id")
|
||||
private Long orderUser;
|
||||
|
||||
/** 下单企业 */
|
||||
@Excel(name = "下单企业")
|
||||
private String orderCompany;
|
||||
}
|
||||
|
|
@ -0,0 +1,61 @@
|
|||
package com.bonus.zlpt.order.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.bonus.zlpt.order.domain.OrderDetails;
|
||||
|
||||
/**
|
||||
* 订单详细Mapper接口
|
||||
*
|
||||
* @author xsheng
|
||||
* @date 2023-12-01
|
||||
*/
|
||||
public interface OrderDetailsMapper
|
||||
{
|
||||
/**
|
||||
* 查询订单详细
|
||||
*
|
||||
* @param id 订单详细主键
|
||||
* @return 订单详细
|
||||
*/
|
||||
public OrderDetails selectOrderDetailsById(Long id);
|
||||
|
||||
/**
|
||||
* 查询订单详细列表
|
||||
*
|
||||
* @param orderDetails 订单详细
|
||||
* @return 订单详细集合
|
||||
*/
|
||||
public List<OrderDetails> selectOrderDetailsList(OrderDetails orderDetails);
|
||||
|
||||
/**
|
||||
* 新增订单详细
|
||||
*
|
||||
* @param orderDetails 订单详细
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertOrderDetails(OrderDetails orderDetails);
|
||||
|
||||
/**
|
||||
* 修改订单详细
|
||||
*
|
||||
* @param orderDetails 订单详细
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateOrderDetails(OrderDetails orderDetails);
|
||||
|
||||
/**
|
||||
* 删除订单详细
|
||||
*
|
||||
* @param id 订单详细主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteOrderDetailsById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除订单详细
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteOrderDetailsByIds(Long[] ids);
|
||||
}
|
||||
|
|
@ -0,0 +1,61 @@
|
|||
package com.bonus.zlpt.order.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.bonus.zlpt.order.domain.OrderInfo;
|
||||
|
||||
/**
|
||||
* 订单信息Mapper接口
|
||||
*
|
||||
* @author xsheng
|
||||
* @date 2023-12-01
|
||||
*/
|
||||
public interface OrderInfoMapper
|
||||
{
|
||||
/**
|
||||
* 查询订单信息
|
||||
*
|
||||
* @param orderId 订单信息主键
|
||||
* @return 订单信息
|
||||
*/
|
||||
public OrderInfo selectOrderInfoByOrderId(Long orderId);
|
||||
|
||||
/**
|
||||
* 查询订单信息列表
|
||||
*
|
||||
* @param orderInfo 订单信息
|
||||
* @return 订单信息集合
|
||||
*/
|
||||
public List<OrderInfo> selectOrderInfoList(OrderInfo orderInfo);
|
||||
|
||||
/**
|
||||
* 新增订单信息
|
||||
*
|
||||
* @param orderInfo 订单信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertOrderInfo(OrderInfo orderInfo);
|
||||
|
||||
/**
|
||||
* 修改订单信息
|
||||
*
|
||||
* @param orderInfo 订单信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateOrderInfo(OrderInfo orderInfo);
|
||||
|
||||
/**
|
||||
* 删除订单信息
|
||||
*
|
||||
* @param orderId 订单信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteOrderInfoByOrderId(Long orderId);
|
||||
|
||||
/**
|
||||
* 批量删除订单信息
|
||||
*
|
||||
* @param orderIds 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteOrderInfoByOrderIds(Long[] orderIds);
|
||||
}
|
||||
|
|
@ -0,0 +1,61 @@
|
|||
package com.bonus.zlpt.order.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.bonus.zlpt.order.domain.OrderDetails;
|
||||
|
||||
/**
|
||||
* 订单详细Service接口
|
||||
*
|
||||
* @author xsheng
|
||||
* @date 2023-12-01
|
||||
*/
|
||||
public interface IOrderDetailsService
|
||||
{
|
||||
/**
|
||||
* 查询订单详细
|
||||
*
|
||||
* @param id 订单详细主键
|
||||
* @return 订单详细
|
||||
*/
|
||||
public OrderDetails selectOrderDetailsById(Long id);
|
||||
|
||||
/**
|
||||
* 查询订单详细列表
|
||||
*
|
||||
* @param orderDetails 订单详细
|
||||
* @return 订单详细集合
|
||||
*/
|
||||
public List<OrderDetails> selectOrderDetailsList(OrderDetails orderDetails);
|
||||
|
||||
/**
|
||||
* 新增订单详细
|
||||
*
|
||||
* @param orderDetails 订单详细
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertOrderDetails(OrderDetails orderDetails);
|
||||
|
||||
/**
|
||||
* 修改订单详细
|
||||
*
|
||||
* @param orderDetails 订单详细
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateOrderDetails(OrderDetails orderDetails);
|
||||
|
||||
/**
|
||||
* 批量删除订单详细
|
||||
*
|
||||
* @param ids 需要删除的订单详细主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteOrderDetailsByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 删除订单详细信息
|
||||
*
|
||||
* @param id 订单详细主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteOrderDetailsById(Long id);
|
||||
}
|
||||
|
|
@ -0,0 +1,61 @@
|
|||
package com.bonus.zlpt.order.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.bonus.zlpt.order.domain.OrderInfo;
|
||||
|
||||
/**
|
||||
* 订单信息Service接口
|
||||
*
|
||||
* @author xsheng
|
||||
* @date 2023-12-01
|
||||
*/
|
||||
public interface IOrderInfoService
|
||||
{
|
||||
/**
|
||||
* 查询订单信息
|
||||
*
|
||||
* @param orderId 订单信息主键
|
||||
* @return 订单信息
|
||||
*/
|
||||
public OrderInfo selectOrderInfoByOrderId(Long orderId);
|
||||
|
||||
/**
|
||||
* 查询订单信息列表
|
||||
*
|
||||
* @param orderInfo 订单信息
|
||||
* @return 订单信息集合
|
||||
*/
|
||||
public List<OrderInfo> selectOrderInfoList(OrderInfo orderInfo);
|
||||
|
||||
/**
|
||||
* 新增订单信息
|
||||
*
|
||||
* @param orderInfo 订单信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertOrderInfo(OrderInfo orderInfo);
|
||||
|
||||
/**
|
||||
* 修改订单信息
|
||||
*
|
||||
* @param orderInfo 订单信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateOrderInfo(OrderInfo orderInfo);
|
||||
|
||||
/**
|
||||
* 批量删除订单信息
|
||||
*
|
||||
* @param orderIds 需要删除的订单信息主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteOrderInfoByOrderIds(Long[] orderIds);
|
||||
|
||||
/**
|
||||
* 删除订单信息信息
|
||||
*
|
||||
* @param orderId 订单信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteOrderInfoByOrderId(Long orderId);
|
||||
}
|
||||
|
|
@ -0,0 +1,93 @@
|
|||
package com.bonus.zlpt.order.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.bonus.zlpt.order.mapper.OrderDetailsMapper;
|
||||
import com.bonus.zlpt.order.domain.OrderDetails;
|
||||
import com.bonus.zlpt.order.service.IOrderDetailsService;
|
||||
|
||||
/**
|
||||
* 订单详细Service业务层处理
|
||||
*
|
||||
* @author xsheng
|
||||
* @date 2023-12-01
|
||||
*/
|
||||
@Service
|
||||
public class OrderDetailsServiceImpl implements IOrderDetailsService
|
||||
{
|
||||
@Autowired
|
||||
private OrderDetailsMapper orderDetailsMapper;
|
||||
|
||||
/**
|
||||
* 查询订单详细
|
||||
*
|
||||
* @param id 订单详细主键
|
||||
* @return 订单详细
|
||||
*/
|
||||
@Override
|
||||
public OrderDetails selectOrderDetailsById(Long id)
|
||||
{
|
||||
return orderDetailsMapper.selectOrderDetailsById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询订单详细列表
|
||||
*
|
||||
* @param orderDetails 订单详细
|
||||
* @return 订单详细
|
||||
*/
|
||||
@Override
|
||||
public List<OrderDetails> selectOrderDetailsList(OrderDetails orderDetails)
|
||||
{
|
||||
return orderDetailsMapper.selectOrderDetailsList(orderDetails);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增订单详细
|
||||
*
|
||||
* @param orderDetails 订单详细
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertOrderDetails(OrderDetails orderDetails)
|
||||
{
|
||||
return orderDetailsMapper.insertOrderDetails(orderDetails);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改订单详细
|
||||
*
|
||||
* @param orderDetails 订单详细
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateOrderDetails(OrderDetails orderDetails)
|
||||
{
|
||||
return orderDetailsMapper.updateOrderDetails(orderDetails);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除订单详细
|
||||
*
|
||||
* @param ids 需要删除的订单详细主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteOrderDetailsByIds(Long[] ids)
|
||||
{
|
||||
return orderDetailsMapper.deleteOrderDetailsByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除订单详细信息
|
||||
*
|
||||
* @param id 订单详细主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteOrderDetailsById(Long id)
|
||||
{
|
||||
return orderDetailsMapper.deleteOrderDetailsById(id);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,93 @@
|
|||
package com.bonus.zlpt.order.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.bonus.zlpt.order.mapper.OrderInfoMapper;
|
||||
import com.bonus.zlpt.order.domain.OrderInfo;
|
||||
import com.bonus.zlpt.order.service.IOrderInfoService;
|
||||
|
||||
/**
|
||||
* 订单信息Service业务层处理
|
||||
*
|
||||
* @author xsheng
|
||||
* @date 2023-12-01
|
||||
*/
|
||||
@Service
|
||||
public class OrderInfoServiceImpl implements IOrderInfoService
|
||||
{
|
||||
@Autowired
|
||||
private OrderInfoMapper orderInfoMapper;
|
||||
|
||||
/**
|
||||
* 查询订单信息
|
||||
*
|
||||
* @param orderId 订单信息主键
|
||||
* @return 订单信息
|
||||
*/
|
||||
@Override
|
||||
public OrderInfo selectOrderInfoByOrderId(Long orderId)
|
||||
{
|
||||
return orderInfoMapper.selectOrderInfoByOrderId(orderId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询订单信息列表
|
||||
*
|
||||
* @param orderInfo 订单信息
|
||||
* @return 订单信息
|
||||
*/
|
||||
@Override
|
||||
public List<OrderInfo> selectOrderInfoList(OrderInfo orderInfo)
|
||||
{
|
||||
return orderInfoMapper.selectOrderInfoList(orderInfo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增订单信息
|
||||
*
|
||||
* @param orderInfo 订单信息
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertOrderInfo(OrderInfo orderInfo)
|
||||
{
|
||||
return orderInfoMapper.insertOrderInfo(orderInfo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改订单信息
|
||||
*
|
||||
* @param orderInfo 订单信息
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateOrderInfo(OrderInfo orderInfo)
|
||||
{
|
||||
return orderInfoMapper.updateOrderInfo(orderInfo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除订单信息
|
||||
*
|
||||
* @param orderIds 需要删除的订单信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteOrderInfoByOrderIds(Long[] orderIds)
|
||||
{
|
||||
return orderInfoMapper.deleteOrderInfoByOrderIds(orderIds);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除订单信息信息
|
||||
*
|
||||
* @param orderId 订单信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteOrderInfoByOrderId(Long orderId)
|
||||
{
|
||||
return orderInfoMapper.deleteOrderInfoByOrderId(orderId);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,10 @@
|
|||
Spring Boot Version: ${spring-boot.version}
|
||||
Spring Application Name: ${spring.application.name}
|
||||
_ _ _
|
||||
(_) (_) | |
|
||||
_ __ _ _ ___ _ _ _ ______ _ ___ | |__
|
||||
| '__|| | | | / _ \ | | | || ||______| | | / _ \ | '_ \
|
||||
| | | |_| || (_) || |_| || | | || (_) || |_) |
|
||||
|_| \__,_| \___/ \__, ||_| | | \___/ |_.__/
|
||||
__/ | _/ |
|
||||
|___/ |__/
|
||||
|
|
@ -0,0 +1,27 @@
|
|||
# Tomcat
|
||||
server:
|
||||
port: 9205
|
||||
|
||||
# Spring
|
||||
spring:
|
||||
application:
|
||||
# 应用名称
|
||||
name: zlpt-order
|
||||
profiles:
|
||||
# 环境配置
|
||||
active: zlpt_cloud_dev
|
||||
cloud:
|
||||
nacos:
|
||||
discovery:
|
||||
# 服务注册地址
|
||||
server-addr: 127.0.0.1:8848
|
||||
namespace: zlpt_cloud_dev
|
||||
config:
|
||||
# 配置中心地址
|
||||
server-addr: 127.0.0.1:8848
|
||||
namespace: zlpt_cloud_dev
|
||||
# 配置文件格式
|
||||
file-extension: yml
|
||||
# 共享配置
|
||||
shared-configs:
|
||||
- application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension}
|
||||
|
|
@ -0,0 +1,74 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<configuration scan="true" scanPeriod="60 seconds" debug="false">
|
||||
<!-- 日志存放路径 -->
|
||||
<property name="log.path" value="logs/zlpt-order" />
|
||||
<!-- 日志输出格式 -->
|
||||
<property name="log.pattern" value="%d{HH:mm:ss.SSS} [%thread] %-5level %logger{20} - [%method,%line] - %msg%n" />
|
||||
|
||||
<!-- 控制台输出 -->
|
||||
<appender name="console" class="ch.qos.logback.core.ConsoleAppender">
|
||||
<encoder>
|
||||
<pattern>${log.pattern}</pattern>
|
||||
</encoder>
|
||||
</appender>
|
||||
|
||||
<!-- 系统日志输出 -->
|
||||
<appender name="file_info" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
||||
<file>${log.path}/info.log</file>
|
||||
<!-- 循环政策:基于时间创建日志文件 -->
|
||||
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
|
||||
<!-- 日志文件名格式 -->
|
||||
<fileNamePattern>${log.path}/info.%d{yyyy-MM-dd}.log</fileNamePattern>
|
||||
<!-- 日志最大的历史 60天 -->
|
||||
<maxHistory>60</maxHistory>
|
||||
</rollingPolicy>
|
||||
<encoder>
|
||||
<pattern>${log.pattern}</pattern>
|
||||
</encoder>
|
||||
<filter class="ch.qos.logback.classic.filter.LevelFilter">
|
||||
<!-- 过滤的级别 -->
|
||||
<level>INFO</level>
|
||||
<!-- 匹配时的操作:接收(记录) -->
|
||||
<onMatch>ACCEPT</onMatch>
|
||||
<!-- 不匹配时的操作:拒绝(不记录) -->
|
||||
<onMismatch>DENY</onMismatch>
|
||||
</filter>
|
||||
</appender>
|
||||
|
||||
<appender name="file_error" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
||||
<file>${log.path}/error.log</file>
|
||||
<!-- 循环政策:基于时间创建日志文件 -->
|
||||
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
|
||||
<!-- 日志文件名格式 -->
|
||||
<fileNamePattern>${log.path}/error.%d{yyyy-MM-dd}.log</fileNamePattern>
|
||||
<!-- 日志最大的历史 60天 -->
|
||||
<maxHistory>60</maxHistory>
|
||||
</rollingPolicy>
|
||||
<encoder>
|
||||
<pattern>${log.pattern}</pattern>
|
||||
</encoder>
|
||||
<filter class="ch.qos.logback.classic.filter.LevelFilter">
|
||||
<!-- 过滤的级别 -->
|
||||
<level>ERROR</level>
|
||||
<!-- 匹配时的操作:接收(记录) -->
|
||||
<onMatch>ACCEPT</onMatch>
|
||||
<!-- 不匹配时的操作:拒绝(不记录) -->
|
||||
<onMismatch>DENY</onMismatch>
|
||||
</filter>
|
||||
</appender>
|
||||
|
||||
<!-- 系统模块日志级别控制 -->
|
||||
<logger name="com.ruoyi" level="info" />
|
||||
<!-- Spring日志级别控制 -->
|
||||
<logger name="org.springframework" level="warn" />
|
||||
|
||||
<root level="info">
|
||||
<appender-ref ref="console" />
|
||||
</root>
|
||||
|
||||
<!--系统操作日志-->
|
||||
<root level="info">
|
||||
<appender-ref ref="file_info" />
|
||||
<appender-ref ref="file_error" />
|
||||
</root>
|
||||
</configuration>
|
||||
|
|
@ -0,0 +1,153 @@
|
|||
<?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.bonus.zlpt.order.mapper.OrderDetailsMapper">
|
||||
|
||||
<resultMap type="OrderDetails" id="OrderDetailsResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="orderId" column="order_id" />
|
||||
<result property="needCompany" column="need_company" />
|
||||
<result property="planStartTime" column="plan_start_time" />
|
||||
<result property="isMachinist" column="is_machinist" />
|
||||
<result property="address" column="address" />
|
||||
<result property="duration" column="duration" />
|
||||
<result property="invoiceType" column="invoice_type" />
|
||||
<result property="description" column="description" />
|
||||
<result property="maId" column="ma_id" />
|
||||
<result property="leaseType" column="lease_type" />
|
||||
<result property="leasePrice" column="lease_price" />
|
||||
<result property="machinistPrice" column="machinist_price" />
|
||||
<result property="orderContract" column="order_contract" />
|
||||
<result property="machinistName" column="machinist_name" />
|
||||
<result property="phone" column="phone" />
|
||||
<result property="logisticsPhone" column="logistics_phone" />
|
||||
<result property="realStartTime" column="real_start_time" />
|
||||
<result property="rentalName" column="rental_name" />
|
||||
<result property="tenantName" column="tenant_name" />
|
||||
<result property="entryAttachment" column="entry_attachment" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectOrderDetailsVo">
|
||||
select id, order_id, need_company, plan_start_time, is_machinist, address, duration, invoice_type, description, ma_id, lease_type, lease_price, machinist_price, order_contract, machinist_name, phone, logistics_phone, real_start_time, rental_name, tenant_name, entry_attachment from ma_order_details
|
||||
</sql>
|
||||
|
||||
<select id="selectOrderDetailsList" parameterType="OrderDetails" resultMap="OrderDetailsResult">
|
||||
<include refid="selectOrderDetailsVo"/>
|
||||
<where>
|
||||
<if test="orderId != null "> and order_id = #{orderId}</if>
|
||||
<if test="needCompany != null and needCompany != ''"> and need_company = #{needCompany}</if>
|
||||
<if test="planStartTime != null and planStartTime != ''"> and plan_start_time = #{planStartTime}</if>
|
||||
<if test="isMachinist != null and isMachinist != ''"> and is_machinist = #{isMachinist}</if>
|
||||
<if test="address != null and address != ''"> and address = #{address}</if>
|
||||
<if test="duration != null and duration != ''"> and duration = #{duration}</if>
|
||||
<if test="invoiceType != null and invoiceType != ''"> and invoice_type = #{invoiceType}</if>
|
||||
<if test="description != null and description != ''"> and description = #{description}</if>
|
||||
<if test="maId != null "> and ma_id = #{maId}</if>
|
||||
<if test="leaseType != null "> and lease_type = #{leaseType}</if>
|
||||
<if test="leasePrice != null and leasePrice != ''"> and lease_price = #{leasePrice}</if>
|
||||
<if test="machinistPrice != null and machinistPrice != ''"> and machinist_price = #{machinistPrice}</if>
|
||||
<if test="orderContract != null and orderContract != ''"> and order_contract = #{orderContract}</if>
|
||||
<if test="machinistName != null and machinistName != ''"> and machinist_name like concat('%', #{machinistName}, '%')</if>
|
||||
<if test="phone != null and phone != ''"> and phone = #{phone}</if>
|
||||
<if test="logisticsPhone != null and logisticsPhone != ''"> and logistics_phone = #{logisticsPhone}</if>
|
||||
<if test="realStartTime != null and realStartTime != ''"> and real_start_time = #{realStartTime}</if>
|
||||
<if test="rentalName != null and rentalName != ''"> and rental_name like concat('%', #{rentalName}, '%')</if>
|
||||
<if test="tenantName != null and tenantName != ''"> and tenant_name like concat('%', #{tenantName}, '%')</if>
|
||||
<if test="entryAttachment != null and entryAttachment != ''"> and entry_attachment = #{entryAttachment}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectOrderDetailsById" parameterType="Long" resultMap="OrderDetailsResult">
|
||||
<include refid="selectOrderDetailsVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertOrderDetails" parameterType="OrderDetails">
|
||||
insert into ma_order_details
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">id,</if>
|
||||
<if test="orderId != null">order_id,</if>
|
||||
<if test="needCompany != null">need_company,</if>
|
||||
<if test="planStartTime != null">plan_start_time,</if>
|
||||
<if test="isMachinist != null">is_machinist,</if>
|
||||
<if test="address != null">address,</if>
|
||||
<if test="duration != null">duration,</if>
|
||||
<if test="invoiceType != null">invoice_type,</if>
|
||||
<if test="description != null">description,</if>
|
||||
<if test="maId != null">ma_id,</if>
|
||||
<if test="leaseType != null">lease_type,</if>
|
||||
<if test="leasePrice != null">lease_price,</if>
|
||||
<if test="machinistPrice != null">machinist_price,</if>
|
||||
<if test="orderContract != null">order_contract,</if>
|
||||
<if test="machinistName != null">machinist_name,</if>
|
||||
<if test="phone != null">phone,</if>
|
||||
<if test="logisticsPhone != null">logistics_phone,</if>
|
||||
<if test="realStartTime != null">real_start_time,</if>
|
||||
<if test="rentalName != null">rental_name,</if>
|
||||
<if test="tenantName != null">tenant_name,</if>
|
||||
<if test="entryAttachment != null">entry_attachment,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">#{id},</if>
|
||||
<if test="orderId != null">#{orderId},</if>
|
||||
<if test="needCompany != null">#{needCompany},</if>
|
||||
<if test="planStartTime != null">#{planStartTime},</if>
|
||||
<if test="isMachinist != null">#{isMachinist},</if>
|
||||
<if test="address != null">#{address},</if>
|
||||
<if test="duration != null">#{duration},</if>
|
||||
<if test="invoiceType != null">#{invoiceType},</if>
|
||||
<if test="description != null">#{description},</if>
|
||||
<if test="maId != null">#{maId},</if>
|
||||
<if test="leaseType != null">#{leaseType},</if>
|
||||
<if test="leasePrice != null">#{leasePrice},</if>
|
||||
<if test="machinistPrice != null">#{machinistPrice},</if>
|
||||
<if test="orderContract != null">#{orderContract},</if>
|
||||
<if test="machinistName != null">#{machinistName},</if>
|
||||
<if test="phone != null">#{phone},</if>
|
||||
<if test="logisticsPhone != null">#{logisticsPhone},</if>
|
||||
<if test="realStartTime != null">#{realStartTime},</if>
|
||||
<if test="rentalName != null">#{rentalName},</if>
|
||||
<if test="tenantName != null">#{tenantName},</if>
|
||||
<if test="entryAttachment != null">#{entryAttachment},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateOrderDetails" parameterType="OrderDetails">
|
||||
update ma_order_details
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="orderId != null">order_id = #{orderId},</if>
|
||||
<if test="needCompany != null">need_company = #{needCompany},</if>
|
||||
<if test="planStartTime != null">plan_start_time = #{planStartTime},</if>
|
||||
<if test="isMachinist != null">is_machinist = #{isMachinist},</if>
|
||||
<if test="address != null">address = #{address},</if>
|
||||
<if test="duration != null">duration = #{duration},</if>
|
||||
<if test="invoiceType != null">invoice_type = #{invoiceType},</if>
|
||||
<if test="description != null">description = #{description},</if>
|
||||
<if test="maId != null">ma_id = #{maId},</if>
|
||||
<if test="leaseType != null">lease_type = #{leaseType},</if>
|
||||
<if test="leasePrice != null">lease_price = #{leasePrice},</if>
|
||||
<if test="machinistPrice != null">machinist_price = #{machinistPrice},</if>
|
||||
<if test="orderContract != null">order_contract = #{orderContract},</if>
|
||||
<if test="machinistName != null">machinist_name = #{machinistName},</if>
|
||||
<if test="phone != null">phone = #{phone},</if>
|
||||
<if test="logisticsPhone != null">logistics_phone = #{logisticsPhone},</if>
|
||||
<if test="realStartTime != null">real_start_time = #{realStartTime},</if>
|
||||
<if test="rentalName != null">rental_name = #{rentalName},</if>
|
||||
<if test="tenantName != null">tenant_name = #{tenantName},</if>
|
||||
<if test="entryAttachment != null">entry_attachment = #{entryAttachment},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteOrderDetailsById" parameterType="Long">
|
||||
delete from ma_order_details where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteOrderDetailsByIds" parameterType="String">
|
||||
delete from ma_order_details where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
|
|
@ -0,0 +1,104 @@
|
|||
<?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.bonus.zlpt.order.mapper.OrderInfoMapper">
|
||||
|
||||
<resultMap type="OrderInfo" id="OrderInfoResult">
|
||||
<result property="orderId" column="order_id" />
|
||||
<result property="pId" column="p_id" />
|
||||
<result property="code" column="code" />
|
||||
<result property="time" column="time" />
|
||||
<result property="deposit" column="deposit" />
|
||||
<result property="cost" column="cost" />
|
||||
<result property="payType" column="pay_type" />
|
||||
<result property="supplier" column="supplier" />
|
||||
<result property="orderStatus" column="order_status" />
|
||||
<result property="orderUser" column="order_user" />
|
||||
<result property="orderCompany" column="order_company" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectOrderInfoVo">
|
||||
select order_id, p_id, code, time, deposit, cost, pay_type, supplier, order_status, order_user, order_company from ma_order_info
|
||||
</sql>
|
||||
|
||||
<select id="selectOrderInfoList" parameterType="OrderInfo" resultMap="OrderInfoResult">
|
||||
<include refid="selectOrderInfoVo"/>
|
||||
<where>
|
||||
<if test="orderId != null "> and order_id = #{orderId}</if>
|
||||
<if test="pId != null "> and p_id = #{pId}</if>
|
||||
<if test="code != null and code != ''"> and code = #{code}</if>
|
||||
<if test="time != null and time != ''"> and time = #{time}</if>
|
||||
<if test="deposit != null "> and deposit = #{deposit}</if>
|
||||
<if test="cost != null "> and cost = #{cost}</if>
|
||||
<if test="payType != null and payType != ''"> and pay_type = #{payType}</if>
|
||||
<if test="supplier != null and supplier != ''"> and supplier = #{supplier}</if>
|
||||
<if test="orderStatus != null and orderStatus != ''"> and order_status = #{orderStatus}</if>
|
||||
<if test="orderUser != null "> and order_user = #{orderUser}</if>
|
||||
<if test="orderCompany != null and orderCompany != ''"> and order_company = #{orderCompany}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectOrderInfoByOrderId" parameterType="Long" resultMap="OrderInfoResult">
|
||||
<include refid="selectOrderInfoVo"/>
|
||||
where order_id = #{orderId}
|
||||
</select>
|
||||
|
||||
<insert id="insertOrderInfo" parameterType="OrderInfo">
|
||||
insert into ma_order_info
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="orderId != null">order_id,</if>
|
||||
<if test="pId != null">p_id,</if>
|
||||
<if test="code != null">code,</if>
|
||||
<if test="time != null">time,</if>
|
||||
<if test="deposit != null">deposit,</if>
|
||||
<if test="cost != null">cost,</if>
|
||||
<if test="payType != null">pay_type,</if>
|
||||
<if test="supplier != null">supplier,</if>
|
||||
<if test="orderStatus != null">order_status,</if>
|
||||
<if test="orderUser != null">order_user,</if>
|
||||
<if test="orderCompany != null">order_company,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="orderId != null">#{orderId},</if>
|
||||
<if test="pId != null">#{pId},</if>
|
||||
<if test="code != null">#{code},</if>
|
||||
<if test="time != null">#{time},</if>
|
||||
<if test="deposit != null">#{deposit},</if>
|
||||
<if test="cost != null">#{cost},</if>
|
||||
<if test="payType != null">#{payType},</if>
|
||||
<if test="supplier != null">#{supplier},</if>
|
||||
<if test="orderStatus != null">#{orderStatus},</if>
|
||||
<if test="orderUser != null">#{orderUser},</if>
|
||||
<if test="orderCompany != null">#{orderCompany},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateOrderInfo" parameterType="OrderInfo">
|
||||
update ma_order_info
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="pId != null">p_id = #{pId},</if>
|
||||
<if test="code != null">code = #{code},</if>
|
||||
<if test="time != null">time = #{time},</if>
|
||||
<if test="deposit != null">deposit = #{deposit},</if>
|
||||
<if test="cost != null">cost = #{cost},</if>
|
||||
<if test="payType != null">pay_type = #{payType},</if>
|
||||
<if test="supplier != null">supplier = #{supplier},</if>
|
||||
<if test="orderStatus != null">order_status = #{orderStatus},</if>
|
||||
<if test="orderUser != null">order_user = #{orderUser},</if>
|
||||
<if test="orderCompany != null">order_company = #{orderCompany},</if>
|
||||
</trim>
|
||||
where order_id = #{orderId}
|
||||
</update>
|
||||
|
||||
<delete id="deleteOrderInfoByOrderId" parameterType="Long">
|
||||
delete from ma_order_info where order_id = #{orderId}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteOrderInfoByOrderIds" parameterType="String">
|
||||
delete from ma_order_info where order_id in
|
||||
<foreach item="orderId" collection="array" open="(" separator="," close=")">
|
||||
#{orderId}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
Loading…
Reference in New Issue