java工具类-公共方法集成项目调用接口

PhoneMessagesFeign

package com.busybird.feign;

import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * busybirdcommon公共方法集合项目调用接口
 */
@FeignClient(name = "busybirdcommon")
public interface PhoneMessagesFeign {
    /**
     *发送手机短信
     * @param phone 手机号
     * @param content 发送内容
     * @param templateCode 模板ID,默认验证号模板
     * @return
     */
    @PostMapping("/communication/sendSMS")
    String sendSMS(@RequestParam("phone") String phone,
                   @RequestParam("content") String content,
                   @RequestParam("templateCode") String templateCode
    );

    /**
     * 写入Redis
     * @param key
     * @param value
     * @param time
     * @return
     */
    @PostMapping("/redis/addRedis")
    String addRedis(@RequestParam("key") String key,
                    @RequestParam("value") String value,
                    @RequestParam("time") Integer time
    );

    /**
     * 获取缓存中的值(验证码)
     * @param key
     * @return
     */
    @PostMapping("/redis/getRedis")
    String getRedis(@RequestParam("key") String key);

    /**
     * 解析Token,获取用户信息
     * @param token
     * @return
     */
    @PostMapping("/token/tokenGetUserId")
    String tokenGetUserId(@RequestParam("token") String token);


    /**
     * @return
     */
    @PostMapping("/redis/getPayId")
    String redisGetPayId();


    @ResponseBody
    @PostMapping("redis/deleteRedis")
    @ApiOperation(value = "删除Redis")
     Integer deleteRedis(@RequestParam("key") String key);

}

你可能感兴趣的:(java工具类)