Commit a7e21e41 authored by hezhen's avatar hezhen

123

parent e6a4c880
...@@ -88,7 +88,7 @@ ...@@ -88,7 +88,7 @@
from tour_good g from tour_good g
LEFT JOIN tour_good_tag tag ON g.id=tag.good_id LEFT JOIN tour_good_tag tag ON g.id=tag.good_id
LEFT JOIN tour_tag t ON tag.tag_id=t.id LEFT JOIN tour_tag t ON tag.tag_id=t.id
where g.recommend=1 and g.status=1 and g.is_del=0 where g.recommend=1 and g.status=1 and g.is_del=0 and t.is_del=0
GROUP BY g.id GROUP BY g.id
ORDER BY g.rank DESC ,g.id DESC ORDER BY g.rank DESC ,g.id DESC
limit #{start,jdbcType=INTEGER},#{size,jdbcType=INTEGER} limit #{start,jdbcType=INTEGER},#{size,jdbcType=INTEGER}
...@@ -104,7 +104,7 @@ ...@@ -104,7 +104,7 @@
LEFT JOIN tour_good_tag tag ON g.id=tag.good_id LEFT JOIN tour_good_tag tag ON g.id=tag.good_id
LEFT JOIN tour_tag t ON tag.tag_id=t.id LEFT JOIN tour_tag t ON tag.tag_id=t.id
<where> <where>
g.is_del=0 g.is_del=0 and t.is_del=0
<if test="params.name != null and params.name != ''"> <if test="params.name != null and params.name != ''">
and (g.`name` like CONCAT('%',#{params.name},'%') or g.introduce like CONCAT('%',#{params.name},'%')) and (g.`name` like CONCAT('%',#{params.name},'%') or g.introduce like CONCAT('%',#{params.name},'%'))
</if> </if>
......
package com.xxfc.platform.universal.vo;
import lombok.Data;
@Data
public class Ueditor {
private String url;
private String original;
private String state;
private String title;
}
...@@ -5,14 +5,12 @@ import com.github.wxiaoqi.security.auth.client.annotation.IgnoreUserToken; ...@@ -5,14 +5,12 @@ import com.github.wxiaoqi.security.auth.client.annotation.IgnoreUserToken;
import com.github.wxiaoqi.security.common.util.result.JsonResultUtil; import com.github.wxiaoqi.security.common.util.result.JsonResultUtil;
import com.xxfc.platform.universal.service.UploadService; import com.xxfc.platform.universal.service.UploadService;
import com.xxfc.platform.universal.utils.PublicMsg; import com.xxfc.platform.universal.utils.PublicMsg;
import com.xxfc.platform.universal.vo.Ueditor;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.ResponseEntity; import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.*;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile; import org.springframework.web.multipart.MultipartFile;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
...@@ -107,5 +105,15 @@ public class UploadController{ ...@@ -107,5 +105,15 @@ public class UploadController{
return PublicMsg.UEDITOR_CONFIG; return PublicMsg.UEDITOR_CONFIG;
} }
@RequestMapping(value="/app/unauth/imgUpload", method = RequestMethod.POST)
public Ueditor imgUpload(MultipartFile upfile) throws Exception {
Ueditor ueditor = new Ueditor();
ueditor.setUrl(uploadService.uploadFile(upfile,"admin"));
ueditor.setOriginal(upfile.getOriginalFilename());
ueditor.setState("SUCCESS");
ueditor.setTitle(upfile.getOriginalFilename());
return ueditor;
}
} }
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