订单管理界面
This commit is contained in:
		| @@ -5,6 +5,8 @@ import org.apache.commons.lang3.builder.ToStringStyle; | ||||
| import com.ruoyi.common.annotation.Excel; | ||||
| import com.ruoyi.common.core.domain.BaseEntity; | ||||
|  | ||||
| import java.math.BigDecimal; | ||||
|  | ||||
| /** | ||||
|  * 业务提成比例对象 sys_commision | ||||
|  *  | ||||
| @@ -27,7 +29,7 @@ public class SysCommision extends BaseEntity | ||||
|  | ||||
|     /** 金额 */ | ||||
|     @Excel(name = "金额") | ||||
|     private Long amount; | ||||
|     private BigDecimal amount; | ||||
|  | ||||
|     /** 分成比例 */ | ||||
|     @Excel(name = "分成比例") | ||||
| @@ -60,12 +62,9 @@ public class SysCommision extends BaseEntity | ||||
|     { | ||||
|         return nickName; | ||||
|     } | ||||
|     public void setAmount(Long amount)  | ||||
|     { | ||||
|         this.amount = amount; | ||||
|     } | ||||
|     public void setAmount(BigDecimal amount) { this.amount = amount; } | ||||
|  | ||||
|     public Long getAmount()  | ||||
|     public BigDecimal getAmount() | ||||
|     { | ||||
|         return amount; | ||||
|     } | ||||
|   | ||||
							
								
								
									
										359
									
								
								ruoyi-custom/src/main/java/com/ruoyi/custom/domain/SysOrder.java
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										359
									
								
								ruoyi-custom/src/main/java/com/ruoyi/custom/domain/SysOrder.java
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,359 @@ | ||||
| package com.ruoyi.custom.domain; | ||||
|  | ||||
| import java.math.BigDecimal; | ||||
| 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; | ||||
|  | ||||
| /** | ||||
|  * 销售订单对象 sys_order | ||||
|  * | ||||
|  * @author wonder | ||||
|  * @date 2020-09-24 | ||||
|  */ | ||||
| public class SysOrder extends BaseEntity | ||||
| { | ||||
|     private static final long serialVersionUID = 1L; | ||||
|  | ||||
|     /** 编号 */ | ||||
|     private Long orderId; | ||||
|  | ||||
|     /** 客户姓名 */ | ||||
|     @Excel(name = "客户姓名") | ||||
|     private String customer; | ||||
|  | ||||
|     /** 电话 */ | ||||
|     @Excel(name = "电话") | ||||
|     private String phone; | ||||
|  | ||||
|     /** 金额 */ | ||||
|     @Excel(name = "金额") | ||||
|     private BigDecimal amount; | ||||
|  | ||||
|     /** 收款方式 */ | ||||
|     private Long payTypeId; | ||||
|  | ||||
|     /** 收款方式 */ | ||||
|     @Excel(name = "收款方式") | ||||
|     private String payType; | ||||
|  | ||||
|     /** 售前 */ | ||||
|     private Long preSaleId; | ||||
|  | ||||
|     /** 售前 */ | ||||
|     @Excel(name = "售前") | ||||
|     private String preSale; | ||||
|  | ||||
|     /** 售后 */ | ||||
|     private Long afterSaleId; | ||||
|  | ||||
|     /** 售后 */ | ||||
|     @Excel(name = "售后") | ||||
|     private String afterSale; | ||||
|  | ||||
|     /** 营养师 */ | ||||
|     private Long nutritionistId; | ||||
|  | ||||
|     /** 营养师 */ | ||||
|     @Excel(name = "营养师") | ||||
|     private String nutritionist; | ||||
|  | ||||
|     /** 助理营养师 */ | ||||
|     private Long nutriAssisId; | ||||
|  | ||||
|     /** 助理营养师 */ | ||||
|     @Excel(name = "助理营养师") | ||||
|     private String nutriAssis; | ||||
|  | ||||
|     /** 账号 */ | ||||
|     private Long accountId; | ||||
|  | ||||
|     /** 账号 */ | ||||
|     @Excel(name = "账号") | ||||
|     private String account; | ||||
|  | ||||
|     /** 策划 */ | ||||
|     private Long plannerId; | ||||
|  | ||||
|     /** 策划 */ | ||||
|     @Excel(name = "策划") | ||||
|     private String planner; | ||||
|  | ||||
|     /** 策划助理 */ | ||||
|     private Long plannerAssisId; | ||||
|  | ||||
|     /** 策划助理 */ | ||||
|     @Excel(name = "策划助理") | ||||
|     private String plannerAssis; | ||||
|  | ||||
|     /** 运营 */ | ||||
|     private Long operatorId; | ||||
|  | ||||
|     /** 运营 */ | ||||
|     @Excel(name = "运营") | ||||
|     private String operator; | ||||
|  | ||||
|     /** 推荐人 */ | ||||
|     @Excel(name = "推荐人") | ||||
|     private String recommender; | ||||
|  | ||||
|     /** 成交日期 */ | ||||
|     @JsonFormat(pattern = "yyyy-MM-dd") | ||||
|     @Excel(name = "成交日期", width = 30, dateFormat = "yyyy-MM-dd") | ||||
|     private Date orderTime; | ||||
|  | ||||
|     public void setOrderId(Long orderId) | ||||
|     { | ||||
|         this.orderId = orderId; | ||||
|     } | ||||
|  | ||||
|     public Long getOrderId() | ||||
|     { | ||||
|         return orderId; | ||||
|     } | ||||
|     public void setCustomer(String customer) | ||||
|     { | ||||
|         this.customer = customer; | ||||
|     } | ||||
|  | ||||
|     public String getCustomer() | ||||
|     { | ||||
|         return customer; | ||||
|     } | ||||
|     public void setPhone(String phone) | ||||
|     { | ||||
|         this.phone = phone; | ||||
|     } | ||||
|  | ||||
|     public String getPhone() | ||||
|     { | ||||
|         return phone; | ||||
|     } | ||||
|     public void setAmount(BigDecimal amount) | ||||
|     { | ||||
|         this.amount = amount; | ||||
|     } | ||||
|  | ||||
|     public BigDecimal getAmount() | ||||
|     { | ||||
|         return amount; | ||||
|     } | ||||
|     public void setPayTypeId(Long payTypeId) | ||||
|     { | ||||
|         this.payTypeId = payTypeId; | ||||
|     } | ||||
|  | ||||
|     public Long getPayTypeId() | ||||
|     { | ||||
|         return payTypeId; | ||||
|     } | ||||
|     public void setPayType(String payType) | ||||
|     { | ||||
|         this.payType = payType; | ||||
|     } | ||||
|  | ||||
|     public String getPayType() | ||||
|     { | ||||
|         return payType; | ||||
|     } | ||||
|     public void setPreSaleId(Long preSaleId) | ||||
|     { | ||||
|         this.preSaleId = preSaleId; | ||||
|     } | ||||
|  | ||||
|     public Long getPreSaleId() | ||||
|     { | ||||
|         return preSaleId; | ||||
|     } | ||||
|     public void setPreSale(String preSale) | ||||
|     { | ||||
|         this.preSale = preSale; | ||||
|     } | ||||
|  | ||||
|     public String getPreSale() | ||||
|     { | ||||
|         return preSale; | ||||
|     } | ||||
|     public void setAfterSaleId(Long afterSaleId) | ||||
|     { | ||||
|         this.afterSaleId = afterSaleId; | ||||
|     } | ||||
|  | ||||
|     public Long getAfterSaleId() | ||||
|     { | ||||
|         return afterSaleId; | ||||
|     } | ||||
|     public void setAfterSale(String afterSale) | ||||
|     { | ||||
|         this.afterSale = afterSale; | ||||
|     } | ||||
|  | ||||
|     public String getAfterSale() | ||||
|     { | ||||
|         return afterSale; | ||||
|     } | ||||
|     public void setNutritionistId(Long nutritionistId) | ||||
|     { | ||||
|         this.nutritionistId = nutritionistId; | ||||
|     } | ||||
|  | ||||
|     public Long getNutritionistId() | ||||
|     { | ||||
|         return nutritionistId; | ||||
|     } | ||||
|     public void setNutritionist(String nutritionist) | ||||
|     { | ||||
|         this.nutritionist = nutritionist; | ||||
|     } | ||||
|  | ||||
|     public String getNutritionist() | ||||
|     { | ||||
|         return nutritionist; | ||||
|     } | ||||
|     public void setNutriAssisId(Long nutriAssisId) | ||||
|     { | ||||
|         this.nutriAssisId = nutriAssisId; | ||||
|     } | ||||
|  | ||||
|     public Long getNutriAssisId() | ||||
|     { | ||||
|         return nutriAssisId; | ||||
|     } | ||||
|     public void setNutriAssis(String nutriAssis) | ||||
|     { | ||||
|         this.nutriAssis = nutriAssis; | ||||
|     } | ||||
|  | ||||
|     public String getNutriAssis() | ||||
|     { | ||||
|         return nutriAssis; | ||||
|     } | ||||
|     public void setAccountId(Long accountId) | ||||
|     { | ||||
|         this.accountId = accountId; | ||||
|     } | ||||
|  | ||||
|     public Long getAccountId() | ||||
|     { | ||||
|         return accountId; | ||||
|     } | ||||
|     public void setAccount(String account) | ||||
|     { | ||||
|         this.account = account; | ||||
|     } | ||||
|  | ||||
|     public String getAccount() | ||||
|     { | ||||
|         return account; | ||||
|     } | ||||
|     public void setPlannerId(Long plannerId) | ||||
|     { | ||||
|         this.plannerId = plannerId; | ||||
|     } | ||||
|  | ||||
|     public Long getPlannerId() | ||||
|     { | ||||
|         return plannerId; | ||||
|     } | ||||
|     public void setPlanner(String planner) | ||||
|     { | ||||
|         this.planner = planner; | ||||
|     } | ||||
|  | ||||
|     public String getPlanner() | ||||
|     { | ||||
|         return planner; | ||||
|     } | ||||
|     public void setPlannerAssisId(Long plannerAssisId) | ||||
|     { | ||||
|         this.plannerAssisId = plannerAssisId; | ||||
|     } | ||||
|  | ||||
|     public Long getPlannerAssisId() | ||||
|     { | ||||
|         return plannerAssisId; | ||||
|     } | ||||
|     public void setPlannerAssis(String plannerAssis) | ||||
|     { | ||||
|         this.plannerAssis = plannerAssis; | ||||
|     } | ||||
|  | ||||
|     public String getPlannerAssis() | ||||
|     { | ||||
|         return plannerAssis; | ||||
|     } | ||||
|     public void setOperatorId(Long operatorId) | ||||
|     { | ||||
|         this.operatorId = operatorId; | ||||
|     } | ||||
|  | ||||
|     public Long getOperatorId() | ||||
|     { | ||||
|         return operatorId; | ||||
|     } | ||||
|     public void setOperator(String operator) | ||||
|     { | ||||
|         this.operator = operator; | ||||
|     } | ||||
|  | ||||
|     public String getOperator() | ||||
|     { | ||||
|         return operator; | ||||
|     } | ||||
|     public void setRecommender(String recommender) | ||||
|     { | ||||
|         this.recommender = recommender; | ||||
|     } | ||||
|  | ||||
|     public String getRecommender() | ||||
|     { | ||||
|         return recommender; | ||||
|     } | ||||
|     public void setOrderTime(Date orderTime) | ||||
|     { | ||||
|         this.orderTime = orderTime; | ||||
|     } | ||||
|  | ||||
|     public Date getOrderTime() | ||||
|     { | ||||
|         return orderTime; | ||||
|     } | ||||
|  | ||||
|     @Override | ||||
|     public String toString() { | ||||
|         return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) | ||||
|                 .append("orderId", getOrderId()) | ||||
|                 .append("customer", getCustomer()) | ||||
|                 .append("phone", getPhone()) | ||||
|                 .append("amount", getAmount()) | ||||
|                 .append("payTypeId", getPayTypeId()) | ||||
|                 .append("payType", getPayType()) | ||||
|                 .append("preSaleId", getPreSaleId()) | ||||
|                 .append("createBy", getCreateBy()) | ||||
|                 .append("preSale", getPreSale()) | ||||
|                 .append("createTime", getCreateTime()) | ||||
|                 .append("afterSaleId", getAfterSaleId()) | ||||
|                 .append("updateBy", getUpdateBy()) | ||||
|                 .append("afterSale", getAfterSale()) | ||||
|                 .append("updateTime", getUpdateTime()) | ||||
|                 .append("nutritionistId", getNutritionistId()) | ||||
|                 .append("remark", getRemark()) | ||||
|                 .append("nutritionist", getNutritionist()) | ||||
|                 .append("nutriAssisId", getNutriAssisId()) | ||||
|                 .append("nutriAssis", getNutriAssis()) | ||||
|                 .append("accountId", getAccountId()) | ||||
|                 .append("account", getAccount()) | ||||
|                 .append("plannerId", getPlannerId()) | ||||
|                 .append("planner", getPlanner()) | ||||
|                 .append("plannerAssisId", getPlannerAssisId()) | ||||
|                 .append("plannerAssis", getPlannerAssis()) | ||||
|                 .append("operatorId", getOperatorId()) | ||||
|                 .append("operator", getOperator()) | ||||
|                 .append("recommender", getRecommender()) | ||||
|                 .append("orderTime", getOrderTime()) | ||||
|                 .toString(); | ||||
|     } | ||||
| } | ||||
| @@ -0,0 +1,61 @@ | ||||
| package com.ruoyi.custom.mapper; | ||||
|  | ||||
| import java.util.List; | ||||
| import com.ruoyi.custom.domain.SysOrder; | ||||
|  | ||||
| /** | ||||
|  * 销售订单Mapper接口 | ||||
|  * | ||||
|  * @author wonder | ||||
|  * @date 2020-09-24 | ||||
|  */ | ||||
| public interface SysOrderMapper | ||||
| { | ||||
|     /** | ||||
|      * 查询销售订单 | ||||
|      * | ||||
|      * @param orderId 销售订单ID | ||||
|      * @return 销售订单 | ||||
|      */ | ||||
|     public SysOrder selectSysOrderById(Long orderId); | ||||
|  | ||||
|     /** | ||||
|      * 查询销售订单列表 | ||||
|      * | ||||
|      * @param sysOrder 销售订单 | ||||
|      * @return 销售订单集合 | ||||
|      */ | ||||
|     public List<SysOrder> selectSysOrderList(SysOrder sysOrder); | ||||
|  | ||||
|     /** | ||||
|      * 新增销售订单 | ||||
|      * | ||||
|      * @param sysOrder 销售订单 | ||||
|      * @return 结果 | ||||
|      */ | ||||
|     public int insertSysOrder(SysOrder sysOrder); | ||||
|  | ||||
|     /** | ||||
|      * 修改销售订单 | ||||
|      * | ||||
|      * @param sysOrder 销售订单 | ||||
|      * @return 结果 | ||||
|      */ | ||||
|     public int updateSysOrder(SysOrder sysOrder); | ||||
|  | ||||
|     /** | ||||
|      * 删除销售订单 | ||||
|      * | ||||
|      * @param orderId 销售订单ID | ||||
|      * @return 结果 | ||||
|      */ | ||||
|     public int deleteSysOrderById(Long orderId); | ||||
|  | ||||
|     /** | ||||
|      * 批量删除销售订单 | ||||
|      * | ||||
|      * @param orderIds 需要删除的数据ID | ||||
|      * @return 结果 | ||||
|      */ | ||||
|     public int deleteSysOrderByIds(Long[] orderIds); | ||||
| } | ||||
| @@ -0,0 +1,61 @@ | ||||
| package com.ruoyi.custom.service; | ||||
|  | ||||
| import java.util.List; | ||||
| import com.ruoyi.custom.domain.SysOrder; | ||||
|  | ||||
| /** | ||||
|  * 销售订单Service接口 | ||||
|  * | ||||
|  * @author wonder | ||||
|  * @date 2020-09-24 | ||||
|  */ | ||||
| public interface ISysOrderService | ||||
| { | ||||
|     /** | ||||
|      * 查询销售订单 | ||||
|      * | ||||
|      * @param orderId 销售订单ID | ||||
|      * @return 销售订单 | ||||
|      */ | ||||
|     public SysOrder selectSysOrderById(Long orderId); | ||||
|  | ||||
|     /** | ||||
|      * 查询销售订单列表 | ||||
|      * | ||||
|      * @param sysOrder 销售订单 | ||||
|      * @return 销售订单集合 | ||||
|      */ | ||||
|     public List<SysOrder> selectSysOrderList(SysOrder sysOrder); | ||||
|  | ||||
|     /** | ||||
|      * 新增销售订单 | ||||
|      * | ||||
|      * @param sysOrder 销售订单 | ||||
|      * @return 结果 | ||||
|      */ | ||||
|     public int insertSysOrder(SysOrder sysOrder); | ||||
|  | ||||
|     /** | ||||
|      * 修改销售订单 | ||||
|      * | ||||
|      * @param sysOrder 销售订单 | ||||
|      * @return 结果 | ||||
|      */ | ||||
|     public int updateSysOrder(SysOrder sysOrder); | ||||
|  | ||||
|     /** | ||||
|      * 批量删除销售订单 | ||||
|      * | ||||
|      * @param orderIds 需要删除的销售订单ID | ||||
|      * @return 结果 | ||||
|      */ | ||||
|     public int deleteSysOrderByIds(Long[] orderIds); | ||||
|  | ||||
|     /** | ||||
|      * 删除销售订单信息 | ||||
|      * | ||||
|      * @param orderId 销售订单ID | ||||
|      * @return 结果 | ||||
|      */ | ||||
|     public int deleteSysOrderById(Long orderId); | ||||
| } | ||||
| @@ -0,0 +1,96 @@ | ||||
| package com.ruoyi.custom.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.custom.mapper.SysOrderMapper; | ||||
| import com.ruoyi.custom.domain.SysOrder; | ||||
| import com.ruoyi.custom.service.ISysOrderService; | ||||
|  | ||||
| /** | ||||
|  * 销售订单Service业务层处理 | ||||
|  * | ||||
|  * @author wonder | ||||
|  * @date 2020-09-24 | ||||
|  */ | ||||
| @Service | ||||
| public class SysOrderServiceImpl implements ISysOrderService | ||||
| { | ||||
|     @Autowired | ||||
|     private SysOrderMapper sysOrderMapper; | ||||
|  | ||||
|     /** | ||||
|      * 查询销售订单 | ||||
|      * | ||||
|      * @param orderId 销售订单ID | ||||
|      * @return 销售订单 | ||||
|      */ | ||||
|     @Override | ||||
|     public SysOrder selectSysOrderById(Long orderId) | ||||
|     { | ||||
|         return sysOrderMapper.selectSysOrderById(orderId); | ||||
|     } | ||||
|  | ||||
|     /** | ||||
|      * 查询销售订单列表 | ||||
|      * | ||||
|      * @param sysOrder 销售订单 | ||||
|      * @return 销售订单 | ||||
|      */ | ||||
|     @Override | ||||
|     public List<SysOrder> selectSysOrderList(SysOrder sysOrder) | ||||
|     { | ||||
|         return sysOrderMapper.selectSysOrderList(sysOrder); | ||||
|     } | ||||
|  | ||||
|     /** | ||||
|      * 新增销售订单 | ||||
|      * | ||||
|      * @param sysOrder 销售订单 | ||||
|      * @return 结果 | ||||
|      */ | ||||
|     @Override | ||||
|     public int insertSysOrder(SysOrder sysOrder) | ||||
|     { | ||||
|         sysOrder.setCreateTime(DateUtils.getNowDate()); | ||||
|         return sysOrderMapper.insertSysOrder(sysOrder); | ||||
|     } | ||||
|  | ||||
|     /** | ||||
|      * 修改销售订单 | ||||
|      * | ||||
|      * @param sysOrder 销售订单 | ||||
|      * @return 结果 | ||||
|      */ | ||||
|     @Override | ||||
|     public int updateSysOrder(SysOrder sysOrder) | ||||
|     { | ||||
|         sysOrder.setUpdateTime(DateUtils.getNowDate()); | ||||
|         return sysOrderMapper.updateSysOrder(sysOrder); | ||||
|     } | ||||
|  | ||||
|     /** | ||||
|      * 批量删除销售订单 | ||||
|      * | ||||
|      * @param orderIds 需要删除的销售订单ID | ||||
|      * @return 结果 | ||||
|      */ | ||||
|     @Override | ||||
|     public int deleteSysOrderByIds(Long[] orderIds) | ||||
|     { | ||||
|         return sysOrderMapper.deleteSysOrderByIds(orderIds); | ||||
|     } | ||||
|  | ||||
|     /** | ||||
|      * 删除销售订单信息 | ||||
|      * | ||||
|      * @param orderId 销售订单ID | ||||
|      * @return 结果 | ||||
|      */ | ||||
|     @Override | ||||
|     public int deleteSysOrderById(Long orderId) | ||||
|     { | ||||
|         return sysOrderMapper.deleteSysOrderById(orderId); | ||||
|     } | ||||
| } | ||||
							
								
								
									
										177
									
								
								ruoyi-custom/src/main/resources/mapper/custom/SysOrderMapper.xml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										177
									
								
								ruoyi-custom/src/main/resources/mapper/custom/SysOrderMapper.xml
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,177 @@ | ||||
| <?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.custom.mapper.SysOrderMapper"> | ||||
|  | ||||
|     <resultMap type="SysOrder" id="SysOrderResult"> | ||||
|         <result property="orderId"    column="order_id"    /> | ||||
|         <result property="customer"    column="customer"    /> | ||||
|         <result property="phone"    column="phone"    /> | ||||
|         <result property="amount"    column="amount"    /> | ||||
|         <result property="payTypeId"    column="pay_type_id"    /> | ||||
|         <result property="payType"    column="pay_type"    /> | ||||
|         <result property="preSaleId"    column="pre_sale_id"    /> | ||||
|         <result property="createBy"    column="create_by"    /> | ||||
|         <result property="preSale"    column="pre_sale"    /> | ||||
|         <result property="createTime"    column="create_time"    /> | ||||
|         <result property="afterSaleId"    column="after_sale_id"    /> | ||||
|         <result property="updateBy"    column="update_by"    /> | ||||
|         <result property="afterSale"    column="after_sale"    /> | ||||
|         <result property="updateTime"    column="update_time"    /> | ||||
|         <result property="nutritionistId"    column="nutritionist_id"    /> | ||||
|         <result property="remark"    column="remark"    /> | ||||
|         <result property="nutritionist"    column="nutritionist"    /> | ||||
|         <result property="nutriAssisId"    column="nutri_assis_id"    /> | ||||
|         <result property="nutriAssis"    column="nutri_assis"    /> | ||||
|         <result property="accountId"    column="account_id"    /> | ||||
|         <result property="account"    column="account"    /> | ||||
|         <result property="plannerId"    column="planner_id"    /> | ||||
|         <result property="planner"    column="planner"    /> | ||||
|         <result property="plannerAssisId"    column="planner_assis_id"    /> | ||||
|         <result property="plannerAssis"    column="planner_assis"    /> | ||||
|         <result property="operatorId"    column="operator_id"    /> | ||||
|         <result property="operator"    column="operator"    /> | ||||
|         <result property="recommender"    column="recommender"    /> | ||||
|         <result property="orderTime"    column="order_time"    /> | ||||
|     </resultMap> | ||||
|  | ||||
|     <sql id="selectSysOrderVo"> | ||||
|         select order_id, customer, phone, amount, pay_type_id, pay_type, pre_sale_id, create_by, pre_sale, create_time, after_sale_id, update_by, after_sale, update_time, nutritionist_id, remark, nutritionist, nutri_assis_id, nutri_assis, account_id, account, planner_id, planner, planner_assis_id, planner_assis, operator_id, operator, recommender, order_time from sys_order | ||||
|     </sql> | ||||
|  | ||||
|     <select id="selectSysOrderList" parameterType="SysOrder" resultMap="SysOrderResult"> | ||||
|         <include refid="selectSysOrderVo"/> | ||||
|         <where> | ||||
|             <if test="customer != null  and customer != ''"> and customer = #{customer}</if> | ||||
|             <if test="phone != null  and phone != ''"> and phone = #{phone}</if> | ||||
|             <if test="payTypeId != null "> and pay_type_id = #{payTypeId}</if> | ||||
|             <if test="preSaleId != null "> and pre_sale_id = #{preSaleId}</if> | ||||
|             <if test="afterSaleId != null "> and after_sale_id = #{afterSaleId}</if> | ||||
|             <if test="nutritionistId != null "> and nutritionist_id = #{nutritionistId}</if> | ||||
|             <if test="nutriAssisId != null "> and nutri_assis_id = #{nutriAssisId}</if> | ||||
|             <if test="accountId != null "> and account_id = #{accountId}</if> | ||||
|             <if test="plannerId != null "> and planner_id = #{plannerId}</if> | ||||
|             <if test="plannerAssisId != null "> and planner_assis_id = #{plannerAssisId}</if> | ||||
|             <if test="operatorId != null "> and operator_id = #{operatorId}</if> | ||||
|             <if test="recommender != null  and recommender != ''"> and recommender = #{recommender}</if> | ||||
|             <if test="orderTime != null "> and order_time = #{orderTime}</if> | ||||
|         </where> | ||||
|     </select> | ||||
|  | ||||
|     <select id="selectSysOrderById" parameterType="Long" resultMap="SysOrderResult"> | ||||
|         <include refid="selectSysOrderVo"/> | ||||
|         where order_id = #{orderId} | ||||
|     </select> | ||||
|  | ||||
|     <insert id="insertSysOrder" parameterType="SysOrder" useGeneratedKeys="true" keyProperty="orderId"> | ||||
|         insert into sys_order | ||||
|         <trim prefix="(" suffix=")" suffixOverrides=","> | ||||
|             <if test="customer != null and customer != ''">customer,</if> | ||||
|             <if test="phone != null">phone,</if> | ||||
|             <if test="amount != null">amount,</if> | ||||
|             <if test="payTypeId != null">pay_type_id,</if> | ||||
|             <if test="payType != null">pay_type,</if> | ||||
|             <if test="preSaleId != null">pre_sale_id,</if> | ||||
|             <if test="createBy != null">create_by,</if> | ||||
|             <if test="preSale != null">pre_sale,</if> | ||||
|             <if test="createTime != null">create_time,</if> | ||||
|             <if test="afterSaleId != null">after_sale_id,</if> | ||||
|             <if test="updateBy != null">update_by,</if> | ||||
|             <if test="afterSale != null">after_sale,</if> | ||||
|             <if test="updateTime != null">update_time,</if> | ||||
|             <if test="nutritionistId != null">nutritionist_id,</if> | ||||
|             <if test="remark != null">remark,</if> | ||||
|             <if test="nutritionist != null">nutritionist,</if> | ||||
|             <if test="nutriAssisId != null">nutri_assis_id,</if> | ||||
|             <if test="nutriAssis != null">nutri_assis,</if> | ||||
|             <if test="accountId != null">account_id,</if> | ||||
|             <if test="account != null">account,</if> | ||||
|             <if test="plannerId != null">planner_id,</if> | ||||
|             <if test="planner != null">planner,</if> | ||||
|             <if test="plannerAssisId != null">planner_assis_id,</if> | ||||
|             <if test="plannerAssis != null">planner_assis,</if> | ||||
|             <if test="operatorId != null">operator_id,</if> | ||||
|             <if test="operator != null">operator,</if> | ||||
|             <if test="recommender != null">recommender,</if> | ||||
|             <if test="orderTime != null">order_time,</if> | ||||
|         </trim> | ||||
|         <trim prefix="values (" suffix=")" suffixOverrides=","> | ||||
|             <if test="customer != null and customer != ''">#{customer},</if> | ||||
|             <if test="phone != null">#{phone},</if> | ||||
|             <if test="amount != null">#{amount},</if> | ||||
|             <if test="payTypeId != null">#{payTypeId},</if> | ||||
|             <if test="payType != null">#{payType},</if> | ||||
|             <if test="preSaleId != null">#{preSaleId},</if> | ||||
|             <if test="createBy != null">#{createBy},</if> | ||||
|             <if test="preSale != null">#{preSale},</if> | ||||
|             <if test="createTime != null">#{createTime},</if> | ||||
|             <if test="afterSaleId != null">#{afterSaleId},</if> | ||||
|             <if test="updateBy != null">#{updateBy},</if> | ||||
|             <if test="afterSale != null">#{afterSale},</if> | ||||
|             <if test="updateTime != null">#{updateTime},</if> | ||||
|             <if test="nutritionistId != null">#{nutritionistId},</if> | ||||
|             <if test="remark != null">#{remark},</if> | ||||
|             <if test="nutritionist != null">#{nutritionist},</if> | ||||
|             <if test="nutriAssisId != null">#{nutriAssisId},</if> | ||||
|             <if test="nutriAssis != null">#{nutriAssis},</if> | ||||
|             <if test="accountId != null">#{accountId},</if> | ||||
|             <if test="account != null">#{account},</if> | ||||
|             <if test="plannerId != null">#{plannerId},</if> | ||||
|             <if test="planner != null">#{planner},</if> | ||||
|             <if test="plannerAssisId != null">#{plannerAssisId},</if> | ||||
|             <if test="plannerAssis != null">#{plannerAssis},</if> | ||||
|             <if test="operatorId != null">#{operatorId},</if> | ||||
|             <if test="operator != null">#{operator},</if> | ||||
|             <if test="recommender != null">#{recommender},</if> | ||||
|             <if test="orderTime != null">#{orderTime},</if> | ||||
|         </trim> | ||||
|     </insert> | ||||
|  | ||||
|     <update id="updateSysOrder" parameterType="SysOrder"> | ||||
|         update sys_order | ||||
|         <trim prefix="SET" suffixOverrides=","> | ||||
|             <if test="customer != null and customer != ''">customer = #{customer},</if> | ||||
|             <if test="phone != null">phone = #{phone},</if> | ||||
|             <if test="amount != null">amount = #{amount},</if> | ||||
|             <if test="payTypeId != null">pay_type_id = #{payTypeId},</if> | ||||
|             <if test="payType != null">pay_type = #{payType},</if> | ||||
|             <if test="preSaleId != null">pre_sale_id = #{preSaleId},</if> | ||||
|             <if test="createBy != null">create_by = #{createBy},</if> | ||||
|             <if test="preSale != null">pre_sale = #{preSale},</if> | ||||
|             <if test="createTime != null">create_time = #{createTime},</if> | ||||
|             <if test="afterSaleId != null">after_sale_id = #{afterSaleId},</if> | ||||
|             <if test="updateBy != null">update_by = #{updateBy},</if> | ||||
|             <if test="afterSale != null">after_sale = #{afterSale},</if> | ||||
|             <if test="updateTime != null">update_time = #{updateTime},</if> | ||||
|             <if test="nutritionistId != null">nutritionist_id = #{nutritionistId},</if> | ||||
|             <if test="remark != null">remark = #{remark},</if> | ||||
|             <if test="nutritionist != null">nutritionist = #{nutritionist},</if> | ||||
|             <if test="nutriAssisId != null">nutri_assis_id = #{nutriAssisId},</if> | ||||
|             <if test="nutriAssis != null">nutri_assis = #{nutriAssis},</if> | ||||
|             <if test="accountId != null">account_id = #{accountId},</if> | ||||
|             <if test="account != null">account = #{account},</if> | ||||
|             <if test="plannerId != null">planner_id = #{plannerId},</if> | ||||
|             <if test="planner != null">planner = #{planner},</if> | ||||
|             <if test="plannerAssisId != null">planner_assis_id = #{plannerAssisId},</if> | ||||
|             <if test="plannerAssis != null">planner_assis = #{plannerAssis},</if> | ||||
|             <if test="operatorId != null">operator_id = #{operatorId},</if> | ||||
|             <if test="operator != null">operator = #{operator},</if> | ||||
|             <if test="recommender != null">recommender = #{recommender},</if> | ||||
|             <if test="orderTime != null">order_time = #{orderTime},</if> | ||||
|         </trim> | ||||
|         where order_id = #{orderId} | ||||
|     </update> | ||||
|  | ||||
|     <delete id="deleteSysOrderById" parameterType="Long"> | ||||
|         delete from sys_order where order_id = #{orderId} | ||||
|     </delete> | ||||
|  | ||||
|     <delete id="deleteSysOrderByIds" parameterType="String"> | ||||
|         delete from sys_order where order_id in | ||||
|         <foreach item="orderId" collection="array" open="(" separator="," close=")"> | ||||
|             #{orderId} | ||||
|         </foreach> | ||||
|     </delete> | ||||
|  | ||||
| </mapper> | ||||
		Reference in New Issue
	
	Block a user