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
ae000099
Commit
ae000099
authored
May 26, 2020
by
huluobin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
考勤
parent
3ef9d884
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
20 additions
and
10 deletions
+20
-10
PurchaseSkuPOI.java
src/main/java/com/gogirl/shared/product/PurchaseSkuPOI.java
+15
-5
PurchaseSkuMapper.xml
src/main/resources/mapper/product/PurchaseSkuMapper.xml
+1
-1
TakeLeaveEventMapper.xml
src/main/resources/mapper/store/TakeLeaveEventMapper.xml
+3
-2
Test.java
src/test/java/com/gogirl/Test.java
+1
-2
No files found.
src/main/java/com/gogirl/shared/product/PurchaseSkuPOI.java
View file @
ae000099
...
@@ -6,6 +6,7 @@ import com.alibaba.excel.annotation.write.style.ColumnWidth;
...
@@ -6,6 +6,7 @@ import com.alibaba.excel.annotation.write.style.ColumnWidth;
import
io.swagger.annotations.ApiModelProperty
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
lombok.Data
;
import
java.math.BigDecimal
;
import
java.net.URL
;
import
java.net.URL
;
/**
/**
...
@@ -21,30 +22,39 @@ public class PurchaseSkuPOI {
...
@@ -21,30 +22,39 @@ public class PurchaseSkuPOI {
@ExcelProperty
(
"sku"
)
@ExcelProperty
(
"sku"
)
@ApiModelProperty
(
"sku码"
)
@ApiModelProperty
(
"sku码"
)
@ColumnWidth
(
5
0
)
@ColumnWidth
(
2
0
)
private
String
sku
;
private
String
sku
;
@ExcelIgnore
@ExcelIgnore
@ApiModelProperty
(
"商品图"
)
@ApiModelProperty
(
"商品图"
)
@ColumnWidth
(
5
0
)
@ColumnWidth
(
2
0
)
private
String
picturePath
;
private
String
picturePath
;
@ExcelProperty
(
"名称"
)
@ExcelProperty
(
"名称"
)
@ApiModelProperty
(
"商品名字"
)
@ApiModelProperty
(
"商品名字"
)
@ColumnWidth
(
5
0
)
@ColumnWidth
(
2
0
)
private
String
skuName
;
private
String
skuName
;
@ColumnWidth
(
10
)
@ExcelProperty
(
"店铺看到的价格"
)
private
BigDecimal
shopPrice
;
@ColumnWidth
(
10
)
@ExcelProperty
(
"采购价格"
)
private
BigDecimal
purchasePrice
;
@ExcelProperty
(
"分类"
)
@ExcelProperty
(
"分类"
)
@ApiModelProperty
(
"分类名称"
)
@ApiModelProperty
(
"分类名称"
)
@ColumnWidth
(
5
0
)
@ColumnWidth
(
2
0
)
private
String
skuType
;
private
String
skuType
;
@ExcelProperty
(
"型号"
)
@ExcelProperty
(
"型号"
)
@ColumnWidth
(
5
0
)
@ColumnWidth
(
2
0
)
private
String
skuModel
;
private
String
skuModel
;
@ExcelProperty
(
value
=
"sku图片"
)
@ExcelProperty
(
value
=
"sku图片"
)
@ApiModelProperty
(
"商品图"
)
@ApiModelProperty
(
"商品图"
)
private
URL
imagesUrl
;
private
URL
imagesUrl
;
}
}
src/main/resources/mapper/product/PurchaseSkuMapper.xml
View file @
ae000099
...
@@ -27,7 +27,7 @@
...
@@ -27,7 +27,7 @@
<select
id=
"purchaseSkuExcel"
resultType=
"com.gogirl.shared.product.PurchaseSkuPOI"
>
<select
id=
"purchaseSkuExcel"
resultType=
"com.gogirl.shared.product.PurchaseSkuPOI"
>
SELECT t1.sku, t1.picture_path, t1.sku_name, t2.`name` sku_type, t1.sku_model
SELECT t1.sku, t1.picture_path, t1.sku_name, t2.`name` sku_type, t1.sku_model
, t1.shop_price, t1.purchase_price
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
...
...
src/main/resources/mapper/store/TakeLeaveEventMapper.xml
View file @
ae000099
...
@@ -6,11 +6,12 @@
...
@@ -6,11 +6,12 @@
SELECT *
SELECT *
from take_leave_event
from take_leave_event
where ((start_time
<
#{endTime} and end_time
>
#{endTime})
where ((start_time
<
#{endTime} and end_time
>
#{endTime})
or (start_time
<
#{startTime} and
start
_time
>
#{startTime})
or (start_time
<
#{startTime} and
end
_time
>
#{startTime})
or (start_time
>
#{startTime} and end_time
<
#{endTime}))
or (start_time
>
= #{startTime} and end_time
<
=
#{endTime}))
and apply_technician_id = #{applyTechnicianId}
and apply_technician_id = #{applyTechnicianId}
and `status` != 3
and `status` != 3
</select>
</select>
<select
id=
"takeLeaveId"
resultType=
"com.gogirl.domain.store.oa.OvertimeRecord"
>
<select
id=
"takeLeaveId"
resultType=
"com.gogirl.domain.store.oa.OvertimeRecord"
>
SELECT t1.*
SELECT t1.*
from over_time_record t1
from over_time_record t1
...
...
src/test/java/com/gogirl/Test.java
View file @
ae000099
...
@@ -676,7 +676,7 @@ public class Test {
...
@@ -676,7 +676,7 @@ public class Test {
List
<
PurchaseSkuPOI
>
purchaseSkuPOIList
=
purchaseSkuMapper
.
purchaseSkuExcel
();
List
<
PurchaseSkuPOI
>
purchaseSkuPOIList
=
purchaseSkuMapper
.
purchaseSkuExcel
();
// List<PurchaseSkuPOI>
// List<PurchaseSkuPOI>
String
fileName
=
"/Users/huluobin/purchaseSku
2
.xlsx"
;
String
fileName
=
"/Users/huluobin/purchaseSku
4
.xlsx"
;
purchaseSkuPOIList
.
forEach
(
purchaseSkuPOI
->
{
purchaseSkuPOIList
.
forEach
(
purchaseSkuPOI
->
{
try
{
try
{
...
@@ -693,7 +693,6 @@ public class Test {
...
@@ -693,7 +693,6 @@ public class Test {
});
});
EasyExcel
.
write
(
fileName
,
PurchaseSkuPOI
.
class
).
sheet
(
"purchaseSku"
).
doWrite
(
purchaseSkuPOIList
);
EasyExcel
.
write
(
fileName
,
PurchaseSkuPOI
.
class
).
sheet
(
"purchaseSku"
).
doWrite
(
purchaseSkuPOIList
);
}
}
}
}
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