Browse Source

big_class接口,增加type字段

zhc
review512jwy@163.com 1 month ago
parent
commit
f12d1e0c2c
  1. 33
      data-center-business-dao/src/main/resources/mappers/auto/BasicAssetClassBigMapper.xml
  2. 3
      data-center-business-dao/src/main/resources/mappers/ex/BasicAssetClassMapperExt.xml
  3. 3
      data-center-business-model/src/main/java/com/techsor/datacenter/business/dto/assetclass/OptAssetClassParams.java
  4. 34
      data-center-business-model/src/main/java/com/techsor/datacenter/business/model/BasicAssetClassBig.java
  5. 60
      data-center-business-model/src/main/java/com/techsor/datacenter/business/model/BasicAssetClassBigExample.java
  6. 3
      data-center-business-model/src/main/java/com/techsor/datacenter/business/vo/assetclass/AssetClassPageVO.java
  7. 2
      data-center-business-service/src/main/java/com/techsor/datacenter/business/service/impl/AssetClassServiceImpl.java

33
data-center-business-dao/src/main/resources/mappers/auto/BasicAssetClassBigMapper.xml

@ -11,6 +11,7 @@
<result column="class_name" jdbcType="VARCHAR" property="className" /> <result column="class_name" jdbcType="VARCHAR" property="className" />
<result column="create_time" jdbcType="BIGINT" property="createTime" /> <result column="create_time" jdbcType="BIGINT" property="createTime" />
<result column="flag" jdbcType="INTEGER" property="flag" /> <result column="flag" jdbcType="INTEGER" property="flag" />
<result column="type" jdbcType="INTEGER" property="type" />
</resultMap> </resultMap>
<resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="com.techsor.datacenter.business.model.BasicAssetClassBig"> <resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="com.techsor.datacenter.business.model.BasicAssetClassBig">
<!-- <!--
@ -92,7 +93,7 @@
WARNING - @mbg.generated WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify. This element is automatically generated by MyBatis Generator, do not modify.
--> -->
id, company_id, class_name, create_time, flag id, company_id, class_name, create_time, flag, `type`
</sql> </sql>
<sql id="Blob_Column_List"> <sql id="Blob_Column_List">
<!-- <!--
@ -180,11 +181,13 @@
SELECT LAST_INSERT_ID() SELECT LAST_INSERT_ID()
</selectKey> </selectKey>
insert into basic_asset_class_big (company_id, class_name, create_time, insert into basic_asset_class_big (company_id, class_name, create_time,
flag, thumbnail_normal_base64, thumbnail_alarm_base64, flag, `type`, thumbnail_normal_base64,
thumbnail_dis_base64) thumbnail_alarm_base64, thumbnail_dis_base64
)
values (#{companyId,jdbcType=BIGINT}, #{className,jdbcType=VARCHAR}, #{createTime,jdbcType=BIGINT}, values (#{companyId,jdbcType=BIGINT}, #{className,jdbcType=VARCHAR}, #{createTime,jdbcType=BIGINT},
#{flag,jdbcType=INTEGER}, #{thumbnailNormalBase64,jdbcType=LONGVARCHAR}, #{thumbnailAlarmBase64,jdbcType=LONGVARCHAR}, #{flag,jdbcType=INTEGER}, #{type,jdbcType=INTEGER}, #{thumbnailNormalBase64,jdbcType=LONGVARCHAR},
#{thumbnailDisBase64,jdbcType=LONGVARCHAR}) #{thumbnailAlarmBase64,jdbcType=LONGVARCHAR}, #{thumbnailDisBase64,jdbcType=LONGVARCHAR}
)
</insert> </insert>
<insert id="insertSelective" parameterType="com.techsor.datacenter.business.model.BasicAssetClassBig"> <insert id="insertSelective" parameterType="com.techsor.datacenter.business.model.BasicAssetClassBig">
<!-- <!--
@ -208,6 +211,9 @@
<if test="flag != null"> <if test="flag != null">
flag, flag,
</if> </if>
<if test="type != null">
`type`,
</if>
<if test="thumbnailNormalBase64 != null"> <if test="thumbnailNormalBase64 != null">
thumbnail_normal_base64, thumbnail_normal_base64,
</if> </if>
@ -231,6 +237,9 @@
<if test="flag != null"> <if test="flag != null">
#{flag,jdbcType=INTEGER}, #{flag,jdbcType=INTEGER},
</if> </if>
<if test="type != null">
#{type,jdbcType=INTEGER},
</if>
<if test="thumbnailNormalBase64 != null"> <if test="thumbnailNormalBase64 != null">
#{thumbnailNormalBase64,jdbcType=LONGVARCHAR}, #{thumbnailNormalBase64,jdbcType=LONGVARCHAR},
</if> </if>
@ -274,6 +283,9 @@
<if test="record.flag != null"> <if test="record.flag != null">
flag = #{record.flag,jdbcType=INTEGER}, flag = #{record.flag,jdbcType=INTEGER},
</if> </if>
<if test="record.type != null">
`type` = #{record.type,jdbcType=INTEGER},
</if>
<if test="record.thumbnailNormalBase64 != null"> <if test="record.thumbnailNormalBase64 != null">
thumbnail_normal_base64 = #{record.thumbnailNormalBase64,jdbcType=LONGVARCHAR}, thumbnail_normal_base64 = #{record.thumbnailNormalBase64,jdbcType=LONGVARCHAR},
</if> </if>
@ -299,6 +311,7 @@
class_name = #{record.className,jdbcType=VARCHAR}, class_name = #{record.className,jdbcType=VARCHAR},
create_time = #{record.createTime,jdbcType=BIGINT}, create_time = #{record.createTime,jdbcType=BIGINT},
flag = #{record.flag,jdbcType=INTEGER}, flag = #{record.flag,jdbcType=INTEGER},
`type` = #{record.type,jdbcType=INTEGER},
thumbnail_normal_base64 = #{record.thumbnailNormalBase64,jdbcType=LONGVARCHAR}, thumbnail_normal_base64 = #{record.thumbnailNormalBase64,jdbcType=LONGVARCHAR},
thumbnail_alarm_base64 = #{record.thumbnailAlarmBase64,jdbcType=LONGVARCHAR}, thumbnail_alarm_base64 = #{record.thumbnailAlarmBase64,jdbcType=LONGVARCHAR},
thumbnail_dis_base64 = #{record.thumbnailDisBase64,jdbcType=LONGVARCHAR} thumbnail_dis_base64 = #{record.thumbnailDisBase64,jdbcType=LONGVARCHAR}
@ -316,7 +329,8 @@
company_id = #{record.companyId,jdbcType=BIGINT}, company_id = #{record.companyId,jdbcType=BIGINT},
class_name = #{record.className,jdbcType=VARCHAR}, class_name = #{record.className,jdbcType=VARCHAR},
create_time = #{record.createTime,jdbcType=BIGINT}, create_time = #{record.createTime,jdbcType=BIGINT},
flag = #{record.flag,jdbcType=INTEGER} flag = #{record.flag,jdbcType=INTEGER},
`type` = #{record.type,jdbcType=INTEGER}
<if test="_parameter != null"> <if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" /> <include refid="Update_By_Example_Where_Clause" />
</if> </if>
@ -340,6 +354,9 @@
<if test="flag != null"> <if test="flag != null">
flag = #{flag,jdbcType=INTEGER}, flag = #{flag,jdbcType=INTEGER},
</if> </if>
<if test="type != null">
`type` = #{type,jdbcType=INTEGER},
</if>
<if test="thumbnailNormalBase64 != null"> <if test="thumbnailNormalBase64 != null">
thumbnail_normal_base64 = #{thumbnailNormalBase64,jdbcType=LONGVARCHAR}, thumbnail_normal_base64 = #{thumbnailNormalBase64,jdbcType=LONGVARCHAR},
</if> </if>
@ -362,6 +379,7 @@
class_name = #{className,jdbcType=VARCHAR}, class_name = #{className,jdbcType=VARCHAR},
create_time = #{createTime,jdbcType=BIGINT}, create_time = #{createTime,jdbcType=BIGINT},
flag = #{flag,jdbcType=INTEGER}, flag = #{flag,jdbcType=INTEGER},
`type` = #{type,jdbcType=INTEGER},
thumbnail_normal_base64 = #{thumbnailNormalBase64,jdbcType=LONGVARCHAR}, thumbnail_normal_base64 = #{thumbnailNormalBase64,jdbcType=LONGVARCHAR},
thumbnail_alarm_base64 = #{thumbnailAlarmBase64,jdbcType=LONGVARCHAR}, thumbnail_alarm_base64 = #{thumbnailAlarmBase64,jdbcType=LONGVARCHAR},
thumbnail_dis_base64 = #{thumbnailDisBase64,jdbcType=LONGVARCHAR} thumbnail_dis_base64 = #{thumbnailDisBase64,jdbcType=LONGVARCHAR}
@ -376,7 +394,8 @@
set company_id = #{companyId,jdbcType=BIGINT}, set company_id = #{companyId,jdbcType=BIGINT},
class_name = #{className,jdbcType=VARCHAR}, class_name = #{className,jdbcType=VARCHAR},
create_time = #{createTime,jdbcType=BIGINT}, create_time = #{createTime,jdbcType=BIGINT},
flag = #{flag,jdbcType=INTEGER} flag = #{flag,jdbcType=INTEGER},
`type` = #{type,jdbcType=INTEGER}
where id = #{id,jdbcType=BIGINT} where id = #{id,jdbcType=BIGINT}
</update> </update>
</mapper> </mapper>

