From 9a819fa35464df79a1a8a56e132b3463fac520a7 Mon Sep 17 00:00:00 2001
From: MrShi <1878285526@qq.com>
Date: 星期日, 07 四月 2024 18:59:08 +0800
Subject: [PATCH] mrshi
---
server/service/src/main/java/com/doumee/service/business/impl/SolutionsServiceImpl.java | 10 ++++++++--
1 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/server/service/src/main/java/com/doumee/service/business/impl/SolutionsServiceImpl.java b/server/service/src/main/java/com/doumee/service/business/impl/SolutionsServiceImpl.java
index 82c40bd..4228f5b 100644
--- a/server/service/src/main/java/com/doumee/service/business/impl/SolutionsServiceImpl.java
+++ b/server/service/src/main/java/com/doumee/service/business/impl/SolutionsServiceImpl.java
@@ -156,7 +156,7 @@
// ||Constants.formatIntegerNum(solutions.getPriceCycleUnit()) < 0
||Constants.formatIntegerNum(solutions.getInsureCycle()) < 0
||Constants.formatIntegerNum(solutions.getInsureCycleUnit()) < 0
- || solutions.getMinAge() >solutions.getMaxAge()
+ ||Constants.formatIntegerNum( solutions.getMinAge()) >Constants.formatIntegerNum(solutions.getMaxAge())
|| Constants.formatBigdecimal(solutions.getPrice()).compareTo(new BigDecimal(0)) !=1
){
throw new BusinessException(ResponseStatus.BAD_REQUEST);
@@ -194,6 +194,7 @@
}
//鏁版嵁鏈夋晥鎬ф牎楠�
initCreateParam(solutions);
+ solutions.setType(null);//涓嶆敮鎸佷慨鏀规姇淇濇柟妗�
if(solutionsMapper.selectCount(new QueryWrapper<Solutions>().lambda()
.eq(Solutions::getName,solutions.getName())
.eq(Solutions::getIsdeleted,Constants.ZERO)
@@ -213,7 +214,6 @@
.eq(Solutions::getDataType,Constants.TWO)
.last("limit 1")
);
-
if(Objects.isNull(oldVersion)){
throw new BusinessException(ResponseStatus.DATA_EMPTY.getCode(),"鏈煡璇㈠埌鍘嗗彶鐗堟湰鏁版嵁");
@@ -362,12 +362,18 @@
@Override
public List<Solutions> findList(Solutions solutions) {
+ LoginUserInfo user = (LoginUserInfo)SecurityUtils.getSubject().getPrincipal();
solutions.setIsdeleted(Constants.ZERO);
solutions.setStatus(Constants.ZERO);
if(solutions.getDataType() == null){
solutions.setDataType(Constants.TWO);
}
+ if(Constants.equalsObject(user.getType(),Constants.TWO)){
+ //濡傛灉鏄垹闄�
+ solutions.setShopId(user.getCompanyId());
+ }
QueryWrapper<Solutions> wrapper = new QueryWrapper<>(solutions);
+
return solutionsMapper.selectList(wrapper);
}
--
Gitblit v1.9.3