规范代码格式,采用generatorConfig.xml执行下就能自动生成
This commit is contained in:
@@ -90,15 +90,14 @@ public class Depot {
|
||||
* @mbggenerated
|
||||
*/
|
||||
private String deleteFlag;
|
||||
private Boolean isdefault;
|
||||
|
||||
public Boolean getIsdefault() {
|
||||
return isdefault;
|
||||
}
|
||||
|
||||
public void setIsdefault(Boolean isdefault) {
|
||||
this.isdefault = isdefault;
|
||||
}
|
||||
/**
|
||||
* This field was generated by MyBatis Generator.
|
||||
* This field corresponds to the database column jsh_depot.is_default
|
||||
*
|
||||
* @mbggenerated
|
||||
*/
|
||||
private Boolean isDefault;
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
@@ -363,4 +362,28 @@ public class Depot {
|
||||
public void setDeleteFlag(String deleteFlag) {
|
||||
this.deleteFlag = deleteFlag == null ? null : deleteFlag.trim();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method returns the value of the database column jsh_depot.is_default
|
||||
*
|
||||
* @return the value of jsh_depot.is_default
|
||||
*
|
||||
* @mbggenerated
|
||||
*/
|
||||
public Boolean getIsDefault() {
|
||||
return isDefault;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method sets the value of the database column jsh_depot.is_default
|
||||
*
|
||||
* @param isDefault the value for jsh_depot.is_default
|
||||
*
|
||||
* @mbggenerated
|
||||
*/
|
||||
public void setIsDefault(Boolean isDefault) {
|
||||
this.isDefault = isDefault;
|
||||
}
|
||||
}
|
||||
@@ -235,7 +235,6 @@ public class DepotExample {
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
|
||||
public Criteria andIdIn(List<Long> values) {
|
||||
addCriterion("id in", values, "id");
|
||||
return (Criteria) this;
|
||||
@@ -665,65 +664,7 @@ public class DepotExample {
|
||||
addCriterion("remark <>", value, "remark");
|
||||
return (Criteria) this;
|
||||
}
|
||||
public Criteria andIsdefaultIsNull() {
|
||||
addCriterion("IsDefault is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIsdefaultIsNotNull() {
|
||||
addCriterion("IsDefault is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIsdefaultEqualTo(Boolean value) {
|
||||
addCriterion("IsDefault =", value, "isdefault");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIsdefaultNotEqualTo(Boolean value) {
|
||||
addCriterion("IsDefault <>", value, "isdefault");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIsdefaultGreaterThan(Boolean value) {
|
||||
addCriterion("IsDefault >", value, "isdefault");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIsdefaultGreaterThanOrEqualTo(Boolean value) {
|
||||
addCriterion("IsDefault >=", value, "isdefault");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIsdefaultLessThan(Boolean value) {
|
||||
addCriterion("IsDefault <", value, "isdefault");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIsdefaultLessThanOrEqualTo(Boolean value) {
|
||||
addCriterion("IsDefault <=", value, "isdefault");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIsdefaultIn(List<Boolean> values) {
|
||||
addCriterion("IsDefault in", values, "isdefault");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIsdefaultNotIn(List<Boolean> values) {
|
||||
addCriterion("IsDefault not in", values, "isdefault");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIsdefaultBetween(Boolean value1, Boolean value2) {
|
||||
addCriterion("IsDefault between", value1, value2, "isdefault");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIsdefaultNotBetween(Boolean value1, Boolean value2) {
|
||||
addCriterion("IsDefault not between", value1, value2, "isdefault");
|
||||
return (Criteria) this;
|
||||
}
|
||||
public Criteria andRemarkGreaterThan(String value) {
|
||||
addCriterion("remark >", value, "remark");
|
||||
return (Criteria) this;
|
||||
@@ -963,6 +904,66 @@ public class DepotExample {
|
||||
addCriterion("delete_Flag not between", value1, value2, "deleteFlag");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIsDefaultIsNull() {
|
||||
addCriterion("is_default is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIsDefaultIsNotNull() {
|
||||
addCriterion("is_default is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIsDefaultEqualTo(Boolean value) {
|
||||
addCriterion("is_default =", value, "isDefault");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIsDefaultNotEqualTo(Boolean value) {
|
||||
addCriterion("is_default <>", value, "isDefault");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIsDefaultGreaterThan(Boolean value) {
|
||||
addCriterion("is_default >", value, "isDefault");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIsDefaultGreaterThanOrEqualTo(Boolean value) {
|
||||
addCriterion("is_default >=", value, "isDefault");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIsDefaultLessThan(Boolean value) {
|
||||
addCriterion("is_default <", value, "isDefault");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIsDefaultLessThanOrEqualTo(Boolean value) {
|
||||
addCriterion("is_default <=", value, "isDefault");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIsDefaultIn(List<Boolean> values) {
|
||||
addCriterion("is_default in", values, "isDefault");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIsDefaultNotIn(List<Boolean> values) {
|
||||
addCriterion("is_default not in", values, "isDefault");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIsDefaultBetween(Boolean value1, Boolean value2) {
|
||||
addCriterion("is_default between", value1, value2, "isDefault");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIsDefaultNotBetween(Boolean value1, Boolean value2) {
|
||||
addCriterion("is_default not between", value1, value2, "isDefault");
|
||||
return (Criteria) this;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1069,4 +1070,4 @@ public class DepotExample {
|
||||
this(condition, value, secondValue, null);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -322,7 +322,7 @@ public class DepotService {
|
||||
logService.insertLog(BusinessConstants.LOG_INTERFACE_NAME_DEPOT,BusinessConstants.LOG_OPERATION_TYPE_EDIT+depotID,
|
||||
((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()).getRequest());
|
||||
Depot depot = new Depot();
|
||||
depot.setIsdefault(isDefault);
|
||||
depot.setIsDefault(isDefault);
|
||||
DepotExample example = new DepotExample();
|
||||
example.createCriteria().andIdEqualTo(depotID);
|
||||
int result=0;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.jsh.erp.datasource.mappers.DepotMapper">
|
||||
<resultMap id="BaseResultMap" type="com.jsh.erp.datasource.entities.Depot">
|
||||
<!--
|
||||
@@ -17,7 +17,7 @@
|
||||
<result column="principal" jdbcType="BIGINT" property="principal" />
|
||||
<result column="tenant_id" jdbcType="BIGINT" property="tenantId" />
|
||||
<result column="delete_Flag" jdbcType="VARCHAR" property="deleteFlag" />
|
||||
<result column="IsDefault" jdbcType="BIT" property="isdefault" />
|
||||
<result column="is_default" jdbcType="BIT" property="isDefault" />
|
||||
</resultMap>
|
||||
<sql id="Example_Where_Clause">
|
||||
<!--
|
||||
@@ -90,8 +90,8 @@
|
||||
WARNING - @mbggenerated
|
||||
This element is automatically generated by MyBatis Generator, do not modify.
|
||||
-->
|
||||
id, name, address, warehousing, truckage, type, sort, remark, principal, tenant_id,
|
||||
delete_Flag,IsDefault
|
||||
id, name, address, warehousing, truckage, type, sort, remark, principal, tenant_id,
|
||||
delete_Flag, is_default
|
||||
</sql>
|
||||
<select id="selectByExample" parameterType="com.jsh.erp.datasource.entities.DepotExample" resultMap="BaseResultMap">
|
||||
<!--
|
||||
@@ -116,7 +116,7 @@
|
||||
WARNING - @mbggenerated
|
||||
This element is automatically generated by MyBatis Generator, do not modify.
|
||||
-->
|
||||
select
|
||||
select
|
||||
<include refid="Base_Column_List" />
|
||||
from jsh_depot
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
@@ -144,14 +144,16 @@
|
||||
WARNING - @mbggenerated
|
||||
This element is automatically generated by MyBatis Generator, do not modify.
|
||||
-->
|
||||
insert into jsh_depot (id, name, address,
|
||||
warehousing, truckage, type,
|
||||
sort, remark, principal,
|
||||
tenant_id, delete_Flag)
|
||||
values (#{id,jdbcType=BIGINT}, #{name,jdbcType=VARCHAR}, #{address,jdbcType=VARCHAR},
|
||||
#{warehousing,jdbcType=DECIMAL}, #{truckage,jdbcType=DECIMAL}, #{type,jdbcType=INTEGER},
|
||||
#{sort,jdbcType=VARCHAR}, #{remark,jdbcType=VARCHAR}, #{principal,jdbcType=BIGINT},
|
||||
#{tenantId,jdbcType=BIGINT}, #{deleteFlag,jdbcType=VARCHAR})
|
||||
insert into jsh_depot (id, name, address,
|
||||
warehousing, truckage, type,
|
||||
sort, remark, principal,
|
||||
tenant_id, delete_Flag, is_default
|
||||
)
|
||||
values (#{id,jdbcType=BIGINT}, #{name,jdbcType=VARCHAR}, #{address,jdbcType=VARCHAR},
|
||||
#{warehousing,jdbcType=DECIMAL}, #{truckage,jdbcType=DECIMAL}, #{type,jdbcType=INTEGER},
|
||||
#{sort,jdbcType=VARCHAR}, #{remark,jdbcType=VARCHAR}, #{principal,jdbcType=BIGINT},
|
||||
#{tenantId,jdbcType=BIGINT}, #{deleteFlag,jdbcType=VARCHAR}, #{isDefault,jdbcType=BIT}
|
||||
)
|
||||
</insert>
|
||||
<insert id="insertSelective" parameterType="com.jsh.erp.datasource.entities.Depot">
|
||||
<!--
|
||||
@@ -193,6 +195,9 @@
|
||||
<if test="deleteFlag != null">
|
||||
delete_Flag,
|
||||
</if>
|
||||
<if test="isDefault != null">
|
||||
is_default,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">
|
||||
@@ -228,6 +233,9 @@
|
||||
<if test="deleteFlag != null">
|
||||
#{deleteFlag,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="isDefault != null">
|
||||
#{isDefault,jdbcType=BIT},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<select id="countByExample" parameterType="com.jsh.erp.datasource.entities.DepotExample" resultType="java.lang.Integer">
|
||||
@@ -280,8 +288,8 @@
|
||||
<if test="record.deleteFlag != null">
|
||||
delete_Flag = #{record.deleteFlag,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.isdefault != null">
|
||||
IsDefault = #{record.isdefault,jdbcType=BIT},
|
||||
<if test="record.isDefault != null">
|
||||
is_default = #{record.isDefault,jdbcType=BIT},
|
||||
</if>
|
||||
</set>
|
||||
<if test="_parameter != null">
|
||||
@@ -304,7 +312,8 @@
|
||||
remark = #{record.remark,jdbcType=VARCHAR},
|
||||
principal = #{record.principal,jdbcType=BIGINT},
|
||||
tenant_id = #{record.tenantId,jdbcType=BIGINT},
|
||||
delete_Flag = #{record.deleteFlag,jdbcType=VARCHAR}
|
||||
delete_Flag = #{record.deleteFlag,jdbcType=VARCHAR},
|
||||
is_default = #{record.isDefault,jdbcType=BIT}
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
@@ -346,6 +355,9 @@
|
||||
<if test="deleteFlag != null">
|
||||
delete_Flag = #{deleteFlag,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="isDefault != null">
|
||||
is_default = #{isDefault,jdbcType=BIT},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
@@ -364,7 +376,8 @@
|
||||
remark = #{remark,jdbcType=VARCHAR},
|
||||
principal = #{principal,jdbcType=BIGINT},
|
||||
tenant_id = #{tenantId,jdbcType=BIGINT},
|
||||
delete_Flag = #{deleteFlag,jdbcType=VARCHAR}
|
||||
delete_Flag = #{deleteFlag,jdbcType=VARCHAR},
|
||||
is_default = #{isDefault,jdbcType=BIT}
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
</mapper>
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user