Commit 7cd4684a16cca00ae889c6ac781b2efe6a69035a
Merge remote-tracking branch 'origin/feature_hg_20240716' into feature_hg_20240716
Showing
7 changed files
with
19 additions
and
11 deletions
etrade-coupon/src/main/resources/com/diligrp/etrade/dao/mapper/CouponBindUserDao.xml
@@ -364,7 +364,7 @@ | @@ -364,7 +364,7 @@ | ||
364 | order by cbu.coupon_no desc | 364 | order by cbu.coupon_no desc |
365 | </select> | 365 | </select> |
366 | <update id="updateByCustomerId" parameterType="com.diligrp.etrade.coupon.model.CouponBindUserDo"> | 366 | <update id="updateByCustomerId" parameterType="com.diligrp.etrade.coupon.model.CouponBindUserDo"> |
367 | - UPDATE `dili_etrade`.`coupon_bind_user` | 367 | + UPDATE `coupon_bind_user` |
368 | SET `customer_name` = #{customerName}, | 368 | SET `customer_name` = #{customerName}, |
369 | `customer_certificate_type` = #{customerCertificateType}, | 369 | `customer_certificate_type` = #{customerCertificateType}, |
370 | `customer_certificate_no` = #{customerCertificateNo}, | 370 | `customer_certificate_no` = #{customerCertificateNo}, |
etrade-coupon/src/main/resources/com/diligrp/etrade/dao/mapper/CouponTemplateDao.xml
@@ -37,7 +37,7 @@ | @@ -37,7 +37,7 @@ | ||
37 | template_no LIKE concat(#{key},'%') | 37 | template_no LIKE concat(#{key},'%') |
38 | </select> | 38 | </select> |
39 | <insert id="insert" parameterType="com.diligrp.etrade.coupon.domain.CouponTemplateDto"> | 39 | <insert id="insert" parameterType="com.diligrp.etrade.coupon.domain.CouponTemplateDto"> |
40 | - INSERT INTO `dili_etrade`.`coupon_template` ( | 40 | + INSERT INTO `coupon_template` ( |
41 | `template_no`, | 41 | `template_no`, |
42 | `template_name`, | 42 | `template_name`, |
43 | `valid_type`, | 43 | `valid_type`, |
@@ -106,7 +106,7 @@ | @@ -106,7 +106,7 @@ | ||
106 | ct.id = #{id} | 106 | ct.id = #{id} |
107 | </select> | 107 | </select> |
108 | <update id="updateById" parameterType="com.diligrp.etrade.coupon.model.CouponTemplateDo"> | 108 | <update id="updateById" parameterType="com.diligrp.etrade.coupon.model.CouponTemplateDo"> |
109 | - UPDATE `dili_etrade`.`coupon_template` | 109 | + UPDATE `coupon_template` |
110 | SET | 110 | SET |
111 | `state` = #{state}, | 111 | `state` = #{state}, |
112 | `version` = #{version}+1, | 112 | `version` = #{version}+1, |
etrade-rpc/src/main/java/com/diligrp/etrade/rpc/basicdata/CategoryRpc.java
@@ -77,9 +77,9 @@ public interface CategoryRpc { | @@ -77,9 +77,9 @@ public interface CategoryRpc { | ||
77 | */ | 77 | */ |
78 | default List<CusCategoryDTO> listCategoryChildByXtrade(Long categoryId, Long marketId) { | 78 | default List<CusCategoryDTO> listCategoryChildByXtrade(Long categoryId, Long marketId) { |
79 | CusCategoryQuery query = new CusCategoryQuery(); | 79 | CusCategoryQuery query = new CusCategoryQuery(); |
80 | - query.setParent(categoryId); | 80 | + query.setCategoryId(categoryId); |
81 | query.setMarketId(marketId); | 81 | query.setMarketId(marketId); |
82 | - List<CusCategoryDTO> list = this.listCusCategory(query).getData(); | 82 | + List<CusCategoryDTO> list = this.listCategoryChildByXtrade(query).getData(); |
83 | return list; | 83 | return list; |
84 | } | 84 | } |
85 | } | 85 | } |
etrade-rpc/src/main/java/com/diligrp/etrade/rpc/dto/request/CusCategoryQuery.java
@@ -42,6 +42,8 @@ public class CusCategoryQuery { | @@ -42,6 +42,8 @@ public class CusCategoryQuery { | ||
42 | 42 | ||
43 | private Long marketId; | 43 | private Long marketId; |
44 | 44 | ||
45 | + private Long categoryId; | ||
46 | + | ||
45 | private Long parent; | 47 | private Long parent; |
46 | 48 | ||
47 | private Integer state; | 49 | private Integer state; |
@@ -140,5 +142,11 @@ public class CusCategoryQuery { | @@ -140,5 +142,11 @@ public class CusCategoryQuery { | ||
140 | this.marketId = marketId; | 142 | this.marketId = marketId; |
141 | } | 143 | } |
142 | 144 | ||
145 | + public Long getCategoryId() { | ||
146 | + return categoryId; | ||
147 | + } | ||
143 | 148 | ||
149 | + public void setCategoryId(Long categoryId) { | ||
150 | + this.categoryId = categoryId; | ||
151 | + } | ||
144 | } | 152 | } |
145 | \ No newline at end of file | 153 | \ No newline at end of file |
etrade-shop/src/main/java/com/diligrp/etrade/shop/domain/request/StockAddRequest.java
@@ -30,7 +30,7 @@ public record StockAddRequest(String businessCode, BigDecimal stock, Long produc | @@ -30,7 +30,7 @@ public record StockAddRequest(String businessCode, BigDecimal stock, Long produc | ||
30 | 30 | ||
31 | boolean isBusinessCodeNotBlank = StrUtil.isNotBlank(businessCode); | 31 | boolean isBusinessCodeNotBlank = StrUtil.isNotBlank(businessCode); |
32 | 32 | ||
33 | - boolean isJmsfStockNullOrNegative = (jmsfStock == null || jmsfStock.compareTo(BigDecimal.ZERO) < 0); | 33 | + boolean isJmsfStockNullOrNegative = (jmsfStock == null || jmsfStock.compareTo(BigDecimal.ZERO) <= 0); |
34 | 34 | ||
35 | if (sourceType == StockSourceType.ADMIN.getCode() || sourceType == StockSourceType.MCH.getCode()) { | 35 | if (sourceType == StockSourceType.ADMIN.getCode() || sourceType == StockSourceType.MCH.getCode()) { |
36 | if (isBusinessCodeNotBlank && isJmsfStockNullOrNegative) { | 36 | if (isBusinessCodeNotBlank && isJmsfStockNullOrNegative) { |
@@ -41,7 +41,7 @@ public record StockAddRequest(String businessCode, BigDecimal stock, Long produc | @@ -41,7 +41,7 @@ public record StockAddRequest(String businessCode, BigDecimal stock, Long produc | ||
41 | throw new IllegalArgumentException("business_code cannot be null or empty"); | 41 | throw new IllegalArgumentException("business_code cannot be null or empty"); |
42 | } | 42 | } |
43 | } | 43 | } |
44 | - if (stock == null || stock.compareTo(BigDecimal.ZERO) < 0) { | 44 | + if (stock == null || stock.compareTo(BigDecimal.ZERO) <= 0) { |
45 | throw new IllegalArgumentException("stock cannot be null or negative"); | 45 | throw new IllegalArgumentException("stock cannot be null or negative"); |
46 | } | 46 | } |
47 | if (productId == null) { | 47 | if (productId == null) { |
etrade-shop/src/main/resources/com/diligrp/etrade/dao/mapper/ShopApproveMainProductMapper.xml
@@ -65,11 +65,11 @@ | @@ -65,11 +65,11 @@ | ||
65 | </insert> | 65 | </insert> |
66 | 66 | ||
67 | <delete id="deleteByApproveId"> | 67 | <delete id="deleteByApproveId"> |
68 | - DELETE FROM `dili_etrade`.`shop_approve_main_product` WHERE `approve_id` = #{approveId} | 68 | + DELETE FROM `shop_approve_main_product` WHERE `approve_id` = #{approveId} |
69 | </delete> | 69 | </delete> |
70 | 70 | ||
71 | <select id="selectShopApproveMainProducts" resultType="com.diligrp.etrade.shop.model.ShopApproveMainProduct"> | 71 | <select id="selectShopApproveMainProducts" resultType="com.diligrp.etrade.shop.model.ShopApproveMainProduct"> |
72 | - SELECT id,shop_id,approve_id,market_id,category_id,category_name,level, top_category_id, top_category_name FROM `dili_etrade`.`shop_approve_main_product` | 72 | + SELECT id,shop_id,approve_id,market_id,category_id,category_name,level, top_category_id, top_category_name FROM `shop_approve_main_product` |
73 | WHERE `shop_id` = #{shopId} | 73 | WHERE `shop_id` = #{shopId} |
74 | 74 | ||
75 | <if test="approveId != null"> | 75 | <if test="approveId != null"> |
etrade-shop/src/main/resources/com/diligrp/etrade/dao/mapper/ShopMainProductMapper.xml
@@ -4,13 +4,13 @@ | @@ -4,13 +4,13 @@ | ||
4 | 4 | ||
5 | 5 | ||
6 | <select id="selectShopMainProducts" resultType="com.diligrp.etrade.shop.domain.response.ShopMainProductVo"> | 6 | <select id="selectShopMainProducts" resultType="com.diligrp.etrade.shop.domain.response.ShopMainProductVo"> |
7 | - SELECT id,shop_id,market_id,category_id,category_name,level, top_category_id, top_category_name FROM `dili_etrade`.`shop_main_product` | 7 | + SELECT id,shop_id,market_id,category_id,category_name,level, top_category_id, top_category_name FROM `shop_main_product` |
8 | WHERE `shop_id` = #{shopId} | 8 | WHERE `shop_id` = #{shopId} |
9 | </select> | 9 | </select> |
10 | 10 | ||
11 | 11 | ||
12 | <delete id="deleteByShopId"> | 12 | <delete id="deleteByShopId"> |
13 | - DELETE FROM `dili_etrade`.`shop_main_product` WHERE `shop_id` = #{shopId} | 13 | + DELETE FROM `shop_main_product` WHERE `shop_id` = #{shopId} |
14 | </delete> | 14 | </delete> |
15 | 15 | ||
16 | 16 |