From 30b2515de769b8b0c35669e49a7aeb7ad0d2d678 Mon Sep 17 00:00:00 2001 From: YuanYe <418471657@qq.com> Date: Wed, 31 Jul 2024 16:19:38 +0800 Subject: [PATCH] 1 --- .../java/com/hfkj/dao/BsOrderGoodsMapper.java | 19 +++-- .../com/hfkj/dao/BsOrderGoodsSqlProvider.java | 14 ++++ .../java/com/hfkj/entity/BsOrderGoods.java | 16 +++++ .../com/hfkj/entity/BsOrderGoodsExample.java | 70 +++++++++++++++++++ 4 files changed, 112 insertions(+), 7 deletions(-) diff --git a/service/src/main/java/com/hfkj/dao/BsOrderGoodsMapper.java b/service/src/main/java/com/hfkj/dao/BsOrderGoodsMapper.java index 26183f3..b987775 100644 --- a/service/src/main/java/com/hfkj/dao/BsOrderGoodsMapper.java +++ b/service/src/main/java/com/hfkj/dao/BsOrderGoodsMapper.java @@ -42,8 +42,9 @@ public interface BsOrderGoodsMapper extends BsOrderGoodsMapperExt { "insert into bs_order_goods (logistics_no, freight_price, ", "delivery_address_id, delivery_address, ", "order_no, child_order_no, ", - "mer_id, user_id, user_phone, ", - "goods_id, img, goods_name, ", + "mer_id, mer_name, user_id, ", + "user_phone, goods_id, ", + "img, goods_name, ", "goods_type_id, goods_type_name, ", "goods_brand_id, goods_brand_name, ", "goods_specs_id, goods_specs_name, ", @@ -62,8 +63,9 @@ public interface BsOrderGoodsMapper extends BsOrderGoodsMapperExt { "values (#{logisticsNo,jdbcType=VARCHAR}, #{freightPrice,jdbcType=DECIMAL}, ", "#{deliveryAddressId,jdbcType=BIGINT}, #{deliveryAddress,jdbcType=VARCHAR}, ", "#{orderNo,jdbcType=VARCHAR}, #{childOrderNo,jdbcType=VARCHAR}, ", - "#{merId,jdbcType=BIGINT}, #{userId,jdbcType=BIGINT}, #{userPhone,jdbcType=VARCHAR}, ", - "#{goodsId,jdbcType=BIGINT}, #{img,jdbcType=VARCHAR}, #{goodsName,jdbcType=VARCHAR}, ", + "#{merId,jdbcType=BIGINT}, #{merName,jdbcType=VARCHAR}, #{userId,jdbcType=BIGINT}, ", + "#{userPhone,jdbcType=VARCHAR}, #{goodsId,jdbcType=BIGINT}, ", + "#{img,jdbcType=VARCHAR}, #{goodsName,jdbcType=VARCHAR}, ", "#{goodsTypeId,jdbcType=BIGINT}, #{goodsTypeName,jdbcType=VARCHAR}, ", "#{goodsBrandId,jdbcType=BIGINT}, #{goodsBrandName,jdbcType=VARCHAR}, ", "#{goodsSpecsId,jdbcType=BIGINT}, #{goodsSpecsName,jdbcType=VARCHAR}, ", @@ -97,6 +99,7 @@ public interface BsOrderGoodsMapper extends BsOrderGoodsMapperExt { @Result(column="order_no", property="orderNo", jdbcType=JdbcType.VARCHAR), @Result(column="child_order_no", property="childOrderNo", jdbcType=JdbcType.VARCHAR), @Result(column="mer_id", property="merId", jdbcType=JdbcType.BIGINT), + @Result(column="mer_name", property="merName", jdbcType=JdbcType.VARCHAR), @Result(column="user_id", property="userId", jdbcType=JdbcType.BIGINT), @Result(column="user_phone", property="userPhone", jdbcType=JdbcType.VARCHAR), @Result(column="goods_id", property="goodsId", jdbcType=JdbcType.BIGINT), @@ -138,9 +141,9 @@ public interface BsOrderGoodsMapper extends BsOrderGoodsMapperExt { @Select({ "select", "id, logistics_no, freight_price, delivery_address_id, delivery_address, order_no, ", - "child_order_no, mer_id, user_id, user_phone, goods_id, img, goods_name, goods_type_id, ", - "goods_type_name, goods_brand_id, goods_brand_name, goods_specs_id, goods_specs_name, ", - "goods_specs_original_price, goods_count, total_price, total_deduction_price, ", + "child_order_no, mer_id, mer_name, user_id, user_phone, goods_id, img, goods_name, ", + "goods_type_id, goods_type_name, goods_brand_id, goods_brand_name, goods_specs_id, ", + "goods_specs_name, goods_specs_original_price, goods_count, total_price, total_deduction_price, ", "coupon_discount_price, integral_discount_price, pay_real_price, pay_channel, ", "pay_serial_no, pay_type, `status`, logistics_status_desc, logistics_status, ", "create_time, pay_time, cancel_time, refund_time, finish_time, update_time, exception_status, ", @@ -157,6 +160,7 @@ public interface BsOrderGoodsMapper extends BsOrderGoodsMapperExt { @Result(column="order_no", property="orderNo", jdbcType=JdbcType.VARCHAR), @Result(column="child_order_no", property="childOrderNo", jdbcType=JdbcType.VARCHAR), @Result(column="mer_id", property="merId", jdbcType=JdbcType.BIGINT), + @Result(column="mer_name", property="merName", jdbcType=JdbcType.VARCHAR), @Result(column="user_id", property="userId", jdbcType=JdbcType.BIGINT), @Result(column="user_phone", property="userPhone", jdbcType=JdbcType.VARCHAR), @Result(column="goods_id", property="goodsId", jdbcType=JdbcType.BIGINT), @@ -213,6 +217,7 @@ public interface BsOrderGoodsMapper extends BsOrderGoodsMapperExt { "order_no = #{orderNo,jdbcType=VARCHAR},", "child_order_no = #{childOrderNo,jdbcType=VARCHAR},", "mer_id = #{merId,jdbcType=BIGINT},", + "mer_name = #{merName,jdbcType=VARCHAR},", "user_id = #{userId,jdbcType=BIGINT},", "user_phone = #{userPhone,jdbcType=VARCHAR},", "goods_id = #{goodsId,jdbcType=BIGINT},", diff --git a/service/src/main/java/com/hfkj/dao/BsOrderGoodsSqlProvider.java b/service/src/main/java/com/hfkj/dao/BsOrderGoodsSqlProvider.java index 1694752..6c5c8e2 100644 --- a/service/src/main/java/com/hfkj/dao/BsOrderGoodsSqlProvider.java +++ b/service/src/main/java/com/hfkj/dao/BsOrderGoodsSqlProvider.java @@ -56,6 +56,10 @@ public class BsOrderGoodsSqlProvider { sql.VALUES("mer_id", "#{merId,jdbcType=BIGINT}"); } + if (record.getMerName() != null) { + sql.VALUES("mer_name", "#{merName,jdbcType=VARCHAR}"); + } + if (record.getUserId() != null) { sql.VALUES("user_id", "#{userId,jdbcType=BIGINT}"); } @@ -213,6 +217,7 @@ public class BsOrderGoodsSqlProvider { sql.SELECT("order_no"); sql.SELECT("child_order_no"); sql.SELECT("mer_id"); + sql.SELECT("mer_name"); sql.SELECT("user_id"); sql.SELECT("user_phone"); sql.SELECT("goods_id"); @@ -297,6 +302,10 @@ public class BsOrderGoodsSqlProvider { sql.SET("mer_id = #{record.merId,jdbcType=BIGINT}"); } + if (record.getMerName() != null) { + sql.SET("mer_name = #{record.merName,jdbcType=VARCHAR}"); + } + if (record.getUserId() != null) { sql.SET("user_id = #{record.userId,jdbcType=BIGINT}"); } @@ -453,6 +462,7 @@ public class BsOrderGoodsSqlProvider { sql.SET("order_no = #{record.orderNo,jdbcType=VARCHAR}"); sql.SET("child_order_no = #{record.childOrderNo,jdbcType=VARCHAR}"); sql.SET("mer_id = #{record.merId,jdbcType=BIGINT}"); + sql.SET("mer_name = #{record.merName,jdbcType=VARCHAR}"); sql.SET("user_id = #{record.userId,jdbcType=BIGINT}"); sql.SET("user_phone = #{record.userPhone,jdbcType=VARCHAR}"); sql.SET("goods_id = #{record.goodsId,jdbcType=BIGINT}"); @@ -526,6 +536,10 @@ public class BsOrderGoodsSqlProvider { sql.SET("mer_id = #{merId,jdbcType=BIGINT}"); } + if (record.getMerName() != null) { + sql.SET("mer_name = #{merName,jdbcType=VARCHAR}"); + } + if (record.getUserId() != null) { sql.SET("user_id = #{userId,jdbcType=BIGINT}"); } diff --git a/service/src/main/java/com/hfkj/entity/BsOrderGoods.java b/service/src/main/java/com/hfkj/entity/BsOrderGoods.java index a6cc449..25871e9 100644 --- a/service/src/main/java/com/hfkj/entity/BsOrderGoods.java +++ b/service/src/main/java/com/hfkj/entity/BsOrderGoods.java @@ -54,6 +54,11 @@ public class BsOrderGoods implements Serializable { */ private Long merId; + /** + * 商户名称 + */ + private String merName; + /** * 用户id */ @@ -286,6 +291,14 @@ public class BsOrderGoods implements Serializable { this.merId = merId; } + public String getMerName() { + return merName; + } + + public void setMerName(String merName) { + this.merName = merName; + } + public Long getUserId() { return userId; } @@ -586,6 +599,7 @@ public class BsOrderGoods implements Serializable { && (this.getOrderNo() == null ? other.getOrderNo() == null : this.getOrderNo().equals(other.getOrderNo())) && (this.getChildOrderNo() == null ? other.getChildOrderNo() == null : this.getChildOrderNo().equals(other.getChildOrderNo())) && (this.getMerId() == null ? other.getMerId() == null : this.getMerId().equals(other.getMerId())) + && (this.getMerName() == null ? other.getMerName() == null : this.getMerName().equals(other.getMerName())) && (this.getUserId() == null ? other.getUserId() == null : this.getUserId().equals(other.getUserId())) && (this.getUserPhone() == null ? other.getUserPhone() == null : this.getUserPhone().equals(other.getUserPhone())) && (this.getGoodsId() == null ? other.getGoodsId() == null : this.getGoodsId().equals(other.getGoodsId())) @@ -635,6 +649,7 @@ public class BsOrderGoods implements Serializable { result = prime * result + ((getOrderNo() == null) ? 0 : getOrderNo().hashCode()); result = prime * result + ((getChildOrderNo() == null) ? 0 : getChildOrderNo().hashCode()); result = prime * result + ((getMerId() == null) ? 0 : getMerId().hashCode()); + result = prime * result + ((getMerName() == null) ? 0 : getMerName().hashCode()); result = prime * result + ((getUserId() == null) ? 0 : getUserId().hashCode()); result = prime * result + ((getUserPhone() == null) ? 0 : getUserPhone().hashCode()); result = prime * result + ((getGoodsId() == null) ? 0 : getGoodsId().hashCode()); @@ -687,6 +702,7 @@ public class BsOrderGoods implements Serializable { sb.append(", orderNo=").append(orderNo); sb.append(", childOrderNo=").append(childOrderNo); sb.append(", merId=").append(merId); + sb.append(", merName=").append(merName); sb.append(", userId=").append(userId); sb.append(", userPhone=").append(userPhone); sb.append(", goodsId=").append(goodsId); diff --git a/service/src/main/java/com/hfkj/entity/BsOrderGoodsExample.java b/service/src/main/java/com/hfkj/entity/BsOrderGoodsExample.java index c22abdc..11b275c 100644 --- a/service/src/main/java/com/hfkj/entity/BsOrderGoodsExample.java +++ b/service/src/main/java/com/hfkj/entity/BsOrderGoodsExample.java @@ -646,6 +646,76 @@ public class BsOrderGoodsExample { return (Criteria) this; } + public Criteria andMerNameIsNull() { + addCriterion("mer_name is null"); + return (Criteria) this; + } + + public Criteria andMerNameIsNotNull() { + addCriterion("mer_name is not null"); + return (Criteria) this; + } + + public Criteria andMerNameEqualTo(String value) { + addCriterion("mer_name =", value, "merName"); + return (Criteria) this; + } + + public Criteria andMerNameNotEqualTo(String value) { + addCriterion("mer_name <>", value, "merName"); + return (Criteria) this; + } + + public Criteria andMerNameGreaterThan(String value) { + addCriterion("mer_name >", value, "merName"); + return (Criteria) this; + } + + public Criteria andMerNameGreaterThanOrEqualTo(String value) { + addCriterion("mer_name >=", value, "merName"); + return (Criteria) this; + } + + public Criteria andMerNameLessThan(String value) { + addCriterion("mer_name <", value, "merName"); + return (Criteria) this; + } + + public Criteria andMerNameLessThanOrEqualTo(String value) { + addCriterion("mer_name <=", value, "merName"); + return (Criteria) this; + } + + public Criteria andMerNameLike(String value) { + addCriterion("mer_name like", value, "merName"); + return (Criteria) this; + } + + public Criteria andMerNameNotLike(String value) { + addCriterion("mer_name not like", value, "merName"); + return (Criteria) this; + } + + public Criteria andMerNameIn(List values) { + addCriterion("mer_name in", values, "merName"); + return (Criteria) this; + } + + public Criteria andMerNameNotIn(List values) { + addCriterion("mer_name not in", values, "merName"); + return (Criteria) this; + } + + public Criteria andMerNameBetween(String value1, String value2) { + addCriterion("mer_name between", value1, value2, "merName"); + return (Criteria) this; + } + + public Criteria andMerNameNotBetween(String value1, String value2) { + addCriterion("mer_name not between", value1, value2, "merName"); + return (Criteria) this; + } + public Criteria andUserIdIsNull() { addCriterion("user_id is null"); return (Criteria) this;