Commit 1d6e99a0 by huluobin

update mail passwd

parent bf6c6419
...@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper; ...@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import com.gogirl.domain.product.purchase.PurchaseSku; import com.gogirl.domain.product.purchase.PurchaseSku;
import com.gogirl.shared.product.PurchaseSkuPOI; import com.gogirl.shared.product.PurchaseSkuPOI;
import com.gogirl.shared.product.PurchaseSkuPOI2;
import java.util.List; import java.util.List;
...@@ -54,4 +55,6 @@ public interface PurchaseSkuMapper extends BaseMapper<PurchaseSku> { ...@@ -54,4 +55,6 @@ public interface PurchaseSkuMapper extends BaseMapper<PurchaseSku> {
* @param sku * @param sku
*/ */
PurchaseSku selectBySku(String 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.ExcelProperty;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
import java.io.Serializable; import java.io.Serializable;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.net.URL;
/** /**
* <p> * <p>
...@@ -12,29 +16,50 @@ import java.math.BigDecimal; ...@@ -12,29 +16,50 @@ import java.math.BigDecimal;
* </p> * </p>
* *
* @author robbendev * @author robbendev
* @since 2020/6/6 5:35 下午 * @since 2020/5/14 3:15 下午
*/ */
@Data @Data
public class ExportPurchaseSkuExcel implements Serializable { public class PurchaseSkuPOI2 implements Serializable {
@ExcelProperty("sku") @ExcelProperty("sku")
@ApiModelProperty("sku码")
@ColumnWidth(20)
private String sku; private String sku;
@ExcelIgnore
@ApiModelProperty("商品图")
@ColumnWidth(20)
private String picturePath;
@ExcelProperty("名称") @ExcelProperty("名称")
private String name; @ApiModelProperty("商品名字")
@ColumnWidth(20)
private String skuName;
@ColumnWidth(10)
@ExcelProperty("店铺看到的价格") @ExcelProperty("店铺看到的价格")
private BigDecimal shopPrice; private BigDecimal shopPrice;
@ColumnWidth(10)
@ExcelProperty("采购价格") @ExcelProperty("采购价格")
private BigDecimal purchasePrice; private BigDecimal purchasePrice;
@ExcelProperty("分类") @ExcelProperty("分类")
private String category; @ApiModelProperty("分类名称")
@ColumnWidth(20)
private String skuType;
@ExcelProperty("型号") @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 @@ ...@@ -33,7 +33,7 @@
t2.`name` sku_type, t2.`name` sku_type,
t1.sku_model, t1.sku_model,
t1.shop_price, t1.shop_price,
t1.purchase_price, t1.purchase_price,cost/list/reset/resetInvoice
t3.num quantity t3.num quantity
from purchase_sku t1 from purchase_sku t1
LEFT JOIN purchase_sku_type t2 on t1.sku_type = t2.id LEFT JOIN purchase_sku_type t2 on t1.sku_type = t2.id
...@@ -55,4 +55,8 @@ ...@@ -55,4 +55,8 @@
limit 1 limit 1
</select> </select>
<select id="purchaseSkuExcel2" resultType="com.gogirl.shared.product.PurchaseSkuPOI2">
</select>
</mapper> </mapper>
...@@ -145,6 +145,7 @@ ...@@ -145,6 +145,7 @@
and tech.user_id in (select user_id from staff_store_authority where store_id = #{departmentId}) and tech.user_id in (select user_id from staff_store_authority where store_id = #{departmentId})
and cls.department_id = #{departmentId} and cls.department_id = #{departmentId}
and tech.`status` = 1 and tech.`status` = 1
GROUP BY ct.id
order by t6.score order by t6.score
</select> </select>
......
...@@ -711,6 +711,13 @@ public class Test { ...@@ -711,6 +711,13 @@ public class Test {
EasyExcel.write("/Users/huluobin/exportSku.xlsx", PurchaseSkuPOI.class).sheet().doWrite(purchaseSkuPOIS); 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 @Resource
MallProductMapper mallProductMapper; 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