From 7792a17e142656586876bd49c923f463f538a4e3 Mon Sep 17 00:00:00 2001 From: wulin Date: Thu, 5 Nov 2020 16:01:03 +0800 Subject: [PATCH 1/5] =?UTF-8?q?=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/com/lz/config/ShiroConfig.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com/lz/config/ShiroConfig.java b/src/main/java/com/lz/config/ShiroConfig.java index 6b88fcc0..0eae9bdf 100644 --- a/src/main/java/com/lz/config/ShiroConfig.java +++ b/src/main/java/com/lz/config/ShiroConfig.java @@ -69,7 +69,7 @@ public class ShiroConfig { filterMap.put("/dtlg/jump", "anon"); filterMap.put("/luck/getLuckById", "anon"); filterMap.put("/luck/updateLuck", "anon"); - filterMap.put("/**", "anon"); + filterMap.put("/**", "oauth2"); shiroFilter.setFilterChainDefinitionMap(filterMap); return shiroFilter; From 915a624785d00f6f7287c5015662663070965dab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=9C=E5=BB=BA=E8=B6=85?= <3182967682@qq.com> Date: Thu, 5 Nov 2020 16:13:05 +0800 Subject: [PATCH 2/5] fix --- src/main/java/com/lz/config/ShiroConfig.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com/lz/config/ShiroConfig.java b/src/main/java/com/lz/config/ShiroConfig.java index 71c73101..36fedbc9 100644 --- a/src/main/java/com/lz/config/ShiroConfig.java +++ b/src/main/java/com/lz/config/ShiroConfig.java @@ -70,7 +70,7 @@ public class ShiroConfig { filterMap.put("/dtlg/jump", "anon"); filterMap.put("/luck/getLuckById", "anon"); filterMap.put("/luck/updateLuck", "anon"); - filterMap.put("/**", "anon"); + filterMap.put("/**", "oauth2"); shiroFilter.setFilterChainDefinitionMap(filterMap); return shiroFilter; From 1c2322f1b9e65798580d5fea84f115a3e4924e7f Mon Sep 17 00:00:00 2001 From: wulin Date: Thu, 5 Nov 2020 16:28:17 +0800 Subject: [PATCH 3/5] =?UTF-8?q?=E4=BF=9D=E5=AD=98=E7=BB=A9=E6=95=88?= =?UTF-8?q?=E8=AF=A6=E6=83=85=E6=97=B6=EF=BC=8C=E5=A2=9E=E5=8A=A0=E5=AF=B9?= =?UTF-8?q?maxCount=E7=9A=84=E5=88=A4=E6=96=AD=E9=99=90=E5=88=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../lz/modules/app/controller/ResultRecordController.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/main/java/com/lz/modules/app/controller/ResultRecordController.java b/src/main/java/com/lz/modules/app/controller/ResultRecordController.java index cf35373d..e4bd1a33 100644 --- a/src/main/java/com/lz/modules/app/controller/ResultRecordController.java +++ b/src/main/java/com/lz/modules/app/controller/ResultRecordController.java @@ -414,6 +414,9 @@ public class ResultRecordController extends AbstractController { if(resultRecortModelDto.getWeight().compareTo(BigDecimal.ZERO) == 0){//不限权重的 resultRecortModelDto.setWeight(null); } + if(resultRecortModelDto.getMaxCount().intValue() == 10000){//不限制数量 + resultRecortModelDto.setMaxCount(null); + } List detailDtos = resultDetailService.selectDtosByRecordId(resultRecord.getId(), model.getType()); for (ResultDetailDto dto:detailDtos @@ -577,6 +580,9 @@ public class ResultRecordController extends AbstractController { ) { int index = 0; BigDecimal weight = BigDecimal.ZERO; + if(model.getDetailDtos().size() > model.getMaxCount().intValue()){ + return R.error(model.getName() + "维度指标不能超过" + model.getMaxCount()); + } for (ResultDetailDto detailDto:model.getDetailDtos() ) {//排序 ResultDetail resultDetail = new ResultDetail(); From 4decad63c17a0e5789f3b81e166115958ec1e159 Mon Sep 17 00:00:00 2001 From: wulin Date: Thu, 5 Nov 2020 17:10:16 +0800 Subject: [PATCH 4/5] =?UTF-8?q?=E4=BF=9D=E5=AD=98=E7=BB=A9=E6=95=88?= =?UTF-8?q?=E8=AF=A6=E6=83=85=E9=A1=B5=E5=8E=BB=E6=8E=89=E5=AF=B9=E6=9D=83?= =?UTF-8?q?=E9=87=8D=E4=B9=8B=E5=92=8C=E7=9A=84=E9=99=90=E5=88=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../lz/modules/app/controller/ResultRecordController.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/lz/modules/app/controller/ResultRecordController.java b/src/main/java/com/lz/modules/app/controller/ResultRecordController.java index e4bd1a33..5a799c51 100644 --- a/src/main/java/com/lz/modules/app/controller/ResultRecordController.java +++ b/src/main/java/com/lz/modules/app/controller/ResultRecordController.java @@ -581,7 +581,7 @@ public class ResultRecordController extends AbstractController { int index = 0; BigDecimal weight = BigDecimal.ZERO; if(model.getDetailDtos().size() > model.getMaxCount().intValue()){ - return R.error(model.getName() + "维度指标不能超过" + model.getMaxCount()); + return R.error(model.getName() + "维度指标数量不能超过" + model.getMaxCount()); } for (ResultDetailDto detailDto:model.getDetailDtos() ) {//排序 @@ -624,10 +624,10 @@ public class ResultRecordController extends AbstractController { } //下面不限权重的,计算权重之和是否超标 - if(model.getWeight() != null && model.getWeight().compareTo(BigDecimal.ZERO) != 0 + /*if(model.getWeight() != null && model.getWeight().compareTo(BigDecimal.ZERO) != 0 && weight.compareTo(model.getWeight()) == 1){ return R.error(model.getName() + "的指标之和不能超过" + model.getWeight().multiply(BigDecimal.valueOf(100)) + "%"); - } + }*/ } //下面更新指标记录 if(inserts.size() > 0){ From 35fdbd38c233be72f19eb7ab10f35caeba9ff1fa Mon Sep 17 00:00:00 2001 From: wulin Date: Thu, 5 Nov 2020 17:19:11 +0800 Subject: [PATCH 5/5] =?UTF-8?q?=E4=BF=9D=E5=AD=98=E7=BB=A9=E6=95=88?= =?UTF-8?q?=E8=AF=A6=E6=83=85=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/lz/modules/app/controller/ResultRecordController.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com/lz/modules/app/controller/ResultRecordController.java b/src/main/java/com/lz/modules/app/controller/ResultRecordController.java index 5a799c51..34c3de8e 100644 --- a/src/main/java/com/lz/modules/app/controller/ResultRecordController.java +++ b/src/main/java/com/lz/modules/app/controller/ResultRecordController.java @@ -580,7 +580,7 @@ public class ResultRecordController extends AbstractController { ) { int index = 0; BigDecimal weight = BigDecimal.ZERO; - if(model.getDetailDtos().size() > model.getMaxCount().intValue()){ + if(model.getMaxCount() != null && model.getDetailDtos().size() > model.getMaxCount().intValue()){ return R.error(model.getName() + "维度指标数量不能超过" + model.getMaxCount()); } for (ResultDetailDto detailDto:model.getDetailDtos()