| | |
| | | package com.fgkj.controller; |
| | | |
| | | import com.fgkj.util.*; |
| | | |
| | | import com.fgkj.dto.ServiceModel; |
| | | import com.fgkj.dto.User_Chart; |
| | | import com.fgkj.dto.User_inf; |
| | | import com.fgkj.dto.User_log; |
| | | import com.fgkj.mapper.UinfDaoFactory; |
| | | import com.fgkj.services.User_ChartService; |
| | | import com.fgkj.services.User_logService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.io.File; |
| | | import java.io.IOException; |
| | | import java.io.InputStream; |
| | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | import com.fgkj.mapper.UinfDaoFactory; |
| | | import com.fgkj.dto.ServiceModel; |
| | | import com.fgkj.dto.User_Chart; |
| | | import com.fgkj.dto.User_inf; |
| | | import com.fgkj.dto.User_log; |
| | | import com.fgkj.services.User_ChartService; |
| | | import com.fgkj.services.User_logService; |
| | | import io.swagger.annotations.Api; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import javax.annotation.Resource; |
| | | |
| | | @RequestMapping("userChart") |
| | | @RestController |
| | | @Api |
| | | @Api(tags = "userChart接口TODO") |
| | | public class User_ChartController{ |
| | | @Autowired |
| | | @Resource |
| | | private User_ChartService service; |
| | | @Autowired |
| | | @Resource |
| | | private User_logService uservice; |
| | | |
| | | // private List<File> file; |
| | |
| | | |
| | | //添加图标 |
| | | @PostMapping("/") |
| | | @ApiOperation(notes = "",value="添加图标") |
| | | public ServiceModel add(@RequestBody User_Chart uchart,@RequestBody List<File> file,List<String> filetype){ |
| | | suitFiles(file,filetype,uchart); |
| | | ServiceModel model =service.add(uchart); |
| | |
| | | |
| | | //修改图标信息 |
| | | @PutMapping("/") |
| | | @ApiOperation(notes = "",value="修改图标信息") |
| | | public ServiceModel update(@RequestBody User_Chart uchart,@RequestBody List<File>file,@RequestBody List<String>filetype){ |
| | | suitFiles(file,filetype,uchart); //设置对象的属性值 |
| | | ServiceModel model =service.update(uchart); |
| | |
| | | } |
| | | //删除图标 |
| | | @DeleteMapping("/") |
| | | @ApiOperation(notes = "",value="删除图标") |
| | | public ServiceModel del(@RequestBody User_Chart uchart){ |
| | | ServiceModel model =service.del(uchart); |
| | | { |
| | |
| | | |
| | | //查询所有图标 |
| | | @GetMapping("all") |
| | | @ApiOperation(notes = "",value="查询所有图标") |
| | | public ServiceModel searchAll(){ |
| | | ServiceModel model =service.searchAll(); |
| | | |
| | |
| | | |
| | | //根据用户id查图表 |
| | | @GetMapping("byCondition") |
| | | @ApiOperation(notes = "",value="用户id查图表") |
| | | public ServiceModel serchByCondition(@RequestBody User_inf uinf){ |
| | | ServiceModel model =service.serchByCondition(uinf); |
| | | |
| | |
| | | |
| | | //根据chartfile和列名查具体的图片 |
| | | @GetMapping("byInfo") |
| | | @ApiOperation(notes = "",value="chartfile和列名查具体的图片") |
| | | public void serchByInfo(@RequestBody User_Chart uc){ |
| | | //System.out.println(json); |
| | | InputStream is = null; |