Commit 60533cbf by wangjf

fix

parent 423c56bd
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment