jinlin
2024-03-14 c531eac7903eaf92d343f086a391fb412cf368a6
修改
6个文件已修改
23 ■■■■■ 已修改文件
modules/mainPart/src/main/java/com/zt/life/modules/mainPart/basicInfo/controller/XhProductModelController.java 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
modules/mainPart/src/main/java/com/zt/life/modules/mainPart/basicInfo/model/XhProductModel.java 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
modules/mainPart/src/main/java/com/zt/life/modules/sysPictureBase/controller/SysPictureBaseController.java 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
modules/mainPart/src/main/java/com/zt/life/modules/sysPictureBase/dao/SysPictureBaseDao.java 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
modules/mainPart/src/main/java/com/zt/life/modules/sysPictureBase/service/SysPictureBaseService.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
modules/mainPart/src/main/resources/mapper/sysPictureBase/SysPictureBaseDao.xml 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
modules/mainPart/src/main/java/com/zt/life/modules/mainPart/basicInfo/controller/XhProductModelController.java
@@ -114,6 +114,7 @@
        for(XhProductModel xhProductModel:list){
            xhProductModel.setSrcId(xhProductModel.getId());
            xhProductModel.setId(null);
            xhProductModel.setProductType(xhProductModel.getNodeType());
            this.insert(xhProductModel);
        }
        return Result.ok();
modules/mainPart/src/main/java/com/zt/life/modules/mainPart/basicInfo/model/XhProductModel.java
@@ -35,6 +35,9 @@
    @ApiModelProperty(value = "节点类型")
    private String productType;
    @TableField(exist = false)
    private String nodeType;
    @ApiModelProperty(value = "运行图片")
    private Long operatImg;
modules/mainPart/src/main/java/com/zt/life/modules/sysPictureBase/controller/SysPictureBaseController.java
@@ -101,6 +101,7 @@
        }
        if (sysPictureBase.getIsDefault()==1){
            sysPictureBaseService.updateByDefault(sysPictureBase.getId(),sysPictureBase.getProductType());
            sysPictureBaseService.updateProdeuctImg(sysPictureBase.getId(),sysPictureBase.getProductType());
        }
        if (file != null) {
            BufferedImage bufferedImage = null;
modules/mainPart/src/main/java/com/zt/life/modules/sysPictureBase/dao/SysPictureBaseDao.java
@@ -21,4 +21,6 @@
    List<SysPictureBase> getList(Map<String, Object> params);
    void updateByDefault(Long id, Integer productType);
    void updateProdeuctImg(Long id, Integer productType);
}
modules/mainPart/src/main/java/com/zt/life/modules/sysPictureBase/service/SysPictureBaseService.java
@@ -45,4 +45,8 @@
    public void updateByDefault(Long id, Integer productType) {
        baseDao.updateByDefault(id,productType);
    }
    public void updateProdeuctImg(Long id, Integer productType) {
        baseDao.updateProdeuctImg(id,productType);
    }
}
modules/mainPart/src/main/resources/mapper/sysPictureBase/SysPictureBaseDao.xml
@@ -5,10 +5,20 @@
    <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.*