| | |
| | | import org.springframework.stereotype.Service; |
| | | import com.zt.common.db.query.QueryFilter; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import javax.validation.constraints.NotNull; |
| | | import javax.validation.constraints.Null; |
| | | import java.io.IOException; |
| | | import java.util.List; |
| | | |
| | | |
| | |
| | | */ |
| | | @Service |
| | | public class SysPictureBaseService extends BaseService<SysPictureBaseDao, SysPictureBase> { |
| | | |
| | | @Autowired |
| | | private SysOssService sysOssService; |
| | | /** |
| | | * 分页查询 |
| | | * |
| | |
| | | public SysPictureBase getDefaultImg(Integer productType) { |
| | | return baseDao.getDefaultImg(productType); |
| | | } |
| | | public void getSvgImage(HttpServletResponse response, Long id) { |
| | | try { |
| | | SysPictureBase data = this.get(id); |
| | | String svgContent = data.getSvgContent(); |
| | | response.setContentType("image/svg+xml"); |
| | | response.getWriter().write(svgContent); |
| | | response.getWriter().flush(); |
| | | response.getWriter().close(); |
| | | |
| | | } catch (IOException e) { |
| | | e.printStackTrace(); |
| | | } |
| | | } |
| | | |
| | | } |