Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gogirl-miniapp-backend
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
huluobin
gogirl-miniapp-backend
Commits
1d6e99a0
Commit
1d6e99a0
authored
Jan 04, 2021
by
huluobin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update mail passwd
parent
bf6c6419
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
49 additions
and
9 deletions
+49
-9
PurchaseSkuMapper.java
...astructure/mapper/product/purchase/PurchaseSkuMapper.java
+3
-0
PurchaseSkuPOI2.java
src/main/java/com/gogirl/shared/product/PurchaseSkuPOI2.java
+33
-8
PurchaseSkuMapper.xml
src/main/resources/mapper/product/PurchaseSkuMapper.xml
+5
-1
StoreClassesTechnicianMapper.xml
...n/resources/mapper/store/StoreClassesTechnicianMapper.xml
+1
-0
Test.java
src/test/java/com/gogirl/Test.java
+7
-0
No files found.
src/main/java/com/gogirl/infrastructure/mapper/product/purchase/PurchaseSkuMapper.java
View file @
1d6e99a0
...
@@ -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
();
}
}
src/main/java/com/gogirl/shared/product/
excel/ExportPurchaseSkuExcel
.java
→
src/main/java/com/gogirl/shared/product/
PurchaseSkuPOI2
.java
View file @
1d6e99a0
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:3
5 下午
* @since 2020/
5/14 3:1
5 下午
*/
*/
@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
;
}
}
src/main/resources/mapper/product/PurchaseSkuMapper.xml
View file @
1d6e99a0
...
@@ -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>
src/main/resources/mapper/store/StoreClassesTechnicianMapper.xml
View file @
1d6e99a0
...
@@ -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>
...
...
src/test/java/com/gogirl/Test.java
View file @
1d6e99a0
...
@@ -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
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment