Commit 1d6e99a0 by huluobin

update mail passwd

parent bf6c6419
......@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.gogirl.domain.product.purchase.PurchaseSku;
import com.gogirl.shared.product.PurchaseSkuPOI;
import com.gogirl.shared.product.PurchaseSkuPOI2;
import java.util.List;
......@@ -54,4 +55,6 @@ public interface PurchaseSkuMapper extends BaseMapper<PurchaseSku> {
* @param sku
*/
PurchaseSku selectBySku(String sku);
List<PurchaseSkuPOI2> purchaseSkuExcel2();
}
package com.gogirl.shared.product.excel;
package com.gogirl.shared.product;
import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
import java.math.BigDecimal;
import java.net.URL;
/**
* <p>
......@@ -12,29 +16,50 @@ import java.math.BigDecimal;
* </p>
*
* @author robbendev
* @since 2020/6/6 5:35 下午
* @since 2020/5/14 3:15 下午
*/
@Data
public class ExportPurchaseSkuExcel implements Serializable {
public class PurchaseSkuPOI2 implements Serializable {
@ExcelProperty("sku")
@ApiModelProperty("sku码")
@ColumnWidth(20)
private String sku;
@ExcelIgnore
@ApiModelProperty("商品图")
@ColumnWidth(20)
private String picturePath;
@ExcelProperty("名称")
private String name;
@ApiModelProperty("商品名字")
@ColumnWidth(20)
private String skuName;
@ColumnWidth(10)
@ExcelProperty("店铺看到的价格")
private BigDecimal shopPrice;
@ColumnWidth(10)
@ExcelProperty("采购价格")
private BigDecimal purchasePrice;
@ExcelProperty("分类")
private String category;
@ApiModelProperty("分类名称")
@ColumnWidth(20)
private String skuType;
@ExcelProperty("型号")
private String model;
@ColumnWidth(20)
private String skuModel;
@ExcelProperty(value = "sku图片")
@ApiModelProperty("商品图")
private URL imagesUrl;
@ExcelProperty(value = "库存数量")
@ApiModelProperty("库存数量")
private Integer quantity;
@ExcelProperty("库存")
private String stock;
}
......@@ -33,7 +33,7 @@
t2.`name` sku_type,
t1.sku_model,
t1.shop_price,
t1.purchase_price,
t1.purchase_price,cost/list/reset/resetInvoice
t3.num quantity
from purchase_sku t1
LEFT JOIN purchase_sku_type t2 on t1.sku_type = t2.id
......@@ -55,4 +55,8 @@
limit 1
</select>
<select id="purchaseSkuExcel2" resultType="com.gogirl.shared.product.PurchaseSkuPOI2">
</select>
</mapper>
......@@ -145,6 +145,7 @@
and tech.user_id in (select user_id from staff_store_authority where store_id = #{departmentId})
and cls.department_id = #{departmentId}
and tech.`status` = 1
GROUP BY ct.id
order by t6.score
</select>
......
......@@ -711,6 +711,13 @@ public class Test {
EasyExcel.write("/Users/huluobin/exportSku.xlsx", PurchaseSkuPOI.class).sheet().doWrite(purchaseSkuPOIS);
}
@org.junit.Test
public void exportSku2() {
List<PurchaseSkuPOI2> purchaseSkuPOIS = purchaseSkuMapper.purchaseSkuExcel2();
EasyExcel.write("/Users/huluobin/exportSku2.xlsx", PurchaseSkuPOI2.class).sheet().doWrite(PurchaseSkuPOI2);
}
@Resource
MallProductMapper mallProductMapper;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment