Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
S
shop-Mall
Project
Project
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
licc
shop-Mall
Commits
8c8bd9d2
Commit
8c8bd9d2
authored
Mar 15, 2021
by
m1991
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
资讯模块数据——图片展示功能修复
parent
b1e55337
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
50 additions
and
18 deletions
+50
-18
UploadServiceImpl.java
...java/cn/wisenergy/service/app/impl/UploadServiceImpl.java
+14
-7
TestController.java
...cn/wisenergy/web/admin/controller/app/TestController.java
+36
-11
No files found.
wisenergy-service/src/main/java/cn/wisenergy/service/app/impl/UploadServiceImpl.java
View file @
8c8bd9d2
...
...
@@ -273,14 +273,21 @@ public class UploadServiceImpl implements UploadService {
pageNum
=
pageNum
-
1
;
List
<
zxUserDto
>
shopZxList
=
shopZxMapper
.
selectPage
(
pageNum
,
pageSize
);
for
(
zxUserDto
shopZx
:
shopZxList
)
{
String
zxUrl
=
shopZx
.
getZxUrl
();
shopZx
.
setUserId
(
shopZx
.
getUserId
().
replaceAll
(
"(\\d{3})\\d{4}(\\d{4})"
,
"$1****$2"
));
String
[]
split
=
StringUtils
.
split
(
zxUrl
,
","
);
if
(
null
!=
split
){
List
<
String
>
strings
=
Arrays
.
asList
(
split
);
shopZx
.
setAskImgList
(
strings
);
String
[]
zxUrl
=
shopZx
.
getZxUrl
().
split
(
","
);
// List<String> strings = Arrays.asList(split);
ArrayList
list
=
new
ArrayList
();
if
(
null
!=
zxUrl
){
for
(
String
split:
zxUrl
)
{
boolean
arrayList
=
Collections
.
addAll
(
list
,
split
);
shopZx
.
setAskImgList
(
list
);
}
}
shopZx
.
setUserId
(
shopZx
.
getUserId
().
replaceAll
(
"(\\d{3})\\d{4}(\\d{4})"
,
"$1****$2"
));
}
map
.
put
(
"data"
,
shopZxList
);
return
map
;
...
...
@@ -288,7 +295,7 @@ public class UploadServiceImpl implements UploadService {
/**
* 资讯点赞实现
* @param
zxid
* @param
* @return
*/
@Override
...
...
wisenergy-web-admin/src/main/java/cn/wisenergy/web/admin/controller/app/TestController.java
View file @
8c8bd9d2
package
cn
.
wisenergy
.
web
.
admin
.
controller
.
app
;
import
cn.wisenergy.common.utils.Result
;
import
cn.wisenergy.common.utils.ResultUtils
;
import
cn.wisenergy.common.utils.ShareCodeUtil
;
import
cn.wisenergy.common.utils.SmsUtils
;
import
cn.wisenergy.common.utils.*
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
lombok.extern.slf4j.Slf4j
;
...
...
@@ -13,7 +10,9 @@ import org.springframework.web.bind.annotation.RequestMapping;
import
org.springframework.web.bind.annotation.ResponseBody
;
import
org.springframework.web.bind.annotation.RestController
;
import
java.math.BigInteger
;
import
java.util.ArrayList
;
import
java.util.Collections
;
import
java.util.List
;
@Api
(
tags
=
"短信服务测试,邀请码测试"
)
@RestController
...
...
@@ -55,12 +54,38 @@ public class TestController {
public
static
void
main
(
String
[]
args
){
/**
* 隐藏中间四位的方法
*/
String
phone
=
"18501234234"
;
String
str
=
"/upload/1a65a6a40-f158-4b03-929a-454c88935a8b.jpg,/upload/1c9dfb994-9f5b-471a-ac7d-93a323089dd2.jpg,/upload/10c03f8cf-d210-486e-bbd4-813a271be298.jpeg,/upload/15e340d63-157c-4374-bf98-ffd1528f0aae.jpeg,"
;
String
hidenPhone
=
phone
.
replaceAll
(
"(\\d{3})\\d{4}(\\d{4})"
,
"$1****$2"
);
List
list
=
new
ArrayList
();
// String str = "打印机*钟表//自行车**雨伞%%收音机??电脑";
String
temp
[]
=
str
.
split
(
","
);
for
(
String
word
:
temp
)
{
boolean
arrayList
=
Collections
.
addAll
(
list
,
word
);
}
System
.
out
.
println
(
list
.
get
(
1
));
// String[] split= StringUtils.split(",");
// List list = new ArrayList();
// list.add(split);
// System.out.println(list);
// String[] dbcodeArray = techCatalog.getDbcodeArray();
// List<String> dbCode=null;
// if(dbcodeArray!=null){
// dbCode = Arrays.asList(dbcodeArray);
// }
// /**
// * 隐藏中间四位的方法
// */
// String phone = "18501234234";
//
// String hidenPhone = phone.replaceAll("(\\d{3})\\d{4}(\\d{4})","$1****$2");
// /**
...
...
@@ -80,7 +105,7 @@ public class TestController {
// String b = ShareCodeUtil.idToCode(1);
// String a= ShareCodeUtil.idToCode(1,0+1);
System
.
out
.
println
(
hidenPhone
);
}
@ApiOperation
(
value
=
"测试短信服务,发送手机号"
,
notes
=
"测试短信服务,发送手机号"
,
httpMethod
=
"POST"
,
produces
=
"application/json; charset=UTF-8"
)
...
...
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