24 changed files with 5275 additions and 17 deletions
@ -0,0 +1,145 @@ |
|||||
|
package cc.hiver.mall.controller; |
||||
|
|
||||
|
import cc.hiver.core.common.utils.BeanUtils; |
||||
|
import cc.hiver.core.common.utils.ResultUtil; |
||||
|
import cc.hiver.core.common.utils.SecurityUtil; |
||||
|
import cc.hiver.core.common.utils.StringUtils; |
||||
|
import cc.hiver.core.common.vo.Result; |
||||
|
import cc.hiver.mall.entity.*; |
||||
|
import cc.hiver.mall.pojo.dto.ReturnSaleDetailDTO; |
||||
|
import cc.hiver.mall.pojo.dto.SaleDTO; |
||||
|
import cc.hiver.mall.pojo.dto.SaleQueryDTO; |
||||
|
import cc.hiver.mall.pojo.dto.SaleReturnDTO; |
||||
|
import cc.hiver.mall.pojo.vo.SaleQueryVO; |
||||
|
import cc.hiver.mall.pojo.vo.SaleVO; |
||||
|
import cc.hiver.mall.service.*; |
||||
|
import cc.hiver.mall.service.mybatis.ReturnDetailService; |
||||
|
import cc.hiver.mall.service.mybatis.ReturnSaleService; |
||||
|
import cc.hiver.mall.service.mybatis.SaleDetailService; |
||||
|
import cc.hiver.mall.service.mybatis.SaleService; |
||||
|
import cn.hutool.core.util.StrUtil; |
||||
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
||||
|
import io.swagger.annotations.Api; |
||||
|
import io.swagger.annotations.ApiOperation; |
||||
|
import io.swagger.annotations.ApiParam; |
||||
|
import lombok.extern.slf4j.Slf4j; |
||||
|
import org.springframework.beans.factory.annotation.Autowired; |
||||
|
import org.springframework.transaction.annotation.Transactional; |
||||
|
import org.springframework.util.ObjectUtils; |
||||
|
import org.springframework.web.bind.annotation.*; |
||||
|
|
||||
|
import java.util.ArrayList; |
||||
|
import java.util.List; |
||||
|
|
||||
|
@Slf4j |
||||
|
@RestController |
||||
|
@Api(tags = "销售订单接口") |
||||
|
@RequestMapping(value = "/hiver/app/return/") |
||||
|
@Transactional |
||||
|
public class ReturnSaleController { |
||||
|
@Autowired |
||||
|
private SalesAndDetailsService salesAndDetailsService; |
||||
|
|
||||
|
@Autowired |
||||
|
private StockAndLogService stockAndLogService; |
||||
|
|
||||
|
@Autowired |
||||
|
private RushOrderService rushOrderService; |
||||
|
|
||||
|
@Autowired |
||||
|
private SendMessageService sendMessageService; |
||||
|
|
||||
|
@Autowired |
||||
|
private SaleService saleService; |
||||
|
|
||||
|
@Autowired |
||||
|
private SaleDetailService saleDetailService; |
||||
|
|
||||
|
@Autowired |
||||
|
private ReturnSaleService returnSaleService; |
||||
|
|
||||
|
@Autowired |
||||
|
private OrderService orderService; |
||||
|
|
||||
|
@Autowired |
||||
|
private ReturnDetailService returnDetailService; |
||||
|
|
||||
|
@Autowired |
||||
|
private SecurityUtil securityUtil; |
||||
|
|
||||
|
|
||||
|
@RequestMapping(value = "/get/{id}", method = RequestMethod.GET) |
||||
|
@ApiOperation(value = "获得订单详情") |
||||
|
public Result<SaleQueryVO> get(@PathVariable String id) { |
||||
|
SaleQueryVO saleQueryVO = new SaleQueryVO(); |
||||
|
Sale sale = saleService.getById(id); |
||||
|
saleQueryVO.setSale(sale); |
||||
|
QueryWrapper<SaleDetail> queryWrapper = new QueryWrapper<>(); |
||||
|
queryWrapper.eq("sale_id",id); |
||||
|
List<SaleDetail> saleDetailList = saleDetailService.list(queryWrapper); |
||||
|
saleQueryVO.setSaleDetailList(saleDetailList); |
||||
|
return new ResultUtil<SaleQueryVO>().setData(saleQueryVO); |
||||
|
} |
||||
|
|
||||
|
@RequestMapping(value = "/rtg", method = RequestMethod.POST) |
||||
|
@ApiOperation(value = "申请退货") |
||||
|
@Transactional |
||||
|
public Result returnGoods(@RequestBody SaleReturnDTO saleReturnDTO) { |
||||
|
|
||||
|
/** |
||||
|
* 1.当前订单未完成不允许退 |
||||
|
* */ |
||||
|
String id = saleReturnDTO.getReturnSale().getSaleId(); |
||||
|
Sale sale = saleService.getById(id); |
||||
|
if(!"5".equals(sale.getStatus())){ |
||||
|
return ResultUtil.error("当前订单未送达,不允许退款!"); |
||||
|
} |
||||
|
/** |
||||
|
* 2.如果存在在途的退货单,不允许再次退货 |
||||
|
* */ |
||||
|
QueryWrapper<ReturnSale> queryWrapper = new QueryWrapper<>(); |
||||
|
queryWrapper.eq("sale_id",sale.getId()); |
||||
|
queryWrapper.ne("status","5"); |
||||
|
List<ReturnSale> returnSaleList = returnSaleService.list(queryWrapper); |
||||
|
if(returnSaleList.size()>0){ |
||||
|
return ResultUtil.error("当前有未完成的退货单,不允许退款"); |
||||
|
} |
||||
|
//1.登记退款表及退款明细表
|
||||
|
ReturnSale returnSale = salesAndDetailsService.handleBackSalesDetails(saleReturnDTO); |
||||
|
saleReturnDTO.setReturnSale(returnSale); |
||||
|
//2.如果不选择物流公司--默认为自取运送,否则进入处理退款抢单模块
|
||||
|
if(StrUtil.isNotEmpty(saleReturnDTO.getTransCompany())){ |
||||
|
rushOrderService.handleReturnRushOrder(saleReturnDTO); |
||||
|
} |
||||
|
//3.消息推送模块--退货抢单(目前只给已选择抢单的人员推送通知)
|
||||
|
if(StrUtil.isNotEmpty(saleReturnDTO.getOrderByWorker())) |
||||
|
sendMessageService.handleSendAppMessage(saleReturnDTO.getOrderByWorker()); |
||||
|
|
||||
|
return ResultUtil.success("申请退货成功!"); |
||||
|
} |
||||
|
|
||||
|
@RequestMapping(value = "/ConfirmRtg/{id}", method = RequestMethod.GET) |
||||
|
@ApiOperation(value = "确认退货") |
||||
|
@Transactional |
||||
|
public Result ConfirmRtq(@ApiParam("退货单Id") @PathVariable String id) { |
||||
|
|
||||
|
/** |
||||
|
* 1.确认退货的前提是如果存在拉包工,那么拉包工必须已完成送达才可以退,否则可以直接退货 |
||||
|
* 2.确认退货后根据库存直接扣减入库明细 |
||||
|
* */ |
||||
|
OrderXd orderXd = orderService.findById(id); |
||||
|
if(orderXd != null && !"5".equals(orderXd.getOrderStatus())){ |
||||
|
return ResultUtil.error("当前退货订单还未送达,不能点击确认退货!"); |
||||
|
}else { |
||||
|
//处理库存模块
|
||||
|
QueryWrapper<ReturnDetail> queryWrapper = new QueryWrapper<>(); |
||||
|
queryWrapper.eq("return_sale_id",id); |
||||
|
List<ReturnDetail> returnDetails = returnDetailService.list(queryWrapper); |
||||
|
List<ReturnSaleDetailDTO> returnSaleDetailDTO = new ArrayList<>(); |
||||
|
BeanUtils.copyBeanProp(returnSaleDetailDTO,returnDetails); |
||||
|
stockAndLogService.handleRetIncStockLog(returnSaleDetailDTO); |
||||
|
return ResultUtil.error("确认收货成功!"); |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
} |
||||
@ -0,0 +1,35 @@ |
|||||
|
package cc.hiver.mall.dao.mapper; |
||||
|
|
||||
|
import cc.hiver.mall.entity.ReturnDetail; |
||||
|
import cc.hiver.mall.entity.ReturnDetailExample; |
||||
|
import cc.hiver.mall.entity.Sale; |
||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
||||
|
import org.apache.ibatis.annotations.Param; |
||||
|
import org.springframework.stereotype.Repository; |
||||
|
|
||||
|
import java.util.List; |
||||
|
|
||||
|
@Repository |
||||
|
public interface ReturnDetailMapper extends BaseMapper<ReturnDetail> { |
||||
|
long countByExample(ReturnDetailExample example); |
||||
|
|
||||
|
int deleteByExample(ReturnDetailExample example); |
||||
|
|
||||
|
int deleteByPrimaryKey(String id); |
||||
|
|
||||
|
int insert(ReturnDetail record); |
||||
|
|
||||
|
int insertSelective(ReturnDetail record); |
||||
|
|
||||
|
List<ReturnDetail> selectByExample(ReturnDetailExample example); |
||||
|
|
||||
|
ReturnDetail selectByPrimaryKey(String id); |
||||
|
|
||||
|
int updateByExampleSelective(@Param("record") ReturnDetail record, @Param("example") ReturnDetailExample example); |
||||
|
|
||||
|
int updateByExample(@Param("record") ReturnDetail record, @Param("example") ReturnDetailExample example); |
||||
|
|
||||
|
int updateByPrimaryKeySelective(ReturnDetail record); |
||||
|
|
||||
|
int updateByPrimaryKey(ReturnDetail record); |
||||
|
} |
||||
@ -0,0 +1,34 @@ |
|||||
|
package cc.hiver.mall.dao.mapper; |
||||
|
|
||||
|
import cc.hiver.mall.entity.ReturnDetail; |
||||
|
import cc.hiver.mall.entity.ReturnSale; |
||||
|
import cc.hiver.mall.entity.ReturnSaleExample; |
||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
||||
|
import org.apache.ibatis.annotations.Param; |
||||
|
import org.springframework.stereotype.Repository; |
||||
|
|
||||
|
import java.util.List; |
||||
|
@Repository |
||||
|
public interface ReturnSaleMapper extends BaseMapper<ReturnSale> { |
||||
|
long countByExample(ReturnSaleExample example); |
||||
|
|
||||
|
int deleteByExample(ReturnSaleExample example); |
||||
|
|
||||
|
int deleteByPrimaryKey(String id); |
||||
|
|
||||
|
int insert(ReturnSale record); |
||||
|
|
||||
|
int insertSelective(ReturnSale record); |
||||
|
|
||||
|
List<ReturnSale> selectByExample(ReturnSaleExample example); |
||||
|
|
||||
|
ReturnSale selectByPrimaryKey(String id); |
||||
|
|
||||
|
int updateByExampleSelective(@Param("record") ReturnSale record, @Param("example") ReturnSaleExample example); |
||||
|
|
||||
|
int updateByExample(@Param("record") ReturnSale record, @Param("example") ReturnSaleExample example); |
||||
|
|
||||
|
int updateByPrimaryKeySelective(ReturnSale record); |
||||
|
|
||||
|
int updateByPrimaryKey(ReturnSale record); |
||||
|
} |
||||
@ -0,0 +1,267 @@ |
|||||
|
package cc.hiver.mall.entity; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.annotation.TableName; |
||||
|
import io.swagger.annotations.ApiModel; |
||||
|
import io.swagger.annotations.ApiModelProperty; |
||||
|
|
||||
|
import java.io.Serializable; |
||||
|
import java.math.BigDecimal; |
||||
|
import java.util.Date; |
||||
|
|
||||
|
@ApiModel(value = "退货单明细表") |
||||
|
@TableName(value = "t_return_detail", autoResultMap = true) |
||||
|
public class ReturnDetail implements Serializable { |
||||
|
private String id; |
||||
|
|
||||
|
private String createBy; |
||||
|
|
||||
|
private Date createTime; |
||||
|
|
||||
|
private Integer delFlag; |
||||
|
|
||||
|
private String updateBy; |
||||
|
|
||||
|
private Date updateTime; |
||||
|
|
||||
|
@ApiModelProperty(value = "销售单ID") |
||||
|
private String saleId; |
||||
|
|
||||
|
@ApiModelProperty(value = "退货单ID") |
||||
|
private String ReturnSaleId; |
||||
|
|
||||
|
@ApiModelProperty(value = "商品ID") |
||||
|
private String productId; |
||||
|
|
||||
|
@ApiModelProperty(value = "商品名称") |
||||
|
private String productName; |
||||
|
|
||||
|
@ApiModelProperty(value = "单位") |
||||
|
private String unit; |
||||
|
|
||||
|
@ApiModelProperty(value = "店铺ID") |
||||
|
private String shopId; |
||||
|
|
||||
|
@ApiModelProperty(value = "商品分类") |
||||
|
private String categoryId; |
||||
|
|
||||
|
@ApiModelProperty(value = "商品属性列表") |
||||
|
private String attributeList; |
||||
|
|
||||
|
@ApiModelProperty(value = "市场价") |
||||
|
private BigDecimal price; |
||||
|
|
||||
|
@ApiModelProperty(value = "采购价") |
||||
|
private BigDecimal purchasePrice; |
||||
|
|
||||
|
@ApiModelProperty(value = "批发价") |
||||
|
private BigDecimal wholesalePrice; |
||||
|
|
||||
|
@ApiModelProperty(value = "销售数量") |
||||
|
private Integer productCount; |
||||
|
|
||||
|
@ApiModelProperty(value = "折扣") |
||||
|
private BigDecimal discount; |
||||
|
|
||||
|
@ApiModelProperty(value = "优惠金额") |
||||
|
private BigDecimal discountAmount; |
||||
|
|
||||
|
@ApiModelProperty(value = "实际价格") |
||||
|
private BigDecimal realPrice; |
||||
|
|
||||
|
private static final long serialVersionUID = 1L; |
||||
|
|
||||
|
public String getId() { |
||||
|
return id; |
||||
|
} |
||||
|
|
||||
|
public void setId(String id) { |
||||
|
this.id = id; |
||||
|
} |
||||
|
|
||||
|
public String getCreateBy() { |
||||
|
return createBy; |
||||
|
} |
||||
|
|
||||
|
public void setCreateBy(String createBy) { |
||||
|
this.createBy = createBy; |
||||
|
} |
||||
|
|
||||
|
public Date getCreateTime() { |
||||
|
return createTime; |
||||
|
} |
||||
|
|
||||
|
public void setCreateTime(Date createTime) { |
||||
|
this.createTime = createTime; |
||||
|
} |
||||
|
|
||||
|
public Integer getDelFlag() { |
||||
|
return delFlag; |
||||
|
} |
||||
|
|
||||
|
public void setDelFlag(Integer delFlag) { |
||||
|
this.delFlag = delFlag; |
||||
|
} |
||||
|
|
||||
|
public String getUpdateBy() { |
||||
|
return updateBy; |
||||
|
} |
||||
|
|
||||
|
public void setUpdateBy(String updateBy) { |
||||
|
this.updateBy = updateBy; |
||||
|
} |
||||
|
|
||||
|
public Date getUpdateTime() { |
||||
|
return updateTime; |
||||
|
} |
||||
|
|
||||
|
public void setUpdateTime(Date updateTime) { |
||||
|
this.updateTime = updateTime; |
||||
|
} |
||||
|
|
||||
|
public String getSaleId() { |
||||
|
return saleId; |
||||
|
} |
||||
|
|
||||
|
public void setSaleId(String saleId) { |
||||
|
this.saleId = saleId; |
||||
|
} |
||||
|
|
||||
|
public String getProductId() { |
||||
|
return productId; |
||||
|
} |
||||
|
|
||||
|
public void setProductId(String productId) { |
||||
|
this.productId = productId; |
||||
|
} |
||||
|
|
||||
|
public String getProductName() { |
||||
|
return productName; |
||||
|
} |
||||
|
|
||||
|
public void setProductName(String productName) { |
||||
|
this.productName = productName; |
||||
|
} |
||||
|
|
||||
|
public String getUnit() { |
||||
|
return unit; |
||||
|
} |
||||
|
|
||||
|
public void setUnit(String unit) { |
||||
|
this.unit = unit; |
||||
|
} |
||||
|
|
||||
|
public String getShopId() { |
||||
|
return shopId; |
||||
|
} |
||||
|
|
||||
|
public void setShopId(String shopId) { |
||||
|
this.shopId = shopId; |
||||
|
} |
||||
|
|
||||
|
public String getCategoryId() { |
||||
|
return categoryId; |
||||
|
} |
||||
|
|
||||
|
public void setCategoryId(String categoryId) { |
||||
|
this.categoryId = categoryId; |
||||
|
} |
||||
|
|
||||
|
public String getAttributeList() { |
||||
|
return attributeList; |
||||
|
} |
||||
|
|
||||
|
public void setAttributeList(String attributeList) { |
||||
|
this.attributeList = attributeList; |
||||
|
} |
||||
|
|
||||
|
public BigDecimal getPrice() { |
||||
|
return price; |
||||
|
} |
||||
|
|
||||
|
public void setPrice(BigDecimal price) { |
||||
|
this.price = price; |
||||
|
} |
||||
|
|
||||
|
public BigDecimal getPurchasePrice() { |
||||
|
return purchasePrice; |
||||
|
} |
||||
|
|
||||
|
public void setPurchasePrice(BigDecimal purchasePrice) { |
||||
|
this.purchasePrice = purchasePrice; |
||||
|
} |
||||
|
|
||||
|
public BigDecimal getWholesalePrice() { |
||||
|
return wholesalePrice; |
||||
|
} |
||||
|
|
||||
|
public void setWholesalePrice(BigDecimal wholesalePrice) { |
||||
|
this.wholesalePrice = wholesalePrice; |
||||
|
} |
||||
|
|
||||
|
public Integer getProductCount() { |
||||
|
return productCount; |
||||
|
} |
||||
|
|
||||
|
public void setProductCount(Integer productCount) { |
||||
|
this.productCount = productCount; |
||||
|
} |
||||
|
|
||||
|
public BigDecimal getDiscount() { |
||||
|
return discount; |
||||
|
} |
||||
|
|
||||
|
public void setDiscount(BigDecimal discount) { |
||||
|
this.discount = discount; |
||||
|
} |
||||
|
|
||||
|
public BigDecimal getDiscountAmount() { |
||||
|
return discountAmount; |
||||
|
} |
||||
|
|
||||
|
public void setDiscountAmount(BigDecimal discountAmount) { |
||||
|
this.discountAmount = discountAmount; |
||||
|
} |
||||
|
|
||||
|
public BigDecimal getRealPrice() { |
||||
|
return realPrice; |
||||
|
} |
||||
|
|
||||
|
public void setRealPrice(BigDecimal realPrice) { |
||||
|
this.realPrice = realPrice; |
||||
|
} |
||||
|
|
||||
|
public String getReturnSaleId() { |
||||
|
return ReturnSaleId; |
||||
|
} |
||||
|
|
||||
|
public void setReturnSaleId(String returnSaleId) { |
||||
|
ReturnSaleId = returnSaleId; |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public String toString() { |
||||
|
return "ReturnDetail{" + |
||||
|
"id='" + id + '\'' + |
||||
|
", createBy='" + createBy + '\'' + |
||||
|
", createTime=" + createTime + |
||||
|
", delFlag=" + delFlag + |
||||
|
", updateBy='" + updateBy + '\'' + |
||||
|
", updateTime=" + updateTime + |
||||
|
", saleId='" + saleId + '\'' + |
||||
|
", ReturnSaleId='" + ReturnSaleId + '\'' + |
||||
|
", productId='" + productId + '\'' + |
||||
|
", productName='" + productName + '\'' + |
||||
|
", unit='" + unit + '\'' + |
||||
|
", shopId='" + shopId + '\'' + |
||||
|
", categoryId='" + categoryId + '\'' + |
||||
|
", attributeList='" + attributeList + '\'' + |
||||
|
", price=" + price + |
||||
|
", purchasePrice=" + purchasePrice + |
||||
|
", wholesalePrice=" + wholesalePrice + |
||||
|
", productCount=" + productCount + |
||||
|
", discount=" + discount + |
||||
|
", discountAmount=" + discountAmount + |
||||
|
", realPrice=" + realPrice + |
||||
|
'}'; |
||||
|
} |
||||
|
} |
||||
File diff suppressed because it is too large
@ -0,0 +1,295 @@ |
|||||
|
package cc.hiver.mall.entity; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.annotation.TableName; |
||||
|
import io.swagger.annotations.ApiModel; |
||||
|
import io.swagger.annotations.ApiModelProperty; |
||||
|
|
||||
|
import java.io.Serializable; |
||||
|
import java.math.BigDecimal; |
||||
|
import java.util.Date; |
||||
|
|
||||
|
@ApiModel(value = "退货单主表") |
||||
|
@TableName(value = "t_return_sale", autoResultMap = true) |
||||
|
public class ReturnSale implements Serializable { |
||||
|
private String id; |
||||
|
|
||||
|
private String saleId; |
||||
|
|
||||
|
private String createBy; |
||||
|
|
||||
|
private Date createTime; |
||||
|
|
||||
|
private Integer delFlag; |
||||
|
|
||||
|
private String updateBy; |
||||
|
|
||||
|
private Date updateTime; |
||||
|
|
||||
|
@ApiModelProperty(value = "客户ID") |
||||
|
private String userId; |
||||
|
|
||||
|
@ApiModelProperty(value = "店铺ID") |
||||
|
private String shopId; |
||||
|
|
||||
|
@ApiModelProperty(value = "订单金额") |
||||
|
private BigDecimal totalAmount; |
||||
|
|
||||
|
@ApiModelProperty(value = "折扣") |
||||
|
private BigDecimal discount; |
||||
|
|
||||
|
@ApiModelProperty(value = "优惠金额") |
||||
|
private BigDecimal discountAmount; |
||||
|
|
||||
|
@ApiModelProperty(value = "实收金额") |
||||
|
private BigDecimal realAmount; |
||||
|
|
||||
|
@ApiModelProperty(value = "已收") |
||||
|
private BigDecimal alreadyEarn; |
||||
|
|
||||
|
@ApiModelProperty(value = "未收") |
||||
|
private BigDecimal noEarn; |
||||
|
|
||||
|
@ApiModelProperty(value = "收款状态 0-未收款 1-已收款") |
||||
|
private String payStatus; |
||||
|
|
||||
|
@ApiModelProperty(value = "订单状态 0-拣货中 1-已提交抢单 2-已取货 3-已送达") |
||||
|
private String status; |
||||
|
|
||||
|
@ApiModelProperty(value = "物流类别 0-物流 1-快递 2-自提 3-拼单") |
||||
|
private String transportType; |
||||
|
|
||||
|
@ApiModelProperty(value = "拼单店铺地址 为拼单类别时手动输入") |
||||
|
private String shareAddress; |
||||
|
|
||||
|
@ApiModelProperty(value = "收货地址") |
||||
|
private String receiveAddress; |
||||
|
|
||||
|
@ApiModelProperty(value = "省") |
||||
|
private String province; |
||||
|
|
||||
|
@ApiModelProperty(value = "市") |
||||
|
private String city; |
||||
|
|
||||
|
@ApiModelProperty(value = "区县") |
||||
|
private String area; |
||||
|
|
||||
|
private static final long serialVersionUID = 1L; |
||||
|
|
||||
|
public String getId() { |
||||
|
return id; |
||||
|
} |
||||
|
|
||||
|
public void setId(String id) { |
||||
|
this.id = id; |
||||
|
} |
||||
|
|
||||
|
public String getSaleId() { |
||||
|
return saleId; |
||||
|
} |
||||
|
|
||||
|
public void setSaleId(String saleId) { |
||||
|
this.saleId = saleId; |
||||
|
} |
||||
|
|
||||
|
public String getCreateBy() { |
||||
|
return createBy; |
||||
|
} |
||||
|
|
||||
|
public void setCreateBy(String createBy) { |
||||
|
this.createBy = createBy; |
||||
|
} |
||||
|
|
||||
|
public Date getCreateTime() { |
||||
|
return createTime; |
||||
|
} |
||||
|
|
||||
|
public void setCreateTime(Date createTime) { |
||||
|
this.createTime = createTime; |
||||
|
} |
||||
|
|
||||
|
public Integer getDelFlag() { |
||||
|
return delFlag; |
||||
|
} |
||||
|
|
||||
|
public void setDelFlag(Integer delFlag) { |
||||
|
this.delFlag = delFlag; |
||||
|
} |
||||
|
|
||||
|
public String getUpdateBy() { |
||||
|
return updateBy; |
||||
|
} |
||||
|
|
||||
|
public void setUpdateBy(String updateBy) { |
||||
|
this.updateBy = updateBy; |
||||
|
} |
||||
|
|
||||
|
public Date getUpdateTime() { |
||||
|
return updateTime; |
||||
|
} |
||||
|
|
||||
|
public void setUpdateTime(Date updateTime) { |
||||
|
this.updateTime = updateTime; |
||||
|
} |
||||
|
|
||||
|
public String getUserId() { |
||||
|
return userId; |
||||
|
} |
||||
|
|
||||
|
public void setUserId(String userId) { |
||||
|
this.userId = userId; |
||||
|
} |
||||
|
|
||||
|
public String getShopId() { |
||||
|
return shopId; |
||||
|
} |
||||
|
|
||||
|
public void setShopId(String shopId) { |
||||
|
this.shopId = shopId; |
||||
|
} |
||||
|
|
||||
|
public BigDecimal getTotalAmount() { |
||||
|
return totalAmount; |
||||
|
} |
||||
|
|
||||
|
public void setTotalAmount(BigDecimal totalAmount) { |
||||
|
this.totalAmount = totalAmount; |
||||
|
} |
||||
|
|
||||
|
public BigDecimal getDiscount() { |
||||
|
return discount; |
||||
|
} |
||||
|
|
||||
|
public void setDiscount(BigDecimal discount) { |
||||
|
this.discount = discount; |
||||
|
} |
||||
|
|
||||
|
public BigDecimal getDiscountAmount() { |
||||
|
return discountAmount; |
||||
|
} |
||||
|
|
||||
|
public void setDiscountAmount(BigDecimal discountAmount) { |
||||
|
this.discountAmount = discountAmount; |
||||
|
} |
||||
|
|
||||
|
public BigDecimal getRealAmount() { |
||||
|
return realAmount; |
||||
|
} |
||||
|
|
||||
|
public void setRealAmount(BigDecimal realAmount) { |
||||
|
this.realAmount = realAmount; |
||||
|
} |
||||
|
|
||||
|
public BigDecimal getAlreadyEarn() { |
||||
|
return alreadyEarn; |
||||
|
} |
||||
|
|
||||
|
public void setAlreadyEarn(BigDecimal alreadyEarn) { |
||||
|
this.alreadyEarn = alreadyEarn; |
||||
|
} |
||||
|
|
||||
|
public BigDecimal getNoEarn() { |
||||
|
return noEarn; |
||||
|
} |
||||
|
|
||||
|
public void setNoEarn(BigDecimal noEarn) { |
||||
|
this.noEarn = noEarn; |
||||
|
} |
||||
|
|
||||
|
public String getPayStatus() { |
||||
|
return payStatus; |
||||
|
} |
||||
|
|
||||
|
public void setPayStatus(String payStatus) { |
||||
|
this.payStatus = payStatus; |
||||
|
} |
||||
|
|
||||
|
public String getStatus() { |
||||
|
return status; |
||||
|
} |
||||
|
|
||||
|
public void setStatus(String status) { |
||||
|
this.status = status; |
||||
|
} |
||||
|
|
||||
|
public String getTransportType() { |
||||
|
return transportType; |
||||
|
} |
||||
|
|
||||
|
public void setTransportType(String transportType) { |
||||
|
this.transportType = transportType; |
||||
|
} |
||||
|
|
||||
|
public String getShareAddress() { |
||||
|
return shareAddress; |
||||
|
} |
||||
|
|
||||
|
public void setShareAddress(String shareAddress) { |
||||
|
this.shareAddress = shareAddress; |
||||
|
} |
||||
|
|
||||
|
public String getReceiveAddress() { |
||||
|
return receiveAddress; |
||||
|
} |
||||
|
|
||||
|
public void setReceiveAddress(String receiveAddress) { |
||||
|
this.receiveAddress = receiveAddress; |
||||
|
} |
||||
|
|
||||
|
public String getProvince() { |
||||
|
return province; |
||||
|
} |
||||
|
|
||||
|
public void setProvince(String province) { |
||||
|
this.province = province; |
||||
|
} |
||||
|
|
||||
|
public String getCity() { |
||||
|
return city; |
||||
|
} |
||||
|
|
||||
|
public void setCity(String city) { |
||||
|
this.city = city; |
||||
|
} |
||||
|
|
||||
|
public String getArea() { |
||||
|
return area; |
||||
|
} |
||||
|
|
||||
|
public void setArea(String area) { |
||||
|
this.area = area; |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public String toString() { |
||||
|
StringBuilder sb = new StringBuilder(); |
||||
|
sb.append(getClass().getSimpleName()); |
||||
|
sb.append(" ["); |
||||
|
sb.append("Hash = ").append(hashCode()); |
||||
|
sb.append(", id=").append(id); |
||||
|
sb.append(", saleId=").append(saleId); |
||||
|
sb.append(", createBy=").append(createBy); |
||||
|
sb.append(", createTime=").append(createTime); |
||||
|
sb.append(", delFlag=").append(delFlag); |
||||
|
sb.append(", updateBy=").append(updateBy); |
||||
|
sb.append(", updateTime=").append(updateTime); |
||||
|
sb.append(", userId=").append(userId); |
||||
|
sb.append(", shopId=").append(shopId); |
||||
|
sb.append(", totalAmount=").append(totalAmount); |
||||
|
sb.append(", discount=").append(discount); |
||||
|
sb.append(", discountAmount=").append(discountAmount); |
||||
|
sb.append(", realAmount=").append(realAmount); |
||||
|
sb.append(", alreadyEarn=").append(alreadyEarn); |
||||
|
sb.append(", noEarn=").append(noEarn); |
||||
|
sb.append(", payStatus=").append(payStatus); |
||||
|
sb.append(", status=").append(status); |
||||
|
sb.append(", transportType=").append(transportType); |
||||
|
sb.append(", shareAddress=").append(shareAddress); |
||||
|
sb.append(", receiveAddress=").append(receiveAddress); |
||||
|
sb.append(", province=").append(province); |
||||
|
sb.append(", city=").append(city); |
||||
|
sb.append(", area=").append(area); |
||||
|
sb.append(", serialVersionUID=").append(serialVersionUID); |
||||
|
sb.append("]"); |
||||
|
return sb.toString(); |
||||
|
} |
||||
|
} |
||||
File diff suppressed because it is too large
@ -0,0 +1,66 @@ |
|||||
|
package cc.hiver.mall.pojo.dto; |
||||
|
|
||||
|
import io.swagger.annotations.ApiModel; |
||||
|
import io.swagger.annotations.ApiModelProperty; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
import java.io.Serializable; |
||||
|
import java.math.BigDecimal; |
||||
|
import java.util.List; |
||||
|
|
||||
|
@ApiModel(value = "退货单明细表") |
||||
|
@Data |
||||
|
public class ReturnSaleDetailDTO implements Serializable { |
||||
|
|
||||
|
@ApiModelProperty(value = "原销售单ID") |
||||
|
private String saleId; |
||||
|
|
||||
|
@ApiModelProperty(value = "退货单ID") |
||||
|
private String returnSaleId; |
||||
|
|
||||
|
@ApiModelProperty(value = "商品ID") |
||||
|
private String productId; |
||||
|
|
||||
|
@ApiModelProperty(value = "商品名称") |
||||
|
private String productName; |
||||
|
|
||||
|
@ApiModelProperty(value = "单位") |
||||
|
private String unit; |
||||
|
|
||||
|
@ApiModelProperty(value = "店铺ID") |
||||
|
private String shopId; |
||||
|
|
||||
|
@ApiModelProperty(value = "商品分类") |
||||
|
private String categoryId; |
||||
|
|
||||
|
@ApiModelProperty(value = "同一件商品购买属性列表") |
||||
|
private List<SaleDetailQueryDTO> saleDetailQueryDTO; |
||||
|
|
||||
|
@ApiModelProperty(value = "属性列表") |
||||
|
private String attributeList; |
||||
|
|
||||
|
@ApiModelProperty(value = "市场价") |
||||
|
private BigDecimal price; |
||||
|
|
||||
|
@ApiModelProperty(value = "采购价") |
||||
|
private BigDecimal purchasePrice; |
||||
|
|
||||
|
@ApiModelProperty(value = "批发价") |
||||
|
private BigDecimal wholesalePrice; |
||||
|
|
||||
|
@ApiModelProperty(value = "销售数量") |
||||
|
private Integer productCount; |
||||
|
|
||||
|
@ApiModelProperty(value = "折扣") |
||||
|
private BigDecimal discount; |
||||
|
|
||||
|
@ApiModelProperty(value = "优惠金额") |
||||
|
private BigDecimal discountAmount; |
||||
|
|
||||
|
@ApiModelProperty(value = "实际价格") |
||||
|
private BigDecimal realPrice; |
||||
|
|
||||
|
private static final long serialVersionUID = 1L; |
||||
|
|
||||
|
|
||||
|
} |
||||
@ -0,0 +1,30 @@ |
|||||
|
package cc.hiver.mall.pojo.dto; |
||||
|
|
||||
|
import cc.hiver.mall.entity.ReturnSale; |
||||
|
import cc.hiver.mall.entity.Sale; |
||||
|
import io.swagger.annotations.ApiModel; |
||||
|
import io.swagger.annotations.ApiModelProperty; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
import java.io.Serializable; |
||||
|
import java.util.List; |
||||
|
|
||||
|
@ApiModel(value = "退款订单") |
||||
|
@Data |
||||
|
public class SaleReturnDTO implements Serializable { |
||||
|
|
||||
|
@ApiModelProperty(value = "退货单主表") |
||||
|
private ReturnSale returnSale; |
||||
|
|
||||
|
@ApiModelProperty(value = "退款订单明细") |
||||
|
private List<ReturnSaleDetailDTO> returnSaleDetailList; |
||||
|
|
||||
|
|
||||
|
@ApiModelProperty(value = "扛包工编号") |
||||
|
private String orderByWorker; |
||||
|
|
||||
|
@ApiModelProperty(value = "物流公司编号") |
||||
|
private String transCompany; |
||||
|
|
||||
|
|
||||
|
} |
||||
@ -0,0 +1,10 @@ |
|||||
|
package cc.hiver.mall.service.mybatis; |
||||
|
|
||||
|
import cc.hiver.mall.entity.ReturnDetail; |
||||
|
import com.baomidou.mybatisplus.extension.service.IService; |
||||
|
|
||||
|
public interface ReturnDetailService extends IService<ReturnDetail> { |
||||
|
|
||||
|
|
||||
|
|
||||
|
} |
||||
@ -0,0 +1,11 @@ |
|||||
|
package cc.hiver.mall.service.mybatis; |
||||
|
|
||||
|
import cc.hiver.mall.entity.ReturnSale; |
||||
|
import cc.hiver.mall.entity.Sale; |
||||
|
import com.baomidou.mybatisplus.extension.service.IService; |
||||
|
|
||||
|
public interface ReturnSaleService extends IService<ReturnSale> { |
||||
|
|
||||
|
|
||||
|
|
||||
|
} |
||||
@ -0,0 +1,17 @@ |
|||||
|
package cc.hiver.mall.serviceimpl.mybatis; |
||||
|
|
||||
|
import cc.hiver.mall.dao.mapper.ReturnDetailMapper; |
||||
|
import cc.hiver.mall.dao.mapper.SaleDetailMapper; |
||||
|
import cc.hiver.mall.entity.ReturnDetail; |
||||
|
import cc.hiver.mall.entity.SaleDetail; |
||||
|
import cc.hiver.mall.service.mybatis.ReturnDetailService; |
||||
|
import cc.hiver.mall.service.mybatis.SaleDetailService; |
||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
||||
|
import org.springframework.stereotype.Service; |
||||
|
|
||||
|
@Service |
||||
|
public class ReturnDetailServiceImpl extends ServiceImpl<ReturnDetailMapper, ReturnDetail> implements ReturnDetailService { |
||||
|
|
||||
|
|
||||
|
|
||||
|
} |
||||
@ -0,0 +1,16 @@ |
|||||
|
package cc.hiver.mall.serviceimpl.mybatis; |
||||
|
|
||||
|
import cc.hiver.mall.dao.mapper.ReturnSaleMapper; |
||||
|
import cc.hiver.mall.dao.mapper.SaleMapper; |
||||
|
import cc.hiver.mall.entity.ReturnSale; |
||||
|
import cc.hiver.mall.entity.Sale; |
||||
|
import cc.hiver.mall.service.mybatis.ReturnSaleService; |
||||
|
import cc.hiver.mall.service.mybatis.SaleService; |
||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
||||
|
import org.springframework.stereotype.Service; |
||||
|
|
||||
|
@Service |
||||
|
public class ReturnSaleServiceImpl extends ServiceImpl<ReturnSaleMapper, ReturnSale> implements ReturnSaleService { |
||||
|
|
||||
|
|
||||
|
} |
||||
@ -0,0 +1,448 @@ |
|||||
|
<?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="cc.hiver.mall.dao.mapper.ReturnDetailMapper"> |
||||
|
<resultMap id="BaseResultMap" type="cc.hiver.mall.entity.ReturnDetail"> |
||||
|
<id column="id" jdbcType="VARCHAR" property="id" /> |
||||
|
<result column="create_by" jdbcType="VARCHAR" property="createBy" /> |
||||
|
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" /> |
||||
|
<result column="del_flag" jdbcType="INTEGER" property="delFlag" /> |
||||
|
<result column="update_by" jdbcType="VARCHAR" property="updateBy" /> |
||||
|
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" /> |
||||
|
<result column="sale_id" jdbcType="VARCHAR" property="saleId" /> |
||||
|
<result column="product_id" jdbcType="VARCHAR" property="productId" /> |
||||
|
<result column="product_name" jdbcType="VARCHAR" property="productName" /> |
||||
|
<result column="unit" jdbcType="VARCHAR" property="unit" /> |
||||
|
<result column="shop_id" jdbcType="VARCHAR" property="shopId" /> |
||||
|
<result column="category_id" jdbcType="VARCHAR" property="categoryId" /> |
||||
|
<result column="attribute_list" jdbcType="VARCHAR" property="attributeList" /> |
||||
|
<result column="price" jdbcType="DECIMAL" property="price" /> |
||||
|
<result column="purchase_price" jdbcType="DECIMAL" property="purchasePrice" /> |
||||
|
<result column="wholesale_price" jdbcType="DECIMAL" property="wholesalePrice" /> |
||||
|
<result column="product_count" jdbcType="INTEGER" property="productCount" /> |
||||
|
<result column="discount" jdbcType="DECIMAL" property="discount" /> |
||||
|
<result column="discount_amount" jdbcType="DECIMAL" property="discountAmount" /> |
||||
|
<result column="real_price" jdbcType="DECIMAL" property="realPrice" /> |
||||
|
</resultMap> |
||||
|
<sql id="Example_Where_Clause"> |
||||
|
<where> |
||||
|
<foreach collection="oredCriteria" item="criteria" separator="or"> |
||||
|
<if test="criteria.valid"> |
||||
|
<trim prefix="(" prefixOverrides="and" suffix=")"> |
||||
|
<foreach collection="criteria.criteria" item="criterion"> |
||||
|
<choose> |
||||
|
<when test="criterion.noValue"> |
||||
|
and ${criterion.condition} |
||||
|
</when> |
||||
|
<when test="criterion.singleValue"> |
||||
|
and ${criterion.condition} #{criterion.value} |
||||
|
</when> |
||||
|
<when test="criterion.betweenValue"> |
||||
|
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} |
||||
|
</when> |
||||
|
<when test="criterion.listValue"> |
||||
|
and ${criterion.condition} |
||||
|
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=","> |
||||
|
#{listItem} |
||||
|
</foreach> |
||||
|
</when> |
||||
|
</choose> |
||||
|
</foreach> |
||||
|
</trim> |
||||
|
</if> |
||||
|
</foreach> |
||||
|
</where> |
||||
|
</sql> |
||||
|
<sql id="Update_By_Example_Where_Clause"> |
||||
|
<where> |
||||
|
<foreach collection="example.oredCriteria" item="criteria" separator="or"> |
||||
|
<if test="criteria.valid"> |
||||
|
<trim prefix="(" prefixOverrides="and" suffix=")"> |
||||
|
<foreach collection="criteria.criteria" item="criterion"> |
||||
|
<choose> |
||||
|
<when test="criterion.noValue"> |
||||
|
and ${criterion.condition} |
||||
|
</when> |
||||
|
<when test="criterion.singleValue"> |
||||
|
and ${criterion.condition} #{criterion.value} |
||||
|
</when> |
||||
|
<when test="criterion.betweenValue"> |
||||
|
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} |
||||
|
</when> |
||||
|
<when test="criterion.listValue"> |
||||
|
and ${criterion.condition} |
||||
|
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=","> |
||||
|
#{listItem} |
||||
|
</foreach> |
||||
|
</when> |
||||
|
</choose> |
||||
|
</foreach> |
||||
|
</trim> |
||||
|
</if> |
||||
|
</foreach> |
||||
|
</where> |
||||
|
</sql> |
||||
|
<sql id="Base_Column_List"> |
||||
|
id, create_by, create_time, del_flag, update_by, update_time, sale_id, product_id, |
||||
|
product_name, unit, shop_id, category_id, attribute_list, price, purchase_price, |
||||
|
wholesale_price, product_count, discount, discount_amount, real_price |
||||
|
</sql> |
||||
|
<select id="selectByExample" parameterType="cc.hiver.mall.entity.ReturnDetailExample" resultMap="BaseResultMap"> |
||||
|
select |
||||
|
<if test="distinct"> |
||||
|
distinct |
||||
|
</if> |
||||
|
<include refid="Base_Column_List" /> |
||||
|
from t_return_detail |
||||
|
<if test="_parameter != null"> |
||||
|
<include refid="Example_Where_Clause" /> |
||||
|
</if> |
||||
|
<if test="orderByClause != null"> |
||||
|
order by ${orderByClause} |
||||
|
</if> |
||||
|
</select> |
||||
|
<select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap"> |
||||
|
select |
||||
|
<include refid="Base_Column_List" /> |
||||
|
from t_return_detail |
||||
|
where id = #{id,jdbcType=VARCHAR} |
||||
|
</select> |
||||
|
<delete id="deleteByPrimaryKey" parameterType="java.lang.String"> |
||||
|
delete from t_return_detail |
||||
|
where id = #{id,jdbcType=VARCHAR} |
||||
|
</delete> |
||||
|
<delete id="deleteByExample" parameterType="cc.hiver.mall.entity.ReturnDetailExample"> |
||||
|
delete from t_return_detail |
||||
|
<if test="_parameter != null"> |
||||
|
<include refid="Example_Where_Clause" /> |
||||
|
</if> |
||||
|
</delete> |
||||
|
<insert id="insert" parameterType="cc.hiver.mall.entity.ReturnDetail"> |
||||
|
insert into t_return_detail (id, create_by, create_time, |
||||
|
del_flag, update_by, update_time, |
||||
|
sale_id, product_id, product_name, |
||||
|
unit, shop_id, category_id, |
||||
|
attribute_list, price, purchase_price, |
||||
|
wholesale_price, product_count, discount, |
||||
|
discount_amount, real_price) |
||||
|
values (#{id,jdbcType=VARCHAR}, #{createBy,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, |
||||
|
#{delFlag,jdbcType=INTEGER}, #{updateBy,jdbcType=VARCHAR}, #{updateTime,jdbcType=TIMESTAMP}, |
||||
|
#{saleId,jdbcType=VARCHAR}, #{productId,jdbcType=VARCHAR}, #{productName,jdbcType=VARCHAR}, |
||||
|
#{unit,jdbcType=VARCHAR}, #{shopId,jdbcType=VARCHAR}, #{categoryId,jdbcType=VARCHAR}, |
||||
|
#{attributeList,jdbcType=VARCHAR}, #{price,jdbcType=DECIMAL}, #{purchasePrice,jdbcType=DECIMAL}, |
||||
|
#{wholesalePrice,jdbcType=DECIMAL}, #{productCount,jdbcType=INTEGER}, #{discount,jdbcType=DECIMAL}, |
||||
|
#{discountAmount,jdbcType=DECIMAL}, #{realPrice,jdbcType=DECIMAL}) |
||||
|
</insert> |
||||
|
<insert id="insertSelective" parameterType="cc.hiver.mall.entity.ReturnDetail"> |
||||
|
insert into t_return_detail |
||||
|
<trim prefix="(" suffix=")" suffixOverrides=","> |
||||
|
<if test="id != null"> |
||||
|
id, |
||||
|
</if> |
||||
|
<if test="createBy != null"> |
||||
|
create_by, |
||||
|
</if> |
||||
|
<if test="createTime != null"> |
||||
|
create_time, |
||||
|
</if> |
||||
|
<if test="delFlag != null"> |
||||
|
del_flag, |
||||
|
</if> |
||||
|
<if test="updateBy != null"> |
||||
|
update_by, |
||||
|
</if> |
||||
|
<if test="updateTime != null"> |
||||
|
update_time, |
||||
|
</if> |
||||
|
<if test="saleId != null"> |
||||
|
sale_id, |
||||
|
</if> |
||||
|
<if test="productId != null"> |
||||
|
product_id, |
||||
|
</if> |
||||
|
<if test="productName != null"> |
||||
|
product_name, |
||||
|
</if> |
||||
|
<if test="unit != null"> |
||||
|
unit, |
||||
|
</if> |
||||
|
<if test="shopId != null"> |
||||
|
shop_id, |
||||
|
</if> |
||||
|
<if test="categoryId != null"> |
||||
|
category_id, |
||||
|
</if> |
||||
|
<if test="attributeList != null"> |
||||
|
attribute_list, |
||||
|
</if> |
||||
|
<if test="price != null"> |
||||
|
price, |
||||
|
</if> |
||||
|
<if test="purchasePrice != null"> |
||||
|
purchase_price, |
||||
|
</if> |
||||
|
<if test="wholesalePrice != null"> |
||||
|
wholesale_price, |
||||
|
</if> |
||||
|
<if test="productCount != null"> |
||||
|
product_count, |
||||
|
</if> |
||||
|
<if test="discount != null"> |
||||
|
discount, |
||||
|
</if> |
||||
|
<if test="discountAmount != null"> |
||||
|
discount_amount, |
||||
|
</if> |
||||
|
<if test="realPrice != null"> |
||||
|
real_price, |
||||
|
</if> |
||||
|
</trim> |
||||
|
<trim prefix="values (" suffix=")" suffixOverrides=","> |
||||
|
<if test="id != null"> |
||||
|
#{id,jdbcType=VARCHAR}, |
||||
|
</if> |
||||
|
<if test="createBy != null"> |
||||
|
#{createBy,jdbcType=VARCHAR}, |
||||
|
</if> |
||||
|
<if test="createTime != null"> |
||||
|
#{createTime,jdbcType=TIMESTAMP}, |
||||
|
</if> |
||||
|
<if test="delFlag != null"> |
||||
|
#{delFlag,jdbcType=INTEGER}, |
||||
|
</if> |
||||
|
<if test="updateBy != null"> |
||||
|
#{updateBy,jdbcType=VARCHAR}, |
||||
|
</if> |
||||
|
<if test="updateTime != null"> |
||||
|
#{updateTime,jdbcType=TIMESTAMP}, |
||||
|
</if> |
||||
|
<if test="saleId != null"> |
||||
|
#{saleId,jdbcType=VARCHAR}, |
||||
|
</if> |
||||
|
<if test="productId != null"> |
||||
|
#{productId,jdbcType=VARCHAR}, |
||||
|
</if> |
||||
|
<if test="productName != null"> |
||||
|
#{productName,jdbcType=VARCHAR}, |
||||
|
</if> |
||||
|
<if test="unit != null"> |
||||
|
#{unit,jdbcType=VARCHAR}, |
||||
|
</if> |
||||
|
<if test="shopId != null"> |
||||
|
#{shopId,jdbcType=VARCHAR}, |
||||
|
</if> |
||||
|
<if test="categoryId != null"> |
||||
|
#{categoryId,jdbcType=VARCHAR}, |
||||
|
</if> |
||||
|
<if test="attributeList != null"> |
||||
|
#{attributeList,jdbcType=VARCHAR}, |
||||
|
</if> |
||||
|
<if test="price != null"> |
||||
|
#{price,jdbcType=DECIMAL}, |
||||
|
</if> |
||||
|
<if test="purchasePrice != null"> |
||||
|
#{purchasePrice,jdbcType=DECIMAL}, |
||||
|
</if> |
||||
|
<if test="wholesalePrice != null"> |
||||
|
#{wholesalePrice,jdbcType=DECIMAL}, |
||||
|
</if> |
||||
|
<if test="productCount != null"> |
||||
|
#{productCount,jdbcType=INTEGER}, |
||||
|
</if> |
||||
|
<if test="discount != null"> |
||||
|
#{discount,jdbcType=DECIMAL}, |
||||
|
</if> |
||||
|
<if test="discountAmount != null"> |
||||
|
#{discountAmount,jdbcType=DECIMAL}, |
||||
|
</if> |
||||
|
<if test="realPrice != null"> |
||||
|
#{realPrice,jdbcType=DECIMAL}, |
||||
|
</if> |
||||
|
</trim> |
||||
|
</insert> |
||||
|
<select id="countByExample" parameterType="cc.hiver.mall.entity.ReturnDetailExample" resultType="java.lang.Long"> |
||||
|
select count(*) from t_return_detail |
||||
|
<if test="_parameter != null"> |
||||
|
<include refid="Example_Where_Clause" /> |
||||
|
</if> |
||||
|
</select> |
||||
|
<update id="updateByExampleSelective" parameterType="map"> |
||||
|
update t_return_detail |
||||
|
<set> |
||||
|
<if test="record.id != null"> |
||||
|
id = #{record.id,jdbcType=VARCHAR}, |
||||
|
</if> |
||||
|
<if test="record.createBy != null"> |
||||
|
create_by = #{record.createBy,jdbcType=VARCHAR}, |
||||
|
</if> |
||||
|
<if test="record.createTime != null"> |
||||
|
create_time = #{record.createTime,jdbcType=TIMESTAMP}, |
||||
|
</if> |
||||
|
<if test="record.delFlag != null"> |
||||
|
del_flag = #{record.delFlag,jdbcType=INTEGER}, |
||||
|
</if> |
||||
|
<if test="record.updateBy != null"> |
||||
|
update_by = #{record.updateBy,jdbcType=VARCHAR}, |
||||
|
</if> |
||||
|
<if test="record.updateTime != null"> |
||||
|
update_time = #{record.updateTime,jdbcType=TIMESTAMP}, |
||||
|
</if> |
||||
|
<if test="record.saleId != null"> |
||||
|
sale_id = #{record.saleId,jdbcType=VARCHAR}, |
||||
|
</if> |
||||
|
<if test="record.productId != null"> |
||||
|
product_id = #{record.productId,jdbcType=VARCHAR}, |
||||
|
</if> |
||||
|
<if test="record.productName != null"> |
||||
|
product_name = #{record.productName,jdbcType=VARCHAR}, |
||||
|
</if> |
||||
|
<if test="record.unit != null"> |
||||
|
unit = #{record.unit,jdbcType=VARCHAR}, |
||||
|
</if> |
||||
|
<if test="record.shopId != null"> |
||||
|
shop_id = #{record.shopId,jdbcType=VARCHAR}, |
||||
|
</if> |
||||
|
<if test="record.categoryId != null"> |
||||
|
category_id = #{record.categoryId,jdbcType=VARCHAR}, |
||||
|
</if> |
||||
|
<if test="record.attributeList != null"> |
||||
|
attribute_list = #{record.attributeList,jdbcType=VARCHAR}, |
||||
|
</if> |
||||
|
<if test="record.price != null"> |
||||
|
price = #{record.price,jdbcType=DECIMAL}, |
||||
|
</if> |
||||
|
<if test="record.purchasePrice != null"> |
||||
|
purchase_price = #{record.purchasePrice,jdbcType=DECIMAL}, |
||||
|
</if> |
||||
|
<if test="record.wholesalePrice != null"> |
||||
|
wholesale_price = #{record.wholesalePrice,jdbcType=DECIMAL}, |
||||
|
</if> |
||||
|
<if test="record.productCount != null"> |
||||
|
product_count = #{record.productCount,jdbcType=INTEGER}, |
||||
|
</if> |
||||
|
<if test="record.discount != null"> |
||||
|
discount = #{record.discount,jdbcType=DECIMAL}, |
||||
|
</if> |
||||
|
<if test="record.discountAmount != null"> |
||||
|
discount_amount = #{record.discountAmount,jdbcType=DECIMAL}, |
||||
|
</if> |
||||
|
<if test="record.realPrice != null"> |
||||
|
real_price = #{record.realPrice,jdbcType=DECIMAL}, |
||||
|
</if> |
||||
|
</set> |
||||
|
<if test="_parameter != null"> |
||||
|
<include refid="Update_By_Example_Where_Clause" /> |
||||
|
</if> |
||||
|
</update> |
||||
|
<update id="updateByExample" parameterType="map"> |
||||
|
update t_return_detail |
||||
|
set id = #{record.id,jdbcType=VARCHAR}, |
||||
|
create_by = #{record.createBy,jdbcType=VARCHAR}, |
||||
|
create_time = #{record.createTime,jdbcType=TIMESTAMP}, |
||||
|
del_flag = #{record.delFlag,jdbcType=INTEGER}, |
||||
|
update_by = #{record.updateBy,jdbcType=VARCHAR}, |
||||
|
update_time = #{record.updateTime,jdbcType=TIMESTAMP}, |
||||
|
sale_id = #{record.saleId,jdbcType=VARCHAR}, |
||||
|
product_id = #{record.productId,jdbcType=VARCHAR}, |
||||
|
product_name = #{record.productName,jdbcType=VARCHAR}, |
||||
|
unit = #{record.unit,jdbcType=VARCHAR}, |
||||
|
shop_id = #{record.shopId,jdbcType=VARCHAR}, |
||||
|
category_id = #{record.categoryId,jdbcType=VARCHAR}, |
||||
|
attribute_list = #{record.attributeList,jdbcType=VARCHAR}, |
||||
|
price = #{record.price,jdbcType=DECIMAL}, |
||||
|
purchase_price = #{record.purchasePrice,jdbcType=DECIMAL}, |
||||
|
wholesale_price = #{record.wholesalePrice,jdbcType=DECIMAL}, |
||||
|
product_count = #{record.productCount,jdbcType=INTEGER}, |
||||
|
discount = #{record.discount,jdbcType=DECIMAL}, |
||||
|
discount_amount = #{record.discountAmount,jdbcType=DECIMAL}, |
||||
|
real_price = #{record.realPrice,jdbcType=DECIMAL} |
||||
|
<if test="_parameter != null"> |
||||
|
<include refid="Update_By_Example_Where_Clause" /> |
||||
|
</if> |
||||
|
</update> |
||||
|
<update id="updateByPrimaryKeySelective" parameterType="cc.hiver.mall.entity.ReturnDetail"> |
||||
|
update t_return_detail |
||||
|
<set> |
||||
|
<if test="createBy != null"> |
||||
|
create_by = #{createBy,jdbcType=VARCHAR}, |
||||
|
</if> |
||||
|
<if test="createTime != null"> |
||||
|
create_time = #{createTime,jdbcType=TIMESTAMP}, |
||||
|
</if> |
||||
|
<if test="delFlag != null"> |
||||
|
del_flag = #{delFlag,jdbcType=INTEGER}, |
||||
|
</if> |
||||
|
<if test="updateBy != null"> |
||||
|
update_by = #{updateBy,jdbcType=VARCHAR}, |
||||
|
</if> |
||||
|
<if test="updateTime != null"> |
||||
|
update_time = #{updateTime,jdbcType=TIMESTAMP}, |
||||
|
</if> |
||||
|
<if test="saleId != null"> |
||||
|
sale_id = #{saleId,jdbcType=VARCHAR}, |
||||
|
</if> |
||||
|
<if test="productId != null"> |
||||
|
product_id = #{productId,jdbcType=VARCHAR}, |
||||
|
</if> |
||||
|
<if test="productName != null"> |
||||
|
product_name = #{productName,jdbcType=VARCHAR}, |
||||
|
</if> |
||||
|
<if test="unit != null"> |
||||
|
unit = #{unit,jdbcType=VARCHAR}, |
||||
|
</if> |
||||
|
<if test="shopId != null"> |
||||
|
shop_id = #{shopId,jdbcType=VARCHAR}, |
||||
|
</if> |
||||
|
<if test="categoryId != null"> |
||||
|
category_id = #{categoryId,jdbcType=VARCHAR}, |
||||
|
</if> |
||||
|
<if test="attributeList != null"> |
||||
|
attribute_list = #{attributeList,jdbcType=VARCHAR}, |
||||
|
</if> |
||||
|
<if test="price != null"> |
||||
|
price = #{price,jdbcType=DECIMAL}, |
||||
|
</if> |
||||
|
<if test="purchasePrice != null"> |
||||
|
purchase_price = #{purchasePrice,jdbcType=DECIMAL}, |
||||
|
</if> |
||||
|
<if test="wholesalePrice != null"> |
||||
|
wholesale_price = #{wholesalePrice,jdbcType=DECIMAL}, |
||||
|
</if> |
||||
|
<if test="productCount != null"> |
||||
|
product_count = #{productCount,jdbcType=INTEGER}, |
||||
|
</if> |
||||
|
<if test="discount != null"> |
||||
|
discount = #{discount,jdbcType=DECIMAL}, |
||||
|
</if> |
||||
|
<if test="discountAmount != null"> |
||||
|
discount_amount = #{discountAmount,jdbcType=DECIMAL}, |
||||
|
</if> |
||||
|
<if test="realPrice != null"> |
||||
|
real_price = #{realPrice,jdbcType=DECIMAL}, |
||||
|
</if> |
||||
|
</set> |
||||
|
where id = #{id,jdbcType=VARCHAR} |
||||
|
</update> |
||||
|
<update id="updateByPrimaryKey" parameterType="cc.hiver.mall.entity.ReturnDetail"> |
||||
|
update t_return_detail |
||||
|
set create_by = #{createBy,jdbcType=VARCHAR}, |
||||
|
create_time = #{createTime,jdbcType=TIMESTAMP}, |
||||
|
del_flag = #{delFlag,jdbcType=INTEGER}, |
||||
|
update_by = #{updateBy,jdbcType=VARCHAR}, |
||||
|
update_time = #{updateTime,jdbcType=TIMESTAMP}, |
||||
|
sale_id = #{saleId,jdbcType=VARCHAR}, |
||||
|
product_id = #{productId,jdbcType=VARCHAR}, |
||||
|
product_name = #{productName,jdbcType=VARCHAR}, |
||||
|
unit = #{unit,jdbcType=VARCHAR}, |
||||
|
shop_id = #{shopId,jdbcType=VARCHAR}, |
||||
|
category_id = #{categoryId,jdbcType=VARCHAR}, |
||||
|
attribute_list = #{attributeList,jdbcType=VARCHAR}, |
||||
|
price = #{price,jdbcType=DECIMAL}, |
||||
|
purchase_price = #{purchasePrice,jdbcType=DECIMAL}, |
||||
|
wholesale_price = #{wholesalePrice,jdbcType=DECIMAL}, |
||||
|
product_count = #{productCount,jdbcType=INTEGER}, |
||||
|
discount = #{discount,jdbcType=DECIMAL}, |
||||
|
discount_amount = #{discountAmount,jdbcType=DECIMAL}, |
||||
|
real_price = #{realPrice,jdbcType=DECIMAL} |
||||
|
where id = #{id,jdbcType=VARCHAR} |
||||
|
</update> |
||||
|
</mapper> |
||||
@ -0,0 +1,495 @@ |
|||||
|
<?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="cc.hiver.mall.dao.mapper.ReturnSaleMapper"> |
||||
|
<resultMap id="BaseResultMap" type="cc.hiver.mall.entity.ReturnSale"> |
||||
|
<id column="id" jdbcType="VARCHAR" property="id" /> |
||||
|
<result column="sale_id" jdbcType="VARCHAR" property="saleId" /> |
||||
|
<result column="create_by" jdbcType="VARCHAR" property="createBy" /> |
||||
|
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" /> |
||||
|
<result column="del_flag" jdbcType="INTEGER" property="delFlag" /> |
||||
|
<result column="update_by" jdbcType="VARCHAR" property="updateBy" /> |
||||
|
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" /> |
||||
|
<result column="user_id" jdbcType="VARCHAR" property="userId" /> |
||||
|
<result column="shop_id" jdbcType="VARCHAR" property="shopId" /> |
||||
|
<result column="total_amount" jdbcType="DECIMAL" property="totalAmount" /> |
||||
|
<result column="discount" jdbcType="DECIMAL" property="discount" /> |
||||
|
<result column="discount_amount" jdbcType="DECIMAL" property="discountAmount" /> |
||||
|
<result column="real_amount" jdbcType="DECIMAL" property="realAmount" /> |
||||
|
<result column="already_earn" jdbcType="DECIMAL" property="alreadyEarn" /> |
||||
|
<result column="no_earn" jdbcType="DECIMAL" property="noEarn" /> |
||||
|
<result column="pay_status" jdbcType="VARCHAR" property="payStatus" /> |
||||
|
<result column="status" jdbcType="VARCHAR" property="status" /> |
||||
|
<result column="transport_type" jdbcType="VARCHAR" property="transportType" /> |
||||
|
<result column="share_address" jdbcType="VARCHAR" property="shareAddress" /> |
||||
|
<result column="receive_address" jdbcType="VARCHAR" property="receiveAddress" /> |
||||
|
<result column="province" jdbcType="VARCHAR" property="province" /> |
||||
|
<result column="city" jdbcType="VARCHAR" property="city" /> |
||||
|
<result column="area" jdbcType="VARCHAR" property="area" /> |
||||
|
</resultMap> |
||||
|
<sql id="Example_Where_Clause"> |
||||
|
<where> |
||||
|
<foreach collection="oredCriteria" item="criteria" separator="or"> |
||||
|
<if test="criteria.valid"> |
||||
|
<trim prefix="(" prefixOverrides="and" suffix=")"> |
||||
|
<foreach collection="criteria.criteria" item="criterion"> |
||||
|
<choose> |
||||
|
<when test="criterion.noValue"> |
||||
|
and ${criterion.condition} |
||||
|
</when> |
||||
|
<when test="criterion.singleValue"> |
||||
|
and ${criterion.condition} #{criterion.value} |
||||
|
</when> |
||||
|
<when test="criterion.betweenValue"> |
||||
|
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} |
||||
|
</when> |
||||
|
<when test="criterion.listValue"> |
||||
|
and ${criterion.condition} |
||||
|
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=","> |
||||
|
#{listItem} |
||||
|
</foreach> |
||||
|
</when> |
||||
|
</choose> |
||||
|
</foreach> |
||||
|
</trim> |
||||
|
</if> |
||||
|
</foreach> |
||||
|
</where> |
||||
|
</sql> |
||||
|
<sql id="Update_By_Example_Where_Clause"> |
||||
|
<where> |
||||
|
<foreach collection="example.oredCriteria" item="criteria" separator="or"> |
||||
|
<if test="criteria.valid"> |
||||
|
<trim prefix="(" prefixOverrides="and" suffix=")"> |
||||
|
<foreach collection="criteria.criteria" item="criterion"> |
||||
|
<choose> |
||||
|
<when test="criterion.noValue"> |
||||
|
and ${criterion.condition} |
||||
|
</when> |
||||
|
<when test="criterion.singleValue"> |
||||
|
and ${criterion.condition} #{criterion.value} |
||||
|
</when> |
||||
|
<when test="criterion.betweenValue"> |
||||
|
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} |
||||
|
</when> |
||||
|
<when test="criterion.listValue"> |
||||
|
and ${criterion.condition} |
||||
|
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=","> |
||||
|
#{listItem} |
||||
|
</foreach> |
||||
|
</when> |
||||
|
</choose> |
||||
|
</foreach> |
||||
|
</trim> |
||||
|
</if> |
||||
|
</foreach> |
||||
|
</where> |
||||
|
</sql> |
||||
|
<sql id="Base_Column_List"> |
||||
|
id, sale_id, create_by, create_time, del_flag, update_by, update_time, user_id, shop_id, |
||||
|
total_amount, discount, discount_amount, real_amount, already_earn, no_earn, pay_status, |
||||
|
status, transport_type, share_address, receive_address, province, city, area |
||||
|
</sql> |
||||
|
<select id="selectByExample" parameterType="cc.hiver.mall.entity.ReturnSaleExample" resultMap="BaseResultMap"> |
||||
|
select |
||||
|
<if test="distinct"> |
||||
|
distinct |
||||
|
</if> |
||||
|
<include refid="Base_Column_List" /> |
||||
|
from t_return_sale |
||||
|
<if test="_parameter != null"> |
||||
|
<include refid="Example_Where_Clause" /> |
||||
|
</if> |
||||
|
<if test="orderByClause != null"> |
||||
|
order by ${orderByClause} |
||||
|
</if> |
||||
|
</select> |
||||
|
<select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap"> |
||||
|
select |
||||
|
<include refid="Base_Column_List" /> |
||||
|
from t_return_sale |
||||
|
where id = #{id,jdbcType=VARCHAR} |
||||
|
</select> |
||||
|
<delete id="deleteByPrimaryKey" parameterType="java.lang.String"> |
||||
|
delete from t_return_sale |
||||
|
where id = #{id,jdbcType=VARCHAR} |
||||
|
</delete> |
||||
|
<delete id="deleteByExample" parameterType="cc.hiver.mall.entity.ReturnSaleExample"> |
||||
|
delete from t_return_sale |
||||
|
<if test="_parameter != null"> |
||||
|
<include refid="Example_Where_Clause" /> |
||||
|
</if> |
||||
|
</delete> |
||||
|
<insert id="insert" parameterType="cc.hiver.mall.entity.ReturnSale"> |
||||
|
insert into t_return_sale (id, sale_id, create_by, |
||||
|
create_time, del_flag, update_by, |
||||
|
update_time, user_id, shop_id, |
||||
|
total_amount, discount, discount_amount, |
||||
|
real_amount, already_earn, no_earn, |
||||
|
pay_status, status, transport_type, |
||||
|
share_address, receive_address, province, |
||||
|
city, area) |
||||
|
values (#{id,jdbcType=VARCHAR}, #{saleId,jdbcType=VARCHAR}, #{createBy,jdbcType=VARCHAR}, |
||||
|
#{createTime,jdbcType=TIMESTAMP}, #{delFlag,jdbcType=INTEGER}, #{updateBy,jdbcType=VARCHAR}, |
||||
|
#{updateTime,jdbcType=TIMESTAMP}, #{userId,jdbcType=VARCHAR}, #{shopId,jdbcType=VARCHAR}, |
||||
|
#{totalAmount,jdbcType=DECIMAL}, #{discount,jdbcType=DECIMAL}, #{discountAmount,jdbcType=DECIMAL}, |
||||
|
#{realAmount,jdbcType=DECIMAL}, #{alreadyEarn,jdbcType=DECIMAL}, #{noEarn,jdbcType=DECIMAL}, |
||||
|
#{payStatus,jdbcType=VARCHAR}, #{status,jdbcType=VARCHAR}, #{transportType,jdbcType=VARCHAR}, |
||||
|
#{shareAddress,jdbcType=VARCHAR}, #{receiveAddress,jdbcType=VARCHAR}, #{province,jdbcType=VARCHAR}, |
||||
|
#{city,jdbcType=VARCHAR}, #{area,jdbcType=VARCHAR}) |
||||
|
</insert> |
||||
|
<insert id="insertSelective" parameterType="cc.hiver.mall.entity.ReturnSale"> |
||||
|
insert into t_return_sale |
||||
|
<trim prefix="(" suffix=")" suffixOverrides=","> |
||||
|
<if test="id != null"> |
||||
|
id, |
||||
|
</if> |
||||
|
<if test="saleId != null"> |
||||
|
sale_id, |
||||
|
</if> |
||||
|
<if test="createBy != null"> |
||||
|
create_by, |
||||
|
</if> |
||||
|
<if test="createTime != null"> |
||||
|
create_time, |
||||
|
</if> |
||||
|
<if test="delFlag != null"> |
||||
|
del_flag, |
||||
|
</if> |
||||
|
<if test="updateBy != null"> |
||||
|
update_by, |
||||
|
</if> |
||||
|
<if test="updateTime != null"> |
||||
|
update_time, |
||||
|
</if> |
||||
|
<if test="userId != null"> |
||||
|
user_id, |
||||
|
</if> |
||||
|
<if test="shopId != null"> |
||||
|
shop_id, |
||||
|
</if> |
||||
|
<if test="totalAmount != null"> |
||||
|
total_amount, |
||||
|
</if> |
||||
|
<if test="discount != null"> |
||||
|
discount, |
||||
|
</if> |
||||
|
<if test="discountAmount != null"> |
||||
|
discount_amount, |
||||
|
</if> |
||||
|
<if test="realAmount != null"> |
||||
|
real_amount, |
||||
|
</if> |
||||
|
<if test="alreadyEarn != null"> |
||||
|
already_earn, |
||||
|
</if> |
||||
|
<if test="noEarn != null"> |
||||
|
no_earn, |
||||
|
</if> |
||||
|
<if test="payStatus != null"> |
||||
|
pay_status, |
||||
|
</if> |
||||
|
<if test="status != null"> |
||||
|
status, |
||||
|
</if> |
||||
|
<if test="transportType != null"> |
||||
|
transport_type, |
||||
|
</if> |
||||
|
<if test="shareAddress != null"> |
||||
|
share_address, |
||||
|
</if> |
||||
|
<if test="receiveAddress != null"> |
||||
|
receive_address, |
||||
|
</if> |
||||
|
<if test="province != null"> |
||||
|
province, |
||||
|
</if> |
||||
|
<if test="city != null"> |
||||
|
city, |
||||
|
</if> |
||||
|
<if test="area != null"> |
||||
|
area, |
||||
|
</if> |
||||
|
</trim> |
||||
|
<trim prefix="values (" suffix=")" suffixOverrides=","> |
||||
|
<if test="id != null"> |
||||
|
#{id,jdbcType=VARCHAR}, |
||||
|
</if> |
||||
|
<if test="saleId != null"> |
||||
|
#{saleId,jdbcType=VARCHAR}, |
||||
|
</if> |
||||
|
<if test="createBy != null"> |
||||
|
#{createBy,jdbcType=VARCHAR}, |
||||
|
</if> |
||||
|
<if test="createTime != null"> |
||||
|
#{createTime,jdbcType=TIMESTAMP}, |
||||
|
</if> |
||||
|
<if test="delFlag != null"> |
||||
|
#{delFlag,jdbcType=INTEGER}, |
||||
|
</if> |
||||
|
<if test="updateBy != null"> |
||||
|
#{updateBy,jdbcType=VARCHAR}, |
||||
|
</if> |
||||
|
<if test="updateTime != null"> |
||||
|
#{updateTime,jdbcType=TIMESTAMP}, |
||||
|
</if> |
||||
|
<if test="userId != null"> |
||||
|
#{userId,jdbcType=VARCHAR}, |
||||
|
</if> |
||||
|
<if test="shopId != null"> |
||||
|
#{shopId,jdbcType=VARCHAR}, |
||||
|
</if> |
||||
|
<if test="totalAmount != null"> |
||||
|
#{totalAmount,jdbcType=DECIMAL}, |
||||
|
</if> |
||||
|
<if test="discount != null"> |
||||
|
#{discount,jdbcType=DECIMAL}, |
||||
|
</if> |
||||
|
<if test="discountAmount != null"> |
||||
|
#{discountAmount,jdbcType=DECIMAL}, |
||||
|
</if> |
||||
|
<if test="realAmount != null"> |
||||
|
#{realAmount,jdbcType=DECIMAL}, |
||||
|
</if> |
||||
|
<if test="alreadyEarn != null"> |
||||
|
#{alreadyEarn,jdbcType=DECIMAL}, |
||||
|
</if> |
||||
|
<if test="noEarn != null"> |
||||
|
#{noEarn,jdbcType=DECIMAL}, |
||||
|
</if> |
||||
|
<if test="payStatus != null"> |
||||
|
#{payStatus,jdbcType=VARCHAR}, |
||||
|
</if> |
||||
|
<if test="status != null"> |
||||
|
#{status,jdbcType=VARCHAR}, |
||||
|
</if> |
||||
|
<if test="transportType != null"> |
||||
|
#{transportType,jdbcType=VARCHAR}, |
||||
|
</if> |
||||
|
<if test="shareAddress != null"> |
||||
|
#{shareAddress,jdbcType=VARCHAR}, |
||||
|
</if> |
||||
|
<if test="receiveAddress != null"> |
||||
|
#{receiveAddress,jdbcType=VARCHAR}, |
||||
|
</if> |
||||
|
<if test="province != null"> |
||||
|
#{province,jdbcType=VARCHAR}, |
||||
|
</if> |
||||
|
<if test="city != null"> |
||||
|
#{city,jdbcType=VARCHAR}, |
||||
|
</if> |
||||
|
<if test="area != null"> |
||||
|
#{area,jdbcType=VARCHAR}, |
||||
|
</if> |
||||
|
</trim> |
||||
|
</insert> |
||||
|
<select id="countByExample" parameterType="cc.hiver.mall.entity.ReturnSaleExample" resultType="java.lang.Long"> |
||||
|
select count(*) from t_return_sale |
||||
|
<if test="_parameter != null"> |
||||
|
<include refid="Example_Where_Clause" /> |
||||
|
</if> |
||||
|
</select> |
||||
|
<update id="updateByExampleSelective" parameterType="map"> |
||||
|
update t_return_sale |
||||
|
<set> |
||||
|
<if test="record.id != null"> |
||||
|
id = #{record.id,jdbcType=VARCHAR}, |
||||
|
</if> |
||||
|
<if test="record.saleId != null"> |
||||
|
sale_id = #{record.saleId,jdbcType=VARCHAR}, |
||||
|
</if> |
||||
|
<if test="record.createBy != null"> |
||||
|
create_by = #{record.createBy,jdbcType=VARCHAR}, |
||||
|
</if> |
||||
|
<if test="record.createTime != null"> |
||||
|
create_time = #{record.createTime,jdbcType=TIMESTAMP}, |
||||
|
</if> |
||||
|
<if test="record.delFlag != null"> |
||||
|
del_flag = #{record.delFlag,jdbcType=INTEGER}, |
||||
|
</if> |
||||
|
<if test="record.updateBy != null"> |
||||
|
update_by = #{record.updateBy,jdbcType=VARCHAR}, |
||||
|
</if> |
||||
|
<if test="record.updateTime != null"> |
||||
|
update_time = #{record.updateTime,jdbcType=TIMESTAMP}, |
||||
|
</if> |
||||
|
<if test="record.userId != null"> |
||||
|
user_id = #{record.userId,jdbcType=VARCHAR}, |
||||
|
</if> |
||||
|
<if test="record.shopId != null"> |
||||
|
shop_id = #{record.shopId,jdbcType=VARCHAR}, |
||||
|
</if> |
||||
|
<if test="record.totalAmount != null"> |
||||
|
total_amount = #{record.totalAmount,jdbcType=DECIMAL}, |
||||
|
</if> |
||||
|
<if test="record.discount != null"> |
||||
|
discount = #{record.discount,jdbcType=DECIMAL}, |
||||
|
</if> |
||||
|
<if test="record.discountAmount != null"> |
||||
|
discount_amount = #{record.discountAmount,jdbcType=DECIMAL}, |
||||
|
</if> |
||||
|
<if test="record.realAmount != null"> |
||||
|
real_amount = #{record.realAmount,jdbcType=DECIMAL}, |
||||
|
</if> |
||||
|
<if test="record.alreadyEarn != null"> |
||||
|
already_earn = #{record.alreadyEarn,jdbcType=DECIMAL}, |
||||
|
</if> |
||||
|
<if test="record.noEarn != null"> |
||||
|
no_earn = #{record.noEarn,jdbcType=DECIMAL}, |
||||
|
</if> |
||||
|
<if test="record.payStatus != null"> |
||||
|
pay_status = #{record.payStatus,jdbcType=VARCHAR}, |
||||
|
</if> |
||||
|
<if test="record.status != null"> |
||||
|
status = #{record.status,jdbcType=VARCHAR}, |
||||
|
</if> |
||||
|
<if test="record.transportType != null"> |
||||
|
transport_type = #{record.transportType,jdbcType=VARCHAR}, |
||||
|
</if> |
||||
|
<if test="record.shareAddress != null"> |
||||
|
share_address = #{record.shareAddress,jdbcType=VARCHAR}, |
||||
|
</if> |
||||
|
<if test="record.receiveAddress != null"> |
||||
|
receive_address = #{record.receiveAddress,jdbcType=VARCHAR}, |
||||
|
</if> |
||||
|
<if test="record.province != null"> |
||||
|
province = #{record.province,jdbcType=VARCHAR}, |
||||
|
</if> |
||||
|
<if test="record.city != null"> |
||||
|
city = #{record.city,jdbcType=VARCHAR}, |
||||
|
</if> |
||||
|
<if test="record.area != null"> |
||||
|
area = #{record.area,jdbcType=VARCHAR}, |
||||
|
</if> |
||||
|
</set> |
||||
|
<if test="_parameter != null"> |
||||
|
<include refid="Update_By_Example_Where_Clause" /> |
||||
|
</if> |
||||
|
</update> |
||||
|
<update id="updateByExample" parameterType="map"> |
||||
|
update t_return_sale |
||||
|
set id = #{record.id,jdbcType=VARCHAR}, |
||||
|
sale_id = #{record.saleId,jdbcType=VARCHAR}, |
||||
|
create_by = #{record.createBy,jdbcType=VARCHAR}, |
||||
|
create_time = #{record.createTime,jdbcType=TIMESTAMP}, |
||||
|
del_flag = #{record.delFlag,jdbcType=INTEGER}, |
||||
|
update_by = #{record.updateBy,jdbcType=VARCHAR}, |
||||
|
update_time = #{record.updateTime,jdbcType=TIMESTAMP}, |
||||
|
user_id = #{record.userId,jdbcType=VARCHAR}, |
||||
|
shop_id = #{record.shopId,jdbcType=VARCHAR}, |
||||
|
total_amount = #{record.totalAmount,jdbcType=DECIMAL}, |
||||
|
discount = #{record.discount,jdbcType=DECIMAL}, |
||||
|
discount_amount = #{record.discountAmount,jdbcType=DECIMAL}, |
||||
|
real_amount = #{record.realAmount,jdbcType=DECIMAL}, |
||||
|
already_earn = #{record.alreadyEarn,jdbcType=DECIMAL}, |
||||
|
no_earn = #{record.noEarn,jdbcType=DECIMAL}, |
||||
|
pay_status = #{record.payStatus,jdbcType=VARCHAR}, |
||||
|
status = #{record.status,jdbcType=VARCHAR}, |
||||
|
transport_type = #{record.transportType,jdbcType=VARCHAR}, |
||||
|
share_address = #{record.shareAddress,jdbcType=VARCHAR}, |
||||
|
receive_address = #{record.receiveAddress,jdbcType=VARCHAR}, |
||||
|
province = #{record.province,jdbcType=VARCHAR}, |
||||
|
city = #{record.city,jdbcType=VARCHAR}, |
||||
|
area = #{record.area,jdbcType=VARCHAR} |
||||
|
<if test="_parameter != null"> |
||||
|
<include refid="Update_By_Example_Where_Clause" /> |
||||
|
</if> |
||||
|
</update> |
||||
|
<update id="updateByPrimaryKeySelective" parameterType="cc.hiver.mall.entity.ReturnSale"> |
||||
|
update t_return_sale |
||||
|
<set> |
||||
|
<if test="saleId != null"> |
||||
|
sale_id = #{saleId,jdbcType=VARCHAR}, |
||||
|
</if> |
||||
|
<if test="createBy != null"> |
||||
|
create_by = #{createBy,jdbcType=VARCHAR}, |
||||
|
</if> |
||||
|
<if test="createTime != null"> |
||||
|
create_time = #{createTime,jdbcType=TIMESTAMP}, |
||||
|
</if> |
||||
|
<if test="delFlag != null"> |
||||
|
del_flag = #{delFlag,jdbcType=INTEGER}, |
||||
|
</if> |
||||
|
<if test="updateBy != null"> |
||||
|
update_by = #{updateBy,jdbcType=VARCHAR}, |
||||
|
</if> |
||||
|
<if test="updateTime != null"> |
||||
|
update_time = #{updateTime,jdbcType=TIMESTAMP}, |
||||
|
</if> |
||||
|
<if test="userId != null"> |
||||
|
user_id = #{userId,jdbcType=VARCHAR}, |
||||
|
</if> |
||||
|
<if test="shopId != null"> |
||||
|
shop_id = #{shopId,jdbcType=VARCHAR}, |
||||
|
</if> |
||||
|
<if test="totalAmount != null"> |
||||
|
total_amount = #{totalAmount,jdbcType=DECIMAL}, |
||||
|
</if> |
||||
|
<if test="discount != null"> |
||||
|
discount = #{discount,jdbcType=DECIMAL}, |
||||
|
</if> |
||||
|
<if test="discountAmount != null"> |
||||
|
discount_amount = #{discountAmount,jdbcType=DECIMAL}, |
||||
|
</if> |
||||
|
<if test="realAmount != null"> |
||||
|
real_amount = #{realAmount,jdbcType=DECIMAL}, |
||||
|
</if> |
||||
|
<if test="alreadyEarn != null"> |
||||
|
already_earn = #{alreadyEarn,jdbcType=DECIMAL}, |
||||
|
</if> |
||||
|
<if test="noEarn != null"> |
||||
|
no_earn = #{noEarn,jdbcType=DECIMAL}, |
||||
|
</if> |
||||
|
<if test="payStatus != null"> |
||||
|
pay_status = #{payStatus,jdbcType=VARCHAR}, |
||||
|
</if> |
||||
|
<if test="status != null"> |
||||
|
status = #{status,jdbcType=VARCHAR}, |
||||
|
</if> |
||||
|
<if test="transportType != null"> |
||||
|
transport_type = #{transportType,jdbcType=VARCHAR}, |
||||
|
</if> |
||||
|
<if test="shareAddress != null"> |
||||
|
share_address = #{shareAddress,jdbcType=VARCHAR}, |
||||
|
</if> |
||||
|
<if test="receiveAddress != null"> |
||||
|
receive_address = #{receiveAddress,jdbcType=VARCHAR}, |
||||
|
</if> |
||||
|
<if test="province != null"> |
||||
|
province = #{province,jdbcType=VARCHAR}, |
||||
|
</if> |
||||
|
<if test="city != null"> |
||||
|
city = #{city,jdbcType=VARCHAR}, |
||||
|
</if> |
||||
|
<if test="area != null"> |
||||
|
area = #{area,jdbcType=VARCHAR}, |
||||
|
</if> |
||||
|
</set> |
||||
|
where id = #{id,jdbcType=VARCHAR} |
||||
|
</update> |
||||
|
<update id="updateByPrimaryKey" parameterType="cc.hiver.mall.entity.ReturnSale"> |
||||
|
update t_return_sale |
||||
|
set sale_id = #{saleId,jdbcType=VARCHAR}, |
||||
|
create_by = #{createBy,jdbcType=VARCHAR}, |
||||
|
create_time = #{createTime,jdbcType=TIMESTAMP}, |
||||
|
del_flag = #{delFlag,jdbcType=INTEGER}, |
||||
|
update_by = #{updateBy,jdbcType=VARCHAR}, |
||||
|
update_time = #{updateTime,jdbcType=TIMESTAMP}, |
||||
|
user_id = #{userId,jdbcType=VARCHAR}, |
||||
|
shop_id = #{shopId,jdbcType=VARCHAR}, |
||||
|
total_amount = #{totalAmount,jdbcType=DECIMAL}, |
||||
|
discount = #{discount,jdbcType=DECIMAL}, |
||||
|
discount_amount = #{discountAmount,jdbcType=DECIMAL}, |
||||
|
real_amount = #{realAmount,jdbcType=DECIMAL}, |
||||
|
already_earn = #{alreadyEarn,jdbcType=DECIMAL}, |
||||
|
no_earn = #{noEarn,jdbcType=DECIMAL}, |
||||
|
pay_status = #{payStatus,jdbcType=VARCHAR}, |
||||
|
status = #{status,jdbcType=VARCHAR}, |
||||
|
transport_type = #{transportType,jdbcType=VARCHAR}, |
||||
|
share_address = #{shareAddress,jdbcType=VARCHAR}, |
||||
|
receive_address = #{receiveAddress,jdbcType=VARCHAR}, |
||||
|
province = #{province,jdbcType=VARCHAR}, |
||||
|
city = #{city,jdbcType=VARCHAR}, |
||||
|
area = #{area,jdbcType=VARCHAR} |
||||
|
where id = #{id,jdbcType=VARCHAR} |
||||
|
</update> |
||||
|
</mapper> |
||||
Loading…
Reference in new issue