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
60533cbf
Commit
60533cbf
authored
6 years ago
by
wangjf
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
parent
423c56bd
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
10 deletions
+16
-10
TagController.java
...in/java/com/mobvista/apptag/controller/TagController.java
+16
-10
No files found.
src/main/java/com/mobvista/apptag/controller/TagController.java
View file @
60533cbf
...
...
@@ -62,6 +62,12 @@ public class TagController {
@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
);
List
<
Feat
>
categoryFeat
=
featDao
.
firstList
(
"01"
);
JSONArray
jsonArray
=
JSONArray
.
fromObject
(
categoryFeat
);
...
...
@@ -81,11 +87,11 @@ public class TagController {
@PostMapping
(
"/save"
)
@ResponseBody
R
save
(
@SessionAttribute
(
WebSecurityConfig
.
SESSION_KEY
)
String
userName
,
@RequestParam
(
name
=
"packageName"
)
String
packageName
,
@RequestParam
(
name
=
"categoryCode"
,
required
=
false
)
String
categoryCode
,
@RequestParam
(
name
=
"ruleCode"
,
required
=
false
)
String
ruleCode
,
@RequestParam
(
name
=
"styleCode"
,
required
=
false
)
String
styleCode
,
@RequestParam
(
name
=
"themeCode"
,
required
=
false
)
String
themeCode
)
{
@RequestParam
(
name
=
"packageName"
)
String
packageName
,
@RequestParam
(
name
=
"categoryCode"
,
required
=
false
)
String
categoryCode
,
@RequestParam
(
name
=
"ruleCode"
,
required
=
false
)
String
ruleCode
,
@RequestParam
(
name
=
"styleCode"
,
required
=
false
)
String
styleCode
,
@RequestParam
(
name
=
"themeCode"
,
required
=
false
)
String
themeCode
)
{
System
.
out
.
println
(
"packageName="
+
packageName
+
",categoryCode="
+
categoryCode
);
Map
<
String
,
String
>
codeMap
=
new
HashMap
<
String
,
String
>();
Map
<
String
,
String
>
featMap
=
featService
.
getMap
();
...
...
@@ -139,7 +145,7 @@ public class TagController {
@PostMapping
(
"/list"
)
@ResponseBody
public
PageUtil
list
(
@RequestBody
Query
query
,
@RequestParam
(
name
=
"tag"
,
required
=
false
,
defaultValue
=
"0"
)
int
tag
)
{
@RequestParam
(
name
=
"tag"
,
required
=
false
,
defaultValue
=
"0"
)
int
tag
)
{
PageHelper
.
startPage
(
query
.
getOffset
()
/
query
.
getLimit
()
+
1
,
query
.
getLimit
());
List
<
Tag
>
tags
=
tagDao
.
list
(
tag
);
int
total
=
tagDao
.
count
(
tag
);
...
...
@@ -149,14 +155,14 @@ public class TagController {
/*
* @GetMapping("/listAll")
*
*
* @ResponseBody public PageUtil
* listAll(@SessionAttribute(WebSecurityConfig.SESSION_KEY) String username,
*
*
* @RequestParam(value = "offset", defaultValue = "0") int pageNum,
*
*
* @RequestParam(value = "limit", defaultValue = "10") int pageSize,
*
*
* @RequestParam(name = "tag", required = false, defaultValue = "1") int tag) {
* PageHelper.startPage(pageNum + 1, pageSize); List<Tag> tags =
* tagDao.list(tag, username); int total = tagDao.count(tag, username); PageUtil
...
...
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