|
|
@ -1,5 +1,6 @@
|
|
|
|
package com.mashibing.strategy.feignclient;
|
|
|
|
package com.mashibing.strategy.feignclient;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import com.mashibing.common.clients.BeaconCacheClient;
|
|
|
|
import org.springframework.cloud.openfeign.FeignClient;
|
|
|
|
import org.springframework.cloud.openfeign.FeignClient;
|
|
|
|
import org.springframework.web.bind.annotation.GetMapping;
|
|
|
|
import org.springframework.web.bind.annotation.GetMapping;
|
|
|
|
import org.springframework.web.bind.annotation.PathVariable;
|
|
|
|
import org.springframework.web.bind.annotation.PathVariable;
|
|
|
@ -17,28 +18,6 @@ import java.util.Set;
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
@FeignClient("beacon-cache")
|
|
|
|
@FeignClient("beacon-cache")
|
|
|
|
public interface CacheClient {
|
|
|
|
public interface CacheClient extends BeaconCacheClient {
|
|
|
|
@GetMapping("/cache/get/{key}")
|
|
|
|
|
|
|
|
String get(@PathVariable String key);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@GetMapping("/cache/set/{key}/{value}")
|
|
|
|
|
|
|
|
void set(@PathVariable String key, @PathVariable String value);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@GetMapping("/cache/hget/{key}")
|
|
|
|
|
|
|
|
Map hget(@PathVariable String key);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@GetMapping("/cache/hget/{key}/{field}")
|
|
|
|
|
|
|
|
Object hget(@PathVariable(value = "key") String key, @PathVariable(value = "field") String field);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@GetMapping("/cache/hget/{key}/{field}")
|
|
|
|
|
|
|
|
String hgetString(@PathVariable(value = "key") String key, @PathVariable(value = "field") String field);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@PostMapping("/cache/hset/{key}")
|
|
|
|
|
|
|
|
void hset(@PathVariable String key, @RequestBody Map hash);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@PostMapping("/cache/sadd/{key}")
|
|
|
|
|
|
|
|
void sadd(@PathVariable(value = "key") String key, @RequestBody Map<String, Object>... maps);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@PostMapping("/cache/smember/{key}")
|
|
|
|
|
|
|
|
Set<Map> smember(@PathVariable(value = "key") String key);
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|