| | |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = Constant.Q.ORDER_FIELD, value = Constant.QV.ORDER_FIELD, dataType = Constant.QT.STRING), |
| | | @ApiImplicitParam(name = Constant.Q.ORDER, value = Constant.QV.ORDER, dataType = Constant.QT.STRING), |
| | | @ApiImplicitParam(name = "productType", value = "检索关键字", dataType = Constant.QT.STRING, format = "CONTENT_TYPE^LK"), @ApiImplicitParam(name = "systemMark", value = "系统标识", dataType = Constant.QT.STRING, format = "SYSTEM_MARK^LK")}) |
| | | @ApiImplicitParam(name = "productType", value = "检索关键字", dataType = Constant.QT.STRING, format = "PRODUCT_TYPE^EQ"), |
| | | @ApiImplicitParam(name = "systemMark", value = "系统标识", dataType = Constant.QT.STRING, format = "SYSTEM_MARK^LK")}) |
| | | public Result<List<SysPictureBase>> page(@ApiIgnore @QueryParam QueryFilter queryFilter) { |
| | | |
| | | return Result.ok(sysPictureBaseService.page(queryFilter)); |
| | |
| | | public Result save(@RequestBody MultipartFile file, Long id, Integer isDefault, |
| | | String name, String contentType, Integer productType, String remark) { |
| | | SysPictureBase sysPictureBase; |
| | | SysPictureBase pictureBase = sysPictureBaseService.getDefaultImg(productType); |
| | | if (id != 0) { |
| | | sysPictureBase = sysPictureBaseService.get(id); |
| | | sysPictureBase.setIsDefault(isDefault); |
| | |
| | | sysPictureBaseService.insert(sysPictureBase); |
| | | } |
| | | if (sysPictureBase.getIsDefault()==1){ |
| | | if (!sysPictureBase.getId().equals(pictureBase.getId())){ |
| | | sysPictureBaseService.updateByDefault(sysPictureBase.getId(),sysPictureBase.getProductType()); |
| | | sysPictureBaseService.updateProdeuctImg(sysPictureBase.getId(),sysPictureBase.getProductType()); |
| | | sysPictureBaseService.updateProdeuctImg(sysPictureBase.getId(),sysPictureBase.getProductType(),pictureBase.getId()); |
| | | } |
| | | } |
| | | if (file != null) { |
| | | BufferedImage bufferedImage = null; |
| | |
| | | } |
| | | } |
| | | |
| | | @GetMapping("/getDefaultImg") |
| | | public Result<SysPictureBase> getDefaultImg(Integer productType) { |
| | | SysPictureBase data = sysPictureBaseService.getDefaultImg(productType); |
| | | return Result.ok(data); |
| | | } |
| | | @DeleteMapping |
| | | @ApiOperation("删除") |
| | | @LogOperation("删除") |