Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
为 GitLab 提交贡献
登录/注册
切换导航
A
Afrishop refactored project
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
Whispa
Afrishop refactored project
Commits
6ec5c575
提交
6ec5c575
authored
4月 02, 2021
作者:
wudepeng
浏览文件
操作
浏览文件
下载
差异文件
Merge remote-tracking branch 'origin/master'
上级
a2c33fd4
d411de3a
显示空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
18 行增加
和
6 行删除
+18
-6
ItemController.java
...a/com/example/afrishop_v3/controllers/ItemController.java
+5
-0
TbCfItemComment.java
.../java/com/example/afrishop_v3/models/TbCfItemComment.java
+9
-2
WebSecurityConfig.java
...a/com/example/afrishop_v3/security/WebSecurityConfig.java
+1
-1
application.properties
src/main/resources/application.properties
+3
-3
没有找到文件。
src/main/java/com/example/afrishop_v3/controllers/ItemController.java
浏览文件 @
6ec5c575
...
...
@@ -301,6 +301,11 @@ public class ItemController {
// String newNick = nick.substring(0, 1) + "***" + nick.substring(nick.length() - 1);
String
newNick
=
String
.
format
(
"%s***%s"
,
nick
.
charAt
(
0
),
nick
.
charAt
(
nick
.
length
()
-
1
));
c
.
setUserName
(
newNick
);
//旧数据不是存的图片链接
if
(
StringUtils
.
isBlank
(
c
.
getUrls
())
||
!
c
.
getUrls
().
startsWith
(
"http"
))
{
c
.
setUrls
(
null
);
c
.
setImgLength
(
0
);
}
if
(!
StringUtils
.
isBlank
(
userId
))
{
String
liked
=
(
String
)
redisCache
.
get
(
key
+
userId
+
"_"
+
c
.
getId
());
c
.
setLike
(
liked
==
null
?
false
:
true
);
...
...
src/main/java/com/example/afrishop_v3/models/TbCfItemComment.java
浏览文件 @
6ec5c575
...
...
@@ -7,6 +7,7 @@ import org.hibernate.annotations.Formula;
import
org.hibernate.annotations.NotFound
;
import
org.hibernate.annotations.NotFoundAction
;
import
org.hibernate.annotations.Where
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.multipart.MultipartFile
;
import
javax.annotation.Nullable
;
...
...
@@ -119,6 +120,8 @@ public class TbCfItemComment {
private
double
score
;
@Transient
private
double
totalScore
;
@Transient
private
Integer
imgLength
;
private
String
attributs
;
...
...
@@ -269,11 +272,11 @@ public class TbCfItemComment {
}
public
String
[]
getImgs
()
{
return
urls
!=
null
?
urls
.
split
(
";"
)
:
null
;
return
!
StringUtils
.
isBlank
(
urls
)
?
urls
.
split
(
";"
)
:
null
;
}
public
Integer
getImgLength
()
{
return
urls
!=
null
?
urls
.
split
(
";"
).
length
:
0
;
return
!
StringUtils
.
isBlank
(
urls
)
?
urls
.
split
(
";"
).
length
:
0
;
}
/**
...
...
@@ -429,4 +432,8 @@ public class TbCfItemComment {
public
void
setLikeCount
(
int
likeCount
)
{
this
.
likeCount
=
likeCount
;
}
public
void
setImgLength
(
Integer
imgLength
)
{
this
.
imgLength
=
imgLength
;
}
}
src/main/java/com/example/afrishop_v3/security/WebSecurityConfig.java
浏览文件 @
6ec5c575
...
...
@@ -71,7 +71,7 @@ public class WebSecurityConfig extends WebSecurityConfigurerAdapter {
"/goodsType/**"
,
"/home/**"
,
"/spider/**"
,
"/store/**"
,
"/shopify/**"
,
"/community/**"
,
"/version/**"
,
"/flutterwave/notify/**"
,
"/dpo/notify/**"
,
"/advertisement/**"
,
"/website/**"
,
"/paypal/**"
,
"/discover/bonus/**"
,
"/problem/**"
,
"/cube/**"
,
"/activity/**"
,
"/attributes/**"
,
"/stripe/**"
,
"/coupon/**"
,
"/logistics/freeShippingThreshold"
,
"/visit/**"
,
"/search/**"
,
"/country/**"
,
"/term/**"
,
"/api/upload"
,
"/cart/**"
,
"/address/**"
,
"/screen/**"
).
permitAll
()
"/visit/**"
,
"/search/**"
,
"/country/**"
,
"/term/**"
,
"/api/upload"
,
"/cart/**"
,
"/address/**"
,
"/screen/**"
,
"/discover/post/**"
).
permitAll
()
.
antMatchers
(
"/api/test/**"
).
permitAll
()
.
anyRequest
().
authenticated
();
...
...
src/main/resources/application.properties
浏览文件 @
6ec5c575
...
...
@@ -2,7 +2,7 @@ server.servlet.context-path=/zion
spring.jpa.hibernate.ddl-auto
=
update
server.port
=
8083
spring.profiles.active
=
test
#spring.datasource.url=jdbc:mysql://${MYSQL_HOST:localhost}:3306/afrishop_test?useUnicode=true&connectionCollation=utf8mb4_general_ci&characterEncoding=UTF-8&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=UTC
#spring.datasource.url=jdbc:mysql://${MYSQL_HOST:localhost}:3306/afrishop_test?useUnicode=true&connectionCollation=utf8mb4_general_ci&characterEncoding=UTF-8&useJDBCCompliant
\
TimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=UTC
#spring.datasource.username=root
#spring.datasource.password=Diaoyunnuli.8
#spring.jpa.database-platform=org.hibernate.dialect.MySQL5InnoDBDialect
...
...
@@ -25,5 +25,5 @@ spring.servlet.multipart.max-request-size=456128KB
bezkoder.app.jwtSecret
=
bezKoderSecretKey
bezkoder.app.jwtExpirationMs
=
86400000
#spring.jpa.show-sql=true
#
spring.jpa.properties.hibernate.format_sql
=
true
\ No newline at end of file
spring.jpa.show-sql
=
true
spring.jpa.properties.hibernate.format_sql
=
true
\ No newline at end of file
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论