合并主分支内容
This commit is contained in:
@ -1,11 +1,12 @@
|
||||
package com.stdiet.custom.domain;
|
||||
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.stdiet.common.annotation.Excel;
|
||||
import lombok.Data;
|
||||
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.util.Date;
|
||||
|
||||
/**
|
||||
* 订单服务暂停对象 sys_order_pause
|
||||
@ -13,115 +14,59 @@ import com.stdiet.common.core.domain.BaseEntity;
|
||||
* @author xzj
|
||||
* @date 2021-01-07
|
||||
*/
|
||||
public class SysOrderPause extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
@Data
|
||||
public class SysOrderPause {
|
||||
|
||||
/** $column.columnComment */
|
||||
/**
|
||||
* $column.columnComment
|
||||
*/
|
||||
private Long id;
|
||||
|
||||
/** 订单id */
|
||||
/**
|
||||
* 订单id
|
||||
*/
|
||||
private Long orderId;
|
||||
|
||||
/** 服务暂停开始时间 */
|
||||
private Long cusId;
|
||||
|
||||
/**
|
||||
* 服务暂停开始时间
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "服务暂停开始时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date pauseStartDate;
|
||||
|
||||
/** 服务暂停结束时间 */
|
||||
/**
|
||||
* 服务暂停结束时间
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "服务暂停结束时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date pauseEndDate;
|
||||
|
||||
/** 服务暂停理由 */
|
||||
/**
|
||||
* 服务暂停理由
|
||||
*/
|
||||
@Excel(name = "服务暂停理由")
|
||||
private String reason;
|
||||
|
||||
/** 备注 */
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@Excel(name = "备注")
|
||||
private String remarks;
|
||||
|
||||
/** 删除标识 0未删除 1已删除,默认0 */
|
||||
/**
|
||||
* 删除标识 0未删除 1已删除,默认0
|
||||
*/
|
||||
private Integer delFlag;
|
||||
|
||||
public void setId(Long id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date createTime;
|
||||
|
||||
public Long getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
public void setOrderId(Long orderId)
|
||||
{
|
||||
this.orderId = orderId;
|
||||
}
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date updateTime;
|
||||
|
||||
public Long getOrderId()
|
||||
{
|
||||
return orderId;
|
||||
}
|
||||
public void setPauseStartDate(Date pauseStartDate)
|
||||
{
|
||||
this.pauseStartDate = pauseStartDate;
|
||||
}
|
||||
private String createBy;
|
||||
|
||||
public Date getPauseStartDate()
|
||||
{
|
||||
return pauseStartDate;
|
||||
}
|
||||
public void setPauseEndDate(Date pauseEndDate)
|
||||
{
|
||||
this.pauseEndDate = pauseEndDate;
|
||||
}
|
||||
|
||||
public Date getPauseEndDate()
|
||||
{
|
||||
return pauseEndDate;
|
||||
}
|
||||
public void setReason(String reason)
|
||||
{
|
||||
this.reason = reason;
|
||||
}
|
||||
|
||||
public String getReason()
|
||||
{
|
||||
return reason;
|
||||
}
|
||||
public void setRemarks(String remarks)
|
||||
{
|
||||
this.remarks = remarks;
|
||||
}
|
||||
|
||||
public String getRemarks()
|
||||
{
|
||||
return remarks;
|
||||
}
|
||||
public void setDelFlag(Integer delFlag)
|
||||
{
|
||||
this.delFlag = delFlag;
|
||||
}
|
||||
|
||||
public Integer getDelFlag()
|
||||
{
|
||||
return delFlag;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("orderId", getOrderId())
|
||||
.append("pauseStartDate", getPauseStartDate())
|
||||
.append("pauseEndDate", getPauseEndDate())
|
||||
.append("reason", getReason())
|
||||
.append("remarks", getRemarks())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("createBy", getCreateBy())
|
||||
.append("updateTime", getUpdateTime())
|
||||
.append("updateBy", getUpdateBy())
|
||||
.append("delFlag", getDelFlag())
|
||||
.toString();
|
||||
}
|
||||
private String updateBy;
|
||||
}
|
@ -74,6 +74,8 @@ public interface SysOrderPauseMapper
|
||||
*/
|
||||
int deletePauseByOrderId(Long[] orderIds);
|
||||
|
||||
long selectNearMainOrderIdByCusId(Long cusId);
|
||||
|
||||
/**
|
||||
* 根据订单ID获取暂停计划
|
||||
* @param orderId
|
||||
|
@ -79,4 +79,6 @@ public interface ISysOrderPauseService
|
||||
* @return
|
||||
*/
|
||||
List<SysOrderPause> getPauseListByOrderId(Long orderId);
|
||||
|
||||
long selectNearMainOrderIdByCusId(Long cusId);
|
||||
}
|
@ -149,4 +149,9 @@ public class SysOrderPauseServiceImpl implements ISysOrderPauseService
|
||||
public List<SysOrderPause> getPauseListByOrderId(Long orderId){
|
||||
return sysOrderPauseMapper.getPauseListByOrderId(orderId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public long selectNearMainOrderIdByCusId(Long cusId) {
|
||||
return sysOrderPauseMapper.selectNearMainOrderIdByCusId(cusId);
|
||||
}
|
||||
}
|
@ -41,6 +41,7 @@ public class SysRecipesTemplateServiceImpl implements ISysRecipesTemplateService
|
||||
sysRecipesPlan.setStartNumDay(1);
|
||||
sysRecipesPlan.setEndNumDay(7);
|
||||
sysRecipesPlan.setType(1);
|
||||
sysRecipesPlan.setCusId(0L);
|
||||
sysRecipesPlanMapper.insertSysRecipesPlan(sysRecipesPlan);
|
||||
if (!StringUtils.isNull(sysRecipesPlan.getId())) {
|
||||
sysRecipesTemplate.setCreateBy(SecurityUtils.getUsername());
|
||||
@ -60,7 +61,15 @@ public class SysRecipesTemplateServiceImpl implements ISysRecipesTemplateService
|
||||
|
||||
@Override
|
||||
public int removeRecipesTemplate(Long id) {
|
||||
return sysRecipesTemplateMapper.removeRecipesTemplate(id);
|
||||
SysRecipesTemplate sysRecipesTemplate= sysRecipesTemplateMapper.getRecipesTemplateById(id);
|
||||
if(StringUtils.isNull(sysRecipesTemplate)) {
|
||||
return 0;
|
||||
}
|
||||
int rows = sysRecipesTemplateMapper.removeRecipesTemplate(sysRecipesTemplate.getId());
|
||||
if(rows > 0) {
|
||||
return sysRecipesPlanMapper.deleteSysRecipesPlanById(sysRecipesTemplate.getPlanId());
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
Reference in New Issue
Block a user