package com.zy.asrs.common.openapi.service.impl; import com.zy.asrs.common.openapi.mapper.HostKeyMapper; import com.zy.asrs.common.openapi.entity.HostKey; import com.zy.asrs.common.openapi.service.HostKeyService; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.zy.asrs.framework.common.Cools; import org.springframework.stereotype.Service; import java.util.List; @Service("hostKeyService") public class HostKeyServiceImpl extends ServiceImpl implements HostKeyService { @Override public List getList() { List list = this.baseMapper.getList(); for (HostKey hostKey : list) {//对signKey进行脱敏处理 if (Cools.isEmpty(hostKey.getSignKey())) { continue; } String signKey = hostKey.getSignKey(); StringBuilder builder = new StringBuilder(signKey); for (int i = 5; i < 27; i++) { builder.setCharAt(i, '*'); } builder.delete(5, 22); hostKey.setSignKey(builder.toString()); } return list; } }