From 9baa175ce6969fdd1b5a3c23a54a7acb00a242c5 Mon Sep 17 00:00:00 2001 From: hupeng Date: Fri, 18 Sep 2020 13:45:05 +0800 Subject: [PATCH 01/10] =?UTF-8?q?RedisUtils=E4=BF=AE=E5=A4=8DgetY=E6=96=B9?= =?UTF-8?q?=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- yshop-common/src/main/java/co/yixiang/utils/RedisUtils.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/yshop-common/src/main/java/co/yixiang/utils/RedisUtils.java b/yshop-common/src/main/java/co/yixiang/utils/RedisUtils.java index d2a80668..fe95bf66 100644 --- a/yshop-common/src/main/java/co/yixiang/utils/RedisUtils.java +++ b/yshop-common/src/main/java/co/yixiang/utils/RedisUtils.java @@ -168,7 +168,7 @@ public class RedisUtils { } public String getY(String key){ - return key == null ? "" : redisTemplate.opsForValue().get(key).toString(); + return key == null || !redisTemplate.hasKey(key) ? "" : redisTemplate.opsForValue().get(key).toString(); } /** From 34d0ac8cd57e0616cbe100eeedbcbfea766ca283 Mon Sep 17 00:00:00 2001 From: hupeng Date: Fri, 18 Sep 2020 13:45:39 +0800 Subject: [PATCH 02/10] =?UTF-8?q?=E4=B8=AA=E4=BA=BA=E5=88=86=E9=94=80?= =?UTF-8?q?=E6=B5=B7=E6=8A=A5=E5=A2=9E=E5=8A=A0from=E9=BB=98=E8=AE=A4?= =?UTF-8?q?=E5=80=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../co/yixiang/modules/services/CreatShareProductService.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/yshop-app/src/main/java/co/yixiang/modules/services/CreatShareProductService.java b/yshop-app/src/main/java/co/yixiang/modules/services/CreatShareProductService.java index 18c17282..0e02bc37 100644 --- a/yshop-app/src/main/java/co/yixiang/modules/services/CreatShareProductService.java +++ b/yshop-app/src/main/java/co/yixiang/modules/services/CreatShareProductService.java @@ -187,8 +187,7 @@ public class CreatShareProductService { } } else{//其他 - if(!from.equals(AppFromEnum.ROUNTINE.getValue())) { - } + if(StrUtil.isBlank(from)) from = AppFromEnum.H5.getValue(); String name = uid + "_"+from+"_user_wap.jpg"; From 39c5ee58fd6112a296187f3917af334bc6dc3d0d Mon Sep 17 00:00:00 2001 From: taozi <552920369@qq.com> Date: Fri, 18 Sep 2020 15:26:47 +0800 Subject: [PATCH 03/10] =?UTF-8?q?bug--=E4=BB=A3=E7=A0=81=E7=94=9F=E6=88=90?= =?UTF-8?q?dto?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/resources/template/generator/admin/ServiceImplP.ftl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/yshop-admin/src/main/resources/template/generator/admin/ServiceImplP.ftl b/yshop-admin/src/main/resources/template/generator/admin/ServiceImplP.ftl index 95d87fe8..f304b267 100644 --- a/yshop-admin/src/main/resources/template/generator/admin/ServiceImplP.ftl +++ b/yshop-admin/src/main/resources/template/generator/admin/ServiceImplP.ftl @@ -70,7 +70,7 @@ public class ${className}ServiceImpl extends BaseServiceImpl<${className}Mapper, public PageResult<${className}Dto> queryAll(${className}QueryCriteria criteria, Pageable pageable) { getPage(pageable); PageInfo<${className}> page = new PageInfo<>(queryAll(criteria)); - return generator.convertPageInfo(page,${className}VO.class); + return generator.convertPageInfo(page,${className}Dto.class); } From 1605e89a4e648e8f73097e894a0598d775586d35 Mon Sep 17 00:00:00 2001 From: hupeng Date: Sat, 19 Sep 2020 19:17:23 +0800 Subject: [PATCH 04/10] =?UTF-8?q?=E5=95=86=E5=93=81=E8=AF=A6=E6=83=85?= =?UTF-8?q?=E6=B5=B7=E6=8A=A5=E5=A2=9E=E5=8A=A0from=E9=BB=98=E8=AE=A4?= =?UTF-8?q?=E5=80=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../co/yixiang/modules/product/rest/StoreProductController.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/yshop-app/src/main/java/co/yixiang/modules/product/rest/StoreProductController.java b/yshop-app/src/main/java/co/yixiang/modules/product/rest/StoreProductController.java index 5ff459c1..0e38fccb 100644 --- a/yshop-app/src/main/java/co/yixiang/modules/product/rest/StoreProductController.java +++ b/yshop-app/src/main/java/co/yixiang/modules/product/rest/StoreProductController.java @@ -138,7 +138,7 @@ public class StoreProductController { @ApiImplicitParam(name = "id", value = "商品ID", paramType = "query", dataType = "int") }) @ApiOperation(value = "商品详情海报",notes = "商品详情海报") - public ApiResult prodoctPoster(@PathVariable Integer id,@RequestParam String from) throws IOException, FontFormatException { + public ApiResult prodoctPoster(@PathVariable Integer id,@RequestParam(value = "from",defaultValue = "h5") String from) throws IOException, FontFormatException { YxUser userInfo = LocalUser.getUser(); long uid = userInfo.getUid(); From 31bba9e2d7ceacf77d44c09e8b74bfb3cc4a56a5 Mon Sep 17 00:00:00 2001 From: hupeng Date: Mon, 21 Sep 2020 14:06:55 +0800 Subject: [PATCH 05/10] =?UTF-8?q?=E5=BE=AE=E4=BF=A1=E9=85=8D=E7=BD=AE?= =?UTF-8?q?=E8=8E=B7=E5=8F=96URL=E5=8F=82=E6=95=B0=E6=9B=B4=E6=8D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../modules/wechat/rest/controller/WechatController.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/yshop-app/src/main/java/co/yixiang/modules/wechat/rest/controller/WechatController.java b/yshop-app/src/main/java/co/yixiang/modules/wechat/rest/controller/WechatController.java index 826b46a1..52b7c397 100644 --- a/yshop-app/src/main/java/co/yixiang/modules/wechat/rest/controller/WechatController.java +++ b/yshop-app/src/main/java/co/yixiang/modules/wechat/rest/controller/WechatController.java @@ -91,11 +91,12 @@ public class WechatController { */ @GetMapping("/wechat/config") @ApiOperation(value = "jssdk配置",notes = "jssdk配置") - public ApiResult> jsConfig(@RequestParam(value = "url") String url) throws WxErrorException { + public ApiResult> jsConfig(HttpServletRequest request) throws WxErrorException { WxMpService wxService = WxMpConfiguration.getWxMpService(); + String url = request.getParameter("url"); + log.info("url:"+url); WxJsapiSignature jsapiSignature = wxService.createJsapiSignature(url); Map map = new LinkedHashMap<>(); - map.put("appId",jsapiSignature.getAppId()); map.put("jsApiList",new String[]{"updateAppMessageShareData","openLocation","scanQRCode", "chooseWXPay","updateAppMessageShareData","updateTimelineShareData", From 64641b8a6118c62e7da84c660576fe0c55f3e0e1 Mon Sep 17 00:00:00 2001 From: taozi <552920369@qq.com> Date: Mon, 21 Sep 2020 14:14:03 +0800 Subject: [PATCH 06/10] =?UTF-8?q?bug--=E9=85=8D=E7=BD=AE=E6=96=87=E4=BB=B6?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- yshop-admin/src/main/resources/config/application-prod.yml | 2 +- yshop-app/src/main/resources/config/application-prod.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/yshop-admin/src/main/resources/config/application-prod.yml b/yshop-admin/src/main/resources/config/application-prod.yml index be99295e..dc297bf2 100644 --- a/yshop-admin/src/main/resources/config/application-prod.yml +++ b/yshop-admin/src/main/resources/config/application-prod.yml @@ -8,7 +8,7 @@ spring: driverClassName: net.sf.log4jdbc.sql.jdbcapi.DriverSpy url: jdbc:log4jdbc:mysql://localhost:3306/yshopb2c?serverTimezone=Asia/Shanghai&characterEncoding=utf8&useSSL=false&zeroDateTimeBehavior=convertToNull username: root - password: + password: xxcs@!2019 # 初始化配置 initial-size: 3 diff --git a/yshop-app/src/main/resources/config/application-prod.yml b/yshop-app/src/main/resources/config/application-prod.yml index 424ec143..5c73b9d5 100644 --- a/yshop-app/src/main/resources/config/application-prod.yml +++ b/yshop-app/src/main/resources/config/application-prod.yml @@ -7,7 +7,7 @@ spring: master: url: jdbc:mysql://localhost:3306/yshopb2c?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8 username: root - password: + password: xxcs@!2019 # 从库数据源 slave: # 从数据源开关/默认关闭 From b31a24a0ca05912103858c61cf74becac0aac0d8 Mon Sep 17 00:00:00 2001 From: hupeng Date: Mon, 21 Sep 2020 15:10:06 +0800 Subject: [PATCH 07/10] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E7=A7=92=E6=9D=80?= =?UTF-8?q?=E4=BB=B7=E6=A0=BC=E8=AE=BE=E7=BD=AE=E7=9A=84=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../activity/service/impl/YxStoreSeckillServiceImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/yshop-mall/src/main/java/co/yixiang/modules/activity/service/impl/YxStoreSeckillServiceImpl.java b/yshop-mall/src/main/java/co/yixiang/modules/activity/service/impl/YxStoreSeckillServiceImpl.java index 2cd3ffbc..3ae19723 100644 --- a/yshop-mall/src/main/java/co/yixiang/modules/activity/service/impl/YxStoreSeckillServiceImpl.java +++ b/yshop-mall/src/main/java/co/yixiang/modules/activity/service/impl/YxStoreSeckillServiceImpl.java @@ -254,7 +254,7 @@ public class YxStoreSeckillServiceImpl extends BaseServiceImpl Date: Mon, 21 Sep 2020 15:15:03 +0800 Subject: [PATCH 08/10] =?UTF-8?q?=E5=A2=9E=E5=8A=A0@ForbidSubmit=E6=B3=A8?= =?UTF-8?q?=E8=A7=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../yixiang/modules/wechat/rest/YxWechatLiveController.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/yshop-shop/src/main/java/co/yixiang/modules/wechat/rest/YxWechatLiveController.java b/yshop-shop/src/main/java/co/yixiang/modules/wechat/rest/YxWechatLiveController.java index 1520e85c..0fa74fc7 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/wechat/rest/YxWechatLiveController.java +++ b/yshop-shop/src/main/java/co/yixiang/modules/wechat/rest/YxWechatLiveController.java @@ -10,6 +10,7 @@ package co.yixiang.modules.wechat.rest; import co.yixiang.dozer.service.IGenerator; import co.yixiang.logging.aop.log.Log; +import co.yixiang.modules.aop.ForbidSubmit; import co.yixiang.modules.mp.domain.YxWechatLive; import co.yixiang.modules.mp.service.YxWechatLiveService; import co.yixiang.modules.mp.service.dto.UpdateGoodsDto; @@ -65,6 +66,7 @@ public class YxWechatLiveController { return new ResponseEntity<>(yxWechatLiveService.queryAll(criteria,pageable),HttpStatus.OK); } + @ForbidSubmit @PostMapping @Log("新增wxlive") @ApiOperation("新增wxlive") @@ -74,6 +76,7 @@ public class YxWechatLiveController { } + @ForbidSubmit @PostMapping("/addGoods") @Log("添加商品") @ApiOperation("添加商品") @@ -82,6 +85,7 @@ public class YxWechatLiveController { return new ResponseEntity<>(yxWechatLiveService.addGoods(resources),HttpStatus.CREATED); } + @ForbidSubmit @PutMapping @Log("修改wxlive") @ApiOperation("修改wxlive") @@ -91,6 +95,7 @@ public class YxWechatLiveController { return new ResponseEntity<>(HttpStatus.NO_CONTENT); } + @ForbidSubmit @Log("删除wxlive") @ApiOperation("删除wxlive") @PreAuthorize("@el.check('admin','yxWechatLive:del')") From 08fc69c2a6c94f67af2203e9608a17ba2a6b2fe8 Mon Sep 17 00:00:00 2001 From: hupeng Date: Mon, 21 Sep 2020 15:15:11 +0800 Subject: [PATCH 09/10] =?UTF-8?q?=E5=A2=9E=E5=8A=A0@ForbidSubmit=E6=B3=A8?= =?UTF-8?q?=E8=A7=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../modules/shop/rest/YxStoreProductRelationController.java | 2 ++ .../modules/wechat/rest/YxWechatLiveGoodsController.java | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/yshop-shop/src/main/java/co/yixiang/modules/shop/rest/YxStoreProductRelationController.java b/yshop-shop/src/main/java/co/yixiang/modules/shop/rest/YxStoreProductRelationController.java index 75ded263..1bf912a8 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/shop/rest/YxStoreProductRelationController.java +++ b/yshop-shop/src/main/java/co/yixiang/modules/shop/rest/YxStoreProductRelationController.java @@ -9,6 +9,7 @@ package co.yixiang.modules.shop.rest; import java.util.Arrays; import co.yixiang.dozer.service.IGenerator; +import co.yixiang.modules.aop.ForbidSubmit; import lombok.AllArgsConstructor; import co.yixiang.logging.aop.log.Log; import co.yixiang.modules.product.domain.YxStoreProductRelation; @@ -72,6 +73,7 @@ public class YxStoreProductRelationController { return new ResponseEntity<>(HttpStatus.NO_CONTENT); } + @ForbidSubmit @Log("删除ProductRelation") @ApiOperation("删除ProductRelation") @PreAuthorize("@el.check('admin','yxStoreProductRelation:del')") diff --git a/yshop-shop/src/main/java/co/yixiang/modules/wechat/rest/YxWechatLiveGoodsController.java b/yshop-shop/src/main/java/co/yixiang/modules/wechat/rest/YxWechatLiveGoodsController.java index 07eaead0..46d095c4 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/wechat/rest/YxWechatLiveGoodsController.java +++ b/yshop-shop/src/main/java/co/yixiang/modules/wechat/rest/YxWechatLiveGoodsController.java @@ -10,6 +10,7 @@ package co.yixiang.modules.wechat.rest; import co.yixiang.dozer.service.IGenerator; import co.yixiang.logging.aop.log.Log; +import co.yixiang.modules.aop.ForbidSubmit; import co.yixiang.modules.mp.domain.YxWechatLiveGoods; import co.yixiang.modules.mp.service.YxWechatLiveGoodsService; import co.yixiang.modules.mp.service.dto.YxWechatLiveGoodsDto; @@ -63,6 +64,7 @@ public class YxWechatLiveGoodsController { return new ResponseEntity<>(yxWechatLiveGoodsService.queryAll(criteria,pageable),HttpStatus.OK); } + @ForbidSubmit @PostMapping @Log("新增yxWechatLiveGoods") @ApiOperation("新增yxWechatLiveGoods") @@ -71,6 +73,7 @@ public class YxWechatLiveGoodsController { return new ResponseEntity<>(yxWechatLiveGoodsService.saveGoods(resources),HttpStatus.CREATED); } + @ForbidSubmit @PutMapping @Log("修改yxWechatLiveGoods") @ApiOperation("修改yxWechatLiveGoods") @@ -80,6 +83,7 @@ public class YxWechatLiveGoodsController { return new ResponseEntity<>(HttpStatus.NO_CONTENT); } + @ForbidSubmit @Log("删除yxWechatLiveGoods") @ApiOperation("删除yxWechatLiveGoods") @PreAuthorize("@el.check('admin','yxWechatLiveGoods:del')") From 82b0b7650bec71a579ec7d88c732c16ddb911041 Mon Sep 17 00:00:00 2001 From: hupeng Date: Mon, 21 Sep 2020 15:39:59 +0800 Subject: [PATCH 10/10] =?UTF-8?q?=E9=85=8D=E7=BD=AE=E5=86=B2=E7=AA=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- yshop-app/src/main/resources/config/application-prod.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/yshop-app/src/main/resources/config/application-prod.yml b/yshop-app/src/main/resources/config/application-prod.yml index 424ec143..5c73b9d5 100644 --- a/yshop-app/src/main/resources/config/application-prod.yml +++ b/yshop-app/src/main/resources/config/application-prod.yml @@ -7,7 +7,7 @@ spring: master: url: jdbc:mysql://localhost:3306/yshopb2c?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8 username: root - password: + password: xxcs@!2019 # 从库数据源 slave: # 从数据源开关/默认关闭