Commit 57bd4ca4 by wuwenlong

1

parent d915d0e2
...@@ -175,6 +175,7 @@ ...@@ -175,6 +175,7 @@
<modules> <modules>
<module>share-admin</module> <module>share-admin</module>
<module>share-front</module>
<module>share-framework</module> <module>share-framework</module>
<module>share-system</module> <module>share-system</module>
<module>share-quartz</module> <module>share-quartz</module>
......
package share.system.controller; package share.web.controller.system;
import java.util.List; import java.util.List;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
...@@ -25,7 +25,7 @@ import share.common.core.page.TableDataInfo; ...@@ -25,7 +25,7 @@ import share.common.core.page.TableDataInfo;
* 订单Controller * 订单Controller
* *
* @author ruoyi * @author ruoyi
* @date 2023-09-27 * @date 2023-10-09
*/ */
@RestController @RestController
@RequestMapping("/system/order") @RequestMapping("/system/order")
......
...@@ -9,9 +9,9 @@ import share.common.core.domain.BaseEntity; ...@@ -9,9 +9,9 @@ import share.common.core.domain.BaseEntity;
/** /**
* 订单对象 s_order * 订单对象 s_order
* *
* @author ruoyi * @author ruoyi
* @date 2023-09-27 * @date 2023-10-09
*/ */
public class SOrder extends BaseEntity public class SOrder extends BaseEntity
{ {
...@@ -82,175 +82,205 @@ public class SOrder extends BaseEntity ...@@ -82,175 +82,205 @@ public class SOrder extends BaseEntity
@Excel(name = "结束时间", width = 30, dateFormat = "yyyy-MM-dd") @Excel(name = "结束时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date endDate; private Date endDate;
public void setId(Long id) /** 预约开始时间 */
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "预约开始时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date preStartDate;
/** 预约结束时间 */
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "预约结束时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date preEndDate;
public void setId(Long id)
{ {
this.id = id; this.id = id;
} }
public Long getId() public Long getId()
{ {
return id; return id;
} }
public void setOrderType(Integer orderType) public void setOrderType(Integer orderType)
{ {
this.orderType = orderType; this.orderType = orderType;
} }
public Integer getOrderType() public Integer getOrderType()
{ {
return orderType; return orderType;
} }
public void setSerialNumber(Long serialNumber) public void setSerialNumber(Long serialNumber)
{ {
this.serialNumber = serialNumber; this.serialNumber = serialNumber;
} }
public Long getSerialNumber() public Long getSerialNumber()
{ {
return serialNumber; return serialNumber;
} }
public void setConsumerId(Long consumerId) public void setConsumerId(Long consumerId)
{ {
this.consumerId = consumerId; this.consumerId = consumerId;
} }
public Long getConsumerId() public Long getConsumerId()
{ {
return consumerId; return consumerId;
} }
public void setConsumerName(String consumerName) public void setConsumerName(String consumerName)
{ {
this.consumerName = consumerName; this.consumerName = consumerName;
} }
public String getConsumerName() public String getConsumerName()
{ {
return consumerName; return consumerName;
} }
public void setDescription(String description) public void setDescription(String description)
{ {
this.description = description; this.description = description;
} }
public String getDescription() public String getDescription()
{ {
return description; return description;
} }
public void setOriginalPrice(Integer originalPrice) public void setOriginalPrice(Integer originalPrice)
{ {
this.originalPrice = originalPrice; this.originalPrice = originalPrice;
} }
public Integer getOriginalPrice() public Integer getOriginalPrice()
{ {
return originalPrice; return originalPrice;
} }
public void setPayWays(Integer payWays) public void setPayWays(Integer payWays)
{ {
this.payWays = payWays; this.payWays = payWays;
} }
public Integer getPayWays() public Integer getPayWays()
{ {
return payWays; return payWays;
} }
public void setRealPrice(Integer realPrice) public void setRealPrice(Integer realPrice)
{ {
this.realPrice = realPrice; this.realPrice = realPrice;
} }
public Integer getRealPrice() public Integer getRealPrice()
{ {
return realPrice; return realPrice;
} }
public void setIsUseCoupon(Integer isUseCoupon) public void setIsUseCoupon(Integer isUseCoupon)
{ {
this.isUseCoupon = isUseCoupon; this.isUseCoupon = isUseCoupon;
} }
public Integer getIsUseCoupon() public Integer getIsUseCoupon()
{ {
return isUseCoupon; return isUseCoupon;
} }
public void setCouponType(String couponType) public void setCouponType(String couponType)
{ {
this.couponType = couponType; this.couponType = couponType;
} }
public String getCouponType() public String getCouponType()
{ {
return couponType; return couponType;
} }
public void setCouponName(String couponName) public void setCouponName(String couponName)
{ {
this.couponName = couponName; this.couponName = couponName;
} }
public String getCouponName() public String getCouponName()
{ {
return couponName; return couponName;
} }
public void setCouponId(String couponId) public void setCouponId(String couponId)
{ {
this.couponId = couponId; this.couponId = couponId;
} }
public String getCouponId() public String getCouponId()
{ {
return couponId; return couponId;
} }
public void setStatus(Integer status) public void setStatus(Integer status)
{ {
this.status = status; this.status = status;
} }
public Integer getStatus() public Integer getStatus()
{ {
return status; return status;
} }
public void setStartDate(Date startDate) public void setStartDate(Date startDate)
{ {
this.startDate = startDate; this.startDate = startDate;
} }
public Date getStartDate() public Date getStartDate()
{ {
return startDate; return startDate;
} }
public void setEndDate(Date endDate) public void setEndDate(Date endDate)
{ {
this.endDate = endDate; this.endDate = endDate;
} }
public Date getEndDate() public Date getEndDate()
{ {
return endDate; return endDate;
} }
public void setPreStartDate(Date preStartDate)
{
this.preStartDate = preStartDate;
}
public Date getPreStartDate()
{
return preStartDate;
}
public void setPreEndDate(Date preEndDate)
{
this.preEndDate = preEndDate;
}
public Date getPreEndDate()
{
return preEndDate;
}
@Override @Override
public String toString() { public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("id", getId()) .append("id", getId())
.append("orderType", getOrderType()) .append("orderType", getOrderType())
.append("serialNumber", getSerialNumber()) .append("serialNumber", getSerialNumber())
.append("consumerId", getConsumerId()) .append("consumerId", getConsumerId())
.append("consumerName", getConsumerName()) .append("consumerName", getConsumerName())
.append("description", getDescription()) .append("description", getDescription())
.append("originalPrice", getOriginalPrice()) .append("originalPrice", getOriginalPrice())
.append("payWays", getPayWays()) .append("payWays", getPayWays())
.append("realPrice", getRealPrice()) .append("realPrice", getRealPrice())
.append("isUseCoupon", getIsUseCoupon()) .append("isUseCoupon", getIsUseCoupon())
.append("couponType", getCouponType()) .append("couponType", getCouponType())
.append("couponName", getCouponName()) .append("couponName", getCouponName())
.append("couponId", getCouponId()) .append("couponId", getCouponId())
.append("status", getStatus()) .append("status", getStatus())
.append("startDate", getStartDate()) .append("startDate", getStartDate())
.append("endDate", getEndDate()) .append("endDate", getEndDate())
.append("createBy", getCreateBy()) .append("createBy", getCreateBy())
.append("createTime", getCreateTime()) .append("createTime", getCreateTime())
.append("updateBy", getUpdateBy()) .append("updateBy", getUpdateBy())
.append("updateTime", getUpdateTime()) .append("updateTime", getUpdateTime())
.append("remark", getRemark()) .append("remark", getRemark())
.toString(); .append("preStartDate", getPreStartDate())
.append("preEndDate", getPreEndDate())
.toString();
} }
} }
<?xml version="1.0" encoding="UTF-8" ?> <?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper <!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd"> "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="share.system.mapper.SOrderMapper"> <mapper namespace="share.system.mapper.SOrderMapper">
<resultMap type="SOrder" id="SOrderResult"> <resultMap type="SOrder" id="SOrderResult">
<result property="id" column="id" /> <result property="id" column="id" />
<result property="orderType" column="order_type" /> <result property="orderType" column="order_type" />
...@@ -26,15 +26,17 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -26,15 +26,17 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="updateBy" column="update_by" /> <result property="updateBy" column="update_by" />
<result property="updateTime" column="update_time" /> <result property="updateTime" column="update_time" />
<result property="remark" column="remark" /> <result property="remark" column="remark" />
<result property="preStartDate" column="pre_start_date" />
<result property="preEndDate" column="pre_end_date" />
</resultMap> </resultMap>
<sql id="selectSOrderVo"> <sql id="selectSOrderVo">
select id, order_type, serial_number, consumer_id, consumer_name, description, original_price, pay_ways, real_price, is_use_coupon, coupon_type, coupon_name, coupon_id, status, start_date, end_date, create_by, create_time, update_by, update_time, remark from s_order select id, order_type, serial_number, consumer_id, consumer_name, description, original_price, pay_ways, real_price, is_use_coupon, coupon_type, coupon_name, coupon_id, status, start_date, end_date, create_by, create_time, update_by, update_time, remark, pre_start_date, pre_end_date from s_order
</sql> </sql>
<select id="selectSOrderList" parameterType="SOrder" resultMap="SOrderResult"> <select id="selectSOrderList" parameterType="SOrder" resultMap="SOrderResult">
<include refid="selectSOrderVo"/> <include refid="selectSOrderVo"/>
<where> <where>
<if test="orderType != null "> and order_type = #{orderType}</if> <if test="orderType != null "> and order_type = #{orderType}</if>
<if test="serialNumber != null "> and serial_number = #{serialNumber}</if> <if test="serialNumber != null "> and serial_number = #{serialNumber}</if>
<if test="consumerId != null "> and consumer_id = #{consumerId}</if> <if test="consumerId != null "> and consumer_id = #{consumerId}</if>
...@@ -50,14 +52,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -50,14 +52,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="status != null "> and status = #{status}</if> <if test="status != null "> and status = #{status}</if>
<if test="startDate != null "> and start_date = #{startDate}</if> <if test="startDate != null "> and start_date = #{startDate}</if>
<if test="endDate != null "> and end_date = #{endDate}</if> <if test="endDate != null "> and end_date = #{endDate}</if>
<if test="preStartDate != null "> and pre_start_date = #{preStartDate}</if>
<if test="preEndDate != null "> and pre_end_date = #{preEndDate}</if>
</where> </where>
</select> </select>
<select id="selectSOrderById" parameterType="Long" resultMap="SOrderResult"> <select id="selectSOrderById" parameterType="Long" resultMap="SOrderResult">
<include refid="selectSOrderVo"/> <include refid="selectSOrderVo"/>
where id = #{id} where id = #{id}
</select> </select>
<insert id="insertSOrder" parameterType="SOrder" useGeneratedKeys="true" keyProperty="id"> <insert id="insertSOrder" parameterType="SOrder" useGeneratedKeys="true" keyProperty="id">
insert into s_order insert into s_order
<trim prefix="(" suffix=")" suffixOverrides=","> <trim prefix="(" suffix=")" suffixOverrides=",">
...@@ -81,7 +85,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -81,7 +85,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="updateBy != null">update_by,</if> <if test="updateBy != null">update_by,</if>
<if test="updateTime != null">update_time,</if> <if test="updateTime != null">update_time,</if>
<if test="remark != null">remark,</if> <if test="remark != null">remark,</if>
</trim> <if test="preStartDate != null">pre_start_date,</if>
<if test="preEndDate != null">pre_end_date,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="orderType != null">#{orderType},</if> <if test="orderType != null">#{orderType},</if>
<if test="serialNumber != null">#{serialNumber},</if> <if test="serialNumber != null">#{serialNumber},</if>
...@@ -103,7 +109,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -103,7 +109,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="updateBy != null">#{updateBy},</if> <if test="updateBy != null">#{updateBy},</if>
<if test="updateTime != null">#{updateTime},</if> <if test="updateTime != null">#{updateTime},</if>
<if test="remark != null">#{remark},</if> <if test="remark != null">#{remark},</if>
</trim> <if test="preStartDate != null">#{preStartDate},</if>
<if test="preEndDate != null">#{preEndDate},</if>
</trim>
</insert> </insert>
<update id="updateSOrder" parameterType="SOrder"> <update id="updateSOrder" parameterType="SOrder">
...@@ -129,6 +137,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -129,6 +137,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="updateBy != null">update_by = #{updateBy},</if> <if test="updateBy != null">update_by = #{updateBy},</if>
<if test="updateTime != null">update_time = #{updateTime},</if> <if test="updateTime != null">update_time = #{updateTime},</if>
<if test="remark != null">remark = #{remark},</if> <if test="remark != null">remark = #{remark},</if>
<if test="preStartDate != null">pre_start_date = #{preStartDate},</if>
<if test="preEndDate != null">pre_end_date = #{preEndDate},</if>
</trim> </trim>
where id = #{id} where id = #{id}
</update> </update>
...@@ -138,7 +148,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -138,7 +148,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</delete> </delete>
<delete id="deleteSOrderByIds" parameterType="String"> <delete id="deleteSOrderByIds" parameterType="String">
delete from s_order where id in delete from s_order where id in
<foreach item="id" collection="array" open="(" separator="," close=")"> <foreach item="id" collection="array" open="(" separator="," close=")">
#{id} #{id}
</foreach> </foreach>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment