Commit 57bd4ca4 by wuwenlong

1

parent d915d0e2
......@@ -175,6 +175,7 @@
<modules>
<module>share-admin</module>
<module>share-front</module>
<module>share-framework</module>
<module>share-system</module>
<module>share-quartz</module>
......
package share.system.controller;
package share.web.controller.system;
import java.util.List;
import javax.servlet.http.HttpServletResponse;
......@@ -25,7 +25,7 @@ import share.common.core.page.TableDataInfo;
* 订单Controller
*
* @author ruoyi
* @date 2023-09-27
* @date 2023-10-09
*/
@RestController
@RequestMapping("/system/order")
......
......@@ -9,9 +9,9 @@ import share.common.core.domain.BaseEntity;
/**
* 订单对象 s_order
*
*
* @author ruoyi
* @date 2023-09-27
* @date 2023-10-09
*/
public class SOrder extends BaseEntity
{
......@@ -82,175 +82,205 @@ public class SOrder extends BaseEntity
@Excel(name = "结束时间", width = 30, dateFormat = "yyyy-MM-dd")
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;
}
public Long getId()
public Long getId()
{
return id;
}
public void setOrderType(Integer orderType)
public void setOrderType(Integer orderType)
{
this.orderType = orderType;
}
public Integer getOrderType()
public Integer getOrderType()
{
return orderType;
}
public void setSerialNumber(Long serialNumber)
public void setSerialNumber(Long serialNumber)
{
this.serialNumber = serialNumber;
}
public Long getSerialNumber()
public Long getSerialNumber()
{
return serialNumber;
}
public void setConsumerId(Long consumerId)
public void setConsumerId(Long consumerId)
{
this.consumerId = consumerId;
}
public Long getConsumerId()
public Long getConsumerId()
{
return consumerId;
}
public void setConsumerName(String consumerName)
public void setConsumerName(String consumerName)
{
this.consumerName = consumerName;
}
public String getConsumerName()
public String getConsumerName()
{
return consumerName;
}
public void setDescription(String description)
public void setDescription(String description)
{
this.description = description;
}
public String getDescription()
public String getDescription()
{
return description;
}
public void setOriginalPrice(Integer originalPrice)
public void setOriginalPrice(Integer originalPrice)
{
this.originalPrice = originalPrice;
}
public Integer getOriginalPrice()
public Integer getOriginalPrice()
{
return originalPrice;
}
public void setPayWays(Integer payWays)
public void setPayWays(Integer payWays)
{
this.payWays = payWays;
}
public Integer getPayWays()
public Integer getPayWays()
{
return payWays;
}
public void setRealPrice(Integer realPrice)
public void setRealPrice(Integer realPrice)
{
this.realPrice = realPrice;
}
public Integer getRealPrice()
public Integer getRealPrice()
{
return realPrice;
}
public void setIsUseCoupon(Integer isUseCoupon)
public void setIsUseCoupon(Integer isUseCoupon)
{
this.isUseCoupon = isUseCoupon;
}
public Integer getIsUseCoupon()
public Integer getIsUseCoupon()
{
return isUseCoupon;
}
public void setCouponType(String couponType)
public void setCouponType(String couponType)
{
this.couponType = couponType;
}
public String getCouponType()
public String getCouponType()
{
return couponType;
}
public void setCouponName(String couponName)
public void setCouponName(String couponName)
{
this.couponName = couponName;
}
public String getCouponName()
public String getCouponName()
{
return couponName;
}
public void setCouponId(String couponId)
public void setCouponId(String couponId)
{
this.couponId = couponId;
}
public String getCouponId()
public String getCouponId()
{
return couponId;
}
public void setStatus(Integer status)
public void setStatus(Integer status)
{
this.status = status;
}
public Integer getStatus()
public Integer getStatus()
{
return status;
}
public void setStartDate(Date startDate)
public void setStartDate(Date startDate)
{
this.startDate = startDate;
}
public Date getStartDate()
public Date getStartDate()
{
return startDate;
}
public void setEndDate(Date endDate)
public void setEndDate(Date endDate)
{
this.endDate = endDate;
}
public Date getEndDate()
public Date getEndDate()
{
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
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("id", getId())
.append("orderType", getOrderType())
.append("serialNumber", getSerialNumber())
.append("consumerId", getConsumerId())
.append("consumerName", getConsumerName())
.append("description", getDescription())
.append("originalPrice", getOriginalPrice())
.append("payWays", getPayWays())
.append("realPrice", getRealPrice())
.append("isUseCoupon", getIsUseCoupon())
.append("couponType", getCouponType())
.append("couponName", getCouponName())
.append("couponId", getCouponId())
.append("status", getStatus())
.append("startDate", getStartDate())
.append("endDate", getEndDate())
.append("createBy", getCreateBy())
.append("createTime", getCreateTime())
.append("updateBy", getUpdateBy())
.append("updateTime", getUpdateTime())
.append("remark", getRemark())
.toString();
.append("id", getId())
.append("orderType", getOrderType())
.append("serialNumber", getSerialNumber())
.append("consumerId", getConsumerId())
.append("consumerName", getConsumerName())
.append("description", getDescription())
.append("originalPrice", getOriginalPrice())
.append("payWays", getPayWays())
.append("realPrice", getRealPrice())
.append("isUseCoupon", getIsUseCoupon())
.append("couponType", getCouponType())
.append("couponName", getCouponName())
.append("couponId", getCouponId())
.append("status", getStatus())
.append("startDate", getStartDate())
.append("endDate", getEndDate())
.append("createBy", getCreateBy())
.append("createTime", getCreateTime())
.append("updateBy", getUpdateBy())
.append("updateTime", getUpdateTime())
.append("remark", getRemark())
.append("preStartDate", getPreStartDate())
.append("preEndDate", getPreEndDate())
.toString();
}
}
<?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">
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="share.system.mapper.SOrderMapper">
<resultMap type="SOrder" id="SOrderResult">
<result property="id" column="id" />
<result property="orderType" column="order_type" />
......@@ -26,15 +26,17 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="updateBy" column="update_by" />
<result property="updateTime" column="update_time" />
<result property="remark" column="remark" />
<result property="preStartDate" column="pre_start_date" />
<result property="preEndDate" column="pre_end_date" />
</resultMap>
<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>
<select id="selectSOrderList" parameterType="SOrder" resultMap="SOrderResult">
<include refid="selectSOrderVo"/>
<where>
<where>
<if test="orderType != null "> and order_type = #{orderType}</if>
<if test="serialNumber != null "> and serial_number = #{serialNumber}</if>
<if test="consumerId != null "> and consumer_id = #{consumerId}</if>
......@@ -50,14 +52,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="status != null "> and status = #{status}</if>
<if test="startDate != null "> and start_date = #{startDate}</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>
</select>
<select id="selectSOrderById" parameterType="Long" resultMap="SOrderResult">
<include refid="selectSOrderVo"/>
where id = #{id}
</select>
<insert id="insertSOrder" parameterType="SOrder" useGeneratedKeys="true" keyProperty="id">
insert into s_order
<trim prefix="(" suffix=")" suffixOverrides=",">
......@@ -81,7 +85,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="updateBy != null">update_by,</if>
<if test="updateTime != null">update_time,</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=",">
<if test="orderType != null">#{orderType},</if>
<if test="serialNumber != null">#{serialNumber},</if>
......@@ -103,7 +109,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="updateBy != null">#{updateBy},</if>
<if test="updateTime != null">#{updateTime},</if>
<if test="remark != null">#{remark},</if>
</trim>
<if test="preStartDate != null">#{preStartDate},</if>
<if test="preEndDate != null">#{preEndDate},</if>
</trim>
</insert>
<update id="updateSOrder" parameterType="SOrder">
......@@ -129,6 +137,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="updateBy != null">update_by = #{updateBy},</if>
<if test="updateTime != null">update_time = #{updateTime},</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>
where id = #{id}
</update>
......@@ -138,7 +148,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</delete>
<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=")">
#{id}
</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