| | |
| | | for(XhProductModel xhProductModel:list){ |
| | | xhProductModel.setSrcId(xhProductModel.getId()); |
| | | xhProductModel.setId(null); |
| | | xhProductModel.setProductType(xhProductModel.getNodeType()); |
| | | this.insert(xhProductModel); |
| | | } |
| | | return Result.ok(); |
| | |
| | | @ApiModelProperty(value = "节点类型") |
| | | private String productType; |
| | | |
| | | @TableField(exist = false) |
| | | private String nodeType; |
| | | |
| | | @ApiModelProperty(value = "运行图片") |
| | | private Long operatImg; |
| | | |
| | |
| | | } |
| | | if (sysPictureBase.getIsDefault()==1){ |
| | | sysPictureBaseService.updateByDefault(sysPictureBase.getId(),sysPictureBase.getProductType()); |
| | | sysPictureBaseService.updateProdeuctImg(sysPictureBase.getId(),sysPictureBase.getProductType()); |
| | | } |
| | | if (file != null) { |
| | | BufferedImage bufferedImage = null; |
| | |
| | | List<SysPictureBase> getList(Map<String, Object> params); |
| | | |
| | | void updateByDefault(Long id, Integer productType); |
| | | |
| | | void updateProdeuctImg(Long id, Integer productType); |
| | | } |
| | |
| | | public void updateByDefault(Long id, Integer productType) { |
| | | baseDao.updateByDefault(id,productType); |
| | | } |
| | | |
| | | public void updateProdeuctImg(Long id, Integer productType) { |
| | | baseDao.updateProdeuctImg(id,productType); |
| | | } |
| | | } |
| | |
| | | <update id="updateByDefault"> |
| | | update sys_picture_base |
| | | set is_default=2 |
| | | where id = ${id} |
| | | where id != ${id} |
| | | and product_type = ${productType} |
| | | and is_delete = 0 |
| | | </update> |
| | | <update id="updateProdeuctImg"> |
| | | UPDATE product_model_common |
| | | set operat_img = ${id} |
| | | where node_type = ${productType} |
| | | and is_delete = 0; |
| | | update product_model |
| | | set operat_img=${id} |
| | | where product_type = ${productType} |
| | | and is_delete = 0 |
| | | </update> |
| | | |
| | | <select id="getList" resultType="com.zt.life.modules.sysPictureBase.model.SysPictureBase"> |
| | | select a.* |