Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
b9320ecd9c
@ -70,13 +70,13 @@ public class AttachmentController {
|
|||||||
if (config1==null){
|
if (config1==null){
|
||||||
bytes1= "没有该Config!".getBytes();
|
bytes1= "没有该Config!".getBytes();
|
||||||
headers.setContentType(MediaType.APPLICATION_JSON);
|
headers.setContentType(MediaType.APPLICATION_JSON);
|
||||||
return new ResponseEntity<byte[]>(bytes1, headers, HttpStatus.NOT_FOUND);
|
return new ResponseEntity<byte[]>(bytes1, headers, HttpStatus.OK);
|
||||||
}
|
}
|
||||||
Attachment attachment =attachmentService.selectAttachment(Long.valueOf(config1.getValue()));
|
Attachment attachment =attachmentService.selectAttachment(Long.valueOf(config1.getValue()));
|
||||||
if (attachment==null){
|
if (attachment==null){
|
||||||
bytes1= "没有该Attachment!".getBytes();
|
bytes1= "没有该Attachment!".getBytes();
|
||||||
headers.setContentType(MediaType.APPLICATION_JSON);
|
headers.setContentType(MediaType.APPLICATION_JSON);
|
||||||
return new ResponseEntity<byte[]>(bytes1, headers, HttpStatus.NOT_FOUND);
|
return new ResponseEntity<byte[]>(bytes1, headers, HttpStatus.OK);
|
||||||
}
|
}
|
||||||
String fileUrl=attachment.getPath()+attachment.getFileName()+attachment.getSuffix();
|
String fileUrl=attachment.getPath()+attachment.getFileName()+attachment.getSuffix();
|
||||||
out.println(fileUrl);
|
out.println(fileUrl);
|
||||||
|
@ -29,6 +29,9 @@ public class SearchController {
|
|||||||
|
|
||||||
@RequestMapping("/searchByInput")
|
@RequestMapping("/searchByInput")
|
||||||
public String searchByInput(String searchKey,String userId ) throws IOException {
|
public String searchByInput(String searchKey,String userId ) throws IOException {
|
||||||
|
if(searchKey == null ){
|
||||||
|
return setResult(500,"未添加搜索内容");
|
||||||
|
}
|
||||||
String placeholder = "***";
|
String placeholder = "***";
|
||||||
//非法敏感词汇判断
|
//非法敏感词汇判断
|
||||||
SensitiveFilter filter = SensitiveFilter.getInstance();
|
SensitiveFilter filter = SensitiveFilter.getInstance();
|
||||||
@ -38,7 +41,7 @@ public class SearchController {
|
|||||||
//存在非法字符
|
//存在非法字符
|
||||||
if(n > 0){
|
if(n > 0){
|
||||||
logger.info("这个人输入了非法字符--> {},不知道他到底要查什么~ userid--> {}",searchKey,1);
|
logger.info("这个人输入了非法字符--> {},不知道他到底要查什么~ userid--> {}",searchKey,1);
|
||||||
return setResult(500,"查询失败");
|
return setResult(500,"非法搜索");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -36,18 +36,20 @@ public class UrlListController {
|
|||||||
UrlList urlList = urlListService.selectUrlListByUrlId(Long.valueOf(urlId));
|
UrlList urlList = urlListService.selectUrlListByUrlId(Long.valueOf(urlId));
|
||||||
String parentString = urlCateListService.selectUrListCateByUrlCateId(urlList.getCateId());
|
String parentString = urlCateListService.selectUrListCateByUrlCateId(urlList.getCateId());
|
||||||
String [] parentList = parentString.split(",");
|
String [] parentList = parentString.split(",");
|
||||||
//System.out.println(parentString);
|
System.out.println(parentString);
|
||||||
for(String parent : parentList)
|
for(String parent : parentList)
|
||||||
{
|
{
|
||||||
if(parent.equals("0")){
|
if(parent.equals("0")){
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
UrlCateList urlCateList =urlCateListService.selectByPrimaryKey(Integer.valueOf(parent));
|
UrlCateList urlCateList =urlCateListService.selectByPrimaryKey(Integer.valueOf(parent));
|
||||||
if(urlCateListService.updateByUrlCateList(urlCateList) == 0)
|
System.out.println(urlCateList);
|
||||||
|
urlCateList.setUrlNumber(urlCateList.getUrlNumber()-1);
|
||||||
|
if(String.valueOf(urlCateListService.updateByUrlCateList(urlCateList)).equals("0"))
|
||||||
{
|
{
|
||||||
flag = 0;
|
flag = 0;
|
||||||
}else{
|
}else{
|
||||||
flag = 1;
|
flag = urlListService.deleteByPrimaryKey(Long.valueOf(urlId));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(flag == 1)
|
if(flag == 1)
|
||||||
@ -80,7 +82,7 @@ public class UrlListController {
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
UrlCateList urlCateList =urlCateListService.selectByPrimaryKey(Integer.valueOf(parent));
|
UrlCateList urlCateList =urlCateListService.selectByPrimaryKey(Integer.valueOf(parent));
|
||||||
if(urlCateListService.updateByUrlCateList(urlCateList) == 0)
|
if(String.valueOf(urlCateListService.updateByUrlCateList(urlCateList)).equals("0") )
|
||||||
{
|
{
|
||||||
flag = 0;
|
flag = 0;
|
||||||
}else{
|
}else{
|
||||||
|
@ -23,6 +23,7 @@ public class QRCServiceImpl implements QRCService{
|
|||||||
private CollectIconListDao collectIconListDao;
|
private CollectIconListDao collectIconListDao;
|
||||||
|
|
||||||
public String QR(Integer url_id) throws Exception {
|
public String QR(Integer url_id) throws Exception {
|
||||||
|
if(url_id!=null){
|
||||||
String logoPath = "src/main/resources/static/logo/NAV.png";
|
String logoPath = "src/main/resources/static/logo/NAV.png";
|
||||||
String destPath = "src/main/resources/static/qr";
|
String destPath = "src/main/resources/static/qr";
|
||||||
UrlList urlList = urlListDao.selectByPrimaryKey(Long.valueOf(url_id));
|
UrlList urlList = urlListDao.selectByPrimaryKey(Long.valueOf(url_id));
|
||||||
@ -40,6 +41,10 @@ public class QRCServiceImpl implements QRCService{
|
|||||||
}else {
|
}else {
|
||||||
return JSON.toJSONString(collectIconListDao.selectByUrlid(url_id));
|
return JSON.toJSONString(collectIconListDao.selectByUrlid(url_id));
|
||||||
}
|
}
|
||||||
|
}else{
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
//// 通过collect的url_id查找网址id对应网址
|
//// 通过collect的url_id查找网址id对应网址
|
||||||
// UrlList urlList = urlListDao.selectByPrimaryKey(Long.valueOf(collect.getUrl_id()));
|
// UrlList urlList = urlListDao.selectByPrimaryKey(Long.valueOf(collect.getUrl_id()));
|
||||||
|
Loading…
Reference in New Issue
Block a user