修改系统
This commit is contained in:
@ -0,0 +1,22 @@
|
||||
package com.stdiet.custom.controller;
|
||||
|
||||
import com.github.pagehelper.PageInfo;
|
||||
import com.stdiet.common.constant.HttpStatus;
|
||||
import com.stdiet.common.core.controller.BaseController;
|
||||
import com.stdiet.custom.page.OrderTableDataInfo;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
|
||||
public class OrderBaseController extends BaseController {
|
||||
|
||||
protected OrderTableDataInfo getOrderDataTable(List<?> list, BigDecimal totalAmount) {
|
||||
OrderTableDataInfo rspData = new OrderTableDataInfo();
|
||||
rspData.setCode(HttpStatus.SUCCESS);
|
||||
rspData.setMsg("查询成功");
|
||||
rspData.setRows(list);
|
||||
rspData.setTotalAmount(totalAmount);
|
||||
rspData.setTotal(new PageInfo(list).getTotal());
|
||||
return rspData;
|
||||
}
|
||||
}
|
@ -0,0 +1,82 @@
|
||||
package com.stdiet.custom.domain;
|
||||
|
||||
import com.stdiet.common.core.domain.BaseEntity;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
public class CusUserPost implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
private Long userId;
|
||||
|
||||
private String userName;
|
||||
|
||||
private String postCode;
|
||||
|
||||
private String postId;
|
||||
|
||||
private String postName;
|
||||
|
||||
private String remark;
|
||||
|
||||
public void setRemark(String remark) {
|
||||
this.remark = remark;
|
||||
}
|
||||
|
||||
public String getRemark() {
|
||||
return remark;
|
||||
}
|
||||
|
||||
public void setPostName(String postName) {
|
||||
this.postName = postName;
|
||||
}
|
||||
|
||||
public String getPostName() {
|
||||
return postName;
|
||||
}
|
||||
|
||||
public String getPostCode() {
|
||||
return postCode;
|
||||
}
|
||||
|
||||
public Long getUserId() {
|
||||
return userId;
|
||||
}
|
||||
|
||||
public String getUserName() {
|
||||
return userName;
|
||||
}
|
||||
|
||||
public void setPostCode(String postCode) {
|
||||
this.postCode = postCode;
|
||||
}
|
||||
|
||||
public void setUserId(Long userId) {
|
||||
this.userId = userId;
|
||||
}
|
||||
|
||||
public void setUserName(String userName) {
|
||||
this.userName = userName;
|
||||
}
|
||||
|
||||
public String getPostId() {
|
||||
return postId;
|
||||
}
|
||||
|
||||
public void setPostId(String postId) {
|
||||
this.postId = postId;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "UserPostOption{" +
|
||||
"userId=" + userId +
|
||||
", userName='" + userName + '\'' +
|
||||
", postCode='" + postCode + '\'' +
|
||||
", postid='" + postId + '\'' +
|
||||
", postName='" + postName + '\'' +
|
||||
", remark='" + remark + '\'' +
|
||||
'}';
|
||||
}
|
||||
}
|
@ -0,0 +1,143 @@
|
||||
package com.stdiet.custom.domain;
|
||||
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
import com.stdiet.common.annotation.Excel;
|
||||
import com.stdiet.common.core.domain.BaseEntity;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
* 业务提成比例对象 sys_commision
|
||||
*
|
||||
* @author wonder
|
||||
* @date 2020-09-24
|
||||
*/
|
||||
public class SysCommision extends BaseEntity {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 编号
|
||||
*/
|
||||
private Long ruleId;
|
||||
|
||||
/**
|
||||
* 业务员
|
||||
*/
|
||||
private Long userId;
|
||||
|
||||
/**
|
||||
* 岗位id
|
||||
*/
|
||||
private Long postId;
|
||||
|
||||
/**
|
||||
* 业务员
|
||||
*/
|
||||
@Excel(name = "业务员")
|
||||
private String userName;
|
||||
|
||||
@Excel(name = "岗位")
|
||||
private String postName;
|
||||
|
||||
/**
|
||||
* 金额
|
||||
*/
|
||||
@Excel(name = "金额", scale = 2)
|
||||
private BigDecimal amount;
|
||||
|
||||
/**
|
||||
* 分成比例
|
||||
*/
|
||||
@Excel(name = "比例", suffix = "%")
|
||||
private Float rate;
|
||||
|
||||
/**
|
||||
* 提成
|
||||
*/
|
||||
@Excel(name = "提成", scale = 2)
|
||||
private BigDecimal commision;
|
||||
|
||||
public BigDecimal getCommision() {
|
||||
return commision;
|
||||
}
|
||||
|
||||
public void setCommision(BigDecimal commision) {
|
||||
this.commision = commision;
|
||||
}
|
||||
|
||||
public Long getPostId() {
|
||||
return postId;
|
||||
}
|
||||
|
||||
public void setPostId(Long postId) {
|
||||
this.postId = postId;
|
||||
}
|
||||
|
||||
public void setPostName(String postName) {
|
||||
this.postName = postName;
|
||||
}
|
||||
|
||||
public String getPostName() {
|
||||
return postName;
|
||||
}
|
||||
|
||||
public void setRuleId(Long ruleId) {
|
||||
this.ruleId = ruleId;
|
||||
}
|
||||
|
||||
public Long getRuleId() {
|
||||
return ruleId;
|
||||
}
|
||||
|
||||
public void setUserId(Long userId) {
|
||||
this.userId = userId;
|
||||
}
|
||||
|
||||
public Long getUserId() {
|
||||
return userId;
|
||||
}
|
||||
|
||||
public void setUserName(String userName) {
|
||||
this.userName = userName;
|
||||
}
|
||||
|
||||
public String getUserName() {
|
||||
return userName;
|
||||
}
|
||||
|
||||
public void setAmount(BigDecimal amount) {
|
||||
this.amount = amount;
|
||||
}
|
||||
|
||||
public BigDecimal getAmount() {
|
||||
return amount;
|
||||
}
|
||||
|
||||
public void setRate(Float rate) {
|
||||
this.rate = rate;
|
||||
}
|
||||
|
||||
public Float getRate() {
|
||||
return rate;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("ruleId", getRuleId())
|
||||
.append("userId", getUserId())
|
||||
.append("userName", getUserName())
|
||||
.append("postId", getPostId())
|
||||
.append("postName", getPostName())
|
||||
.append("amount", getAmount())
|
||||
.append("commision", getCommision())
|
||||
.append("rate", getRate())
|
||||
.append("createBy", getCreateBy())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("updateBy", getUpdateBy())
|
||||
.append("updateTime", getUpdateTime())
|
||||
.append("remark", getRemark())
|
||||
.toString();
|
||||
}
|
||||
}
|
@ -0,0 +1,223 @@
|
||||
package com.stdiet.custom.domain;
|
||||
|
||||
import com.stdiet.common.annotation.Excel;
|
||||
import com.stdiet.common.core.domain.BaseEntity;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
* 合同对象 sys_contract
|
||||
*
|
||||
* @author wonder
|
||||
* @date 2020-10-23
|
||||
*/
|
||||
public class SysContract extends BaseEntity {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 合同编号
|
||||
*/
|
||||
@Excel(name = "合同编号")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 客户姓名
|
||||
*/
|
||||
@Excel(name = "客户姓名")
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 客户签名
|
||||
*/
|
||||
private String signName;
|
||||
|
||||
/**
|
||||
* 客户身份证
|
||||
*/
|
||||
private String cusId;
|
||||
|
||||
/**
|
||||
* 电话
|
||||
*/
|
||||
@Excel(name = "电话")
|
||||
private String phone;
|
||||
|
||||
/**
|
||||
* 服务时间
|
||||
*/
|
||||
@Excel(name = "服务时间")
|
||||
private int serveTime;
|
||||
|
||||
private String serveTimeStr;
|
||||
|
||||
/**
|
||||
* 金额
|
||||
*/
|
||||
@Excel(name = "金额")
|
||||
private BigDecimal amount;
|
||||
|
||||
private String amountUpper;
|
||||
|
||||
/**
|
||||
* 文件路径
|
||||
*/
|
||||
@Excel(name = "文件路径")
|
||||
private String path;
|
||||
|
||||
/**
|
||||
* 签约日期
|
||||
*/
|
||||
private String signDate;
|
||||
|
||||
/**
|
||||
* 营养师
|
||||
*/
|
||||
private String tutor;
|
||||
|
||||
/**
|
||||
* 合同状态
|
||||
* 0-未签订;1-已签订
|
||||
*/
|
||||
private String Status;
|
||||
|
||||
private String servePromise;
|
||||
|
||||
public String getSignName() {
|
||||
return signName;
|
||||
}
|
||||
|
||||
public void setSignName(String signName) {
|
||||
this.signName = signName;
|
||||
}
|
||||
|
||||
public String getTutor() {
|
||||
return tutor;
|
||||
}
|
||||
|
||||
public void setTutor(String tutor) {
|
||||
this.tutor = tutor;
|
||||
}
|
||||
|
||||
public String getServePromise() {
|
||||
return servePromise;
|
||||
}
|
||||
|
||||
public void setServePromise(String servePromise) {
|
||||
this.servePromise = servePromise;
|
||||
}
|
||||
|
||||
public Long getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Long id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getPhone() {
|
||||
return phone;
|
||||
}
|
||||
|
||||
public void setPhone(String phone) {
|
||||
this.phone = phone;
|
||||
}
|
||||
|
||||
public int getServeTime() {
|
||||
return serveTime;
|
||||
}
|
||||
|
||||
public void setServeTime(int serveTime) {
|
||||
this.serveTime = serveTime;
|
||||
}
|
||||
|
||||
public BigDecimal getAmount() {
|
||||
return amount;
|
||||
}
|
||||
|
||||
public void setAmount(BigDecimal amount) {
|
||||
this.amount = amount;
|
||||
}
|
||||
|
||||
public String getAmountUpper() {
|
||||
return amountUpper;
|
||||
}
|
||||
|
||||
public void setAmountUpper(String amountUpper) {
|
||||
this.amountUpper = amountUpper;
|
||||
}
|
||||
|
||||
public String getPath() {
|
||||
return path;
|
||||
}
|
||||
|
||||
public void setPath(String path) {
|
||||
this.path = path;
|
||||
}
|
||||
|
||||
public String getStatus() {
|
||||
return Status;
|
||||
}
|
||||
|
||||
public void setStatus(String status) {
|
||||
Status = status;
|
||||
}
|
||||
|
||||
public String getCusId() {
|
||||
return cusId;
|
||||
}
|
||||
|
||||
public void setCusId(String cusId) {
|
||||
this.cusId = cusId;
|
||||
}
|
||||
|
||||
public String getSignDate() {
|
||||
return signDate;
|
||||
}
|
||||
|
||||
public void setSignDate(String signDate) {
|
||||
this.signDate = signDate;
|
||||
}
|
||||
|
||||
|
||||
public String getServeTimeStr() {
|
||||
return serveTimeStr;
|
||||
}
|
||||
|
||||
public void setServeTimeStr(String serveTimeStr) {
|
||||
this.serveTimeStr = serveTimeStr;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("name", getName())
|
||||
.append("cusId", getCusId())
|
||||
.append("status", getStatus())
|
||||
.append("phone", getPhone())
|
||||
.append("serveTime", getServeTime())
|
||||
.append("amount", getAmount())
|
||||
.append("amountUpper", getAmountUpper())
|
||||
.append("signDate", getSignDate())
|
||||
.append("path", getPath())
|
||||
.append("createBy", getCreateBy())
|
||||
.append("tutor", getTutor())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("updateBy", getUpdateBy())
|
||||
.append("updateTime", getUpdateTime())
|
||||
.append("remark", getRemark())
|
||||
.append("signName", getSignName())
|
||||
|
||||
.toString();
|
||||
}
|
||||
}
|
@ -0,0 +1,447 @@
|
||||
package com.stdiet.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.stdiet.common.annotation.Excel;
|
||||
import com.stdiet.common.core.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 销售订单对象 sys_order
|
||||
*
|
||||
* @author wonder
|
||||
* @date 2020-09-24
|
||||
*/
|
||||
public class SysOrder extends BaseEntity {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 编号
|
||||
*/
|
||||
@Excel(name = "编号")
|
||||
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;
|
||||
|
||||
/**
|
||||
* 运营助理
|
||||
*/
|
||||
private Long operatorAssisId;
|
||||
|
||||
@Excel(name = "运营助理")
|
||||
private String operatorAssis;
|
||||
|
||||
/**
|
||||
* 推荐人
|
||||
*/
|
||||
@Excel(name = "推荐人")
|
||||
private String recommender;
|
||||
|
||||
/**
|
||||
* 服务月数
|
||||
*/
|
||||
@Excel(name = "服务时长")
|
||||
private String serveTime;
|
||||
|
||||
private Long serveTimeId;
|
||||
|
||||
@Excel(name = "审核状态", dictType = "cus_review_status")
|
||||
private String reviewStatus;
|
||||
|
||||
/**
|
||||
* 成交日期
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@Excel(name = "成交时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date orderTime;
|
||||
|
||||
public String getServeTime() {
|
||||
return serveTime;
|
||||
}
|
||||
|
||||
public void setServeTimeId(Long serveTimeId) {
|
||||
this.serveTimeId = serveTimeId;
|
||||
}
|
||||
|
||||
public Long getServeTimeId() {
|
||||
return serveTimeId;
|
||||
}
|
||||
|
||||
public void setServeTime(String serveTime) {
|
||||
this.serveTime = serveTime;
|
||||
}
|
||||
|
||||
public void setOperatorAssis(String operatorAssis) {
|
||||
this.operatorAssis = operatorAssis;
|
||||
}
|
||||
|
||||
public void setOperatorAssisId(Long operatorAssisId) {
|
||||
this.operatorAssisId = operatorAssisId;
|
||||
}
|
||||
|
||||
public Long getOperatorAssisId() {
|
||||
return operatorAssisId;
|
||||
}
|
||||
|
||||
public String getOperatorAssis() {
|
||||
return operatorAssis;
|
||||
}
|
||||
|
||||
public String getReviewStatus() {
|
||||
return reviewStatus;
|
||||
}
|
||||
|
||||
public void setReviewStatus(String reviewStatus) {
|
||||
this.reviewStatus = reviewStatus;
|
||||
}
|
||||
|
||||
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("operatorAssisId", getOperatorAssisId())
|
||||
.append("operatorAssis", getOperatorAssis())
|
||||
.append("recommender", getRecommender())
|
||||
.append("orderTime", getOrderTime())
|
||||
.append("serveTimeId", getServeTimeId())
|
||||
.append("serveTime", getServeTime())
|
||||
.append("reviewStatus", getReviewStatus())
|
||||
.toString();
|
||||
}
|
||||
}
|
@ -0,0 +1,9 @@
|
||||
package com.stdiet.custom.domain;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
public class WxPush implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,9 @@
|
||||
package com.stdiet.custom.mapper;
|
||||
|
||||
import com.stdiet.custom.domain.CusUserPost;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface CusUserPostMapper {
|
||||
public List<CusUserPost> selectAllCusUserPost();
|
||||
}
|
@ -0,0 +1,63 @@
|
||||
package com.stdiet.custom.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.stdiet.custom.domain.SysCommision;
|
||||
|
||||
/**
|
||||
* 业务提成比例Mapper接口
|
||||
*
|
||||
* @author wonder
|
||||
* @date 2020-09-24
|
||||
*/
|
||||
public interface SysCommisionMapper
|
||||
{
|
||||
/**
|
||||
* 查询业务提成比例
|
||||
*
|
||||
* @param sysCommision 业务提成比例ID
|
||||
* @return 业务提成比例
|
||||
*/
|
||||
public SysCommision selectSysCommisionById(SysCommision sysCommision);
|
||||
|
||||
/**
|
||||
* 查询业务提成比例列表
|
||||
*
|
||||
* @param sysCommision 业务提成比例
|
||||
* @return 业务提成比例集合
|
||||
*/
|
||||
public List<SysCommision> selectSysCommisionList(SysCommision sysCommision);
|
||||
|
||||
/**
|
||||
* 新增业务提成比例
|
||||
*
|
||||
* @param sysCommision 业务提成比例
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertSysCommision(SysCommision sysCommision);
|
||||
|
||||
/**
|
||||
* 修改业务提成比例
|
||||
*
|
||||
* @param sysCommision 业务提成比例
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateSysCommision(SysCommision sysCommision);
|
||||
|
||||
/**
|
||||
* 删除业务提成比例
|
||||
*
|
||||
* @param ruleId 业务提成比例ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteSysCommisionById(Long ruleId);
|
||||
|
||||
/**
|
||||
* 批量删除业务提成比例
|
||||
*
|
||||
* @param ruleIds 需要删除的数据ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteSysCommisionByIds(Long[] ruleIds);
|
||||
|
||||
public List<SysCommision> selectSysCommisionDetail(SysCommision sysCommision);
|
||||
}
|
@ -0,0 +1,61 @@
|
||||
package com.stdiet.custom.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.stdiet.custom.domain.SysContract;
|
||||
|
||||
/**
|
||||
* 合同Mapper接口
|
||||
*
|
||||
* @author wonder
|
||||
* @date 2020-10-23
|
||||
*/
|
||||
public interface SysContractMapper
|
||||
{
|
||||
/**
|
||||
* 查询合同
|
||||
*
|
||||
* @param id 合同ID
|
||||
* @return 合同
|
||||
*/
|
||||
public SysContract selectSysContractById(Long id);
|
||||
|
||||
/**
|
||||
* 查询合同列表
|
||||
*
|
||||
* @param sysContract 合同
|
||||
* @return 合同集合
|
||||
*/
|
||||
public List<SysContract> selectSysContractList(SysContract sysContract);
|
||||
|
||||
/**
|
||||
* 新增合同
|
||||
*
|
||||
* @param sysContract 合同
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertSysContract(SysContract sysContract);
|
||||
|
||||
/**
|
||||
* 修改合同
|
||||
*
|
||||
* @param sysContract 合同
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateSysContract(SysContract sysContract);
|
||||
|
||||
/**
|
||||
* 删除合同
|
||||
*
|
||||
* @param id 合同ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteSysContractById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除合同
|
||||
*
|
||||
* @param ids 需要删除的数据ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteSysContractByIds(Long[] ids);
|
||||
}
|
@ -0,0 +1,69 @@
|
||||
package com.stdiet.custom.mapper;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
import com.stdiet.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);
|
||||
|
||||
/**
|
||||
* 计算所有订单总额
|
||||
* @param sysOrder
|
||||
* @return
|
||||
*/
|
||||
public BigDecimal selectAllOrderAmount(SysOrder sysOrder);
|
||||
}
|
@ -0,0 +1,92 @@
|
||||
package com.stdiet.custom.page;
|
||||
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
|
||||
public class OrderTableDataInfo implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 总记录数
|
||||
*/
|
||||
private long total;
|
||||
|
||||
/**
|
||||
* 列表数据
|
||||
*/
|
||||
private List<?> rows;
|
||||
|
||||
/**
|
||||
* 消息状态码
|
||||
*/
|
||||
private int code;
|
||||
|
||||
/**
|
||||
* 消息内容
|
||||
*/
|
||||
private String msg;
|
||||
|
||||
/**
|
||||
* 金额总数
|
||||
*/
|
||||
private BigDecimal totalAmount;
|
||||
|
||||
/**
|
||||
* 表格数据对象
|
||||
*/
|
||||
public OrderTableDataInfo() {
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页
|
||||
*
|
||||
* @param list 列表数据
|
||||
* @param total 总记录数
|
||||
*/
|
||||
public OrderTableDataInfo(List<?> list, int total) {
|
||||
this.rows = list;
|
||||
this.total = total;
|
||||
}
|
||||
|
||||
public long getTotal() {
|
||||
return total;
|
||||
}
|
||||
|
||||
public void setTotal(long total) {
|
||||
this.total = total;
|
||||
}
|
||||
|
||||
public List<?> getRows() {
|
||||
return rows;
|
||||
}
|
||||
|
||||
public void setRows(List<?> rows) {
|
||||
this.rows = rows;
|
||||
}
|
||||
|
||||
public int getCode() {
|
||||
return code;
|
||||
}
|
||||
|
||||
public void setCode(int code) {
|
||||
this.code = code;
|
||||
}
|
||||
|
||||
public String getMsg() {
|
||||
return msg;
|
||||
}
|
||||
|
||||
public void setMsg(String msg) {
|
||||
this.msg = msg;
|
||||
}
|
||||
|
||||
public void setTotalAmount(BigDecimal totalAmount) {
|
||||
this.totalAmount = totalAmount;
|
||||
}
|
||||
|
||||
public BigDecimal getTotalAmount() {
|
||||
return totalAmount;
|
||||
}
|
||||
}
|
@ -0,0 +1,26 @@
|
||||
package com.stdiet.custom.page;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
public class PdfProcessInfo implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
private int code;
|
||||
private String msg;
|
||||
|
||||
public int getCode() {
|
||||
return code;
|
||||
}
|
||||
|
||||
public void setCode(int code) {
|
||||
this.code = code;
|
||||
}
|
||||
|
||||
public String getMsg() {
|
||||
return msg;
|
||||
}
|
||||
|
||||
public void setMsg(String msg) {
|
||||
this.msg = msg;
|
||||
}
|
||||
}
|
@ -0,0 +1,10 @@
|
||||
package com.stdiet.custom.service;
|
||||
|
||||
import com.stdiet.custom.domain.CusUserPost;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface ICusUserPostService {
|
||||
|
||||
public List<CusUserPost> selectAllCusUserPost();
|
||||
}
|
@ -0,0 +1,63 @@
|
||||
package com.stdiet.custom.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.stdiet.custom.domain.SysCommision;
|
||||
|
||||
/**
|
||||
* 业务提成比例Service接口
|
||||
*
|
||||
* @author wonder
|
||||
* @date 2020-09-24
|
||||
*/
|
||||
public interface ISysCommisionService
|
||||
{
|
||||
/**
|
||||
* 查询业务提成比例
|
||||
*
|
||||
* @param ruleId 业务提成比例ID
|
||||
* @return 业务提成比例
|
||||
*/
|
||||
public SysCommision selectSysCommisionById(SysCommision sysCommision);
|
||||
|
||||
/**
|
||||
* 查询业务提成比例列表
|
||||
*
|
||||
* @param sysCommision 业务提成比例
|
||||
* @return 业务提成比例集合
|
||||
*/
|
||||
public List<SysCommision> selectSysCommisionList(SysCommision sysCommision);
|
||||
|
||||
/**
|
||||
* 新增业务提成比例
|
||||
*
|
||||
* @param sysCommision 业务提成比例
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertSysCommision(SysCommision sysCommision);
|
||||
|
||||
/**
|
||||
* 修改业务提成比例
|
||||
*
|
||||
* @param sysCommision 业务提成比例
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateSysCommision(SysCommision sysCommision);
|
||||
|
||||
/**
|
||||
* 批量删除业务提成比例
|
||||
*
|
||||
* @param ruleIds 需要删除的业务提成比例ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteSysCommisionByIds(Long[] ruleIds);
|
||||
|
||||
/**
|
||||
* 删除业务提成比例信息
|
||||
*
|
||||
* @param ruleId 业务提成比例ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteSysCommisionById(Long ruleId);
|
||||
|
||||
public List<SysCommision> selectSysCommisionDetail(SysCommision sysCommision);
|
||||
}
|
@ -0,0 +1,64 @@
|
||||
package com.stdiet.custom.service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.stdiet.custom.domain.SysContract;
|
||||
import com.stdiet.custom.page.PdfProcessInfo;
|
||||
|
||||
/**
|
||||
* 合同Service接口
|
||||
*
|
||||
* @author wonder
|
||||
* @date 2020-10-23
|
||||
*/
|
||||
public interface ISysContractService {
|
||||
/**
|
||||
* 查询合同
|
||||
*
|
||||
* @param id 合同ID
|
||||
* @return 合同
|
||||
*/
|
||||
public SysContract selectSysContractById(Long id);
|
||||
|
||||
/**
|
||||
* 查询合同列表
|
||||
*
|
||||
* @param sysContract 合同
|
||||
* @return 合同集合
|
||||
*/
|
||||
public List<SysContract> selectSysContractList(SysContract sysContract);
|
||||
|
||||
/**
|
||||
* 新增合同
|
||||
*
|
||||
* @param sysContract 合同
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertSysContract(SysContract sysContract);
|
||||
|
||||
/**
|
||||
* 修改合同
|
||||
*
|
||||
* @param sysContract 合同
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateSysContract(SysContract sysContract);
|
||||
|
||||
/**
|
||||
* 批量删除合同
|
||||
*
|
||||
* @param ids 需要删除的合同ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteSysContractByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 删除合同信息
|
||||
*
|
||||
* @param id 合同ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteSysContractById(Long id);
|
||||
|
||||
public PdfProcessInfo signContract(SysContract sysContract);
|
||||
}
|
@ -0,0 +1,69 @@
|
||||
package com.stdiet.custom.service;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
import com.stdiet.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);
|
||||
|
||||
/**
|
||||
* 计算所有订单总额
|
||||
* @param sysOrder
|
||||
* @return
|
||||
*/
|
||||
public BigDecimal selectAllOrderAmount(SysOrder sysOrder);
|
||||
}
|
@ -0,0 +1,21 @@
|
||||
package com.stdiet.custom.service.impl;
|
||||
|
||||
import com.stdiet.custom.domain.CusUserPost;
|
||||
import com.stdiet.custom.mapper.CusUserPostMapper;
|
||||
import com.stdiet.custom.service.ICusUserPostService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Service
|
||||
public class CusUserPostImpl implements ICusUserPostService {
|
||||
|
||||
@Autowired
|
||||
private CusUserPostMapper cusUserPostMapper;
|
||||
|
||||
@Override
|
||||
public List<CusUserPost> selectAllCusUserPost() {
|
||||
return cusUserPostMapper.selectAllCusUserPost();
|
||||
}
|
||||
}
|
@ -0,0 +1,101 @@
|
||||
package com.stdiet.custom.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
import com.stdiet.common.utils.DateUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.stdiet.custom.mapper.SysCommisionMapper;
|
||||
import com.stdiet.custom.domain.SysCommision;
|
||||
import com.stdiet.custom.service.ISysCommisionService;
|
||||
|
||||
/**
|
||||
* 业务提成比例Service业务层处理
|
||||
*
|
||||
* @author wonder
|
||||
* @date 2020-09-24
|
||||
*/
|
||||
@Service
|
||||
public class SysCommisionServiceImpl implements ISysCommisionService
|
||||
{
|
||||
@Autowired
|
||||
private SysCommisionMapper sysCommisionMapper;
|
||||
|
||||
/**
|
||||
* 查询业务提成比例
|
||||
*
|
||||
* @param ruleId 业务提成比例ID
|
||||
* @return 业务提成比例
|
||||
*/
|
||||
@Override
|
||||
public SysCommision selectSysCommisionById(SysCommision sysCommision)
|
||||
{
|
||||
return sysCommisionMapper.selectSysCommisionById(sysCommision);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询业务提成比例列表
|
||||
*
|
||||
* @param sysCommision 业务提成比例
|
||||
* @return 业务提成比例
|
||||
*/
|
||||
@Override
|
||||
public List<SysCommision> selectSysCommisionList(SysCommision sysCommision)
|
||||
{
|
||||
return sysCommisionMapper.selectSysCommisionList(sysCommision);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增业务提成比例
|
||||
*
|
||||
* @param sysCommision 业务提成比例
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertSysCommision(SysCommision sysCommision)
|
||||
{
|
||||
sysCommision.setCreateTime(DateUtils.getNowDate());
|
||||
return sysCommisionMapper.insertSysCommision(sysCommision);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改业务提成比例
|
||||
*
|
||||
* @param sysCommision 业务提成比例
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateSysCommision(SysCommision sysCommision)
|
||||
{
|
||||
sysCommision.setUpdateTime(DateUtils.getNowDate());
|
||||
return sysCommisionMapper.updateSysCommision(sysCommision);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除业务提成比例
|
||||
*
|
||||
* @param ruleIds 需要删除的业务提成比例ID
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteSysCommisionByIds(Long[] ruleIds)
|
||||
{
|
||||
return sysCommisionMapper.deleteSysCommisionByIds(ruleIds);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除业务提成比例信息
|
||||
*
|
||||
* @param ruleId 业务提成比例ID
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteSysCommisionById(Long ruleId)
|
||||
{
|
||||
return sysCommisionMapper.deleteSysCommisionById(ruleId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<SysCommision> selectSysCommisionDetail(SysCommision sysCommision) {
|
||||
return sysCommisionMapper.selectSysCommisionDetail(sysCommision);
|
||||
}
|
||||
}
|
@ -0,0 +1,176 @@
|
||||
package com.stdiet.custom.service.impl;
|
||||
|
||||
import com.itextpdf.text.Document;
|
||||
import com.itextpdf.text.DocumentException;
|
||||
import com.itextpdf.text.pdf.*;
|
||||
import com.stdiet.common.utils.DateUtils;
|
||||
import com.stdiet.custom.domain.SysContract;
|
||||
import com.stdiet.custom.mapper.SysContractMapper;
|
||||
import com.stdiet.custom.page.PdfProcessInfo;
|
||||
import com.stdiet.custom.service.ISysContractService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.io.ByteArrayOutputStream;
|
||||
import java.io.FileNotFoundException;
|
||||
import java.io.FileOutputStream;
|
||||
import java.io.IOException;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
/**
|
||||
* 合同Service业务层处理
|
||||
*
|
||||
* @author wonder
|
||||
* @date 2020-10-23
|
||||
*/
|
||||
@Service
|
||||
public class SysContractServiceImpl implements ISysContractService {
|
||||
@Autowired
|
||||
private SysContractMapper sysContractMapper;
|
||||
|
||||
/**
|
||||
* 查询合同
|
||||
*
|
||||
* @param id 合同ID
|
||||
* @return 合同
|
||||
*/
|
||||
@Override
|
||||
public SysContract selectSysContractById(Long id) {
|
||||
return sysContractMapper.selectSysContractById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询合同列表
|
||||
*
|
||||
* @param sysContract 合同
|
||||
* @return 合同
|
||||
*/
|
||||
@Override
|
||||
public List<SysContract> selectSysContractList(SysContract sysContract) {
|
||||
return sysContractMapper.selectSysContractList(sysContract);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增合同
|
||||
*
|
||||
* @param sysContract 合同
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertSysContract(SysContract sysContract) {
|
||||
sysContract.setId(DateUtils.getNowDate().getTime());
|
||||
sysContract.setCreateTime(DateUtils.getNowDate());
|
||||
sysContract.setStatus("no");
|
||||
sysContract.setPath("/f/contract/" + sysContract.getId());
|
||||
return sysContractMapper.insertSysContract(sysContract);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改合同
|
||||
*
|
||||
* @param sysContract 合同
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateSysContract(SysContract sysContract) {
|
||||
sysContract.setUpdateTime(DateUtils.getNowDate());
|
||||
return sysContractMapper.updateSysContract(sysContract);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除合同
|
||||
*
|
||||
* @param ids 需要删除的合同ID
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteSysContractByIds(Long[] ids) {
|
||||
return sysContractMapper.deleteSysContractByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除合同信息
|
||||
*
|
||||
* @param id 合同ID
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteSysContractById(Long id) {
|
||||
return sysContractMapper.deleteSysContractById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PdfProcessInfo signContract(SysContract sysContract) {
|
||||
// String templatePath = "/Users/wonder/Documents/Workspaces/java/RuoYi-Vue/running/pdf/contract.pdf";
|
||||
// String filePath = "/Users/wonder/Documents/Workspaces/java/RuoYi-Vue/running" + sysContract.getPath();
|
||||
String templatePath = "/home/workspace/ShengTangManage/running/pdf/contract.pdf";
|
||||
String filePath = "/home/web/manage.shengtangdiet.com" + sysContract.getPath();
|
||||
|
||||
PdfReader reader;
|
||||
FileOutputStream out;
|
||||
ByteArrayOutputStream bos;
|
||||
PdfStamper stamper;
|
||||
|
||||
PdfProcessInfo info = new PdfProcessInfo();
|
||||
|
||||
try {
|
||||
out = new FileOutputStream(filePath);// 输出流到新的pdf,没有b2.pdf时会创建
|
||||
reader = new PdfReader(templatePath);// 读取pdf模板
|
||||
bos = new ByteArrayOutputStream();
|
||||
stamper = new PdfStamper(reader, bos);
|
||||
AcroFields form = stamper.getAcroFields();
|
||||
|
||||
form.addSubstitutionFont(BaseFont.createFont("STSong-Light", "UniGB-UCS2-H", BaseFont.NOT_EMBEDDED));
|
||||
form.setField("signName", sysContract.getSignName(), true);
|
||||
form.setField("serveTime", sysContract.getServeTimeStr(), true);
|
||||
form.setField("tutor", sysContract.getTutor(), true);
|
||||
form.setField("moneyUpper", sysContract.getAmountUpper(), true);
|
||||
form.setField("money", sysContract.getAmount().intValue() + "", true);
|
||||
form.setField("phone", sysContract.getPhone(), true);
|
||||
form.setField("promise", sysContract.getServePromise(), true);
|
||||
form.setField("date", DateUtils.getDate(), true);
|
||||
form.setField("cusId", sysContract.getCusId(), true);
|
||||
String remark = "";
|
||||
if (sysContract.getRemark() != null && !sysContract.getRemark().equals("")) {
|
||||
remark = "(备注:" + sysContract.getRemark() + ")";
|
||||
}
|
||||
form.setField("remark", remark, true);
|
||||
|
||||
|
||||
stamper.setFormFlattening(true);// 如果为false那么生成的PDF文件还能编辑,一定要设为true
|
||||
stamper.close();
|
||||
|
||||
Document doc = new Document();
|
||||
|
||||
PdfCopy copy = new PdfCopy(doc, out);
|
||||
doc.open();
|
||||
PdfImportedPage importPage = null;
|
||||
for (int i = 1; i <= reader.getNumberOfPages(); i++) {
|
||||
importPage = copy
|
||||
.getImportedPage(new PdfReader(bos.toByteArray()), i);
|
||||
copy.addPage(importPage);
|
||||
}
|
||||
doc.close();
|
||||
|
||||
Runtime.getRuntime().exec("chmod 644 " + filePath);
|
||||
|
||||
info.setCode(1);
|
||||
info.setMsg("success");
|
||||
|
||||
} catch (FileNotFoundException e) {
|
||||
e.printStackTrace();
|
||||
info.setCode(0);
|
||||
info.setMsg(e.getMessage());
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
info.setCode(0);
|
||||
info.setMsg(e.getMessage());
|
||||
} catch (DocumentException e) {
|
||||
e.printStackTrace();
|
||||
info.setCode(0);
|
||||
info.setMsg(e.getMessage());
|
||||
}
|
||||
return info;
|
||||
}
|
||||
}
|
@ -0,0 +1,105 @@
|
||||
package com.stdiet.custom.service.impl;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
import com.stdiet.common.utils.DateUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.stdiet.custom.mapper.SysOrderMapper;
|
||||
import com.stdiet.custom.domain.SysOrder;
|
||||
import com.stdiet.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) {
|
||||
Date orderTime = DateUtils.getNowDate();
|
||||
sysOrder.setCreateTime(orderTime);
|
||||
// sysOrder.setOrderTime(orderTime);
|
||||
sysOrder.setOrderId(Long.parseLong(DateUtils.parseDateToStr(DateUtils.YYYYMMDDHHMMSS, orderTime)));
|
||||
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);
|
||||
}
|
||||
|
||||
/**
|
||||
* 计算所有订单总额
|
||||
* @param sysOrder
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public BigDecimal selectAllOrderAmount(SysOrder sysOrder) {
|
||||
return sysOrderMapper.selectAllOrderAmount(sysOrder);
|
||||
}
|
||||
}
|
@ -0,0 +1,27 @@
|
||||
<?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.stdiet.custom.mapper.CusUserPostMapper">
|
||||
|
||||
<resultMap type="CusUserPost" id="CusUserPostResult">
|
||||
<result property="userId" column="user_id"/>
|
||||
<result property="userName" column="nick_name"/>
|
||||
<result property="postId" column="post_id"/>
|
||||
<result property="postCode" column="post_code"/>
|
||||
<result property="postName" column="post_name"/>
|
||||
<result property="remark" column="remark"/>
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectCusUserPostVo">
|
||||
SELECT u.user_id, u.nick_name, p.post_id, p.post_code, p.post_name, u.remark
|
||||
FROM sys_user u, sys_post p, sys_user_post up
|
||||
WHERE up.user_id = u.user_id AND p.post_id = up.post_id AND p.remark = 'sale_post' AND u.status = 0
|
||||
</sql>
|
||||
|
||||
<select id="selectAllCusUserPost" parameterType="CusUserPost" resultMap="CusUserPostResult">
|
||||
<include refid="selectCusUserPostVo"/>
|
||||
</select>
|
||||
|
||||
|
||||
</mapper>
|
@ -0,0 +1,191 @@
|
||||
<?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.stdiet.custom.mapper.SysCommisionMapper">
|
||||
|
||||
<resultMap type="SysCommision" id="SysCommisionResult">
|
||||
<result property="ruleId" column="rule_id"/>
|
||||
<result property="userId" column="user_id"/>
|
||||
<result property="postId" column="post_id"/>
|
||||
<result property="userName" column="user_name"/>
|
||||
<result property="postName" column="post_name"/>
|
||||
<result property="amount" column="amount"/>
|
||||
<result property="rate" column="rate"/>
|
||||
<result property="createBy" column="create_by"/>
|
||||
<result property="createTime" column="create_time"/>
|
||||
<result property="updateBy" column="update_by"/>
|
||||
<result property="updateTime" column="update_time"/>
|
||||
<result property="remark" column="remark"/>
|
||||
<result property="commision" column="commision"/>
|
||||
</resultMap>
|
||||
|
||||
<resultMap id="SysCommisionDetailResult" type="SysCommision">
|
||||
<result property="userId" column="user_id"/>
|
||||
<result property="userName" column="user_name"/>
|
||||
<result property="postId" column="post_id"/>
|
||||
<result property="postName" column="post_name"/>
|
||||
<result property="amount" column="amount"/>
|
||||
</resultMap>
|
||||
|
||||
<sql id="groupAmountVo">
|
||||
SELECT ${column} AS user_id, ${postId} AS post_id, SUM(amount) AS amount
|
||||
FROM sys_order
|
||||
WHERE ${column} IS NOT NULL AND ${column} <> 0
|
||||
AND review_status = 'yes'
|
||||
<if test="beginTime != null and beginTime != ''">AND date_format(order_time,'%y%m%d') >=
|
||||
date_format(${beginTime},'%y%m%d')
|
||||
</if>
|
||||
<if test="endTime != null and endTime != ''">AND date_format(order_time,'%y%m%d') <=
|
||||
date_format(${endTime},'%y%m%d')
|
||||
</if>
|
||||
GROUP BY ${column}
|
||||
</sql>
|
||||
|
||||
<select id="selectSysCommisionDetail" parameterType="SysCommision" resultMap="SysCommisionResult">
|
||||
SELECT * FROM view_user_post pa
|
||||
JOIN (
|
||||
<include refid="groupAmountVo">
|
||||
<property name="column" value="pre_sale_id"/>
|
||||
<property name="beginTime" value="#{beginTime}"/>
|
||||
<property name="endTime" value="#{endTime}"/>
|
||||
<property name="postId" value="5"/>
|
||||
</include>
|
||||
UNION
|
||||
<include refid="groupAmountVo">
|
||||
<property name="column" value="after_sale_id"/>
|
||||
<property name="beginTime" value="#{beginTime}"/>
|
||||
<property name="endTime" value="#{endTime}"/>
|
||||
<property name="postId" value="6"/>
|
||||
</include>
|
||||
UNION
|
||||
<include refid="groupAmountVo">
|
||||
<property name="column" value="nutritionist_id"/>
|
||||
<property name="beginTime" value="#{beginTime}"/>
|
||||
<property name="endTime" value="#{endTime}"/>
|
||||
<property name="postId" value="9"/>
|
||||
</include>
|
||||
UNION
|
||||
<include refid="groupAmountVo">
|
||||
<property name="column" value="nutri_assis_id"/>
|
||||
<property name="beginTime" value="#{beginTime}"/>
|
||||
<property name="endTime" value="#{endTime}"/>
|
||||
<property name="postId" value="10"/>
|
||||
</include>
|
||||
UNION
|
||||
<include refid="groupAmountVo">
|
||||
<property name="column" value="operator_id"/>
|
||||
<property name="beginTime" value="#{beginTime}"/>
|
||||
<property name="endTime" value="#{endTime}"/>
|
||||
<property name="postId" value="11"/>
|
||||
</include>
|
||||
UNION
|
||||
<include refid="groupAmountVo">
|
||||
<property name="column" value="operator_assis_id"/>
|
||||
<property name="beginTime" value="#{beginTime}"/>
|
||||
<property name="endTime" value="#{endTime}"/>
|
||||
<property name="postId" value="13"/>
|
||||
</include>
|
||||
UNION
|
||||
<include refid="groupAmountVo">
|
||||
<property name="column" value="planner_id"/>
|
||||
<property name="beginTime" value="#{beginTime}"/>
|
||||
<property name="endTime" value="#{endTime}"/>
|
||||
<property name="postId" value="7"/>
|
||||
</include>
|
||||
UNION
|
||||
<include refid="groupAmountVo">
|
||||
<property name="column" value="planner_assis_id"/>
|
||||
<property name="beginTime" value="#{beginTime}"/>
|
||||
<property name="endTime" value="#{endTime}"/>
|
||||
<property name="postId" value="8"/>
|
||||
</include>
|
||||
) AS a USING(user_id, post_id)
|
||||
<where>
|
||||
<if test="postId != null and postId != ''">and post_id = #{postId}</if>
|
||||
<if test="userId != null and userId != ''">and user_id = #{userId}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<sql id="selectSysCommisionVo">
|
||||
SELECT * FROM (
|
||||
SELECT * FROM sys_commision c
|
||||
JOIN (SELECT user_id, nick_name AS user_name FROM sys_user) AS u USING(user_id)
|
||||
JOIN (SELECT post_id, post_name FROM sys_post) AS p USING(post_id)
|
||||
<if test="postId != null">WHERE post_id = ${postId}</if>
|
||||
ORDER BY user_id, amount
|
||||
) as t
|
||||
</sql>
|
||||
|
||||
|
||||
<select id="selectSysCommisionList" parameterType="SysCommision" resultMap="SysCommisionResult">
|
||||
<include refid="selectSysCommisionVo">
|
||||
<property name="postId" value="#{postId}"/>
|
||||
</include>
|
||||
<where>
|
||||
<if test="userId != null ">and user_id = #{userId}</if>
|
||||
<if test="postId != null ">and post_id = #{postId}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectSysCommisionById" parameterType="SysCommision" resultMap="SysCommisionResult">
|
||||
<include refid="selectSysCommisionVo">
|
||||
<property name="postId" value="#{postId}"/>
|
||||
</include>
|
||||
where rule_id = #{ruleId}
|
||||
</select>
|
||||
|
||||
<insert id="insertSysCommision" parameterType="SysCommision" useGeneratedKeys="true" keyProperty="ruleId">
|
||||
insert into sys_commision
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="userId != null">user_id,</if>
|
||||
<if test="postId != null">post_id,</if>
|
||||
<if test="amount != null">amount,</if>
|
||||
<if test="rate != null">rate,</if>
|
||||
<if test="createBy != null">create_by,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="updateBy != null">update_by,</if>
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
<if test="remark != null">remark,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="userId != null">#{userId},</if>
|
||||
<if test="postId != null">#{postId},</if>
|
||||
<if test="amount != null">#{amount},</if>
|
||||
<if test="rate != null">#{rate},</if>
|
||||
<if test="createBy != null">#{createBy},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="updateBy != null">#{updateBy},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
<if test="remark != null">#{remark},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateSysCommision" parameterType="SysCommision">
|
||||
update sys_commision
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="userId != null">user_id = #{userId},</if>
|
||||
<if test="postId != null">post_id = #{postId},</if>
|
||||
<if test="amount != null">amount = #{amount},</if>
|
||||
<if test="rate != null">rate = #{rate},</if>
|
||||
<if test="createBy != null">create_by = #{createBy},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
<if test="remark != null">remark = #{remark},</if>
|
||||
</trim>
|
||||
where rule_id = #{ruleId}
|
||||
</update>
|
||||
|
||||
<delete id="deleteSysCommisionById" parameterType="Long">
|
||||
delete from sys_commision where rule_id = #{ruleId}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteSysCommisionByIds" parameterType="String">
|
||||
delete from sys_commision where rule_id in
|
||||
<foreach item="ruleId" collection="array" open="(" separator="," close=")">
|
||||
#{ruleId}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
</mapper>
|
@ -0,0 +1,120 @@
|
||||
<?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.stdiet.custom.mapper.SysContractMapper">
|
||||
|
||||
<resultMap type="SysContract" id="SysContractResult">
|
||||
<result property="id" column="id"/>
|
||||
<result property="status" column="status"/>
|
||||
<result property="name" column="name"/>
|
||||
<result property="signName" column="sign_name"/>
|
||||
<result property="cusId" column="cus_id"/>
|
||||
<result property="phone" column="phone"/>
|
||||
<result property="tutor" column="tutor"/>
|
||||
<result property="serveTime" column="serve_time"/>
|
||||
<result property="servePromise" column="serve_promise"/>
|
||||
<result property="amount" column="amount"/>
|
||||
<result property="path" column="path"/>
|
||||
<result property="createBy" column="create_by"/>
|
||||
<result property="createTime" column="create_time"/>
|
||||
<result property="updateBy" column="update_by"/>
|
||||
<result property="updateTime" column="update_time"/>
|
||||
<result property="remark" column="remark"/>
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectSysContractVo">
|
||||
select id, status, name, sign_name, phone, cus_id, serve_time, tutor, serve_promise, amount, path, create_by, create_time, update_by, update_time, remark from sys_contract
|
||||
</sql>
|
||||
|
||||
<select id="selectSysContractList" parameterType="SysContract" resultMap="SysContractResult">
|
||||
<include refid="selectSysContractVo"/>
|
||||
<where>
|
||||
<if test="id != null ">and id = #{id}</if>
|
||||
<if test="status != null ">and status = #{status}</if>
|
||||
<if test="tutor != null and tutor != '' ">and tutor = #{tutor}</if>
|
||||
<if test="name != null and name != ''">and name like concat('%', #{name}, '%')</if>
|
||||
<if test="phone != null and phone != ''">and phone = #{phone}</if>
|
||||
</where>
|
||||
order by create_time desc
|
||||
</select>
|
||||
|
||||
<select id="selectSysContractById" parameterType="Long" resultMap="SysContractResult">
|
||||
<include refid="selectSysContractVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertSysContract" parameterType="SysContract" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into sys_contract
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">id,</if>
|
||||
<if test="status != null">status,</if>
|
||||
<if test="name != null and name != ''">name,</if>
|
||||
<if test="signName != null and signName != ''">sign_name,</if>
|
||||
<if test="tutor != null and tutor != ''">tutor,</if>
|
||||
<if test="cusId != null and cusId != ''">cus_id,</if>
|
||||
<if test="phone != null">phone,</if>
|
||||
<if test="serveTime != null">serve_time,</if>
|
||||
<if test="servePromise != null">serve_promise,</if>
|
||||
<if test="amount != null">amount,</if>
|
||||
<if test="path != null">path,</if>
|
||||
<if test="createBy != null">create_by,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="updateBy != null">update_by,</if>
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
<if test="remark != null">remark,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">#{id},</if>
|
||||
<if test="status != null">#{status},</if>
|
||||
<if test="name != null and name != ''">#{name},</if>
|
||||
<if test="signName != null and signName != ''">#{signName},</if>
|
||||
<if test="tutor != null and name != ''">#{tutor},</if>
|
||||
<if test="cusId != null and cusId != ''">#{cusId},</if>
|
||||
<if test="phone != null">#{phone},</if>
|
||||
<if test="serveTime != null">#{serveTime},</if>
|
||||
<if test="servePromise != null">#{servePromise},</if>
|
||||
<if test="amount != null">#{amount},</if>
|
||||
<if test="path != null">#{path},</if>
|
||||
<if test="createBy != null">#{createBy},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="updateBy != null">#{updateBy},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
<if test="remark != null">#{remark},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateSysContract" parameterType="SysContract">
|
||||
update sys_contract
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="status != null">status = #{status},</if>
|
||||
<if test="name != null and name != ''">name = #{name},</if>
|
||||
<if test="signName != null and signName != ''">sign_name = #{signName},</if>
|
||||
<if test="tutor != null">tutor = #{tutor},</if>
|
||||
<if test="cusId != null and cusId != ''">cus_id = #{cusId},</if>
|
||||
<if test="phone != null">phone = #{phone},</if>
|
||||
<if test="serveTime != null">serve_time = #{serveTime},</if>
|
||||
<if test="servePromise != null">serve_promise = #{servePromise},</if>
|
||||
<if test="amount != null">amount = #{amount},</if>
|
||||
<if test="path != null">path = #{path},</if>
|
||||
<if test="createBy != null">create_by = #{createBy},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
<if test="remark != null">remark = #{remark},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteSysContractById" parameterType="Long">
|
||||
delete from sys_contract where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteSysContractByIds" parameterType="String">
|
||||
delete from sys_contract where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
</mapper>
|
@ -0,0 +1,191 @@
|
||||
<?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.stdiet.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="createTime" column="create_time"/>
|
||||
<result property="afterSaleId" column="after_sale_id"/>
|
||||
<result property="updateBy" column="update_by"/>
|
||||
<result property="updateTime" column="update_time"/>
|
||||
<result property="nutritionistId" column="nutritionist_id"/>
|
||||
<result property="remark" column="remark"/>
|
||||
<result property="nutriAssisId" column="nutri_assis_id"/>
|
||||
<result property="accountId" column="account_id"/>
|
||||
<result property="account" column="account"/>
|
||||
<result property="plannerId" column="planner_id"/>
|
||||
<result property="plannerAssisId" column="planner_assis_id"/>
|
||||
<result property="operatorId" column="operator_id"/>
|
||||
<result property="operatorAssisId" column="operator_assis_id"/>
|
||||
<result property="recommender" column="recommender"/>
|
||||
<result property="orderTime" column="order_time"/>
|
||||
<result property="serveTime" column="serve_time"/>
|
||||
<result property="serveTimeId" column="serve_time_id"/>
|
||||
<result property="reviewStatus" column="review_status"/>
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectSysOrderVo">
|
||||
select o.order_id, o.review_status, o.customer, o.phone, o.amount, ser.dict_label as serve_time, o.serve_time_id, o.pay_type_id, pay.dict_label as pay_type, o.pre_sale_id, o.create_by, o.create_time, o.after_sale_id, o.update_by, o.update_time, o.nutritionist_id, o.remark, o.nutri_assis_id, o.account_id, acc.dict_label as account, o.planner_id, o.planner_assis_id, o.operator_id, o.operator_assis_id, o.recommender, o.order_time from sys_order o
|
||||
LEFT JOIN (SELECT dict_label, dict_value FROM sys_dict_data WHERE dict_type = 'cus_pay_type') AS pay ON pay.dict_value = o.pay_type_id
|
||||
LEFT JOIN (SELECT dict_label, dict_value FROM sys_dict_data WHERE dict_type = 'cus_account') AS acc ON acc.dict_value = o.account_id
|
||||
LEFT JOIN (SELECT dict_label, dict_value FROM sys_dict_data WHERE dict_type = 'cus_serve_time') AS ser ON ser.dict_value = o.serve_time_id
|
||||
</sql>
|
||||
|
||||
<select id="selectAllOrderAmount" parameterType="SysOrder" resultType="BigDecimal">
|
||||
SELECT SUM(amount) FROM sys_order
|
||||
<where>
|
||||
<if test="orderId != null and orderId != ''">and order_id = #{orderId}</if>
|
||||
<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="operatorAssisId != null ">and operator_assis_id = #{operatorAssisId}</if>
|
||||
<if test="recommender != null and recommender != ''">and recommender = #{recommender}</if>
|
||||
<if test="beginTime != null and beginTime != ''">and date_format(order_time,'%y%m%d') >= date_format(#{beginTime},'%y%m%d')</if>
|
||||
<if test="endTime != null and endTime != ''">and date_format(order_time,'%y%m%d') <= date_format(#{endTime},'%y%m%d')</if>
|
||||
<if test="serveTimeId != null ">and serve_time_id = #{serveTimeId}</if>
|
||||
<if test="reviewStatus != null ">and review_status = #{reviewStatus}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectSysOrderList" parameterType="SysOrder" resultMap="SysOrderResult">
|
||||
<include refid="selectSysOrderVo"/>
|
||||
<where>
|
||||
<if test="orderId != null and orderId != ''">and order_id = #{orderId}</if>
|
||||
<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="operatorAssisId != null ">and operator_assis_id = #{operatorAssisId}</if>
|
||||
<if test="recommender != null and recommender != ''">and recommender = #{recommender}</if>
|
||||
<if test="beginTime != null and beginTime != ''">and date_format(order_time,'%y%m%d') >= date_format(#{beginTime},'%y%m%d')</if>
|
||||
<if test="endTime != null and endTime != ''">and date_format(order_time,'%y%m%d') <= date_format(#{endTime},'%y%m%d')</if>
|
||||
<if test="serveTimeId != null ">and serve_time_id = #{serveTimeId}</if>
|
||||
<if test="reviewStatus != null ">and review_status = #{reviewStatus}</if>
|
||||
</where>
|
||||
order by order_time desc
|
||||
</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="orderId != null and orderId != ''">order_id,</if>
|
||||
<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="preSaleId != null">pre_sale_id,</if>
|
||||
<if test="createBy != null">create_by,</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="updateTime != null">update_time,</if>
|
||||
<if test="nutritionistId != null">nutritionist_id,</if>
|
||||
<if test="remark != null">remark,</if>
|
||||
<if test="nutriAssisId != null">nutri_assis_id,</if>
|
||||
<if test="accountId != null">account_id,</if>
|
||||
<if test="plannerId != null">planner_id,</if>
|
||||
<if test="plannerAssisId != null">planner_assis_id,</if>
|
||||
<if test="operatorId != null">operator_id,</if>
|
||||
<if test="operatorAssisId != null">operator_assis_id,</if>
|
||||
<if test="recommender != null">recommender,</if>
|
||||
<if test="orderTime != null">order_time,</if>
|
||||
<if test="serveTimeId != null">serve_time_id,</if>
|
||||
<if test="reviewStatus != null">review_status,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="orderId != null and orderId != ''">#{orderId},</if>
|
||||
<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="preSaleId != null">#{preSaleId},</if>
|
||||
<if test="createBy != null">#{createBy},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="afterSaleId != null">#{afterSaleId},</if>
|
||||
<if test="updateBy != null">#{updateBy},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
<if test="nutritionistId != null">#{nutritionistId},</if>
|
||||
<if test="remark != null">#{remark},</if>
|
||||
<if test="nutriAssisId != null">#{nutriAssisId},</if>
|
||||
<if test="accountId != null">#{accountId},</if>
|
||||
<if test="plannerId != null">#{plannerId},</if>
|
||||
<if test="plannerAssisId != null">#{plannerAssisId},</if>
|
||||
<if test="operatorId != null">#{operatorId},</if>
|
||||
<if test="operatorAssisId != null">#{operatorAssisId},</if>
|
||||
<if test="recommender != null">#{recommender},</if>
|
||||
<if test="orderTime != null">#{orderTime},</if>
|
||||
<if test="serveTimeId != null">#{serveTimeId},</if>
|
||||
<if test="reviewStatus != null">#{reviewStatus},</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="preSaleId != null">pre_sale_id = #{preSaleId},</if>
|
||||
<if test="createBy != null">create_by = #{createBy},</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="updateTime != null">update_time = #{updateTime},</if>
|
||||
<if test="nutritionistId != null">nutritionist_id = #{nutritionistId},</if>
|
||||
<if test="remark != null">remark = #{remark},</if>
|
||||
<if test="nutriAssisId != null">nutri_assis_id = #{nutriAssisId},</if>
|
||||
<if test="accountId != null">account_id = #{accountId},</if>
|
||||
<if test="plannerId != null">planner_id = #{plannerId},</if>
|
||||
<if test="plannerAssisId != null">planner_assis_id = #{plannerAssisId},</if>
|
||||
<if test="operatorId != null">operator_id = #{operatorId},</if>
|
||||
<if test="operatorAssisId != null">operator_assis_id = #{operatorAssisId},</if>
|
||||
<if test="recommender != null">recommender = #{recommender},</if>
|
||||
<if test="orderTime != null">order_time = #{orderTime},</if>
|
||||
<if test="serveTimeId != null">serve_time_id = #{serveTimeId},</if>
|
||||
<if test="reviewStatus != null">review_status = #{reviewStatus},</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