Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
为 GitLab 提交贡献
登录/注册
切换导航
C
chinafrica
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
zhengfg
chinafrica
Commits
5505d8f2
提交
5505d8f2
authored
10月 15, 2020
作者:
吴德鹏
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
优化落地页商品排序
上级
6d7a6be0
隐藏空白字符变更
内嵌
并排
正在显示
5 个修改的文件
包含
29 行增加
和
12 行删除
+29
-12
AdvertisementItemController.java
.../com/platform/controller/AdvertisementItemController.java
+2
-0
AdvertisementItemServiceImpl.java
...m/platform/service/impl/AdvertisementItemServiceImpl.java
+11
-0
platform.properties
platform-admin/src/main/resources/dev/platform.properties
+6
-6
platform.properties
platform-admin/src/main/resources/prod/platform.properties
+6
-6
ImpartCode.java
platform-admin/src/main/test/test/ImpartCode.java
+4
-0
没有找到文件。
platform-admin/src/main/java/com/platform/controller/AdvertisementItemController.java
浏览文件 @
5505d8f2
...
...
@@ -164,6 +164,8 @@ public class AdvertisementItemController {
return
R
.
error
(
"参数不能为空"
);
}
else
if
(
res
==
-
2
)
{
return
R
.
error
(
"序号不能跟原来相同"
);
}
else
if
(
res
==
-
3
)
{
return
R
.
error
(
"序号必须是正整数"
);
}
return
R
.
error
(
"操作失败"
);
}
...
...
platform-admin/src/main/java/com/platform/service/impl/AdvertisementItemServiceImpl.java
浏览文件 @
5505d8f2
...
...
@@ -14,6 +14,8 @@ import java.util.HashMap;
import
java.util.List
;
import
java.util.Map
;
import
java.util.concurrent.locks.ReentrantLock
;
import
java.util.regex.Matcher
;
import
java.util.regex.Pattern
;
/**
* Service实现类
...
...
@@ -122,7 +124,16 @@ public class AdvertisementItemServiceImpl implements AdvertisementItemService {
String
itemId
=
map
.
get
(
"itemId"
).
toString
();
String
adId
=
map
.
get
(
"adId"
).
toString
();
String
sort
=
map
.
get
(
"sort"
).
toString
();
if
(!
StringUtils
.
isNumeric
(
sort
))
{
return
-
3
;
}
Integer
itemSort
=
Integer
.
parseInt
(
sort
);
String
regex
=
"^[1-9]+[0-9]*$"
;
Pattern
p
=
Pattern
.
compile
(
regex
);
Matcher
matcher
=
p
.
matcher
(
sort
);
if
(!
matcher
.
matches
())
{
return
-
3
;
}
if
(
itemId
==
null
||
itemId
==
""
)
{
return
-
1
;
}
...
...
platform-admin/src/main/resources/dev/platform.properties
浏览文件 @
5505d8f2
...
...
@@ -2,13 +2,13 @@
#jdbc.username=root
#jdbc.password=root
jdbc.url
=
jdbc:mysql://47.106.242.175:3306/chinafrica?allowMultiQueries=true&useSSL=false&useUnicode=true&characterEncoding=UTF-8
jdbc.username
=
root
jdbc.password
=
diaoyun666
#
jdbc.url=jdbc:mysql://47.106.242.175:3306/chinafrica?allowMultiQueries=true&useSSL=false&useUnicode=true&characterEncoding=UTF-8
#
jdbc.username=root
#
jdbc.password=diaoyun666
#
jdbc.url: jdbc:mysql://159.138.48.71:3306/chinafrica?useUnicode=true&characterEncoding=UTF-8&rewriteBatchedStatements=true&autoReconnect=true&failOverReadOnly=false&zeroDateTimeBehavior=convertToNull&useSSL=false
#
jdbc.username: root
#
jdbc.password: Diaoyunnuli.8
jdbc.url
:
jdbc:mysql://159.138.48.71:3306/chinafrica?useUnicode=true&characterEncoding=UTF-8&rewriteBatchedStatements=true&autoReconnect=true&failOverReadOnly=false&zeroDateTimeBehavior=convertToNull&useSSL=false
jdbc.username
:
root
jdbc.password
:
Diaoyunnuli.8
jdbc.initialSize
=
5
jdbc.maxActive
=
30
...
...
platform-admin/src/main/resources/prod/platform.properties
浏览文件 @
5505d8f2
...
...
@@ -2,13 +2,13 @@
#jdbc.username=root
#jdbc.password=root
jdbc.url
=
jdbc:mysql://47.106.242.175:3306/chinafrica?allowMultiQueries=true&useSSL=false&useUnicode=true&characterEncoding=UTF-8
jdbc.username
=
root
jdbc.password
=
diaoyun666
#
jdbc.url=jdbc:mysql://47.106.242.175:3306/chinafrica?allowMultiQueries=true&useSSL=false&useUnicode=true&characterEncoding=UTF-8
#
jdbc.username=root
#
jdbc.password=diaoyun666
#
jdbc.url: jdbc:mysql://159.138.48.71:3306/chinafrica?useUnicode=true&characterEncoding=UTF-8&rewriteBatchedStatements=true&autoReconnect=true&failOverReadOnly=false&zeroDateTimeBehavior=convertToNull&useSSL=false
#
jdbc.username: root
#
jdbc.password: Diaoyunnuli.8
jdbc.url
:
jdbc:mysql://159.138.48.71:3306/chinafrica?useUnicode=true&characterEncoding=UTF-8&rewriteBatchedStatements=true&autoReconnect=true&failOverReadOnly=false&zeroDateTimeBehavior=convertToNull&useSSL=false
jdbc.username
:
root
jdbc.password
:
Diaoyunnuli.8
jdbc.initialSize
=
5
jdbc.maxActive
=
30
...
...
platform-admin/src/main/test/test/ImpartCode.java
浏览文件 @
5505d8f2
...
...
@@ -24,6 +24,8 @@ import java.util.Date;
import
java.util.List
;
import
java.util.concurrent.ExecutorService
;
import
java.util.concurrent.Executors
;
import
java.util.regex.Matcher
;
import
java.util.regex.Pattern
;
/**
* 商品导入功能
...
...
@@ -481,4 +483,6 @@ public class ImpartCode {
return
output
.
toByteArray
();
}
}
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论