Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
为 GitLab 提交贡献
登录/注册
切换导航
C
chinafrica
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
zhengfg
chinafrica
Commits
0e10dc5c
提交
0e10dc5c
authored
2月 20, 2020
作者:
zgy
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
接口优化
上级
99040568
隐藏空白字符变更
内嵌
并排
正在显示
14 个修改的文件
包含
83 行增加
和
40 行删除
+83
-40
TbCfStationItemController.java
...va/com/platform/controller/TbCfStationItemController.java
+7
-0
uploadController.java
...in/java/com/platform/controller/api/uploadController.java
+2
-1
TbCfStationItemEntityExtends.java
...ava/com/platform/entity/TbCfStationItemEntityExtends.java
+12
-0
TbCfStationItemService.java
...ain/java/com/platform/service/TbCfStationItemService.java
+2
-0
TbCfStationItemServiceImpl.java
...com/platform/service/impl/TbCfStationItemServiceImpl.java
+9
-1
ItemTask.java
platform-admin/src/main/java/com/platform/task/ItemTask.java
+2
-2
TbCfItemCommentDao.xml
...rc/main/resources/com/platform/dao/TbCfItemCommentDao.xml
+3
-1
TbCfStationItemDao.xml
...rc/main/resources/com/platform/dao/TbCfStationItemDao.xml
+20
-20
tbcfstationitem.html
...min/src/main/webapp/WEB-INF/page/sys/tbcfstationitem.html
+4
-4
tbcfexchange.js
platform-admin/src/main/webapp/js/sys/tbcfexchange.js
+1
-1
tbcfitemcomment.js
platform-admin/src/main/webapp/js/sys/tbcfitemcomment.js
+2
-2
tbcfstationitem.js
platform-admin/src/main/webapp/js/sys/tbcfstationitem.js
+3
-3
year.html
platform-admin/src/main/webapp/year.html
+11
-0
OssUtil.java
...form-common/src/main/java/com/platform/utils/OssUtil.java
+5
-5
没有找到文件。
platform-admin/src/main/java/com/platform/controller/TbCfStationItemController.java
浏览文件 @
0e10dc5c
...
...
@@ -204,4 +204,11 @@ public class TbCfStationItemController extends ApiBaseAction {
return
R
.
error
();
}
}
@RequestMapping
(
"/importShopifyProducts"
)
@ResponseBody
public
R
importShopifyProducts
(
@RequestParam
(
"file"
)
MultipartFile
multipartFile
)
{
tbCfStationItemService
.
importShopifyProducts
(
multipartFile
);
return
R
.
ok
();
}
}
platform-admin/src/main/java/com/platform/controller/api/uploadController.java
浏览文件 @
0e10dc5c
...
...
@@ -6,6 +6,7 @@ import com.platform.utils.R;
import
com.platform.utils.util.UuidUtil
;
import
org.springframework.stereotype.Controller
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.bind.annotation.ResponseBody
;
import
org.springframework.web.multipart.MultipartFile
;
...
...
@@ -21,8 +22,8 @@ import java.io.File;
public
class
uploadController
{
@IgnoreAuth
@RequestMapping
(
value
=
"/uploadFile"
,
produces
=
"application/json;charset=UTF-8"
)
@ResponseBody
@RequestMapping
(
value
=
"/uploadFile"
,
produces
=
"application/json;charset=UTF-8"
)
public
String
upload
(
MultipartFile
file
)
{
try
{
String
secondaryFolderName
=
"Afrishop"
;
...
...
platform-admin/src/main/java/com/platform/entity/TbCfStationItemEntityExtends.java
浏览文件 @
0e10dc5c
package
com
.
platform
.
entity
;
import
java.io.Serializable
;
import
java.math.BigDecimal
;
public
class
TbCfStationItemEntityExtends
extends
TbCfStationItemEntity
implements
Serializable
{
...
...
@@ -9,6 +10,17 @@ public class TbCfStationItemEntityExtends extends TbCfStationItemEntity implemen
private
String
title
;
private
String
goodtype
;
private
String
itemDesc
;
private
BigDecimal
discountPrice
;
@Override
public
BigDecimal
getDiscountPrice
()
{
return
discountPrice
;
}
@Override
public
void
setDiscountPrice
(
BigDecimal
discountPrice
)
{
this
.
discountPrice
=
discountPrice
;
}
public
String
getItemDesc
()
{
return
itemDesc
;
...
...
platform-admin/src/main/java/com/platform/service/TbCfStationItemService.java
浏览文件 @
0e10dc5c
...
...
@@ -94,4 +94,6 @@ public interface TbCfStationItemService {
void
exportExcel
()
throws
IOException
;
void
importExcel
(
MultipartFile
multipartFile
);
R
importShopifyProducts
(
MultipartFile
multipartFile
);
}
platform-admin/src/main/java/com/platform/service/impl/TbCfStationItemServiceImpl.java
浏览文件 @
0e10dc5c
...
...
@@ -5,6 +5,7 @@ import com.platform.entity.*;
import
com.platform.service.TbCfStationItemService
;
import
com.platform.utils.IdUtil
;
import
com.platform.utils.OssUtil
;
import
com.platform.utils.R
;
import
com.platform.utils.UuidUtil
;
import
com.platform.utils.excel.ExcelExport
;
import
com.platform.utils.excel.ExcelImport
;
...
...
@@ -258,7 +259,6 @@ public class TbCfStationItemServiceImpl implements TbCfStationItemService {
tbCfCategoryDao
.
deleteByItemId
(
itemId
);
tbCfOptionDao
.
deleteByItemId
(
itemId
);
//商品规格
//商品规格
List
<
TbCfCategoryEntity
>
tree
=
itemSkus
.
getTree
();
for
(
int
i
=
0
;
i
<
tree
.
size
();
i
++)
{
String
cid
=
IdUtil
.
createIdbyUUID
();
...
...
@@ -381,6 +381,7 @@ public class TbCfStationItemServiceImpl implements TbCfStationItemService {
}
}
//"商品编号", "商品名称", "商品标题", "商品标签", "商品价格", "折扣价格", "库存","商品图片", "一级分类", "二级分类", "商品品名", "状态", "创建时间", "商品详情"
public
void
handleExcel
(
String
[]
values
)
{
//商品信息
...
...
@@ -428,5 +429,12 @@ public class TbCfStationItemServiceImpl implements TbCfStationItemService {
desc
.
setDelFlag
(
1
);
tbCfItemDescDao
.
save
(
desc
);
}
@Override
public
R
importShopifyProducts
(
MultipartFile
multipartFile
)
{
Map
<
Integer
,
List
<
String
[]>>
productMap
=
ExcelImport
.
getExcelDataAll
(
multipartFile
);
return
null
;
}
}
platform-admin/src/main/java/com/platform/task/ItemTask.java
浏览文件 @
0e10dc5c
...
...
@@ -88,9 +88,9 @@ public class ItemTask {
product
.
setItemNum
(
0L
);
product
.
setPlatformCode
(
"afri-eshop"
);
product
.
setPlatformName
(
"afri-eshop"
);
product
.
setEnableFlag
(
0
);
product
.
setEnableFlag
(
3
);
product
.
setCreateTime
(
new
Date
());
tbCfStationItemDao
.
save
(
product
);
//
tbCfStationItemDao.save(product);
}
}
...
...
platform-admin/src/main/resources/com/platform/dao/TbCfItemCommentDao.xml
浏览文件 @
0e10dc5c
...
...
@@ -20,6 +20,8 @@
<result
property=
"createTime"
column=
"create_time"
/>
<result
property=
"updateTime"
column=
"update_time"
/>
<result
property=
"username"
column=
"nick"
></result>
<result
property=
"orderNo"
column=
"order_no"
></result>
<result
property=
"itemName"
column=
"item_name"
></result>
</resultMap>
<select
id=
"queryObject"
resultType=
"com.platform.entity.TbCfItemCommentEntity"
>
...
...
@@ -43,7 +45,7 @@
where id = #{id}
</select>
<select
id=
"queryList"
result
Map=
"tbCfItemCommentMap
"
>
<select
id=
"queryList"
result
Type=
"com.platform.entity.TbCfItemCommentEntity
"
>
SELECT
c.id,
c.user_id,
...
...
platform-admin/src/main/resources/com/platform/dao/TbCfStationItemDao.xml
浏览文件 @
0e10dc5c
...
...
@@ -214,26 +214,26 @@
<update
id=
"update"
parameterType=
"com.platform.entity.TbCfStationItemEntity"
>
update tb_cf_station_item
<set>
<if
test=
"itemCode != null"
>
`item_code` = #{itemCode},
</if>
<if
test=
"itemName != null"
>
`item_name` = #{itemName},
</if>
<if
test=
"itemBrief != null"
>
`item_brief` = #{itemBrief},
</if>
<if
test=
"itemCategory != null"
>
`item_category` = #{itemCategory},
</if>
<if
test=
"itemPrice != null"
>
`item_price` = #{itemPrice},
</if>
<if
test=
"discountPrice != null"
>
`discount_price` = #{discountPrice},
</if>
<if
test=
"itemUrl != null"
>
`item_url` = #{itemUrl},
</if>
<if
test=
"itemImg != null"
>
`item_img` = #{itemImg},
</if>
<if
test=
"itemTags != null"
>
`item_tags` = #{itemTags},
</if>
<if
test=
"itemNum != null"
>
`item_num` = #{itemNum},
</if>
<if
test=
"itemCollectionNum != null"
>
`item_collection_num` = #{itemCollectionNum},
</if>
<if
test=
"itemCount != null"
>
`item_count` = #{itemCount},
</if>
<if
test=
"itemSku != null"
>
`item_sku` = #{itemSku},
</if>
<if
test=
"itemTop != null"
>
`item_top` = #{itemTop},
</if>
<if
test=
"supplier != null"
>
`supplier` = #{supplier},
</if>
<if
test=
"platformCode != null"
>
`platform_code` = #{platformCode},
</if>
<if
test=
"platformName != null"
>
`platform_name` = #{platformName},
</if>
<if
test=
"enableFlag != null"
>
`enable_flag` = #{enableFlag},
</if>
<if
test=
"createTime != null"
>
`create_time` = #{createTime},
</if>
<if
test=
"itemCategorytwo != null"
>
`item_categorytwo` = #{itemCategorytwo},
</if>
<if
test=
"itemCode != null"
>
`item_code` = #{itemCode},
</if>
<if
test=
"itemName != null"
>
`item_name` = #{itemName},
</if>
<if
test=
"itemBrief != null"
>
`item_brief` = #{itemBrief},
</if>
<if
test=
"itemCategory != null"
>
`item_category` = #{itemCategory},
</if>
`item_price` = #{itemPrice},
<if
test=
"discountPrice != null"
>
`discount_price` = #{discountPrice},
</if>
<if
test=
"itemUrl != null"
>
`item_url` = #{itemUrl},
</if>
<if
test=
"itemImg != null"
>
`item_img` = #{itemImg},
</if>
<if
test=
"itemTags != null"
>
`item_tags` = #{itemTags},
</if>
<if
test=
"itemNum != null"
>
`item_num` = #{itemNum},
</if>
<if
test=
"itemCollectionNum != null"
>
`item_collection_num` = #{itemCollectionNum},
</if>
<if
test=
"itemCount != null"
>
`item_count` = #{itemCount},
</if>
<if
test=
"itemSku != null"
>
`item_sku` = #{itemSku},
</if>
<if
test=
"itemTop != null"
>
`item_top` = #{itemTop},
</if>
<if
test=
"supplier != null"
>
`supplier` = #{supplier},
</if>
<if
test=
"platformCode != null"
>
`platform_code` = #{platformCode},
</if>
<if
test=
"platformName != null"
>
`platform_name` = #{platformName},
</if>
<if
test=
"enableFlag != null"
>
`enable_flag` = #{enableFlag},
</if>
<if
test=
"createTime != null"
>
`create_time` = #{createTime},
</if>
<if
test=
"itemCategorytwo != null"
>
`item_categorytwo` = #{itemCategorytwo},
</if>
<if
test=
"itemDescritionId != null"
>
`item_descrition_id` = #{itemDescritionId}
</if>
</set>
where item_id = #{itemId}
...
...
platform-admin/src/main/webapp/WEB-INF/page/sys/tbcfstationitem.html
浏览文件 @
0e10dc5c
...
...
@@ -258,11 +258,11 @@
<Form-item
label=
"商品标签"
prop=
"itemTags"
style=
"width: 800px"
>
<i-input
v-model=
"tbCfStationItem.itemTags"
placeholder=
"商品标签"
/>
</Form-item>
<Form-item
label=
"
商品价格
"
prop=
"itemPrice"
style=
"width: 800px"
>
<i-input
v-model=
"tbCfStationItem.itemPrice"
placeholder=
"
商品价格
"
/>
<Form-item
label=
"
原价
"
prop=
"itemPrice"
style=
"width: 800px"
>
<i-input
v-model=
"tbCfStationItem.itemPrice"
placeholder=
"
原价(可不填)
"
/>
</Form-item>
<Form-item
label=
"
商品折扣价格
"
prop=
"discountPrice"
style=
"width: 800px"
>
<i-input
v-model=
"tbCfStationItem.discountPrice"
placeholder=
"
商品折扣价格
"
/>
<Form-item
label=
"
现价
"
prop=
"discountPrice"
style=
"width: 800px"
>
<i-input
v-model=
"tbCfStationItem.discountPrice"
placeholder=
"
现价
"
/>
</Form-item>
<!-- <Form-item label="商品库存" prop="item_count" style="width: 800px">
<i-input v-model="tbCfStationItem.itemCount" placeholder="商品库存"/>
...
...
platform-admin/src/main/webapp/js/sys/tbcfexchange.js
浏览文件 @
0e10dc5c
...
...
@@ -7,7 +7,7 @@ $(function () {
{
label
:
'货币'
,
name
:
'currency'
,
index
:
'currency'
,
width
:
80
},
{
label
:
'兑换货币'
,
name
:
'exchangeCurrency'
,
index
:
'exchange_currency'
,
width
:
80
},
{
label
:
'汇率'
,
name
:
'exchangeRate'
,
index
:
'exchange_rate'
,
width
:
80
},
{
label
:
'状态'
,
name
:
'delFlag'
,
index
:
'del_flag'
,
width
:
80
},
{
label
:
'状态'
,
name
:
'delFlag'
,
index
:
'del_flag'
,
width
:
80
,
formatter
:
categoryFormat
},
{
label
:
'创建时间'
,
name
:
'createTime'
,
index
:
'create_time'
,
width
:
80
}
],
shrinkToFit
:
true
,
...
...
platform-admin/src/main/webapp/js/sys/tbcfitemcomment.js
浏览文件 @
0e10dc5c
...
...
@@ -3,8 +3,8 @@ $(function () {
url
:
'../tbcfitemcomment/list'
,
colModel
:
[
{
label
:
'id'
,
name
:
'id'
,
index
:
'id'
,
key
:
true
,
hidden
:
true
},
{
label
:
'评论人'
,
name
:
'userName'
,
index
:
'user
n
ame'
,
width
:
80
},
{
label
:
'订单号'
,
name
:
'orderNo'
,
index
:
'order
_id
'
,
width
:
80
},
{
label
:
'评论人'
,
name
:
'userName'
,
index
:
'user
N
ame'
,
width
:
80
},
{
label
:
'订单号'
,
name
:
'orderNo'
,
index
:
'order
No
'
,
width
:
80
},
{
label
:
'商品名称'
,
name
:
'itemName'
,
index
:
'item_id'
,
width
:
80
},
{
label
:
'商品评分'
,
name
:
'itemScore'
,
index
:
'item_score'
,
width
:
80
},
{
label
:
'服务评分'
,
name
:
'serviceScore'
,
index
:
'service_score'
,
width
:
80
},
...
...
platform-admin/src/main/webapp/js/sys/tbcfstationitem.js
浏览文件 @
0e10dc5c
...
...
@@ -8,8 +8,8 @@ $(function () {
{
label
:
'商品名称'
,
name
:
'itemName'
,
index
:
'item_name'
,
width
:
160
},
/* {label: '商品标题', name: 'itemBrief', index: 'item_brief', width: 120},*/
/*{label: '商品链接', name: 'itemUrl', index: 'item_url', width: 80,formatter:linkFormat},*/
{
label
:
'商品
价格
'
,
name
:
'itemPrice'
,
index
:
'item_price'
,
width
:
45
},
{
label
:
'
折扣价格
'
,
name
:
'discountPrice'
,
index
:
'discount_price'
,
width
:
45
},
{
label
:
'商品
原价
'
,
name
:
'itemPrice'
,
index
:
'item_price'
,
width
:
45
},
{
label
:
'
商品现价
'
,
name
:
'discountPrice'
,
index
:
'discount_price'
,
width
:
45
},
{
label
:
'库存'
,
name
:
'itemCount'
,
index
:
'item_count'
,
width
:
45
},
{
label
:
'点击量'
,
name
:
'itemNum'
,
index
:
'item_num'
,
width
:
45
},
/*{label: '所属平台', name: 'platformCode', index: 'platform_code', width: 80},
...
...
@@ -498,7 +498,7 @@ let vm = new Vue({
}
},
ok
()
{
this
.
reloadSearch
();
vm
.
reload
();
},
cancel
()
{
},
...
...
platform-admin/src/main/webapp/year.html
0 → 100644
浏览文件 @
0e10dc5c
<!DOCTYPE html>
<html
lang=
"en"
>
<head>
<meta
meta
name=
"viewport"
content=
"width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no, minimal-ui"
charset=
"UTF-8"
>
<title>
Notice
</title>
</head>
<body>
<img
src=
"https://diaosaas-prod.oss-cn-shenzhen.aliyuncs.com/africa-shop/Afrishop/year.jpg"
/>
</body>
</html>
\ No newline at end of file
platform-common/src/main/java/com/platform/utils/OssUtil.java
浏览文件 @
0e10dc5c
...
...
@@ -382,13 +382,13 @@ public class OssUtil {
}
public
static
void
main
(
String
[]
args
)
throws
Exception
{
File
file
=
new
File
(
"C:\\Users\\Administrator\\Pictures\\
四等奖_20190918194024.pn
g"
);
File
file
=
new
File
(
"C:\\Users\\Administrator\\Pictures\\
year.jp
g"
);
byte
[]
b
=
File2byte
(
file
);
System
.
out
.
println
(
b
);
boolean
flag
=
deleteFile
(
"https://diaosaas-prod.oss-cn-shenzhen.aliyuncs.com/africa-shop/Afrishop/157865444910310855.png"
);
// String s = upload(b, "hello.png", "hello
");
//
System.out.println(s);
System
.
out
.
println
(
flag
);
//
boolean flag = deleteFile("https://diaosaas-prod.oss-cn-shenzhen.aliyuncs.com/africa-shop/Afrishop/157865444910310855.png");
String
s
=
upload
(
b
,
"year.jpg"
,
"Afrishop
"
);
System
.
out
.
println
(
s
);
//
System.out.println(flag);
}
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论