master
冯凯 2023-11-21 15:16:45 +08:00
parent fc4e4d6d66
commit 49294296c3
6 changed files with 24 additions and 22 deletions

View File

@ -1,8 +1,9 @@
package dragon.vehicle.firm.server; package com.dragon.vehicle.firm.server;
import com.dragon.common.security.annotation.EnableCustomConfig; import com.dragon.common.security.annotation.EnableCustomConfig;
import com.dragon.common.security.annotation.EnableDragonFeignClients; import com.dragon.common.security.annotation.EnableDragonFeignClients;
import com.dragon.common.swagger.annotation.EnableCustomSwagger2; import com.dragon.common.swagger.annotation.EnableCustomSwagger2;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication; import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.boot.autoconfigure.SpringBootApplication;

View File

@ -1,8 +1,8 @@
package dragon.vehicle.firm.server.controller; package com.dragon.vehicle.firm.server.controller;
import com.dragon.common.core.domain.Result; import com.dragon.common.core.domain.Result;
import com.dragon.vehicle.firm.domain.cache.FirmInfoCache; import com.dragon.vehicle.firm.domain.cache.FirmInfoCache;
import dragon.vehicle.firm.server.service.FirmInfoService; import com.dragon.vehicle.firm.server.service.FirmInfoService;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;

View File

@ -1,8 +1,9 @@
package dragon.vehicle.firm.server.mapper; package com.dragon.vehicle.firm.server.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.dragon.vehicle.firm.domain.common.FirmInfo; import com.dragon.vehicle.firm.domain.common.FirmInfo;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import org.mybatis.spring.annotation.MapperScan;
/** /**
* @author * @author
@ -10,6 +11,6 @@ import org.apache.ibatis.annotations.Mapper;
* @description: * @description:
* @date 2023/11/21 13:57 * @date 2023/11/21 13:57
*/ */
@Mapper
public interface FirmInfoMapper { public interface FirmInfoMapper extends BaseMapper<FirmInfo>{
} }

View File

@ -1,4 +1,4 @@
package dragon.vehicle.firm.server.service; package com.dragon.vehicle.firm.server.service;
import com.baomidou.mybatisplus.extension.service.IService; import com.baomidou.mybatisplus.extension.service.IService;
import com.dragon.vehicle.firm.domain.cache.FirmInfoCache; import com.dragon.vehicle.firm.domain.cache.FirmInfoCache;
@ -10,7 +10,7 @@ import com.dragon.vehicle.firm.domain.common.FirmInfo;
* @description: * @description:
* @date 2023/11/21 13:57 * @date 2023/11/21 13:57
*/ */
public interface FirmInfoService { public interface FirmInfoService extends IService<FirmInfo>{
/*** /***

View File

@ -1,12 +1,12 @@
package dragon.vehicle.firm.server.service.impl; package com.dragon.vehicle.firm.server.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.dragon.common.redis.service.RedisService; import com.dragon.common.redis.service.RedisService;
import com.dragon.vehicle.firm.domain.cache.FirmInfoCache; import com.dragon.vehicle.firm.domain.cache.FirmInfoCache;
import com.dragon.vehicle.firm.domain.common.FirmInfo; import com.dragon.vehicle.firm.domain.common.FirmInfo;
import dragon.vehicle.firm.server.mapper.FirmInfoMapper; import com.dragon.vehicle.firm.server.mapper.FirmInfoMapper;
import dragon.vehicle.firm.server.service.FirmInfoService; import com.dragon.vehicle.firm.server.service.FirmInfoService;
import lombok.extern.log4j.Log4j2; import lombok.extern.log4j.Log4j2;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
@ -20,7 +20,7 @@ import org.springframework.util.Assert;
*/ */
@Service @Service
@Log4j2 @Log4j2
public class FirmInfoServiceImpl implements FirmInfoService { public class FirmInfoServiceImpl extends ServiceImpl<FirmInfoMapper,FirmInfo> implements FirmInfoService {
@Autowired @Autowired
private FirmInfoMapper firmInfoMapper; private FirmInfoMapper firmInfoMapper;
@ -39,15 +39,15 @@ public class FirmInfoServiceImpl implements FirmInfoService {
public FirmInfoCache getFirmInfoByUserId(Long userId) { public FirmInfoCache getFirmInfoByUserId(Long userId) {
// FirmInfoCache firmInfoCache=null; FirmInfoCache firmInfoCache=null;
// if (redisService.hasKey("firm"+userId)){ if (redisService.hasKey("firm"+userId)){
// firmInfoCache=redisService.getCacheObject("firm"+userId); firmInfoCache=redisService.getCacheObject("firm"+userId);
// } }
// LambdaQueryWrapper<FirmInfo> queryWrapper = new LambdaQueryWrapper<>(); LambdaQueryWrapper<FirmInfo> queryWrapper = new LambdaQueryWrapper<>();
// Assert.notNull(userId,"用户不能为空"); Assert.notNull(userId,"用户不能为空");
// queryWrapper.eq(FirmInfo::getCreateBy,userId); queryWrapper.eq(FirmInfo::getCreateBy,userId);
// firmInfoCache= FirmInfoCache.getCache(firmInfoMapper.selectOne(queryWrapper)); firmInfoCache= FirmInfoCache.getCache(firmInfoMapper.selectOne(queryWrapper));
// log.info(firmInfoCache); log.info(firmInfoCache);
return null; return null;
} }
} }

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="dragon.vehicle.firm.server.mapper.FirmInfoMapper"> <mapper namespace="com.dragon.vehicle.firm.server.mapper.FirmInfoMapper">
</mapper> </mapper>