From bc01b68b6550f3892f10e82d6ffe1c676e621e60 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BD=90=E5=A4=A9=E5=A4=A7=E5=9C=A3?= <17615834396@163.com> Date: Fri, 29 Mar 2024 15:56:55 +0800 Subject: [PATCH] bug --- .../business/member/service/impl/LJDutyServiceImpl.java | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/member/service/impl/LJDutyServiceImpl.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/member/service/impl/LJDutyServiceImpl.java index 134b96e34..2d4fdd509 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/member/service/impl/LJDutyServiceImpl.java +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/member/service/impl/LJDutyServiceImpl.java @@ -11,6 +11,7 @@ import com.fuint.common.util.TokenUtil; import com.fuint.system.dept.entity.SysDept; import com.fuint.system.dept.service.ISysDeptService; import com.fuint.system.role.entity.TDuty; +import org.apache.commons.lang3.ObjectUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; @@ -64,6 +65,7 @@ public class LJDutyServiceImpl extends ServiceImpl implemen @Override public Page selectDutyPage(Page page, TDuty duty) { + AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo(); /*if (ObjectUtil.isNotEmpty(duty.getStoreId())){ SysDept sysDept = sysDeptService.selectParentId(Long.valueOf(duty.getStoreId())); duty.setStoreId(Math.toIntExact(sysDept.getDeptId())); @@ -72,7 +74,12 @@ public class LJDutyServiceImpl extends ServiceImpl implemen SysDept sysDept = sysDeptService.selectParentId(nowAccountInfo.getDeptId()); duty.setStoreId(Math.toIntExact(sysDept.getDeptId())); }*/ - duty.setStoreId(duty.getStoreId()); + if (ObjectUtils.isNotEmpty(duty.getStoreId())){ + duty.setStoreId(duty.getStoreId()); + }else { + duty.setStoreId(Integer.parseInt(nowAccountInfo.getDeptId().toString())); + } + return baseMapper.selectDutyPage(page,duty); }