From 551cbd65043143f183fcba64f8fbb1c4f9d2e516 Mon Sep 17 00:00:00 2001 From: hurui <177768073@qq.com> Date: Wed, 29 Mar 2023 17:35:54 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/hai/dao/HighGoodsTypeMapper.java | 33 +++++----- .../com/hai/dao/HighGoodsTypeSqlProvider.java | 14 +++++ .../java/com/hai/entity/HighGoodsType.java | 16 +++++ .../com/hai/entity/HighGoodsTypeExample.java | 60 +++++++++++++++++++ .../main/java/com/web/config/AuthConfig.java | 2 + 5 files changed, 111 insertions(+), 14 deletions(-) diff --git a/hai-service/src/main/java/com/hai/dao/HighGoodsTypeMapper.java b/hai-service/src/main/java/com/hai/dao/HighGoodsTypeMapper.java index 151fdf32..2e1e696e 100644 --- a/hai-service/src/main/java/com/hai/dao/HighGoodsTypeMapper.java +++ b/hai-service/src/main/java/com/hai/dao/HighGoodsTypeMapper.java @@ -39,18 +39,20 @@ public interface HighGoodsTypeMapper extends HighGoodsTypeMapperExt { int deleteByPrimaryKey(Integer id); @Insert({ - "insert into high_goods_type (parent_id, title, ", - "business_type, user_service, ", - "img, created_user_id, ", - "created_time, updated_user_id, ", - "updated_time, `status`, ", - "ext_1, ext_2, ext_3)", - "values (#{parentId,jdbcType=INTEGER}, #{title,jdbcType=VARCHAR}, ", - "#{businessType,jdbcType=INTEGER}, #{userService,jdbcType=VARCHAR}, ", - "#{img,jdbcType=VARCHAR}, #{createdUserId,jdbcType=INTEGER}, ", - "#{createdTime,jdbcType=TIMESTAMP}, #{updatedUserId,jdbcType=INTEGER}, ", - "#{updatedTime,jdbcType=TIMESTAMP}, #{status,jdbcType=INTEGER}, ", - "#{ext1,jdbcType=VARCHAR}, #{ext2,jdbcType=VARCHAR}, #{ext3,jdbcType=VARCHAR})" + "insert into high_goods_type (parent_id, company_id, ", + "title, business_type, ", + "user_service, img, ", + "created_user_id, created_time, ", + "updated_user_id, updated_time, ", + "`status`, ext_1, ext_2, ", + "ext_3)", + "values (#{parentId,jdbcType=INTEGER}, #{companyId,jdbcType=BIGINT}, ", + "#{title,jdbcType=VARCHAR}, #{businessType,jdbcType=INTEGER}, ", + "#{userService,jdbcType=VARCHAR}, #{img,jdbcType=VARCHAR}, ", + "#{createdUserId,jdbcType=INTEGER}, #{createdTime,jdbcType=TIMESTAMP}, ", + "#{updatedUserId,jdbcType=INTEGER}, #{updatedTime,jdbcType=TIMESTAMP}, ", + "#{status,jdbcType=INTEGER}, #{ext1,jdbcType=VARCHAR}, #{ext2,jdbcType=VARCHAR}, ", + "#{ext3,jdbcType=VARCHAR})" }) @Options(useGeneratedKeys=true,keyProperty="id") int insert(HighGoodsType record); @@ -63,6 +65,7 @@ public interface HighGoodsTypeMapper extends HighGoodsTypeMapperExt { @Results({ @Result(column="id", property="id", jdbcType=JdbcType.INTEGER, id=true), @Result(column="parent_id", property="parentId", jdbcType=JdbcType.INTEGER), + @Result(column="company_id", property="companyId", jdbcType=JdbcType.BIGINT), @Result(column="title", property="title", jdbcType=JdbcType.VARCHAR), @Result(column="business_type", property="businessType", jdbcType=JdbcType.INTEGER), @Result(column="user_service", property="userService", jdbcType=JdbcType.VARCHAR), @@ -80,14 +83,15 @@ public interface HighGoodsTypeMapper extends HighGoodsTypeMapperExt { @Select({ "select", - "id, parent_id, title, business_type, user_service, img, created_user_id, created_time, ", - "updated_user_id, updated_time, `status`, ext_1, ext_2, ext_3", + "id, parent_id, company_id, title, business_type, user_service, img, created_user_id, ", + "created_time, updated_user_id, updated_time, `status`, ext_1, ext_2, ext_3", "from high_goods_type", "where id = #{id,jdbcType=INTEGER}" }) @Results({ @Result(column="id", property="id", jdbcType=JdbcType.INTEGER, id=true), @Result(column="parent_id", property="parentId", jdbcType=JdbcType.INTEGER), + @Result(column="company_id", property="companyId", jdbcType=JdbcType.BIGINT), @Result(column="title", property="title", jdbcType=JdbcType.VARCHAR), @Result(column="business_type", property="businessType", jdbcType=JdbcType.INTEGER), @Result(column="user_service", property="userService", jdbcType=JdbcType.VARCHAR), @@ -115,6 +119,7 @@ public interface HighGoodsTypeMapper extends HighGoodsTypeMapperExt { @Update({ "update high_goods_type", "set parent_id = #{parentId,jdbcType=INTEGER},", + "company_id = #{companyId,jdbcType=BIGINT},", "title = #{title,jdbcType=VARCHAR},", "business_type = #{businessType,jdbcType=INTEGER},", "user_service = #{userService,jdbcType=VARCHAR},", diff --git a/hai-service/src/main/java/com/hai/dao/HighGoodsTypeSqlProvider.java b/hai-service/src/main/java/com/hai/dao/HighGoodsTypeSqlProvider.java index cc20349b..16281ee0 100644 --- a/hai-service/src/main/java/com/hai/dao/HighGoodsTypeSqlProvider.java +++ b/hai-service/src/main/java/com/hai/dao/HighGoodsTypeSqlProvider.java @@ -32,6 +32,10 @@ public class HighGoodsTypeSqlProvider { sql.VALUES("parent_id", "#{parentId,jdbcType=INTEGER}"); } + if (record.getCompanyId() != null) { + sql.VALUES("company_id", "#{companyId,jdbcType=BIGINT}"); + } + if (record.getTitle() != null) { sql.VALUES("title", "#{title,jdbcType=VARCHAR}"); } @@ -91,6 +95,7 @@ public class HighGoodsTypeSqlProvider { sql.SELECT("id"); } sql.SELECT("parent_id"); + sql.SELECT("company_id"); sql.SELECT("title"); sql.SELECT("business_type"); sql.SELECT("user_service"); @@ -128,6 +133,10 @@ public class HighGoodsTypeSqlProvider { sql.SET("parent_id = #{record.parentId,jdbcType=INTEGER}"); } + if (record.getCompanyId() != null) { + sql.SET("company_id = #{record.companyId,jdbcType=BIGINT}"); + } + if (record.getTitle() != null) { sql.SET("title = #{record.title,jdbcType=VARCHAR}"); } @@ -186,6 +195,7 @@ public class HighGoodsTypeSqlProvider { sql.SET("id = #{record.id,jdbcType=INTEGER}"); sql.SET("parent_id = #{record.parentId,jdbcType=INTEGER}"); + sql.SET("company_id = #{record.companyId,jdbcType=BIGINT}"); sql.SET("title = #{record.title,jdbcType=VARCHAR}"); sql.SET("business_type = #{record.businessType,jdbcType=INTEGER}"); sql.SET("user_service = #{record.userService,jdbcType=VARCHAR}"); @@ -212,6 +222,10 @@ public class HighGoodsTypeSqlProvider { sql.SET("parent_id = #{parentId,jdbcType=INTEGER}"); } + if (record.getCompanyId() != null) { + sql.SET("company_id = #{companyId,jdbcType=BIGINT}"); + } + if (record.getTitle() != null) { sql.SET("title = #{title,jdbcType=VARCHAR}"); } diff --git a/hai-service/src/main/java/com/hai/entity/HighGoodsType.java b/hai-service/src/main/java/com/hai/entity/HighGoodsType.java index 5f2a0fd3..6fd631e9 100644 --- a/hai-service/src/main/java/com/hai/entity/HighGoodsType.java +++ b/hai-service/src/main/java/com/hai/entity/HighGoodsType.java @@ -23,6 +23,11 @@ public class HighGoodsType implements Serializable { */ private Integer parentId; + /** + * 公司id + */ + private Long companyId; + /** * 标题 */ @@ -101,6 +106,14 @@ public class HighGoodsType implements Serializable { this.parentId = parentId; } + public Long getCompanyId() { + return companyId; + } + + public void setCompanyId(Long companyId) { + this.companyId = companyId; + } + public String getTitle() { return title; } @@ -211,6 +224,7 @@ public class HighGoodsType implements Serializable { HighGoodsType other = (HighGoodsType) that; return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId())) && (this.getParentId() == null ? other.getParentId() == null : this.getParentId().equals(other.getParentId())) + && (this.getCompanyId() == null ? other.getCompanyId() == null : this.getCompanyId().equals(other.getCompanyId())) && (this.getTitle() == null ? other.getTitle() == null : this.getTitle().equals(other.getTitle())) && (this.getBusinessType() == null ? other.getBusinessType() == null : this.getBusinessType().equals(other.getBusinessType())) && (this.getUserService() == null ? other.getUserService() == null : this.getUserService().equals(other.getUserService())) @@ -231,6 +245,7 @@ public class HighGoodsType implements Serializable { int result = 1; result = prime * result + ((getId() == null) ? 0 : getId().hashCode()); result = prime * result + ((getParentId() == null) ? 0 : getParentId().hashCode()); + result = prime * result + ((getCompanyId() == null) ? 0 : getCompanyId().hashCode()); result = prime * result + ((getTitle() == null) ? 0 : getTitle().hashCode()); result = prime * result + ((getBusinessType() == null) ? 0 : getBusinessType().hashCode()); result = prime * result + ((getUserService() == null) ? 0 : getUserService().hashCode()); @@ -254,6 +269,7 @@ public class HighGoodsType implements Serializable { sb.append("Hash = ").append(hashCode()); sb.append(", id=").append(id); sb.append(", parentId=").append(parentId); + sb.append(", companyId=").append(companyId); sb.append(", title=").append(title); sb.append(", businessType=").append(businessType); sb.append(", userService=").append(userService); diff --git a/hai-service/src/main/java/com/hai/entity/HighGoodsTypeExample.java b/hai-service/src/main/java/com/hai/entity/HighGoodsTypeExample.java index 165cea37..0b5cd42c 100644 --- a/hai-service/src/main/java/com/hai/entity/HighGoodsTypeExample.java +++ b/hai-service/src/main/java/com/hai/entity/HighGoodsTypeExample.java @@ -245,6 +245,66 @@ public class HighGoodsTypeExample { return (Criteria) this; } + public Criteria andCompanyIdIsNull() { + addCriterion("company_id is null"); + return (Criteria) this; + } + + public Criteria andCompanyIdIsNotNull() { + addCriterion("company_id is not null"); + return (Criteria) this; + } + + public Criteria andCompanyIdEqualTo(Long value) { + addCriterion("company_id =", value, "companyId"); + return (Criteria) this; + } + + public Criteria andCompanyIdNotEqualTo(Long value) { + addCriterion("company_id <>", value, "companyId"); + return (Criteria) this; + } + + public Criteria andCompanyIdGreaterThan(Long value) { + addCriterion("company_id >", value, "companyId"); + return (Criteria) this; + } + + public Criteria andCompanyIdGreaterThanOrEqualTo(Long value) { + addCriterion("company_id >=", value, "companyId"); + return (Criteria) this; + } + + public Criteria andCompanyIdLessThan(Long value) { + addCriterion("company_id <", value, "companyId"); + return (Criteria) this; + } + + public Criteria andCompanyIdLessThanOrEqualTo(Long value) { + addCriterion("company_id <=", value, "companyId"); + return (Criteria) this; + } + + public Criteria andCompanyIdIn(List values) { + addCriterion("company_id in", values, "companyId"); + return (Criteria) this; + } + + public Criteria andCompanyIdNotIn(List values) { + addCriterion("company_id not in", values, "companyId"); + return (Criteria) this; + } + + public Criteria andCompanyIdBetween(Long value1, Long value2) { + addCriterion("company_id between", value1, value2, "companyId"); + return (Criteria) this; + } + + public Criteria andCompanyIdNotBetween(Long value1, Long value2) { + addCriterion("company_id not between", value1, value2, "companyId"); + return (Criteria) this; + } + public Criteria andTitleIsNull() { addCriterion("title is null"); return (Criteria) this; diff --git a/hai-user/src/main/java/com/web/config/AuthConfig.java b/hai-user/src/main/java/com/web/config/AuthConfig.java index 8b35c5c7..33cdd09f 100644 --- a/hai-user/src/main/java/com/web/config/AuthConfig.java +++ b/hai-user/src/main/java/com/web/config/AuthConfig.java @@ -91,6 +91,8 @@ public class AuthConfig implements WebMvcConfigurer { .excludePathPatterns("/**/swagger-ui.html") .excludePathPatterns("/login/*") .excludePathPatterns("/wechat/*") + .excludePathPatterns("/discount/hzfUserDiscountUse") + .excludePathPatterns("/discount/hzfUserDiscountReturn") .excludePathPatterns("/sms/*") ; }