| | |
| | | import cn.lili.modules.member.service.StoreDepartmentRoleService; |
| | | import cn.lili.modules.member.service.StoreMenuRoleService; |
| | | import cn.lili.modules.member.service.StoreRoleService; |
| | | import cn.lili.mybatis.util.PageUtil; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | |
| | | @Service |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public class StoreRoleServiceImpl extends ServiceImpl<StoreRoleMapper, StoreRole> implements StoreRoleService { |
| | | @Override |
| | | public List<StoreRole> getSelectList() { |
| | | |
| | | String storeId = UserContext.getCurrentUser().getStoreId(); |
| | | // System.out.println(UserContext.getCurrentUser().getId()); |
| | | // System.out.println(storeId); |
| | | // String storeId = "1376433565247471616"; |
| | | if ( storeId == null) { |
| | | return null; |
| | | } |
| | | StoreRole storeRole = new StoreRole(); |
| | | storeRole.setStoreId(storeId); |
| | | |
| | | return this.list(PageUtil.initWrapper(storeRole)); |
| | | } |
| | | /** |
| | | * 部门角色 |
| | | */ |
| | |
| | | @Override |
| | | public List<StoreRole> list(List<String> ids) { |
| | | QueryWrapper<StoreRole> queryWrapper = new QueryWrapper<>(); |
| | | queryWrapper.eq("store_id", UserContext.getCurrentUser().getStoreId()); |
| | | String storeId = UserContext.getCurrentUser().getStoreId(); |
| | | queryWrapper.eq("store_id", storeId); |
| | | queryWrapper.in("id", ids); |
| | | return this.baseMapper.selectList(queryWrapper); |
| | | } |