Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
AppTag
Project
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
dataplatform
AppTag
Commits
423c56bd
Commit
423c56bd
authored
6 years ago
by
wangjf
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
parent
6b169175
master
No related merge requests found
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
15 deletions
+13
-15
ResultController.java
...java/com/mobvista/apptag/controller/ResultController.java
+13
-15
No files found.
src/main/java/com/mobvista/apptag/controller/ResultController.java
View file @
423c56bd
package
com
.
mobvista
.
apptag
.
controller
;
import
java.io.IOException
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
import
com.fasterxml.jackson.core.JsonProcessingException
;
import
com.fasterxml.jackson.databind.ObjectMapper
;
import
com.github.pagehelper.PageHelper
;
...
...
@@ -20,23 +15,20 @@ import com.mobvista.apptag.service.ResultService;
import
com.mobvista.apptag.utils.PageUtil
;
import
com.mobvista.apptag.utils.Query
;
import
com.mobvista.apptag.utils.R
;
import
net.sf.json.JSONArray
;
import
net.sf.json.JSONObject
;
import
org.apache.commons.lang3.StringUtils
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Controller
;
import
org.springframework.ui.Model
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.RequestBody
;
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.bind.annotation.SessionAttribute
;
import
org.springframework.web.bind.annotation.*
;
import
net.sf.json.JSONArray
;
import
net.sf.json.JSONObject
;
import
java.io.IOException
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
/**
* @author wangjf
...
...
@@ -63,6 +55,12 @@ public class ResultController {
@GetMapping
(
"/edit"
)
String
edit
(
@RequestParam
(
name
=
"packageName"
)
String
packageName
,
Model
model
)
{
Tag
tag
=
tagDao
.
find
(
packageName
);
if
(
StringUtils
.
isNotBlank
(
tag
.
getUrl
())
&&
tag
.
getUrl
().
length
()
>
2
&&
tag
.
getUrl
().
startsWith
(
"["
)
&&
tag
.
getUrl
().
endsWith
(
"]"
))
{
String
url
=
tag
.
getUrl
().
substring
(
2
,
tag
.
getUrl
().
length
()
-
2
).
replace
(
"\""
,
""
).
split
(
","
)[
0
];
tag
.
setUrl
(
url
);
}
else
{
tag
.
setUrl
(
""
);
}
model
.
addAttribute
(
"tag"
,
tag
);
TagResult
result
=
resultDao
.
find
(
packageName
);
model
.
addAttribute
(
"resultCategory"
,
JSONObject
.
fromObject
(
result
.
getFeatId
()));
...
...
This diff is collapsed.
Click to expand it.
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