From 2d5ca759421ab8d5a081ed1ab2d29514776692de Mon Sep 17 00:00:00 2001 From: GYJ <1157756119@qq.com> Date: Mon, 8 Jul 2024 14:19:03 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E6=9F=A5=E8=AF=A2=E5=95=86=E5=93=81?= =?UTF-8?q?=E5=BA=93=E5=AD=98=20=20=E5=A2=9E=E5=8A=A0=E5=88=86=E7=B1=BB?= =?UTF-8?q?=E5=8A=9F=E8=83=BD=20-=20=E8=A7=A3=E5=86=B3=20jpa=20sql=20?= =?UTF-8?q?=E7=B1=BB=E5=9E=8B=E4=B8=8D=E4=B8=80=E8=87=B4=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/cn/ysk/cashier/dto/product/StockQueryDto.java | 2 +- .../ysk/cashier/repository/product/TbProductSkuRepository.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/eladmin-system/src/main/java/cn/ysk/cashier/dto/product/StockQueryDto.java b/eladmin-system/src/main/java/cn/ysk/cashier/dto/product/StockQueryDto.java index 03a9e8e0..679cac80 100644 --- a/eladmin-system/src/main/java/cn/ysk/cashier/dto/product/StockQueryDto.java +++ b/eladmin-system/src/main/java/cn/ysk/cashier/dto/product/StockQueryDto.java @@ -10,7 +10,7 @@ public class StockQueryDto { private String shopId; private Double num; private Integer isStock; - private Integer categoryId; + private String categoryId; public void setName(String name) { if (StringUtils.isNotBlank(name)) { diff --git a/eladmin-system/src/main/java/cn/ysk/cashier/repository/product/TbProductSkuRepository.java b/eladmin-system/src/main/java/cn/ysk/cashier/repository/product/TbProductSkuRepository.java index 2ff8b180..6b11ddce 100644 --- a/eladmin-system/src/main/java/cn/ysk/cashier/repository/product/TbProductSkuRepository.java +++ b/eladmin-system/src/main/java/cn/ysk/cashier/repository/product/TbProductSkuRepository.java @@ -71,7 +71,7 @@ public interface TbProductSkuRepository extends JpaRepository searchProStockV2(@Param("shopId") String shopId, @Param("proName") String proName, @Param("isStock")Integer isStock, - @Param("categoryId") Integer categoryId, Pageable pageable); + @Param("categoryId") String categoryId, Pageable pageable); @Query("SELECT new cn.ysk.cashier.vo.StockV2Vo(" + "sku.id,pro.id,pro.coverImg,pro.name,unit.name,pro.typeEnum,sku.specSnap,pro.isStock, " + From 06e65187d2a353c41be063fc78d0f9e7a56e0aa5 Mon Sep 17 00:00:00 2001 From: GYJ <1157756119@qq.com> Date: Mon, 8 Jul 2024 14:45:53 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E5=A4=84=E7=90=86=E7=A9=BA=E5=AD=97?= =?UTF-8?q?=E7=AC=A6=E4=B8=B2=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/cn/ysk/cashier/dto/product/StockQueryDto.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/eladmin-system/src/main/java/cn/ysk/cashier/dto/product/StockQueryDto.java b/eladmin-system/src/main/java/cn/ysk/cashier/dto/product/StockQueryDto.java index 679cac80..da4acb10 100644 --- a/eladmin-system/src/main/java/cn/ysk/cashier/dto/product/StockQueryDto.java +++ b/eladmin-system/src/main/java/cn/ysk/cashier/dto/product/StockQueryDto.java @@ -18,6 +18,12 @@ public class StockQueryDto { } } + public void setCategoryId(String categoryId) { + if (StringUtils.isNotBlank(categoryId)) { + this.categoryId = categoryId; + } + } + public void setShopId(String shopId) { if (StringUtils.isNotBlank(shopId) && !shopId.equals("1")) { this.shopId = shopId; From 8304da10fec64330484dc288aff0b8d024b3a944 Mon Sep 17 00:00:00 2001 From: wangw <1594593906@qq.com> Date: Mon, 8 Jul 2024 15:55:09 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=AF=86=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/shop/TbShopInfoController.java | 22 +++++-------------- .../impl/shopimpl/TbShopInfoServiceImpl.java | 3 ++- 2 files changed, 7 insertions(+), 18 deletions(-) diff --git a/eladmin-system/src/main/java/cn/ysk/cashier/controller/shop/TbShopInfoController.java b/eladmin-system/src/main/java/cn/ysk/cashier/controller/shop/TbShopInfoController.java index e5fec78b..48a51f9b 100644 --- a/eladmin-system/src/main/java/cn/ysk/cashier/controller/shop/TbShopInfoController.java +++ b/eladmin-system/src/main/java/cn/ysk/cashier/controller/shop/TbShopInfoController.java @@ -1,21 +1,7 @@ -/* -* Copyright 2019-2020 Zheng Jie -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ package cn.ysk.cashier.controller.shop; import cn.ysk.cashier.annotation.Log; +import cn.ysk.cashier.annotation.rest.AnonymousPostMapping; import cn.ysk.cashier.config.security.security.TokenProvider; import cn.ysk.cashier.config.security.service.OnlineUserService; import cn.ysk.cashier.dto.shop.TbShopInfoDto; @@ -33,6 +19,7 @@ import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.*; import javax.servlet.http.HttpServletRequest; +import java.util.Map; /** * @website https://eladmin.vip @@ -81,8 +68,9 @@ public class TbShopInfoController { @ApiOperation("修改商户密码") @PostMapping(value = "/shop/upPass") - public ResponseEntity upShopPass(HttpServletRequest request, @RequestBody String username,String password) throws Exception { - tbShopInfoService.upShopPass(username,password); + @AnonymousPostMapping + public ResponseEntity upShopPass(HttpServletRequest request, @RequestBody Map map) throws Exception { + tbShopInfoService.upShopPass(map.get("username"),map.get("password")); //根据token踢出用户 // onlineUserService.logout(tokenProvider.getToken(request)); log.info("修改商户密码成功。"); diff --git a/eladmin-system/src/main/java/cn/ysk/cashier/service/impl/shopimpl/TbShopInfoServiceImpl.java b/eladmin-system/src/main/java/cn/ysk/cashier/service/impl/shopimpl/TbShopInfoServiceImpl.java index 6ef9be71..25e25028 100644 --- a/eladmin-system/src/main/java/cn/ysk/cashier/service/impl/shopimpl/TbShopInfoServiceImpl.java +++ b/eladmin-system/src/main/java/cn/ysk/cashier/service/impl/shopimpl/TbShopInfoServiceImpl.java @@ -229,7 +229,8 @@ public class TbShopInfoServiceImpl implements TbShopInfoService { String encPass = MD5Utils.encrypt(password); shopStaffRepository.updatePass(username,encPass,System.currentTimeMillis()); merchantAccountRepository.updatePass(username,encPass,System.currentTimeMillis()); - userService.updatePass(username,passwordEncoder.encode(passwordEncoder.encode(password))); +// passwordEncoder.encode(passwordEncoder.encode(password)) + userService.updatePass(username,passwordEncoder.encode(password)); } @Override