1.6controller&service
This commit is contained in:
@@ -1,12 +1,13 @@
|
||||
package com.cool.store.mapper;
|
||||
|
||||
import com.cool.store.entity.HyPartnerExhibitionDO;
|
||||
import tk.mybatis.mapper.common.Mapper;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* @author zhangchenbiao
|
||||
* @date 2023-11-30 11:55
|
||||
*/
|
||||
@Mapper
|
||||
public interface HyPartnerExhibitionMapper {
|
||||
/**
|
||||
*
|
||||
|
||||
@@ -28,6 +28,12 @@ public class RedisUtilConfig {
|
||||
@Value("${redis.host.uri}")
|
||||
private String REDIS_HOST_URI;
|
||||
|
||||
@Value("${redis.host}")
|
||||
private String REDIS_HOST;
|
||||
|
||||
@Value("${redis.password}")
|
||||
private String REDIS_PASSWORD;
|
||||
|
||||
@Bean
|
||||
public RedisUtilPool redisUtilPool() {
|
||||
|
||||
@@ -40,7 +46,8 @@ public class RedisUtilConfig {
|
||||
jedisPoolConfig.setTestOnBorrow(false);
|
||||
|
||||
List<JedisShardInfo> shards = new ArrayList<>();
|
||||
JedisShardInfo jedisShardInfo = new JedisShardInfo(REDIS_HOST_URI);
|
||||
JedisShardInfo jedisShardInfo = new JedisShardInfo(REDIS_HOST);
|
||||
jedisShardInfo.setPassword(REDIS_PASSWORD);
|
||||
shards.add(jedisShardInfo);
|
||||
redisUtil.setShardedJedisPool(new ShardedJedisPool(jedisPoolConfig, shards));
|
||||
return redisUtil;
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
package com.cool.store.service;
|
||||
|
||||
/**
|
||||
* @author Fun Li 2023/11/30 14:42
|
||||
* @version 1.0
|
||||
*/
|
||||
public interface ExhibitionService {
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
package com.cool.store.service.impl.exhibition;
|
||||
|
||||
import com.cool.store.mapper.HyPartnerExhibitionMapper;
|
||||
import com.cool.store.service.ExhibitionService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* @author Fun Li 2023/11/30 14:42
|
||||
* @version 1.0
|
||||
*/
|
||||
@Service
|
||||
public class ExhibitionServiceImpl implements ExhibitionService {
|
||||
|
||||
@Autowired
|
||||
private HyPartnerExhibitionMapper exhibitionMapper;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
package com.cool.store.controller;
|
||||
|
||||
import com.cool.store.service.ExhibitionService;
|
||||
import io.swagger.annotations.Api;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
/**
|
||||
* @author Fun Li 2023/11/30 14:44
|
||||
* @version 1.0
|
||||
*/
|
||||
@RestController
|
||||
@Api(tags = "会销相关接口")
|
||||
@RequestMapping("/exhibition")
|
||||
@Slf4j
|
||||
public class ExhibitionController {
|
||||
|
||||
@Autowired
|
||||
private ExhibitionService exhibitionService;
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user