3
data-center-business-dao/src/main/resources/mappers/ex/BasicAssetClassMapperExt.xml

@ -47,6 +47,9 @@
tab.company_id companyId, tab.company_id companyId,
bcomp.company_name companyName, bcomp.company_name companyName,
tab.class_name assetClassName tab.class_name assetClassName
<if test="optType == 1">
,tab.`type`
</if>
<if test="optType == 2"> <if test="optType == 2">
,tab.class_big_id ,tab.class_big_id
,tabbig.class_name classBigName ,tabbig.class_name classBigName

3
data-center-business-model/src/main/java/com/techsor/datacenter/business/dto/assetclass/OptAssetClassParams.java

@ -28,4 +28,7 @@ public class OptAssetClassParams{
@Schema(description ="分类名称",example = "testAssetClass1", required = true) @Schema(description ="分类名称",example = "testAssetClass1", required = true)
private String assetClassName; private String assetClassName;
@Schema(description = "optType=1时,才需要这个参数,类型,0-个别,1-全部",example = "1")
private Integer type = 0;
} }

34
data-center-business-model/src/main/java/com/techsor/datacenter/business/model/BasicAssetClassBig.java

@ -48,6 +48,15 @@ public class BasicAssetClassBig implements Serializable {
*/ */
private Integer flag; private Integer flag;
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column basic_asset_class_big.type
*
* @mbg.generated
*/
private Integer type;
/** /**
* *
* This field was generated by MyBatis Generator. * This field was generated by MyBatis Generator.
@ -203,6 +212,30 @@ public class BasicAssetClassBig implements Serializable {
this.flag = flag; this.flag = flag;
} }
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column basic_asset_class_big.type
*
* @return the value of basic_asset_class_big.type
*
* @mbg.generated
*/
public Integer getType() {
return type;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column basic_asset_class_big.type
*
* @param type the value for basic_asset_class_big.type
*
* @mbg.generated
*/
public void setType(Integer type) {
this.type = type;
}
/** /**
* This method was generated by MyBatis Generator. * This method was generated by MyBatis Generator.
* This method returns the value of the database column basic_asset_class_big.thumbnail_normal_base64 * This method returns the value of the database column basic_asset_class_big.thumbnail_normal_base64
@ -292,6 +325,7 @@ public class BasicAssetClassBig implements Serializable {
sb.append(", className=").append(className); sb.append(", className=").append(className);
sb.append(", createTime=").append(createTime); sb.append(", createTime=").append(createTime);
sb.append(", flag=").append(flag); sb.append(", flag=").append(flag);
sb.append(", type=").append(type);
sb.append(", thumbnailNormalBase64=").append(thumbnailNormalBase64); sb.append(", thumbnailNormalBase64=").append(thumbnailNormalBase64);
sb.append(", thumbnailAlarmBase64=").append(thumbnailAlarmBase64); sb.append(", thumbnailAlarmBase64=").append(thumbnailAlarmBase64);
sb.append(", thumbnailDisBase64=").append(thumbnailDisBase64); sb.append(", thumbnailDisBase64=").append(thumbnailDisBase64);

60
data-center-business-model/src/main/java/com/techsor/datacenter/business/model/BasicAssetClassBigExample.java

@ -503,6 +503,66 @@ public class BasicAssetClassBigExample {
addCriterion("flag not between", value1, value2, "flag"); addCriterion("flag not between", value1, value2, "flag");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andTypeIsNull() {
addCriterion("`type` is null");
return (Criteria) this;
}
public Criteria andTypeIsNotNull() {
addCriterion("`type` is not null");
return (Criteria) this;
}
public Criteria andTypeEqualTo(Integer value) {
addCriterion("`type` =", value, "type");
return (Criteria) this;
}
public Criteria andTypeNotEqualTo(Integer value) {
addCriterion("`type` <>", value, "type");
return (Criteria) this;
}
public Criteria andTypeGreaterThan(Integer value) {
addCriterion("`type` >", value, "type");
return (Criteria) this;
}
public Criteria andTypeGreaterThanOrEqualTo(Integer value) {
addCriterion("`type` >=", value, "type");
return (Criteria) this;
}
public Criteria andTypeLessThan(Integer value) {
addCriterion("`type` <", value, "type");
return (Criteria) this;
}
public Criteria andTypeLessThanOrEqualTo(Integer value) {
addCriterion("`type` <=", value, "type");
return (Criteria) this;
}
public Criteria andTypeIn(List<Integer> values) {
addCriterion("`type` in", values, "type");
return (Criteria) this;
}
public Criteria andTypeNotIn(List<Integer> values) {
addCriterion("`type` not in", values, "type");
return (Criteria) this;
}
public Criteria andTypeBetween(Integer value1, Integer value2) {
addCriterion("`type` between", value1, value2, "type");
return (Criteria) this;
}
public Criteria andTypeNotBetween(Integer value1, Integer value2) {
addCriterion("`type` not between", value1, value2, "type");
return (Criteria) this;
}
} }
/** /**

3
data-center-business-model/src/main/java/com/techsor/datacenter/business/vo/assetclass/AssetClassPageVO.java

@ -34,4 +34,7 @@ public class AssetClassPageVO{
@Schema(description ="分类名称",example = "testAssetClass1", required = true) @Schema(description ="分类名称",example = "testAssetClass1", required = true)
private String assetClassName; private String assetClassName;
@Schema(description = "类型,0-个别,1-全部",example = "1")
private Integer type = 0;
} }

2
data-center-business-service/src/main/java/com/techsor/datacenter/business/service/impl/AssetClassServiceImpl.java

@ -131,6 +131,7 @@ public class AssetClassServiceImpl implements AssetClassService {
BasicAssetClassBig basicAssetClassBig = new BasicAssetClassBig(); BasicAssetClassBig basicAssetClassBig = new BasicAssetClassBig();
basicAssetClassBig.setId(null); basicAssetClassBig.setId(null);
basicAssetClassBig.setCompanyId(optAssetClassParams.getCompanyId()); basicAssetClassBig.setCompanyId(optAssetClassParams.getCompanyId());
basicAssetClassBig.setType(optAssetClassParams.getType());
basicAssetClassBig.setClassName(optAssetClassParams.getAssetClassName()); basicAssetClassBig.setClassName(optAssetClassParams.getAssetClassName());
basicAssetClassBig.setCreateTime(currentUnix); basicAssetClassBig.setCreateTime(currentUnix);
basicAssetClassBigMapperExt.insertSelective(basicAssetClassBig); basicAssetClassBigMapperExt.insertSelective(basicAssetClassBig);
@ -325,6 +326,7 @@ public class AssetClassServiceImpl implements AssetClassService {
BasicAssetClassBig basicAssetClassBig = new BasicAssetClassBig(); BasicAssetClassBig basicAssetClassBig = new BasicAssetClassBig();
basicAssetClassBig.setId(optAssetClassParams.getAssetClassId()); basicAssetClassBig.setId(optAssetClassParams.getAssetClassId());
basicAssetClassBig.setClassName(optAssetClassParams.getAssetClassName()); basicAssetClassBig.setClassName(optAssetClassParams.getAssetClassName());
basicAssetClassBig.setType(optAssetClassParams.getType());
basicAssetClassBigMapperExt.updateByPrimaryKeySelective(basicAssetClassBig); basicAssetClassBigMapperExt.updateByPrimaryKeySelective(basicAssetClassBig);
//Record log //Record log
userOperationLogsService.recordLog(companyId,userId,"编辑资产分类-大:"+basicAssetClassBig.getClassName(), userOperationLogsService.recordLog(companyId,userId,"编辑资产分类-大:"+basicAssetClassBig.getClassName(),

Loading…
Cancel
Save