个人中心完成及其导出最新的sql
This commit is contained in:
1 parent
30a0a1c962
commit
642ec441be
15 files changed
+3834
-953
No files matched your search
@@ -3,9 +3,12 @@ package com.ruoyi.app.common.persistence.dao;
|
|||||||
import com.ruoyi.app.common.persistence.model.StoreCoupon;
|
import com.ruoyi.app.common.persistence.model.StoreCoupon;
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
import com.ruoyi.app.modular.shop.service.dto.CouponDTO;
|
import com.ruoyi.app.modular.shop.service.dto.CouponDTO;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
import org.apache.ibatis.annotations.Select;
|
import org.apache.ibatis.annotations.Select;
|
||||||
import org.apache.ibatis.annotations.Update;
|
import org.apache.ibatis.annotations.Update;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <p>
|
* <p>
|
||||||
* 优惠券主表 Mapper 接口
|
* 优惠券主表 Mapper 接口
|
||||||
@@ -23,4 +26,11 @@ public interface StoreCouponMapper extends BaseMapper<StoreCoupon> {
|
|||||||
@Update("update store_coupon set use_num=use_num+1 where id=#{id}")
|
@Update("update store_coupon set use_num=use_num+1 where id=#{id}")
|
||||||
void incUserNum(int id);
|
void incUserNum(int id);
|
||||||
|
|
||||||
|
@Select("<script>select s.id,c.money,c.name,c.condition from store_coupon_list s left join store_coupon c " +
|
||||||
|
"on s.cid=c.id where s.uid=#{userId} and s.status=0" +
|
||||||
|
" <if test='orderTotalPrice > 0'>and c.condition <![CDATA[<= ]]> #{orderTotalPrice}</if>" +
|
||||||
|
" and c.use_start_time <![CDATA[<= ]]> now() and c.use_end_time <![CDATA[>= ]]> now()</script>")
|
||||||
|
List<CouponDTO> couponList(@Param("userId") int userId,
|
||||||
|
@Param("orderTotalPrice") double orderTotalPrice);
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -4,8 +4,8 @@ import java.math.BigDecimal;
|
|||||||
|
|
||||||
import com.baomidou.mybatisplus.annotation.*;
|
import com.baomidou.mybatisplus.annotation.*;
|
||||||
import com.baomidou.mybatisplus.extension.activerecord.Model;
|
import com.baomidou.mybatisplus.extension.activerecord.Model;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
import javax.xml.crypto.Data;
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
|
||||||
@@ -18,6 +18,7 @@ import java.util.Date;
|
|||||||
* @since 2019-09-10
|
* @since 2019-09-10
|
||||||
*/
|
*/
|
||||||
@TableName("store_cart")
|
@TableName("store_cart")
|
||||||
|
@Data
|
||||||
public class StoreCart extends Model<StoreCart> {
|
public class StoreCart extends Model<StoreCart> {
|
||||||
|
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
@@ -52,6 +53,9 @@ public class StoreCart extends Model<StoreCart> {
|
|||||||
*/
|
*/
|
||||||
@TableField("goods_name")
|
@TableField("goods_name")
|
||||||
private String goodsName;
|
private String goodsName;
|
||||||
|
|
||||||
|
@TableField("goods_logo")
|
||||||
|
private String goodsLogo;
|
||||||
/**
|
/**
|
||||||
* 零售价
|
* 零售价
|
||||||
*/
|
*/
|
||||||
@@ -112,176 +116,5 @@ public class StoreCart extends Model<StoreCart> {
|
|||||||
private String sku;
|
private String sku;
|
||||||
|
|
||||||
|
|
||||||
public Integer getId() {
|
|
||||||
return id;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setId(Integer id) {
|
|
||||||
this.id = id;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Integer getUserId() {
|
|
||||||
return userId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setUserId(Integer userId) {
|
|
||||||
this.userId = userId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getSessionId() {
|
|
||||||
return sessionId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setSessionId(String sessionId) {
|
|
||||||
this.sessionId = sessionId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Integer getGoodsId() {
|
|
||||||
return goodsId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setGoodsId(Integer goodsId) {
|
|
||||||
this.goodsId = goodsId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getGoodsSn() {
|
|
||||||
return goodsSn;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setGoodsSn(String goodsSn) {
|
|
||||||
this.goodsSn = goodsSn;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getGoodsName() {
|
|
||||||
return goodsName;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setGoodsName(String goodsName) {
|
|
||||||
this.goodsName = goodsName;
|
|
||||||
}
|
|
||||||
|
|
||||||
public BigDecimal getMarketPrice() {
|
|
||||||
return marketPrice;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setMarketPrice(BigDecimal marketPrice) {
|
|
||||||
this.marketPrice = marketPrice;
|
|
||||||
}
|
|
||||||
|
|
||||||
public BigDecimal getGoodsPrice() {
|
|
||||||
return goodsPrice;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setGoodsPrice(BigDecimal goodsPrice) {
|
|
||||||
this.goodsPrice = goodsPrice;
|
|
||||||
}
|
|
||||||
|
|
||||||
public BigDecimal getMemberGoodsPrice() {
|
|
||||||
return memberGoodsPrice;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setMemberGoodsPrice(BigDecimal memberGoodsPrice) {
|
|
||||||
this.memberGoodsPrice = memberGoodsPrice;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Integer getGoodsNum() {
|
|
||||||
return goodsNum;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setGoodsNum(Integer goodsNum) {
|
|
||||||
this.goodsNum = goodsNum;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getSpecKey() {
|
|
||||||
return specKey;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setSpecKey(String specKey) {
|
|
||||||
this.specKey = specKey;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getSpecKeyName() {
|
|
||||||
return specKeyName;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setSpecKeyName(String specKeyName) {
|
|
||||||
this.specKeyName = specKeyName;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getBarCode() {
|
|
||||||
return barCode;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setBarCode(String barCode) {
|
|
||||||
this.barCode = barCode;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Integer getSelected() {
|
|
||||||
return selected;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setSelected(Integer selected) {
|
|
||||||
this.selected = selected;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Date getAddTime() {
|
|
||||||
return addTime;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setAddTime(Date addTime) {
|
|
||||||
this.addTime = addTime;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Integer getPromType() {
|
|
||||||
return promType;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setPromType(Integer promType) {
|
|
||||||
this.promType = promType;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Integer getPromId() {
|
|
||||||
return promId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setPromId(Integer promId) {
|
|
||||||
this.promId = promId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getSku() {
|
|
||||||
return sku;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setSku(String sku) {
|
|
||||||
this.sku = sku;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
protected Serializable pkVal() {
|
|
||||||
return this.id;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String toString() {
|
|
||||||
return "StoreCart{" +
|
|
||||||
", id=" + id +
|
|
||||||
", userId=" + userId +
|
|
||||||
", sessionId=" + sessionId +
|
|
||||||
", goodsId=" + goodsId +
|
|
||||||
", goodsSn=" + goodsSn +
|
|
||||||
", goodsName=" + goodsName +
|
|
||||||
", marketPrice=" + marketPrice +
|
|
||||||
", goodsPrice=" + goodsPrice +
|
|
||||||
", memberGoodsPrice=" + memberGoodsPrice +
|
|
||||||
", goodsNum=" + goodsNum +
|
|
||||||
", specKey=" + specKey +
|
|
||||||
", specKeyName=" + specKeyName +
|
|
||||||
", barCode=" + barCode +
|
|
||||||
", selected=" + selected +
|
|
||||||
", addTime=" + addTime +
|
|
||||||
", promType=" + promType +
|
|
||||||
", promId=" + promId +
|
|
||||||
", sku=" + sku +
|
|
||||||
"}";
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@@ -4,6 +4,8 @@ import java.math.BigDecimal;
|
|||||||
|
|
||||||
import com.baomidou.mybatisplus.annotation.*;
|
import com.baomidou.mybatisplus.annotation.*;
|
||||||
import com.baomidou.mybatisplus.extension.activerecord.Model;
|
import com.baomidou.mybatisplus.extension.activerecord.Model;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
|
||||||
@@ -16,6 +18,7 @@ import java.util.Date;
|
|||||||
* @since 2019-06-26
|
* @since 2019-06-26
|
||||||
*/
|
*/
|
||||||
@TableName("store_order")
|
@TableName("store_order")
|
||||||
|
@Data
|
||||||
public class StoreOrder extends Model<StoreOrder> {
|
public class StoreOrder extends Model<StoreOrder> {
|
||||||
|
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
@@ -25,11 +28,7 @@ public class StoreOrder extends Model<StoreOrder> {
|
|||||||
*/
|
*/
|
||||||
@TableId(value = "order_id", type = IdType.AUTO)
|
@TableId(value = "order_id", type = IdType.AUTO)
|
||||||
private Integer orderId;
|
private Integer orderId;
|
||||||
/**
|
|
||||||
* 店铺ID
|
|
||||||
*/
|
|
||||||
@TableField("store_id")
|
|
||||||
private Integer storeId;
|
|
||||||
/**
|
/**
|
||||||
* 订单编号
|
* 订单编号
|
||||||
*/
|
*/
|
||||||
@@ -164,13 +163,7 @@ public class StoreOrder extends Model<StoreOrder> {
|
|||||||
*/
|
*/
|
||||||
@TableField("coupon_price")
|
@TableField("coupon_price")
|
||||||
private BigDecimal couponPrice;
|
private BigDecimal couponPrice;
|
||||||
/**
|
|
||||||
* 红包金额
|
|
||||||
*/
|
|
||||||
@TableField("red_price")
|
|
||||||
private BigDecimal redPrice;
|
|
||||||
@TableField("red_id")
|
|
||||||
private Integer redId;
|
|
||||||
/**
|
/**
|
||||||
* 使用积分
|
* 使用积分
|
||||||
*/
|
*/
|
||||||
@@ -275,581 +268,9 @@ public class StoreOrder extends Model<StoreOrder> {
|
|||||||
* 用户假删除标识,1:删除,0未删除
|
* 用户假删除标识,1:删除,0未删除
|
||||||
*/
|
*/
|
||||||
private Integer deleted;
|
private Integer deleted;
|
||||||
/**
|
|
||||||
* 0未结算1已结算
|
|
||||||
*/
|
|
||||||
@TableField("is_checkout")
|
|
||||||
private Integer isCheckout;
|
|
||||||
/**
|
|
||||||
* 平台奖励的积分
|
|
||||||
*/
|
|
||||||
@TableField("give_points")
|
|
||||||
private Integer givePoints;
|
|
||||||
/**
|
|
||||||
* 唯一兑换码
|
|
||||||
*/
|
|
||||||
@TableField("unique_number")
|
|
||||||
private Long uniqueNumber;
|
|
||||||
/**
|
|
||||||
* 店铺类型1订门票2农家乐3找民宿4补给箱5-旗舰店
|
|
||||||
*/
|
|
||||||
@TableField("store_type")
|
|
||||||
private Integer storeType;
|
|
||||||
/**
|
|
||||||
* 唯一二维码
|
|
||||||
*/
|
|
||||||
@TableField("unique_qrcode")
|
|
||||||
private String uniqueQrcode;
|
|
||||||
|
|
||||||
|
|
||||||
public Integer getOrderId() {
|
|
||||||
return orderId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setOrderId(Integer orderId) {
|
|
||||||
this.orderId = orderId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Integer getStoreId() {
|
|
||||||
return storeId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setStoreId(Integer storeId) {
|
|
||||||
this.storeId = storeId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getOrderSn() {
|
|
||||||
return orderSn;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setOrderSn(String orderSn) {
|
|
||||||
this.orderSn = orderSn;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Integer getUserId() {
|
|
||||||
return userId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setUserId(Integer userId) {
|
|
||||||
this.userId = userId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Integer getOrderStatus() {
|
|
||||||
return orderStatus;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setOrderStatus(Integer orderStatus) {
|
|
||||||
this.orderStatus = orderStatus;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Integer getShippingStatus() {
|
|
||||||
return shippingStatus;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setShippingStatus(Integer shippingStatus) {
|
|
||||||
this.shippingStatus = shippingStatus;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Integer getPayStatus() {
|
|
||||||
return payStatus;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setPayStatus(Integer payStatus) {
|
|
||||||
this.payStatus = payStatus;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getConsignee() {
|
|
||||||
return consignee;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setConsignee(String consignee) {
|
|
||||||
this.consignee = consignee;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Integer getCountry() {
|
|
||||||
return country;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setCountry(Integer country) {
|
|
||||||
this.country = country;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Integer getProvince() {
|
|
||||||
return province;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setProvince(Integer province) {
|
|
||||||
this.province = province;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Integer getCity() {
|
|
||||||
return city;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setCity(Integer city) {
|
|
||||||
this.city = city;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Integer getDistrict() {
|
|
||||||
return district;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setDistrict(Integer district) {
|
|
||||||
this.district = district;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Integer getTwon() {
|
|
||||||
return twon;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setTwon(Integer twon) {
|
|
||||||
this.twon = twon;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getCityInfo() {
|
|
||||||
return cityInfo;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setCityInfo(String cityInfo) {
|
|
||||||
this.cityInfo = cityInfo;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getAddress() {
|
|
||||||
return address;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setAddress(String address) {
|
|
||||||
this.address = address;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getZipcode() {
|
|
||||||
return zipcode;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setZipcode(String zipcode) {
|
|
||||||
this.zipcode = zipcode;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getMobile() {
|
|
||||||
return mobile;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setMobile(String mobile) {
|
|
||||||
this.mobile = mobile;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getEmail() {
|
|
||||||
return email;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setEmail(String email) {
|
|
||||||
this.email = email;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Integer getReceiveType() {
|
|
||||||
return receiveType;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setReceiveType(Integer receiveType) {
|
|
||||||
this.receiveType = receiveType;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getShippingCode() {
|
|
||||||
return shippingCode;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setShippingCode(String shippingCode) {
|
|
||||||
this.shippingCode = shippingCode;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getShippingName() {
|
|
||||||
return shippingName;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setShippingName(String shippingName) {
|
|
||||||
this.shippingName = shippingName;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getPayCode() {
|
|
||||||
return payCode;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setPayCode(String payCode) {
|
|
||||||
this.payCode = payCode;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Integer getPayMethod() {
|
|
||||||
return payMethod;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setPayMethod(Integer payMethod) {
|
|
||||||
this.payMethod = payMethod;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Integer getRechargeId() {
|
|
||||||
return rechargeId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setRechargeId(Integer rechargeId) {
|
|
||||||
this.rechargeId = rechargeId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getPayName() {
|
|
||||||
return payName;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setPayName(String payName) {
|
|
||||||
this.payName = payName;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getInvoiceTitle() {
|
|
||||||
return invoiceTitle;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setInvoiceTitle(String invoiceTitle) {
|
|
||||||
this.invoiceTitle = invoiceTitle;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getTaxpayer() {
|
|
||||||
return taxpayer;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setTaxpayer(String taxpayer) {
|
|
||||||
this.taxpayer = taxpayer;
|
|
||||||
}
|
|
||||||
|
|
||||||
public BigDecimal getGoodsPrice() {
|
|
||||||
return goodsPrice;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setGoodsPrice(BigDecimal goodsPrice) {
|
|
||||||
this.goodsPrice = goodsPrice;
|
|
||||||
}
|
|
||||||
|
|
||||||
public BigDecimal getShippingPrice() {
|
|
||||||
return shippingPrice;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setShippingPrice(BigDecimal shippingPrice) {
|
|
||||||
this.shippingPrice = shippingPrice;
|
|
||||||
}
|
|
||||||
|
|
||||||
public BigDecimal getUserMoney() {
|
|
||||||
return userMoney;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setUserMoney(BigDecimal userMoney) {
|
|
||||||
this.userMoney = userMoney;
|
|
||||||
}
|
|
||||||
|
|
||||||
public BigDecimal getCouponPrice() {
|
|
||||||
return couponPrice;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setCouponPrice(BigDecimal couponPrice) {
|
|
||||||
this.couponPrice = couponPrice;
|
|
||||||
}
|
|
||||||
|
|
||||||
public BigDecimal getRedPrice() {
|
|
||||||
return redPrice;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setRedPrice(BigDecimal redPrice) {
|
|
||||||
this.redPrice = redPrice;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Integer getRedId() {
|
|
||||||
return redId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setRedId(Integer redId) {
|
|
||||||
this.redId = redId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Integer getIntegral() {
|
|
||||||
return integral;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setIntegral(Integer integral) {
|
|
||||||
this.integral = integral;
|
|
||||||
}
|
|
||||||
|
|
||||||
public BigDecimal getIntegralMoney() {
|
|
||||||
return integralMoney;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setIntegralMoney(BigDecimal integralMoney) {
|
|
||||||
this.integralMoney = integralMoney;
|
|
||||||
}
|
|
||||||
|
|
||||||
public BigDecimal getOrderAmount() {
|
|
||||||
return orderAmount;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setOrderAmount(BigDecimal orderAmount) {
|
|
||||||
this.orderAmount = orderAmount;
|
|
||||||
}
|
|
||||||
|
|
||||||
public BigDecimal getTotalAmount() {
|
|
||||||
return totalAmount;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setTotalAmount(BigDecimal totalAmount) {
|
|
||||||
this.totalAmount = totalAmount;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Date getAddTime() {
|
|
||||||
return addTime;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setAddTime(Date addTime) {
|
|
||||||
this.addTime = addTime;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Integer getShippingTime() {
|
|
||||||
return shippingTime;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setShippingTime(Integer shippingTime) {
|
|
||||||
this.shippingTime = shippingTime;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Integer getConfirmTime() {
|
|
||||||
return confirmTime;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setConfirmTime(Integer confirmTime) {
|
|
||||||
this.confirmTime = confirmTime;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Integer getPayTime() {
|
|
||||||
return payTime;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setPayTime(Integer payTime) {
|
|
||||||
this.payTime = payTime;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getTransactionId() {
|
|
||||||
return transactionId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setTransactionId(String transactionId) {
|
|
||||||
this.transactionId = transactionId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Integer getPromId() {
|
|
||||||
return promId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setPromId(Integer promId) {
|
|
||||||
this.promId = promId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Integer getPromType() {
|
|
||||||
return promType;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setPromType(Integer promType) {
|
|
||||||
this.promType = promType;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Integer getOrderPromId() {
|
|
||||||
return orderPromId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setOrderPromId(Integer orderPromId) {
|
|
||||||
this.orderPromId = orderPromId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public BigDecimal getOrderPromAmount() {
|
|
||||||
return orderPromAmount;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setOrderPromAmount(BigDecimal orderPromAmount) {
|
|
||||||
this.orderPromAmount = orderPromAmount;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getEditMoney() {
|
|
||||||
return editMoney;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setEditMoney(String editMoney) {
|
|
||||||
this.editMoney = editMoney;
|
|
||||||
}
|
|
||||||
|
|
||||||
public BigDecimal getDiscount() {
|
|
||||||
return discount;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setDiscount(BigDecimal discount) {
|
|
||||||
this.discount = discount;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getUserNote() {
|
|
||||||
return userNote;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setUserNote(String userNote) {
|
|
||||||
this.userNote = userNote;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getAdminNote() {
|
|
||||||
return adminNote;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setAdminNote(String adminNote) {
|
|
||||||
this.adminNote = adminNote;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getParentSn() {
|
|
||||||
return parentSn;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setParentSn(String parentSn) {
|
|
||||||
this.parentSn = parentSn;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Integer getIsDistribut() {
|
|
||||||
return isDistribut;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setIsDistribut(Integer isDistribut) {
|
|
||||||
this.isDistribut = isDistribut;
|
|
||||||
}
|
|
||||||
|
|
||||||
public BigDecimal getPaidMoney() {
|
|
||||||
return paidMoney;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setPaidMoney(BigDecimal paidMoney) {
|
|
||||||
this.paidMoney = paidMoney;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Integer getDeletedTime() {
|
|
||||||
return deletedTime;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setDeletedTime(Integer deletedTime) {
|
|
||||||
this.deletedTime = deletedTime;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Integer getDeleted() {
|
|
||||||
return deleted;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setDeleted(Integer deleted) {
|
|
||||||
this.deleted = deleted;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Integer getIsCheckout() {
|
|
||||||
return isCheckout;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setIsCheckout(Integer isCheckout) {
|
|
||||||
this.isCheckout = isCheckout;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Integer getGivePoints() {
|
|
||||||
return givePoints;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setGivePoints(Integer givePoints) {
|
|
||||||
this.givePoints = givePoints;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Long getUniqueNumber() {
|
|
||||||
return uniqueNumber;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setUniqueNumber(Long uniqueNumber) {
|
|
||||||
this.uniqueNumber = uniqueNumber;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Integer getStoreType() {
|
|
||||||
return storeType;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setStoreType(Integer storeType) {
|
|
||||||
this.storeType = storeType;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getUniqueQrcode() {
|
|
||||||
return uniqueQrcode;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setUniqueQrcode(String uniqueQrcode) {
|
|
||||||
this.uniqueQrcode = uniqueQrcode;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
protected Serializable pkVal() {
|
|
||||||
return this.orderId;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String toString() {
|
|
||||||
return "StoreOrder{" +
|
|
||||||
", orderId=" + orderId +
|
|
||||||
", storeId=" + storeId +
|
|
||||||
", orderSn=" + orderSn +
|
|
||||||
", userId=" + userId +
|
|
||||||
", orderStatus=" + orderStatus +
|
|
||||||
", shippingStatus=" + shippingStatus +
|
|
||||||
", payStatus=" + payStatus +
|
|
||||||
", consignee=" + consignee +
|
|
||||||
", country=" + country +
|
|
||||||
", province=" + province +
|
|
||||||
", city=" + city +
|
|
||||||
", district=" + district +
|
|
||||||
", twon=" + twon +
|
|
||||||
", cityInfo=" + cityInfo +
|
|
||||||
", address=" + address +
|
|
||||||
", zipcode=" + zipcode +
|
|
||||||
", mobile=" + mobile +
|
|
||||||
", email=" + email +
|
|
||||||
", receiveType=" + receiveType +
|
|
||||||
", shippingCode=" + shippingCode +
|
|
||||||
", shippingName=" + shippingName +
|
|
||||||
", payCode=" + payCode +
|
|
||||||
", payMethod=" + payMethod +
|
|
||||||
", rechargeId=" + rechargeId +
|
|
||||||
", payName=" + payName +
|
|
||||||
", invoiceTitle=" + invoiceTitle +
|
|
||||||
", taxpayer=" + taxpayer +
|
|
||||||
", goodsPrice=" + goodsPrice +
|
|
||||||
", shippingPrice=" + shippingPrice +
|
|
||||||
", userMoney=" + userMoney +
|
|
||||||
", couponPrice=" + couponPrice +
|
|
||||||
", redPrice=" + redPrice +
|
|
||||||
", redId=" + redId +
|
|
||||||
", integral=" + integral +
|
|
||||||
", integralMoney=" + integralMoney +
|
|
||||||
", orderAmount=" + orderAmount +
|
|
||||||
", totalAmount=" + totalAmount +
|
|
||||||
", addTime=" + addTime +
|
|
||||||
", shippingTime=" + shippingTime +
|
|
||||||
", confirmTime=" + confirmTime +
|
|
||||||
", payTime=" + payTime +
|
|
||||||
", transactionId=" + transactionId +
|
|
||||||
", promId=" + promId +
|
|
||||||
", promType=" + promType +
|
|
||||||
", orderPromId=" + orderPromId +
|
|
||||||
", orderPromAmount=" + orderPromAmount +
|
|
||||||
", editMoney=" + editMoney +
|
|
||||||
", discount=" + discount +
|
|
||||||
", userNote=" + userNote +
|
|
||||||
", adminNote=" + adminNote +
|
|
||||||
", parentSn=" + parentSn +
|
|
||||||
", isDistribut=" + isDistribut +
|
|
||||||
", paidMoney=" + paidMoney +
|
|
||||||
", deletedTime=" + deletedTime +
|
|
||||||
", deleted=" + deleted +
|
|
||||||
", isCheckout=" + isCheckout +
|
|
||||||
", givePoints=" + givePoints +
|
|
||||||
", uniqueNumber=" + uniqueNumber +
|
|
||||||
", storeType=" + storeType +
|
|
||||||
", uniqueQrcode=" + uniqueQrcode +
|
|
||||||
"}";
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
+6
-189
@@ -6,6 +6,8 @@ import com.baomidou.mybatisplus.annotation.TableField;
|
|||||||
import com.baomidou.mybatisplus.annotation.TableId;
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
import com.baomidou.mybatisplus.annotation.TableName;
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
import com.baomidou.mybatisplus.extension.activerecord.Model;
|
import com.baomidou.mybatisplus.extension.activerecord.Model;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -17,6 +19,7 @@ import java.io.Serializable;
|
|||||||
* @since 2019-09-13
|
* @since 2019-09-13
|
||||||
*/
|
*/
|
||||||
@TableName("store_order_goods")
|
@TableName("store_order_goods")
|
||||||
|
@Data
|
||||||
public class StoreOrderGoods extends Model<StoreOrderGoods> {
|
public class StoreOrderGoods extends Model<StoreOrderGoods> {
|
||||||
|
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
@@ -41,6 +44,9 @@ public class StoreOrderGoods extends Model<StoreOrderGoods> {
|
|||||||
*/
|
*/
|
||||||
@TableField("goods_name")
|
@TableField("goods_name")
|
||||||
private String goodsName;
|
private String goodsName;
|
||||||
|
|
||||||
|
@TableField("goods_logo")
|
||||||
|
private String goodsLogo;
|
||||||
/**
|
/**
|
||||||
* 商品货号
|
* 商品货号
|
||||||
*/
|
*/
|
||||||
@@ -122,194 +128,5 @@ public class StoreOrderGoods extends Model<StoreOrderGoods> {
|
|||||||
private String sku;
|
private String sku;
|
||||||
|
|
||||||
|
|
||||||
public Integer getRecId() {
|
|
||||||
return recId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setRecId(Integer recId) {
|
|
||||||
this.recId = recId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Integer getOrderId() {
|
|
||||||
return orderId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setOrderId(Integer orderId) {
|
|
||||||
this.orderId = orderId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Integer getGoodsId() {
|
|
||||||
return goodsId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setGoodsId(Integer goodsId) {
|
|
||||||
this.goodsId = goodsId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getGoodsName() {
|
|
||||||
return goodsName;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setGoodsName(String goodsName) {
|
|
||||||
this.goodsName = goodsName;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getGoodsSn() {
|
|
||||||
return goodsSn;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setGoodsSn(String goodsSn) {
|
|
||||||
this.goodsSn = goodsSn;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Integer getGoodsNum() {
|
|
||||||
return goodsNum;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setGoodsNum(Integer goodsNum) {
|
|
||||||
this.goodsNum = goodsNum;
|
|
||||||
}
|
|
||||||
|
|
||||||
public BigDecimal getMarketPrice() {
|
|
||||||
return marketPrice;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setMarketPrice(BigDecimal marketPrice) {
|
|
||||||
this.marketPrice = marketPrice;
|
|
||||||
}
|
|
||||||
|
|
||||||
public BigDecimal getGoodsPrice() {
|
|
||||||
return goodsPrice;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setGoodsPrice(BigDecimal goodsPrice) {
|
|
||||||
this.goodsPrice = goodsPrice;
|
|
||||||
}
|
|
||||||
|
|
||||||
public BigDecimal getCostPrice() {
|
|
||||||
return costPrice;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setCostPrice(BigDecimal costPrice) {
|
|
||||||
this.costPrice = costPrice;
|
|
||||||
}
|
|
||||||
|
|
||||||
public BigDecimal getMemberGoodsPrice() {
|
|
||||||
return memberGoodsPrice;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setMemberGoodsPrice(BigDecimal memberGoodsPrice) {
|
|
||||||
this.memberGoodsPrice = memberGoodsPrice;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Integer getGiveIntegral() {
|
|
||||||
return giveIntegral;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setGiveIntegral(Integer giveIntegral) {
|
|
||||||
this.giveIntegral = giveIntegral;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getSpecKey() {
|
|
||||||
return specKey;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setSpecKey(String specKey) {
|
|
||||||
this.specKey = specKey;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getSpecKeyName() {
|
|
||||||
return specKeyName;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setSpecKeyName(String specKeyName) {
|
|
||||||
this.specKeyName = specKeyName;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getBarCode() {
|
|
||||||
return barCode;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setBarCode(String barCode) {
|
|
||||||
this.barCode = barCode;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Integer getIsComment() {
|
|
||||||
return isComment;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setIsComment(Integer isComment) {
|
|
||||||
this.isComment = isComment;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Integer getPromType() {
|
|
||||||
return promType;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setPromType(Integer promType) {
|
|
||||||
this.promType = promType;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Integer getPromId() {
|
|
||||||
return promId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setPromId(Integer promId) {
|
|
||||||
this.promId = promId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Integer getIsSend() {
|
|
||||||
return isSend;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setIsSend(Integer isSend) {
|
|
||||||
this.isSend = isSend;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Integer getDeliveryId() {
|
|
||||||
return deliveryId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setDeliveryId(Integer deliveryId) {
|
|
||||||
this.deliveryId = deliveryId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getSku() {
|
|
||||||
return sku;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setSku(String sku) {
|
|
||||||
this.sku = sku;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
protected Serializable pkVal() {
|
|
||||||
return this.recId;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String toString() {
|
|
||||||
return "StoreOrderGoods{" +
|
|
||||||
", recId=" + recId +
|
|
||||||
", orderId=" + orderId +
|
|
||||||
", goodsId=" + goodsId +
|
|
||||||
", goodsName=" + goodsName +
|
|
||||||
", goodsSn=" + goodsSn +
|
|
||||||
", goodsNum=" + goodsNum +
|
|
||||||
", marketPrice=" + marketPrice +
|
|
||||||
", goodsPrice=" + goodsPrice +
|
|
||||||
", costPrice=" + costPrice +
|
|
||||||
", memberGoodsPrice=" + memberGoodsPrice +
|
|
||||||
", giveIntegral=" + giveIntegral +
|
|
||||||
", specKey=" + specKey +
|
|
||||||
", specKeyName=" + specKeyName +
|
|
||||||
", barCode=" + barCode +
|
|
||||||
", isComment=" + isComment +
|
|
||||||
", promType=" + promType +
|
|
||||||
", promId=" + promId +
|
|
||||||
", isSend=" + isSend +
|
|
||||||
", deliveryId=" + deliveryId +
|
|
||||||
", sku=" + sku +
|
|
||||||
"}";
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@@ -31,4 +31,28 @@ public class OrderUtil {
|
|||||||
String timestamp = String.valueOf(new Date().getTime()/1000);
|
String timestamp = String.valueOf(new Date().getTime()/1000);
|
||||||
return Integer.valueOf(timestamp);
|
return Integer.valueOf(timestamp);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public static int orderStatus(int payStatus,int shippingStatus,int orderStatus){
|
||||||
|
//todo 0-待付款 1-已付款,待发货 2-已发货,待收货 3-退货中 4-退货完成 5-待评价 6-已评价
|
||||||
|
int status = 0;
|
||||||
|
|
||||||
|
if(payStatus == 1 && shippingStatus == 0 && orderStatus == 0){
|
||||||
|
status = 1;
|
||||||
|
}else if(shippingStatus == 1 && orderStatus == 0){
|
||||||
|
status = 2;
|
||||||
|
}else if(shippingStatus == 2) {
|
||||||
|
status = 3;
|
||||||
|
}else if(shippingStatus == 3) {
|
||||||
|
status = 4;
|
||||||
|
}else if (orderStatus == 1){
|
||||||
|
status = 5;
|
||||||
|
}else if (orderStatus == 2){
|
||||||
|
status = 6;
|
||||||
|
}
|
||||||
|
|
||||||
|
return status;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -13,6 +13,9 @@ import com.ruoyi.app.modular.member.service.mapper.MemberMapper;
|
|||||||
//import io.swagger.annotations.Api;
|
//import io.swagger.annotations.Api;
|
||||||
//import io.swagger.annotations.ApiOperation;
|
//import io.swagger.annotations.ApiOperation;
|
||||||
import com.ruoyi.app.modular.member.service.vo.AddressVO;
|
import com.ruoyi.app.modular.member.service.vo.AddressVO;
|
||||||
|
import com.ruoyi.app.modular.shop.service.impl.GoodsServiceImpl;
|
||||||
|
import com.ruoyi.app.modular.shop.service.impl.OrderServiceImpl;
|
||||||
|
import com.ruoyi.app.modular.shop.service.mapper.GoodsMapper;
|
||||||
import com.ruoyi.app.modular.shop.service.vo.PageVO;
|
import com.ruoyi.app.modular.shop.service.vo.PageVO;
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
@@ -37,6 +40,9 @@ public class UserController {
|
|||||||
private final IMemberService memberService;
|
private final IMemberService memberService;
|
||||||
private final MemberMapper memberMapper;
|
private final MemberMapper memberMapper;
|
||||||
private final AddressServiceImpl addressService;
|
private final AddressServiceImpl addressService;
|
||||||
|
private final GoodsServiceImpl goodsService;
|
||||||
|
private final GoodsMapper goodsMapper;
|
||||||
|
private final OrderServiceImpl orderService;
|
||||||
|
|
||||||
@GetMapping(value = "/shop/user-my-info")
|
@GetMapping(value = "/shop/user-my-info")
|
||||||
@ApiOperation(value = "我的个人信息",notes = "我的个人信息")
|
@ApiOperation(value = "我的个人信息",notes = "我的个人信息")
|
||||||
@@ -69,6 +75,74 @@ public class UserController {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@PostMapping(value = "/shop/user-address-del")
|
||||||
|
@ApiOperation(value = "删除地址",notes = "删除地址")
|
||||||
|
public R delAddress(@RequestParam(value = "address_id",defaultValue = "0") int addressId){
|
||||||
|
|
||||||
|
boolean result = addressService.removeById(addressId);
|
||||||
|
if(result){
|
||||||
|
return R.success("操作成功");
|
||||||
|
}else{
|
||||||
|
return R.error(4000,"操作失败");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@GetMapping(value = "/shop/user-my-coupons")
|
||||||
|
@ApiOperation(value = "我的优惠券",notes = "我的优惠券")
|
||||||
|
public R myCoupons(@RequestParam(value = "orderTotalPrice",defaultValue = "0") double orderTotalPrice){
|
||||||
|
int userId = userOperator.getUser().getId();
|
||||||
|
return R.success(memberService.couponList(userId,orderTotalPrice));
|
||||||
|
}
|
||||||
|
|
||||||
|
@GetMapping(value = "/shop/user-my-collects")
|
||||||
|
@ApiOperation(value = "我的收藏列表",notes = "我的收藏列表")
|
||||||
|
public R myCollect(@Validated @RequestBody PageVO pageVO){
|
||||||
|
int userId = userOperator.getUser().getId();
|
||||||
|
return R.success(goodsMapper.toDto(goodsService
|
||||||
|
.collectGoods(pageVO.getPage(),pageVO.getLimit(),userId)));
|
||||||
|
}
|
||||||
|
|
||||||
|
@GetMapping(value = "/shop/user-order-list")
|
||||||
|
@ApiOperation(value = "订单列表",notes = "订单列表")
|
||||||
|
public R orderList(@RequestParam(value = "status",defaultValue = "0") int status,
|
||||||
|
@RequestParam(value = "page",defaultValue = "1") int page,
|
||||||
|
@RequestParam(value = "limit",defaultValue = "10") int limit){
|
||||||
|
|
||||||
|
int userId = userOperator.getUser().getId();
|
||||||
|
return R.success(orderService.orderList(status,userId,page,limit));
|
||||||
|
}
|
||||||
|
|
||||||
|
@GetMapping(value = "/shop/user-order-detail")
|
||||||
|
@ApiOperation(value = "订单详情",notes = "订单详情")
|
||||||
|
public R orderDetail(@RequestParam(value = "order_id",defaultValue = "0") String orderId){
|
||||||
|
int userId = userOperator.getUser().getId();
|
||||||
|
|
||||||
|
return R.success(orderService.orderDetail(orderId,userId));
|
||||||
|
}
|
||||||
|
|
||||||
|
@PostMapping(value = "/shop/user-order-handle")
|
||||||
|
@ApiOperation(value = "订单操作",notes = "订单操作")
|
||||||
|
public R handleOrder(@RequestParam(value = "order_id",defaultValue = "0") int orderId,
|
||||||
|
@RequestParam(value = "type",defaultValue = "1") int type){
|
||||||
|
int userId = userOperator.getUser().getId();
|
||||||
|
orderService.orderHandle(orderId,type,userId);
|
||||||
|
return R.success("操作成功");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@GetMapping(value = "/shop/user-points-money-logs")
|
||||||
|
@ApiOperation(value = "获取积分或者余额流水",notes = "获取积分或者余额流水")
|
||||||
|
public R pointsMoneyLogs(@RequestParam(value = "type",defaultValue = "1") int type,
|
||||||
|
@RequestParam(value = "page",defaultValue = "1") int page,
|
||||||
|
@RequestParam(value = "limit",defaultValue = "10") int limit){
|
||||||
|
|
||||||
|
int userId = userOperator.getUser().getId();
|
||||||
|
return R.success(orderService.pointsMoneyLogs(type,userId,page,limit));
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ package com.ruoyi.app.modular.member.service;
|
|||||||
import com.baomidou.mybatisplus.extension.service.IService;
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
import com.ruoyi.app.common.persistence.model.StoreMember;
|
import com.ruoyi.app.common.persistence.model.StoreMember;
|
||||||
import com.ruoyi.app.modular.member.service.dto.MemberDTO;
|
import com.ruoyi.app.modular.member.service.dto.MemberDTO;
|
||||||
|
import com.ruoyi.app.modular.shop.service.dto.CouponDTO;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@@ -13,4 +14,7 @@ public interface IMemberService extends IService<StoreMember> {
|
|||||||
StoreMember login(String openid);
|
StoreMember login(String openid);
|
||||||
|
|
||||||
List<MemberDTO> memeberList();
|
List<MemberDTO> memeberList();
|
||||||
|
|
||||||
|
List<CouponDTO> couponList(int userId,double orderTotalPrice);
|
||||||
|
|
||||||
}
|
}
|
||||||
+14
-7
@@ -3,11 +3,14 @@ package com.ruoyi.app.modular.member.service.impl;
|
|||||||
|
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import com.ruoyi.app.common.persistence.dao.StoreCouponMapper;
|
||||||
import com.ruoyi.app.common.persistence.dao.StoreMemberMapper;
|
import com.ruoyi.app.common.persistence.dao.StoreMemberMapper;
|
||||||
import com.ruoyi.app.common.persistence.model.StoreMember;
|
import com.ruoyi.app.common.persistence.model.StoreMember;
|
||||||
import com.ruoyi.app.modular.member.service.IMemberService;
|
import com.ruoyi.app.modular.member.service.IMemberService;
|
||||||
import com.ruoyi.app.modular.member.service.dto.MemberDTO;
|
import com.ruoyi.app.modular.member.service.dto.MemberDTO;
|
||||||
import com.ruoyi.app.modular.member.service.mapper.MemberMapper;
|
import com.ruoyi.app.modular.member.service.mapper.MemberMapper;
|
||||||
|
import com.ruoyi.app.modular.shop.service.dto.CouponDTO;
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
@@ -15,13 +18,12 @@ import javax.annotation.Resource;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@Service
|
@Service
|
||||||
|
@RequiredArgsConstructor(onConstructor = @__(@Autowired))
|
||||||
public class MemberServiceImpl extends ServiceImpl<StoreMemberMapper,StoreMember> implements IMemberService {
|
public class MemberServiceImpl extends ServiceImpl<StoreMemberMapper,StoreMember> implements IMemberService {
|
||||||
|
|
||||||
@Autowired
|
private final StoreMemberMapper storeMemberMapper;
|
||||||
private StoreMemberMapper storeMemberMapper;
|
private final MemberMapper memberMapper;
|
||||||
|
private final StoreCouponMapper storeCouponMapper;
|
||||||
@Autowired
|
|
||||||
private MemberMapper memberMapper;
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public StoreMember login(String openid) {
|
public StoreMember login(String openid) {
|
||||||
@@ -38,8 +40,13 @@ public class MemberServiceImpl extends ServiceImpl<StoreMemberMapper,StoreMember
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<MemberDTO> memeberList() {
|
public List<MemberDTO> memeberList() {
|
||||||
//storeMemberMapper.selectList(null);
|
|
||||||
return memberMapper.toDto(storeMemberMapper.selectList(null));
|
return memberMapper.toDto(storeMemberMapper.selectList(null));
|
||||||
//return null;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<CouponDTO> couponList(int userId, double orderTotalPrice) {
|
||||||
|
return storeCouponMapper.couponList(userId,orderTotalPrice);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -5,7 +5,10 @@ package com.ruoyi.app.modular.shop.service;
|
|||||||
|
|
||||||
import com.baomidou.mybatisplus.extension.service.IService;
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
import com.ruoyi.app.common.persistence.model.StoreOrder;
|
import com.ruoyi.app.common.persistence.model.StoreOrder;
|
||||||
|
import com.ruoyi.app.common.persistence.model.StorePointsMoneyLog;
|
||||||
|
import com.ruoyi.app.modular.shop.service.dto.OrderDTO;
|
||||||
import com.ruoyi.app.modular.shop.service.vo.OrderVo;
|
import com.ruoyi.app.modular.shop.service.vo.OrderVo;
|
||||||
|
import com.ruoyi.app.modular.shop.service.vo.PageVO;
|
||||||
|
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@@ -20,4 +23,13 @@ public interface IOrderService extends IService<StoreOrder> {
|
|||||||
public int checkStore(int goodsId,String spec_key);
|
public int checkStore(int goodsId,String spec_key);
|
||||||
|
|
||||||
public void updateCouponStatus(int id);
|
public void updateCouponStatus(int id);
|
||||||
|
|
||||||
|
public List<OrderDTO> orderList(int status, int userId, int page,int limit);
|
||||||
|
|
||||||
|
public OrderDTO orderDetail(String orderId,int userId);
|
||||||
|
|
||||||
|
public void orderHandle(int orderId,int type,int userId);
|
||||||
|
|
||||||
|
public List<StorePointsMoneyLog> pointsMoneyLogs(int type, int userId, int page,int limit);
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -0,0 +1,85 @@
|
|||||||
|
package com.ruoyi.app.modular.shop.service.dto;
|
||||||
|
|
||||||
|
|
||||||
|
import com.ruoyi.app.common.persistence.model.StoreOrderGoods;
|
||||||
|
import lombok.Data;
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class OrderDTO implements Serializable{
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
|
||||||
|
private Integer orderId;
|
||||||
|
|
||||||
|
private String orderSn;
|
||||||
|
|
||||||
|
private Integer userId;
|
||||||
|
/**
|
||||||
|
* 订单状态 0-未确认 1-已确认(已收货) 2-已评价
|
||||||
|
*/
|
||||||
|
private Integer orderStatus;
|
||||||
|
/**
|
||||||
|
* 发货状态 0-未发货 1-已发货 2-退货中 3-退货完成
|
||||||
|
*/
|
||||||
|
private Integer shippingStatus;
|
||||||
|
/**
|
||||||
|
* 支付状态 0-未支付 1-已支付
|
||||||
|
*/
|
||||||
|
private Integer payStatus;
|
||||||
|
/**
|
||||||
|
* 收货人
|
||||||
|
*/
|
||||||
|
private String consignee;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 地区地址
|
||||||
|
*/
|
||||||
|
private String cityInfo;
|
||||||
|
/**
|
||||||
|
* 地址详细地址
|
||||||
|
*/
|
||||||
|
private String address;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 手机
|
||||||
|
*/
|
||||||
|
private String mobile;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 物流code 单号
|
||||||
|
*/
|
||||||
|
private String shippingCode;
|
||||||
|
/**
|
||||||
|
* 物流名称
|
||||||
|
*/
|
||||||
|
private String shippingName;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 优惠券抵扣
|
||||||
|
*/
|
||||||
|
private BigDecimal couponPrice;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 应付款金额
|
||||||
|
*/
|
||||||
|
private BigDecimal orderAmount;
|
||||||
|
/**
|
||||||
|
* 订单总价
|
||||||
|
*/
|
||||||
|
private BigDecimal totalAmount;
|
||||||
|
|
||||||
|
private List<StoreOrderGoods> goodsList;
|
||||||
|
|
||||||
|
private int status;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -210,6 +210,7 @@ public class GoodsServiceImpl extends ServiceImpl<StoreGoodsMapper, StoreGoods>
|
|||||||
cart.setGoodsName(storeGoods.getGoodsName());
|
cart.setGoodsName(storeGoods.getGoodsName());
|
||||||
cart.setSpecKey(attrVO.getSpecKey());
|
cart.setSpecKey(attrVO.getSpecKey());
|
||||||
cart.setSpecKeyName(storeSpecGoodsPrice.getKeyName());
|
cart.setSpecKeyName(storeSpecGoodsPrice.getKeyName());
|
||||||
|
cart.setGoodsLogo(storeGoods.getGoodsLogo());
|
||||||
|
|
||||||
int result = storeCartMapper.insert(cart);
|
int result = storeCartMapper.insert(cart);
|
||||||
if(result == 0) return false;
|
if(result == 0) return false;
|
||||||
|
|||||||
+161
@@ -5,9 +5,12 @@ package com.ruoyi.app.modular.shop.service.impl;
|
|||||||
|
|
||||||
|
|
||||||
import cn.hutool.core.date.DateUtil;
|
import cn.hutool.core.date.DateUtil;
|
||||||
|
import cn.hutool.core.util.ObjectUtil;
|
||||||
import cn.hutool.core.util.RandomUtil;
|
import cn.hutool.core.util.RandomUtil;
|
||||||
import cn.hutool.core.util.StrUtil;
|
import cn.hutool.core.util.StrUtil;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
import com.itmuch.lightsecurity.exception.LightSecurityException;
|
import com.itmuch.lightsecurity.exception.LightSecurityException;
|
||||||
import com.ruoyi.app.common.persistence.dao.*;
|
import com.ruoyi.app.common.persistence.dao.*;
|
||||||
@@ -15,9 +18,14 @@ import com.ruoyi.app.common.persistence.model.*;
|
|||||||
import com.ruoyi.app.common.utils.OrderUtil;
|
import com.ruoyi.app.common.utils.OrderUtil;
|
||||||
import com.ruoyi.app.modular.shop.service.IOrderService;
|
import com.ruoyi.app.modular.shop.service.IOrderService;
|
||||||
import com.ruoyi.app.modular.shop.service.dto.CouponDTO;
|
import com.ruoyi.app.modular.shop.service.dto.CouponDTO;
|
||||||
|
import com.ruoyi.app.modular.shop.service.dto.GoodsDTO;
|
||||||
|
import com.ruoyi.app.modular.shop.service.dto.OrderDTO;
|
||||||
|
import com.ruoyi.app.modular.shop.service.mapper.GoodsMapper;
|
||||||
|
import com.ruoyi.app.modular.shop.service.mapper.OrderMapper;
|
||||||
import com.ruoyi.app.modular.shop.service.vo.CartAttrVO;
|
import com.ruoyi.app.modular.shop.service.vo.CartAttrVO;
|
||||||
import com.ruoyi.app.modular.shop.service.vo.CartVO;
|
import com.ruoyi.app.modular.shop.service.vo.CartVO;
|
||||||
import com.ruoyi.app.modular.shop.service.vo.OrderVo;
|
import com.ruoyi.app.modular.shop.service.vo.OrderVo;
|
||||||
|
import com.ruoyi.app.modular.shop.service.vo.PageVO;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
@@ -41,6 +49,9 @@ public class OrderServiceImpl extends ServiceImpl<StoreOrderMapper, StoreOrder>
|
|||||||
private final StoreCouponListMapper storeCouponListMapper;
|
private final StoreCouponListMapper storeCouponListMapper;
|
||||||
private final OrderGoodsServiceImpl orderGoodsService;
|
private final OrderGoodsServiceImpl orderGoodsService;
|
||||||
private final GoodsServiceImpl goodsService;
|
private final GoodsServiceImpl goodsService;
|
||||||
|
private final StoreOrderGoodsMapper storeOrderGoodsMapper;
|
||||||
|
private final OrderMapper orderMapper;
|
||||||
|
private final StorePointsMoneyLogMapper storePointsMoneyLogMapper;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 购物车提交
|
* 购物车提交
|
||||||
@@ -124,6 +135,7 @@ public class OrderServiceImpl extends ServiceImpl<StoreOrderMapper, StoreOrder>
|
|||||||
orderGoods.setGoodsNum(cart.getGoodsNum());
|
orderGoods.setGoodsNum(cart.getGoodsNum());
|
||||||
orderGoods.setSpecKey(cart.getSpecKey());
|
orderGoods.setSpecKey(cart.getSpecKey());
|
||||||
orderGoods.setSpecKeyName(cart.getSpecKeyName());
|
orderGoods.setSpecKeyName(cart.getSpecKeyName());
|
||||||
|
orderGoods.setGoodsLogo(cart.getGoodsLogo());
|
||||||
|
|
||||||
orderGoodsList.add(orderGoods);
|
orderGoodsList.add(orderGoods);
|
||||||
}
|
}
|
||||||
@@ -228,6 +240,7 @@ public class OrderServiceImpl extends ServiceImpl<StoreOrderMapper, StoreOrder>
|
|||||||
orderGoods.setGoodsNum(attrVO.getGoodsNum());
|
orderGoods.setGoodsNum(attrVO.getGoodsNum());
|
||||||
orderGoods.setSpecKey(attrVO.getSpecKey());
|
orderGoods.setSpecKey(attrVO.getSpecKey());
|
||||||
orderGoods.setSpecKeyName(specGoodsPrice.getKeyName());
|
orderGoods.setSpecKeyName(specGoodsPrice.getKeyName());
|
||||||
|
orderGoods.setGoodsLogo(storeGoods.getGoodsLogo());
|
||||||
|
|
||||||
orderGoodsList.add(orderGoods);
|
orderGoodsList.add(orderGoods);
|
||||||
|
|
||||||
@@ -257,4 +270,152 @@ public class OrderServiceImpl extends ServiceImpl<StoreOrderMapper, StoreOrder>
|
|||||||
storeCouponListMapper.updateById(storeCouponList);
|
storeCouponListMapper.updateById(storeCouponList);
|
||||||
storeCouponMapper.incUserNum(id);
|
storeCouponMapper.incUserNum(id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 订单列表
|
||||||
|
* @param status
|
||||||
|
* @param userId
|
||||||
|
* @param page
|
||||||
|
* @param limit
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<OrderDTO> orderList(int status, int userId, int page,int limit) {
|
||||||
|
QueryWrapper<StoreOrder> wrapper = new QueryWrapper<>();
|
||||||
|
wrapper.eq("deleted",0).eq("user_id",userId);
|
||||||
|
// 0-全部 1-待付款 2-待发货 3-待收货 4-待评价
|
||||||
|
switch (status){
|
||||||
|
case 1:
|
||||||
|
wrapper.eq("pay_status",0);
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
wrapper.eq("pay_status",1).eq("shipping_status",0).eq("order_status",0);
|
||||||
|
break;
|
||||||
|
case 3:
|
||||||
|
wrapper.eq("shipping_status",1);
|
||||||
|
break;
|
||||||
|
case 4:
|
||||||
|
wrapper.eq("order_status",1);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
Page<StoreOrder> pageModel = new Page<>(page, limit);
|
||||||
|
IPage<StoreOrder> pageList = baseMapper.selectPage(pageModel,wrapper);
|
||||||
|
List<StoreOrder> list = pageList.getRecords();
|
||||||
|
|
||||||
|
|
||||||
|
List<OrderDTO> orderDTOList = new ArrayList<>();
|
||||||
|
for (StoreOrder storeOrder : list) {
|
||||||
|
QueryWrapper<StoreOrderGoods> wrapperGoods = new QueryWrapper<>();
|
||||||
|
wrapperGoods.eq("order_id",storeOrder.getOrderId());
|
||||||
|
List<StoreOrderGoods> storeGoods = storeOrderGoodsMapper.selectList(wrapperGoods);
|
||||||
|
OrderDTO orderDTO = orderMapper.toDto(storeOrder);
|
||||||
|
orderDTO.setGoodsList(storeGoods);
|
||||||
|
//处理订单状态
|
||||||
|
orderDTO.setStatus(OrderUtil.orderStatus(storeOrder.getPayStatus(),
|
||||||
|
storeOrder.getShippingStatus(),storeOrder.getOrderStatus()));
|
||||||
|
|
||||||
|
orderDTOList.add(orderDTO);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
return orderDTOList;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 订单详情
|
||||||
|
* @param orderId
|
||||||
|
* @param userId
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public OrderDTO orderDetail(String orderId,int userId) {
|
||||||
|
QueryWrapper<StoreOrder> wrapper = new QueryWrapper<>();
|
||||||
|
wrapper.eq("deleted",0).eq("user_id",userId).and(
|
||||||
|
i->i.eq("order_id",orderId).or().eq("order_sn",orderId));
|
||||||
|
StoreOrder storeOrder = baseMapper.selectOne(wrapper);
|
||||||
|
|
||||||
|
QueryWrapper<StoreOrderGoods> wrapperGoods = new QueryWrapper<>();
|
||||||
|
wrapperGoods.eq("order_id",storeOrder.getOrderId());
|
||||||
|
List<StoreOrderGoods> orderGoodsList = storeOrderGoodsMapper
|
||||||
|
.selectList(wrapperGoods);
|
||||||
|
OrderDTO orderDTO = orderMapper.toDto(storeOrder);
|
||||||
|
orderDTO.setGoodsList(orderGoodsList);
|
||||||
|
//处理订单状态
|
||||||
|
orderDTO.setStatus(OrderUtil.orderStatus(storeOrder.getPayStatus(),
|
||||||
|
storeOrder.getShippingStatus(),storeOrder.getOrderStatus()));
|
||||||
|
|
||||||
|
return orderDTO;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 操作订单
|
||||||
|
* @param orderId
|
||||||
|
* @param type 操作类型 1-取消订单 2-确认收货 3-退货
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
@Transactional
|
||||||
|
public void orderHandle(int orderId, int type,int userId) {
|
||||||
|
QueryWrapper<StoreOrder> wrapper = new QueryWrapper<>();
|
||||||
|
wrapper.eq("deleted",0).eq("user_id",userId).eq("order_id",orderId);
|
||||||
|
StoreOrder storeOrder = baseMapper.selectOne(wrapper);
|
||||||
|
if(ObjectUtil.isNull(storeOrder)){
|
||||||
|
throw new LightSecurityException("订单不存在");
|
||||||
|
}
|
||||||
|
|
||||||
|
StoreOrder order = new StoreOrder();
|
||||||
|
order.setOrderId(orderId);
|
||||||
|
switch (type){
|
||||||
|
case 1:
|
||||||
|
if(storeOrder.getPayStatus() != 0){
|
||||||
|
throw new LightSecurityException("只有未付款订单才能取消");
|
||||||
|
}
|
||||||
|
order.setDeleted(1);
|
||||||
|
order.setDeletedTime(OrderUtil.getSecondTimestampTwo());
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
if(storeOrder.getShippingStatus() != 1){
|
||||||
|
throw new LightSecurityException("只能操作已经发货订单");
|
||||||
|
}
|
||||||
|
order.setOrderStatus(1);
|
||||||
|
order.setConfirmTime(OrderUtil.getSecondTimestampTwo());
|
||||||
|
break;
|
||||||
|
case 3:
|
||||||
|
if(storeOrder.getShippingStatus() == 1 && storeOrder.getOrderStatus() == 0){
|
||||||
|
throw new LightSecurityException("已发货订单才能操作退货");
|
||||||
|
}
|
||||||
|
order.setShippingStatus(2);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
baseMapper.updateById(order);
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @param type 1-积分 2-余额
|
||||||
|
* @param userId
|
||||||
|
* @param page
|
||||||
|
* @param limit
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<StorePointsMoneyLog> pointsMoneyLogs(int type, int userId, int page, int limit) {
|
||||||
|
QueryWrapper<StorePointsMoneyLog> wrapper = new QueryWrapper<>();
|
||||||
|
wrapper.eq("user_id",userId).orderByDesc("create_time");
|
||||||
|
if(type == 1){
|
||||||
|
wrapper.gt("points_number",0);
|
||||||
|
}else{
|
||||||
|
wrapper.gt("money_number",0);
|
||||||
|
}
|
||||||
|
Page<StorePointsMoneyLog> pageModel = new Page<>(page, limit);
|
||||||
|
IPage<StorePointsMoneyLog> pageList = storePointsMoneyLogMapper.selectPage(pageModel,wrapper);
|
||||||
|
List<StorePointsMoneyLog> list = pageList.getRecords();
|
||||||
|
|
||||||
|
return list;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -0,0 +1,17 @@
|
|||||||
|
package com.ruoyi.app.modular.shop.service.mapper;
|
||||||
|
|
||||||
|
|
||||||
|
import com.ruoyi.app.common.persistence.model.StoreOrder;
|
||||||
|
import com.ruoyi.app.modular.mapper.EntityMapper;
|
||||||
|
import com.ruoyi.app.modular.shop.service.dto.OrderDTO;
|
||||||
|
import org.mapstruct.Mapper;
|
||||||
|
import org.mapstruct.ReportingPolicy;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author hupeng
|
||||||
|
* @date 2019-09-07
|
||||||
|
*/
|
||||||
|
@Mapper(componentModel = "spring",uses = {},unmappedTargetPolicy = ReportingPolicy.IGNORE)
|
||||||
|
public interface OrderMapper extends EntityMapper<OrderDTO, StoreOrder> {
|
||||||
|
|
||||||
|
}
|
||||||
@@ -58,7 +58,7 @@ public class EntityGenerator {
|
|||||||
StrategyConfig strategy = new StrategyConfig();
|
StrategyConfig strategy = new StrategyConfig();
|
||||||
//strategy.setTablePrefix(new String[]{"_"});// 此处可以修改为您的表前缀
|
//strategy.setTablePrefix(new String[]{"_"});// 此处可以修改为您的表前缀
|
||||||
strategy.setNaming(NamingStrategy.underline_to_camel);// 表名生成策略
|
strategy.setNaming(NamingStrategy.underline_to_camel);// 表名生成策略
|
||||||
strategy.setInclude(new String[]{"store_points_money_log","store_comment"});
|
strategy.setInclude(new String[]{"store_order",});
|
||||||
mpg.setStrategy(strategy);
|
mpg.setStrategy(strategy);
|
||||||
|
|
||||||
// 包配置
|
// 包配置
|
||||||
|
|||||||
File diff suppressed because it is too large.
Load diff
Reference in new issue
Block a user