【改进】APP访问统计接口服务

This commit is contained in:
MichaelWin
2026-01-30 15:26:58 +08:00
parent cbdce6211f
commit 2516e1e1a3

View File

@@ -7,6 +7,8 @@ import com.corewing.app.dto.AccessStatisticsRequest;
import com.corewing.app.entity.AppAccessStatistics; import com.corewing.app.entity.AppAccessStatistics;
import com.corewing.app.mapper.AppAccessStatisticsMapper; import com.corewing.app.mapper.AppAccessStatisticsMapper;
import com.corewing.app.service.AppAccessStatisticsService; import com.corewing.app.service.AppAccessStatisticsService;
import com.corewing.app.util.CommonServletUtil;
import com.corewing.app.util.IpUtil;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
@Service @Service
@@ -30,6 +32,7 @@ public class AppAccessStatisticsServiceImpl extends ServiceImpl<AppAccessStatist
appAccessStatistics.setAccessType(accessStatisticsRequest.getAccessType()); appAccessStatistics.setAccessType(accessStatisticsRequest.getAccessType());
} }
appAccessStatistics.setAccessDevice(accessStatisticsRequest.getAccessDevice()); appAccessStatistics.setAccessDevice(accessStatisticsRequest.getAccessDevice());
appAccessStatistics.setAccessIp(IpUtil.getClientIp(CommonServletUtil.getRequest()));
return save(appAccessStatistics); return save(appAccessStatistics);
} }
} }