规范代码格式,采用generatorConfig.xml执行下就能自动生成
This commit is contained in:
@@ -229,7 +229,7 @@
|
|||||||
{
|
{
|
||||||
if(userdepot.indexOf("["+depot.id+"]")!=-1)
|
if(userdepot.indexOf("["+depot.id+"]")!=-1)
|
||||||
{
|
{
|
||||||
if(depot.isdefault){
|
if(depot.isDefault){
|
||||||
defDepotId = depot.id;
|
defDepotId = depot.id;
|
||||||
}
|
}
|
||||||
options += '<option value="' + depot.id + '">' + depot.name + '</option>';
|
options += '<option value="' + depot.id + '">' + depot.name + '</option>';
|
||||||
|
|||||||
@@ -183,9 +183,9 @@
|
|||||||
{title: '负责人', field: 'principalName', width: 60},
|
{title: '负责人', field: 'principalName', width: 60},
|
||||||
{title: '排序', field: 'sort', width: 60},
|
{title: '排序', field: 'sort', width: 60},
|
||||||
{
|
{
|
||||||
title: '是否默认', field: 'isdefault', width: 100, align: "center",
|
title: '是否默认', field: 'isDefault', width: 100, align: "center",
|
||||||
formatter: function (value, rec) {
|
formatter: function (value, rec) {
|
||||||
if (rec.isdefault) {
|
if (rec.isDefault) {
|
||||||
return "<b style='color:green'>是</b>";
|
return "<b style='color:green'>是</b>";
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|||||||
@@ -328,7 +328,6 @@ CREATE TABLE `jsh_depot` (
|
|||||||
`type` int(10) DEFAULT NULL COMMENT '类型',
|
`type` int(10) DEFAULT NULL COMMENT '类型',
|
||||||
`sort` varchar(10) DEFAULT NULL COMMENT '排序',
|
`sort` varchar(10) DEFAULT NULL COMMENT '排序',
|
||||||
`remark` varchar(100) DEFAULT NULL COMMENT '描述',
|
`remark` varchar(100) DEFAULT NULL COMMENT '描述',
|
||||||
`IsDefault` bit(1) DEFAULT NULL COMMENT '是否默认',
|
|
||||||
PRIMARY KEY (`id`)
|
PRIMARY KEY (`id`)
|
||||||
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8 COMMENT='仓库表';
|
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8 COMMENT='仓库表';
|
||||||
|
|
||||||
@@ -1607,3 +1606,11 @@ ALTER TABLE jsh_log DROP FOREIGN KEY FKF2696AA13E226853;
|
|||||||
ALTER TABLE jsh_material DROP FOREIGN KEY FK675951272AB6672C;
|
ALTER TABLE jsh_material DROP FOREIGN KEY FK675951272AB6672C;
|
||||||
ALTER TABLE jsh_material DROP FOREIGN KEY jsh_material_ibfk_1;
|
ALTER TABLE jsh_material DROP FOREIGN KEY jsh_material_ibfk_1;
|
||||||
|
|
||||||
|
-- ----------------------------
|
||||||
|
-- 时间:2019年4月30日
|
||||||
|
-- version:1.0.14
|
||||||
|
-- 此次更新
|
||||||
|
-- 删除所有外键
|
||||||
|
-- 特别提醒:之后的sql都是在之前基础上迭代,可以对已存在的系统进行数据保留更新
|
||||||
|
-- ----------------------------
|
||||||
|
alter table jsh_depot add is_default bit(1) DEFAULT NULL COMMENT '是否默认';
|
||||||
@@ -90,15 +90,14 @@ public class Depot {
|
|||||||
* @mbggenerated
|
* @mbggenerated
|
||||||
*/
|
*/
|
||||||
private String deleteFlag;
|
private String deleteFlag;
|
||||||
private Boolean isdefault;
|
|
||||||
|
|
||||||
public Boolean getIsdefault() {
|
/**
|
||||||
return isdefault;
|
* This field was generated by MyBatis Generator.
|
||||||
}
|
* This field corresponds to the database column jsh_depot.is_default
|
||||||
|
*
|
||||||
public void setIsdefault(Boolean isdefault) {
|
* @mbggenerated
|
||||||
this.isdefault = isdefault;
|
*/
|
||||||
}
|
private Boolean isDefault;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This method was generated by MyBatis Generator.
|
* This method was generated by MyBatis Generator.
|
||||||
@@ -363,4 +362,28 @@ public class Depot {
|
|||||||
public void setDeleteFlag(String deleteFlag) {
|
public void setDeleteFlag(String deleteFlag) {
|
||||||
this.deleteFlag = deleteFlag == null ? null : deleteFlag.trim();
|
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;
|
return (Criteria) this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public Criteria andIdIn(List<Long> values) {
|
public Criteria andIdIn(List<Long> values) {
|
||||||
addCriterion("id in", values, "id");
|
addCriterion("id in", values, "id");
|
||||||
return (Criteria) this;
|
return (Criteria) this;
|
||||||
@@ -665,65 +664,7 @@ public class DepotExample {
|
|||||||
addCriterion("remark <>", value, "remark");
|
addCriterion("remark <>", value, "remark");
|
||||||
return (Criteria) this;
|
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) {
|
public Criteria andRemarkGreaterThan(String value) {
|
||||||
addCriterion("remark >", value, "remark");
|
addCriterion("remark >", value, "remark");
|
||||||
return (Criteria) this;
|
return (Criteria) this;
|
||||||
@@ -963,6 +904,66 @@ public class DepotExample {
|
|||||||
addCriterion("delete_Flag not between", value1, value2, "deleteFlag");
|
addCriterion("delete_Flag not between", value1, value2, "deleteFlag");
|
||||||
return (Criteria) this;
|
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;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -322,7 +322,7 @@ public class DepotService {
|
|||||||
logService.insertLog(BusinessConstants.LOG_INTERFACE_NAME_DEPOT,BusinessConstants.LOG_OPERATION_TYPE_EDIT+depotID,
|
logService.insertLog(BusinessConstants.LOG_INTERFACE_NAME_DEPOT,BusinessConstants.LOG_OPERATION_TYPE_EDIT+depotID,
|
||||||
((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()).getRequest());
|
((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()).getRequest());
|
||||||
Depot depot = new Depot();
|
Depot depot = new Depot();
|
||||||
depot.setIsdefault(isDefault);
|
depot.setIsDefault(isDefault);
|
||||||
DepotExample example = new DepotExample();
|
DepotExample example = new DepotExample();
|
||||||
example.createCriteria().andIdEqualTo(depotID);
|
example.createCriteria().andIdEqualTo(depotID);
|
||||||
int result=0;
|
int result=0;
|
||||||
|
|||||||
@@ -17,7 +17,7 @@
|
|||||||
<result column="principal" jdbcType="BIGINT" property="principal" />
|
<result column="principal" jdbcType="BIGINT" property="principal" />
|
||||||
<result column="tenant_id" jdbcType="BIGINT" property="tenantId" />
|
<result column="tenant_id" jdbcType="BIGINT" property="tenantId" />
|
||||||
<result column="delete_Flag" jdbcType="VARCHAR" property="deleteFlag" />
|
<result column="delete_Flag" jdbcType="VARCHAR" property="deleteFlag" />
|
||||||
<result column="IsDefault" jdbcType="BIT" property="isdefault" />
|
<result column="is_default" jdbcType="BIT" property="isDefault" />
|
||||||
</resultMap>
|
</resultMap>
|
||||||
<sql id="Example_Where_Clause">
|
<sql id="Example_Where_Clause">
|
||||||
<!--
|
<!--
|
||||||
@@ -91,7 +91,7 @@
|
|||||||
This element is automatically generated by MyBatis Generator, do not modify.
|
This element is automatically generated by MyBatis Generator, do not modify.
|
||||||
-->
|
-->
|
||||||
id, name, address, warehousing, truckage, type, sort, remark, principal, tenant_id,
|
id, name, address, warehousing, truckage, type, sort, remark, principal, tenant_id,
|
||||||
delete_Flag,IsDefault
|
delete_Flag, is_default
|
||||||
</sql>
|
</sql>
|
||||||
<select id="selectByExample" parameterType="com.jsh.erp.datasource.entities.DepotExample" resultMap="BaseResultMap">
|
<select id="selectByExample" parameterType="com.jsh.erp.datasource.entities.DepotExample" resultMap="BaseResultMap">
|
||||||
<!--
|
<!--
|
||||||
@@ -147,11 +147,13 @@
|
|||||||
insert into jsh_depot (id, name, address,
|
insert into jsh_depot (id, name, address,
|
||||||
warehousing, truckage, type,
|
warehousing, truckage, type,
|
||||||
sort, remark, principal,
|
sort, remark, principal,
|
||||||
tenant_id, delete_Flag)
|
tenant_id, delete_Flag, is_default
|
||||||
|
)
|
||||||
values (#{id,jdbcType=BIGINT}, #{name,jdbcType=VARCHAR}, #{address,jdbcType=VARCHAR},
|
values (#{id,jdbcType=BIGINT}, #{name,jdbcType=VARCHAR}, #{address,jdbcType=VARCHAR},
|
||||||
#{warehousing,jdbcType=DECIMAL}, #{truckage,jdbcType=DECIMAL}, #{type,jdbcType=INTEGER},
|
#{warehousing,jdbcType=DECIMAL}, #{truckage,jdbcType=DECIMAL}, #{type,jdbcType=INTEGER},
|
||||||
#{sort,jdbcType=VARCHAR}, #{remark,jdbcType=VARCHAR}, #{principal,jdbcType=BIGINT},
|
#{sort,jdbcType=VARCHAR}, #{remark,jdbcType=VARCHAR}, #{principal,jdbcType=BIGINT},
|
||||||
#{tenantId,jdbcType=BIGINT}, #{deleteFlag,jdbcType=VARCHAR})
|
#{tenantId,jdbcType=BIGINT}, #{deleteFlag,jdbcType=VARCHAR}, #{isDefault,jdbcType=BIT}
|
||||||
|
)
|
||||||
</insert>
|
</insert>
|
||||||
<insert id="insertSelective" parameterType="com.jsh.erp.datasource.entities.Depot">
|
<insert id="insertSelective" parameterType="com.jsh.erp.datasource.entities.Depot">
|
||||||
<!--
|
<!--
|
||||||
@@ -193,6 +195,9 @@
|
|||||||
<if test="deleteFlag != null">
|
<if test="deleteFlag != null">
|
||||||
delete_Flag,
|
delete_Flag,
|
||||||
</if>
|
</if>
|
||||||
|
<if test="isDefault != null">
|
||||||
|
is_default,
|
||||||
|
</if>
|
||||||
</trim>
|
</trim>
|
||||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||||
<if test="id != null">
|
<if test="id != null">
|
||||||
@@ -228,6 +233,9 @@
|
|||||||
<if test="deleteFlag != null">
|
<if test="deleteFlag != null">
|
||||||
#{deleteFlag,jdbcType=VARCHAR},
|
#{deleteFlag,jdbcType=VARCHAR},
|
||||||
</if>
|
</if>
|
||||||
|
<if test="isDefault != null">
|
||||||
|
#{isDefault,jdbcType=BIT},
|
||||||
|
</if>
|
||||||
</trim>
|
</trim>
|
||||||
</insert>
|
</insert>
|
||||||
<select id="countByExample" parameterType="com.jsh.erp.datasource.entities.DepotExample" resultType="java.lang.Integer">
|
<select id="countByExample" parameterType="com.jsh.erp.datasource.entities.DepotExample" resultType="java.lang.Integer">
|
||||||
@@ -280,8 +288,8 @@
|
|||||||
<if test="record.deleteFlag != null">
|
<if test="record.deleteFlag != null">
|
||||||
delete_Flag = #{record.deleteFlag,jdbcType=VARCHAR},
|
delete_Flag = #{record.deleteFlag,jdbcType=VARCHAR},
|
||||||
</if>
|
</if>
|
||||||
<if test="record.isdefault != null">
|
<if test="record.isDefault != null">
|
||||||
IsDefault = #{record.isdefault,jdbcType=BIT},
|
is_default = #{record.isDefault,jdbcType=BIT},
|
||||||
</if>
|
</if>
|
||||||
</set>
|
</set>
|
||||||
<if test="_parameter != null">
|
<if test="_parameter != null">
|
||||||
@@ -304,7 +312,8 @@
|
|||||||
remark = #{record.remark,jdbcType=VARCHAR},
|
remark = #{record.remark,jdbcType=VARCHAR},
|
||||||
principal = #{record.principal,jdbcType=BIGINT},
|
principal = #{record.principal,jdbcType=BIGINT},
|
||||||
tenant_id = #{record.tenantId,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">
|
<if test="_parameter != null">
|
||||||
<include refid="Update_By_Example_Where_Clause" />
|
<include refid="Update_By_Example_Where_Clause" />
|
||||||
</if>
|
</if>
|
||||||
@@ -346,6 +355,9 @@
|
|||||||
<if test="deleteFlag != null">
|
<if test="deleteFlag != null">
|
||||||
delete_Flag = #{deleteFlag,jdbcType=VARCHAR},
|
delete_Flag = #{deleteFlag,jdbcType=VARCHAR},
|
||||||
</if>
|
</if>
|
||||||
|
<if test="isDefault != null">
|
||||||
|
is_default = #{isDefault,jdbcType=BIT},
|
||||||
|
</if>
|
||||||
</set>
|
</set>
|
||||||
where id = #{id,jdbcType=BIGINT}
|
where id = #{id,jdbcType=BIGINT}
|
||||||
</update>
|
</update>
|
||||||
@@ -364,7 +376,8 @@
|
|||||||
remark = #{remark,jdbcType=VARCHAR},
|
remark = #{remark,jdbcType=VARCHAR},
|
||||||
principal = #{principal,jdbcType=BIGINT},
|
principal = #{principal,jdbcType=BIGINT},
|
||||||
tenant_id = #{tenantId,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}
|
where id = #{id,jdbcType=BIGINT}
|
||||||
</update>
|
</update>
|
||||||
</mapper>
|
</mapper>
|
||||||
Reference in New Issue
Block a user