订单增加赠送时长字段,增加服务暂停管理列表,身份证号验证方法优化
This commit is contained in:
@ -169,6 +169,12 @@ public class SysOrder extends BaseEntity {
|
||||
@Excel(name = "服务时长")
|
||||
private String serveTime;
|
||||
|
||||
/**
|
||||
* 赠送时长
|
||||
*/
|
||||
@Excel(name = "赠送时长", width = 30, suffix = "天")
|
||||
private String giveServeDay;
|
||||
|
||||
private Long serveTimeId;
|
||||
|
||||
@Excel(name = "审核状态", dictType = "cus_review_status")
|
||||
@ -448,6 +454,14 @@ public class SysOrder extends BaseEntity {
|
||||
return orderTime;
|
||||
}
|
||||
|
||||
public String getGiveServeDay() {
|
||||
return giveServeDay;
|
||||
}
|
||||
|
||||
public void setGiveServeDay(String giveServeDay) {
|
||||
this.giveServeDay = giveServeDay;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
|
||||
|
@ -0,0 +1,127 @@
|
||||
package com.stdiet.custom.domain;
|
||||
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
import com.stdiet.common.annotation.Excel;
|
||||
import com.stdiet.common.core.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 订单服务暂停对象 sys_order_pause
|
||||
*
|
||||
* @author xzj
|
||||
* @date 2021-01-07
|
||||
*/
|
||||
public class SysOrderPause extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** $column.columnComment */
|
||||
private Long id;
|
||||
|
||||
/** 订单id */
|
||||
private Long orderId;
|
||||
|
||||
/** 服务暂停开始时间 */
|
||||
@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 */
|
||||
private Integer delFlag;
|
||||
|
||||
public void setId(Long id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
public void setOrderId(Long orderId)
|
||||
{
|
||||
this.orderId = orderId;
|
||||
}
|
||||
|
||||
public Long getOrderId()
|
||||
{
|
||||
return orderId;
|
||||
}
|
||||
public void setPauseStartDate(Date pauseStartDate)
|
||||
{
|
||||
this.pauseStartDate = pauseStartDate;
|
||||
}
|
||||
|
||||
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();
|
||||
}
|
||||
}
|
@ -3,6 +3,8 @@ package com.stdiet.custom.dto.response;
|
||||
import com.stdiet.common.annotation.Excel;
|
||||
import com.stdiet.common.core.domain.BaseEntity;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 客户体征信息响应DTO
|
||||
*
|
||||
@ -17,6 +19,10 @@ public class CustomerListResponse extends BaseEntity
|
||||
/** $column.columnComment */
|
||||
private Long id;
|
||||
|
||||
/** 创建时间 */
|
||||
@Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date createTime;
|
||||
|
||||
/** 名字 */
|
||||
@Excel(name = "名字")
|
||||
private String name;
|
||||
@ -361,4 +367,14 @@ public class CustomerListResponse extends BaseEntity
|
||||
public void setDifficulty(String difficulty) {
|
||||
this.difficulty = difficulty;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Date getCreateTime() {
|
||||
return createTime;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setCreateTime(Date createTime) {
|
||||
this.createTime = createTime;
|
||||
}
|
||||
}
|
@ -0,0 +1,61 @@
|
||||
package com.stdiet.custom.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.stdiet.custom.domain.SysOrderPause;
|
||||
|
||||
/**
|
||||
* 订单服务暂停Mapper接口
|
||||
*
|
||||
* @author wonder
|
||||
* @date 2021-01-07
|
||||
*/
|
||||
public interface SysOrderPauseMapper
|
||||
{
|
||||
/**
|
||||
* 查询订单服务暂停
|
||||
*
|
||||
* @param id 订单服务暂停ID
|
||||
* @return 订单服务暂停
|
||||
*/
|
||||
public SysOrderPause selectSysOrderPauseById(Long id);
|
||||
|
||||
/**
|
||||
* 查询订单服务暂停列表
|
||||
*
|
||||
* @param sysOrderPause 订单服务暂停
|
||||
* @return 订单服务暂停集合
|
||||
*/
|
||||
public List<SysOrderPause> selectSysOrderPauseList(SysOrderPause sysOrderPause);
|
||||
|
||||
/**
|
||||
* 新增订单服务暂停
|
||||
*
|
||||
* @param sysOrderPause 订单服务暂停
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertSysOrderPause(SysOrderPause sysOrderPause);
|
||||
|
||||
/**
|
||||
* 修改订单服务暂停
|
||||
*
|
||||
* @param sysOrderPause 订单服务暂停
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateSysOrderPause(SysOrderPause sysOrderPause);
|
||||
|
||||
/**
|
||||
* 删除订单服务暂停
|
||||
*
|
||||
* @param id 订单服务暂停ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteSysOrderPauseById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除订单服务暂停
|
||||
*
|
||||
* @param ids 需要删除的数据ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteSysOrderPauseByIds(Long[] ids);
|
||||
}
|
@ -0,0 +1,61 @@
|
||||
package com.stdiet.custom.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.stdiet.custom.domain.SysOrderPause;
|
||||
|
||||
/**
|
||||
* 订单服务暂停Service接口
|
||||
*
|
||||
* @author wonder
|
||||
* @date 2021-01-07
|
||||
*/
|
||||
public interface ISysOrderPauseService
|
||||
{
|
||||
/**
|
||||
* 查询订单服务暂停
|
||||
*
|
||||
* @param id 订单服务暂停ID
|
||||
* @return 订单服务暂停
|
||||
*/
|
||||
public SysOrderPause selectSysOrderPauseById(Long id);
|
||||
|
||||
/**
|
||||
* 查询订单服务暂停列表
|
||||
*
|
||||
* @param sysOrderPause 订单服务暂停
|
||||
* @return 订单服务暂停集合
|
||||
*/
|
||||
public List<SysOrderPause> selectSysOrderPauseList(SysOrderPause sysOrderPause);
|
||||
|
||||
/**
|
||||
* 新增订单服务暂停
|
||||
*
|
||||
* @param sysOrderPause 订单服务暂停
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertSysOrderPause(SysOrderPause sysOrderPause);
|
||||
|
||||
/**
|
||||
* 修改订单服务暂停
|
||||
*
|
||||
* @param sysOrderPause 订单服务暂停
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateSysOrderPause(SysOrderPause sysOrderPause);
|
||||
|
||||
/**
|
||||
* 批量删除订单服务暂停
|
||||
*
|
||||
* @param ids 需要删除的订单服务暂停ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteSysOrderPauseByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 删除订单服务暂停信息
|
||||
*
|
||||
* @param id 订单服务暂停ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteSysOrderPauseById(Long id);
|
||||
}
|
@ -0,0 +1,96 @@
|
||||
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.SysOrderPauseMapper;
|
||||
import com.stdiet.custom.domain.SysOrderPause;
|
||||
import com.stdiet.custom.service.ISysOrderPauseService;
|
||||
|
||||
/**
|
||||
* 订单服务暂停Service业务层处理
|
||||
*
|
||||
* @author wonder
|
||||
* @date 2021-01-07
|
||||
*/
|
||||
@Service
|
||||
public class SysOrderPauseServiceImpl implements ISysOrderPauseService
|
||||
{
|
||||
@Autowired
|
||||
private SysOrderPauseMapper sysOrderPauseMapper;
|
||||
|
||||
/**
|
||||
* 查询订单服务暂停
|
||||
*
|
||||
* @param id 订单服务暂停ID
|
||||
* @return 订单服务暂停
|
||||
*/
|
||||
@Override
|
||||
public SysOrderPause selectSysOrderPauseById(Long id)
|
||||
{
|
||||
return sysOrderPauseMapper.selectSysOrderPauseById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询订单服务暂停列表
|
||||
*
|
||||
* @param sysOrderPause 订单服务暂停
|
||||
* @return 订单服务暂停
|
||||
*/
|
||||
@Override
|
||||
public List<SysOrderPause> selectSysOrderPauseList(SysOrderPause sysOrderPause)
|
||||
{
|
||||
return sysOrderPauseMapper.selectSysOrderPauseList(sysOrderPause);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增订单服务暂停
|
||||
*
|
||||
* @param sysOrderPause 订单服务暂停
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertSysOrderPause(SysOrderPause sysOrderPause)
|
||||
{
|
||||
sysOrderPause.setCreateTime(DateUtils.getNowDate());
|
||||
return sysOrderPauseMapper.insertSysOrderPause(sysOrderPause);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改订单服务暂停
|
||||
*
|
||||
* @param sysOrderPause 订单服务暂停
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateSysOrderPause(SysOrderPause sysOrderPause)
|
||||
{
|
||||
sysOrderPause.setUpdateTime(DateUtils.getNowDate());
|
||||
return sysOrderPauseMapper.updateSysOrderPause(sysOrderPause);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除订单服务暂停
|
||||
*
|
||||
* @param ids 需要删除的订单服务暂停ID
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteSysOrderPauseByIds(Long[] ids)
|
||||
{
|
||||
return sysOrderPauseMapper.deleteSysOrderPauseByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除订单服务暂停信息
|
||||
*
|
||||
* @param id 订单服务暂停ID
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteSysOrderPauseById(Long id)
|
||||
{
|
||||
return sysOrderPauseMapper.deleteSysOrderPauseById(id);
|
||||
}
|
||||
}
|
@ -35,13 +35,14 @@
|
||||
<result property="serveTime" column="serve_time"/>
|
||||
<result property="serveTimeId" column="serve_time_id"/>
|
||||
<result property="reviewStatus" column="review_status"/>
|
||||
<result property="giveServeDay" column="give_serve_day"/>
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectSysOrderVo">
|
||||
select o.order_id, o.review_status, o.customer, o.phone, o.amount, o.start_time, o.pause_time, o.status, o.weight, 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
|
||||
o.recommender, o.order_time,o.give_serve_day 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
|
||||
@ -133,6 +134,7 @@
|
||||
<if test="orderTime != null">order_time,</if>
|
||||
<if test="serveTimeId != null">serve_time_id,</if>
|
||||
<if test="reviewStatus != null">review_status,</if>
|
||||
<if test="giveServeDay != null">give_serve_day,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="orderId != null and orderId != ''">#{orderId},</if>
|
||||
@ -162,6 +164,7 @@
|
||||
<if test="orderTime != null">#{orderTime},</if>
|
||||
<if test="serveTimeId != null">#{serveTimeId},</if>
|
||||
<if test="reviewStatus != null">#{reviewStatus},</if>
|
||||
<if test="giveServeDay != null">#{giveServeDay},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
@ -194,6 +197,7 @@
|
||||
<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>
|
||||
<if test="giveServeDay != null">give_serve_day = #{giveServeDay},</if>
|
||||
</trim>
|
||||
where order_id = #{orderId}
|
||||
</update>
|
||||
|
@ -0,0 +1,100 @@
|
||||
<?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.SysOrderPauseMapper">
|
||||
|
||||
<resultMap type="SysOrderPause" id="SysOrderPauseResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="orderId" column="order_id" />
|
||||
<result property="pauseStartDate" column="pause_start_date" />
|
||||
<result property="pauseEndDate" column="pause_end_date" />
|
||||
<result property="reason" column="reason" />
|
||||
<result property="remarks" column="remarks" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="delFlag" column="del_flag" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectSysOrderPauseVo">
|
||||
select id, order_id, pause_start_date, pause_end_date, reason, remarks, create_time, create_by, update_time, update_by, del_flag from sys_order_pause sop
|
||||
</sql>
|
||||
|
||||
<select id="selectSysOrderPauseList" parameterType="SysOrderPause" resultMap="SysOrderPauseResult">
|
||||
<!--select sop.id, sop.order_id, sop.pause_start_date, sop.pause_end_date, sop.reason, sop.remarks, sop.create_time, sop.create_by, sop.update_time, sop.update_by, sop.del_flag,
|
||||
so.customer,so.order_time
|
||||
from sys_order_pause sop
|
||||
left join sys_order so on so.order_id = sop.order_id-->
|
||||
<include refid="selectSysOrderPauseVo"></include>
|
||||
where sop.del_flag = 0
|
||||
<if test="orderId != null "> and sop.order_id = #{orderId}</if>
|
||||
<if test="pauseStartDate != null "> and sop.pause_start_date = #{pauseStartDate}</if>
|
||||
<if test="pauseEndDate != null "> and sop.pause_end_date = #{pauseEndDate}</if>
|
||||
<if test="reason != null and reason != ''"> and sop.reason = #{reason}</if>
|
||||
<if test="remarks != null and remarks != ''"> and sop.remarks = #{remarks}</if>
|
||||
</select>
|
||||
|
||||
<select id="selectSysOrderPauseById" parameterType="Long" resultMap="SysOrderPauseResult">
|
||||
<include refid="selectSysOrderPauseVo"/>
|
||||
where id = #{id} and del_flag = 0
|
||||
</select>
|
||||
|
||||
<insert id="insertSysOrderPause" parameterType="SysOrderPause" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into sys_order_pause
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="orderId != null">order_id,</if>
|
||||
<if test="pauseStartDate != null">pause_start_date,</if>
|
||||
<if test="pauseEndDate != null">pause_end_date,</if>
|
||||
<if test="reason != null">reason,</if>
|
||||
<if test="remarks != null">remarks,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="createBy != null">create_by,</if>
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
<if test="updateBy != null">update_by,</if>
|
||||
<if test="delFlag != null">del_flag,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="orderId != null">#{orderId},</if>
|
||||
<if test="pauseStartDate != null">#{pauseStartDate},</if>
|
||||
<if test="pauseEndDate != null">#{pauseEndDate},</if>
|
||||
<if test="reason != null">#{reason},</if>
|
||||
<if test="remarks != null">#{remarks},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="createBy != null">#{createBy},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
<if test="updateBy != null">#{updateBy},</if>
|
||||
<if test="delFlag != null">#{delFlag},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateSysOrderPause" parameterType="SysOrderPause">
|
||||
update sys_order_pause
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="orderId != null">order_id = #{orderId},</if>
|
||||
<if test="pauseStartDate != null">pause_start_date = #{pauseStartDate},</if>
|
||||
<if test="pauseEndDate != null">pause_end_date = #{pauseEndDate},</if>
|
||||
<if test="reason != null">reason = #{reason},</if>
|
||||
<if test="remarks != null">remarks = #{remarks},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="createBy != null">create_by = #{createBy},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||
<if test="delFlag != null">del_flag = #{delFlag},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<update id="deleteSysOrderPauseById" parameterType="Long">
|
||||
update sys_order_pause set del_flag = 1 where id = #{id}
|
||||
</update>
|
||||
|
||||
<update id="deleteSysOrderPauseByIds" parameterType="String">
|
||||
update sys_order_pause set del_flag = 1 where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</update>
|
||||
|
||||
</mapper>
|
Reference in New Issue
Block a user