mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-04-19 18:45:03 +08:00
update 权限
This commit is contained in:
@@ -8,6 +8,7 @@ import com.google.common.collect.Maps;
|
||||
import com.jsowell.common.annotation.DataScope;
|
||||
import com.jsowell.common.constant.CacheConstants;
|
||||
import com.jsowell.common.constant.Constants;
|
||||
import com.jsowell.common.core.domain.vo.AuthorizedDeptVO;
|
||||
import com.jsowell.common.core.domain.ykc.RealTimeMonitorData;
|
||||
import com.jsowell.common.core.domain.ykc.TransactionRecordsData;
|
||||
import com.jsowell.common.core.redis.RedisCache;
|
||||
@@ -19,6 +20,7 @@ import com.jsowell.common.enums.ykc.PileConnectorDataBaseStatusEnum;
|
||||
import com.jsowell.common.enums.ykc.ReturnCodeEnum;
|
||||
import com.jsowell.common.exception.BusinessException;
|
||||
import com.jsowell.common.util.DateUtils;
|
||||
import com.jsowell.common.util.SecurityUtils;
|
||||
import com.jsowell.common.util.StringUtils;
|
||||
import com.jsowell.common.util.bean.BeanUtils;
|
||||
import com.jsowell.common.util.id.SnowflakeIdWorker;
|
||||
@@ -147,9 +149,16 @@ public class OrderBasicInfoServiceImpl implements IOrderBasicInfoService {
|
||||
* @return 订单
|
||||
*/
|
||||
@Override
|
||||
@DataScope(deptAlias = "t3")
|
||||
// @DataScope(deptAlias = "t3")
|
||||
public List<OrderListVO> selectOrderBasicInfoList(QueryOrderDTO dto) {
|
||||
// 权限过滤
|
||||
AuthorizedDeptVO authorizedMap = SecurityUtils.getAuthorizedMap();
|
||||
if (authorizedMap == null) {
|
||||
// 为空表示没有权限,返回空数组
|
||||
return Lists.newArrayList();
|
||||
}
|
||||
dto.setStationDeptIds(authorizedMap.getStationDeptIds());
|
||||
dto.setMerchantDeptIds(authorizedMap.getMerchantDeptIds());
|
||||
|
||||
List<OrderListVO> orderListVOS = orderBasicInfoMapper.selectOrderBasicInfoList(dto);
|
||||
if (CollectionUtils.isNotEmpty(orderListVOS)) {
|
||||
|
||||
@@ -196,7 +196,18 @@
|
||||
and t1.create_time <![CDATA[ <= ]]> #{endTime,jdbcType=VARCHAR}
|
||||
</if>
|
||||
<!-- 数据范围过滤 -->
|
||||
${params.dataScope}
|
||||
<!--<if test="merchantDeptIds != null and merchantDeptIds.size() != 0">
|
||||
and t3.dept_id in
|
||||
<foreach collection="merchantDeptIds" item="merchantDeptId" open="(" separator="," close=")">
|
||||
#{merchantDeptId}
|
||||
</foreach>
|
||||
</if>-->
|
||||
<if test="stationDeptIds != null and stationDeptIds.size() != 0">
|
||||
and t3.dept_id in
|
||||
<foreach collection="stationDeptIds" item="stationDeptId" open="(" separator="," close=")">
|
||||
#{stationDeptId}
|
||||
</foreach>
|
||||
</if>
|
||||
order by t1.create_time desc
|
||||
</select>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user