Commit ac06a1eb3f40649d9d3c8bfc3f841b7e9b56872d

Authored by gaohan
1 parent b179c69764
Exists in dev

提交代码

Showing 4 changed files with 20 additions and 27 deletions

platform-dal/src/main/java/com/lyms/platform/pojo/MsgModel.java View file @ ac06a1e
... ... @@ -45,6 +45,16 @@
45 45 //阅读量
46 46 private Integer readNum;
47 47  
  48 + private String img;
  49 +
  50 + public String getImg() {
  51 + return img;
  52 + }
  53 +
  54 + public void setImg(String img) {
  55 + this.img = img;
  56 + }
  57 +
48 58 public Integer getReadNum() {
49 59 return readNum;
50 60 }
platform-dal/src/main/java/com/lyms/platform/query/MsgQuery.java View file @ ac06a1e
... ... @@ -41,6 +41,16 @@
41 41  
42 42 private Integer readNum;
43 43  
  44 + private String img;
  45 +
  46 + public String getImg() {
  47 + return img;
  48 + }
  49 +
  50 + public void setImg(String img) {
  51 + this.img = img;
  52 + }
  53 +
44 54 public Integer getReadNum() {
45 55 return readNum;
46 56 }
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/CourseController.java View file @ ac06a1e
... ... @@ -26,8 +26,6 @@
26 26 */
27 27 @Controller
28 28 public class CourseController extends BaseController {
29   - // 允许上传的格式 图片形式
30   - private static final String[] IMAGE_TYPE = new String[]{".bmp", ".jpg", ".jpeg", ".png"};
31 29  
32 30 @Autowired
33 31 private CourseFacade courseFacade;
... ... @@ -393,30 +391,6 @@
393 391 return courseFacade.getMsgCountById(parentId);
394 392 }
395 393  
396   - @RequestMapping(method = RequestMethod.POST, value = "/uploadFile",produces = "application/json;charset=utf-8")
397   - @ResponseBody
398   - public String uploadImage(@RequestParam("file") MultipartFile file,
399   - HttpServletRequest request){
400   - try {
401   - //请求参数
402   - Map<String,String[]> parameterMap = request.getParameterMap();
403   - // 文件名
404   - String fileName = file.getOriginalFilename();
405   - //文件类型
406   - String contentType = file.getContentType();
407   - //上传路径
408   - String filePath = "f://" + fileName;
409   -
410   - File demoFile = new File(filePath);
411   -
412   - //上传
413   - file.transferTo(demoFile);
414   - return "上传成功";
415   - } catch (Exception e) {
416   - e.printStackTrace();
417   - return "上传失败";
418   - }
419   - }
420 394  
421 395 }
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/CourseFacade.java View file @ ac06a1e
... ... @@ -29,7 +29,6 @@
29 29 import org.springframework.data.mongodb.core.MongoTemplate;
30 30 import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor;
31 31 import org.springframework.stereotype.Component;
32   -import org.springframework.web.multipart.MultipartFile;
33 32  
34 33  
35 34 import java.text.DecimalFormat;