// Path: xbin-store-cloud-service-notify-api/src/main/java/cn/binux/notify/service/NotifyUserService.java
// @FeignClient(value = "xbin-store-cloud-service-notify",fallback = NotifyUserServiceHystrix.class)
// public interface NotifyUserService {
//     /**
//      * 发送短信
//      *
//      * @param mobile 手机号码 带国际区号
//      * @return ({"rs":1})   第一次
//      *         ({'remain':'\u8be5\u624b\u673a\u8fd8\u53ef\u83b7\u53d62\u6b21\u9a8c\u8bc1\u7801\uff0c\u8bf7\u5c3d\u5feb\u5b8c\u6210\u9a8c\u8bc1'})
//      *                      第二次提示还有2次
//      *         ({'remain':'\u8be5\u624b\u673a\u8fd8\u53ef\u83b7\u53d62\u6b21\u9a8c\u8bc1\u7801\uff0c\u8bf7\u5c3d\u5feb\u5b8c\u6210\u9a8c\u8bc1'})
//      *                      第三次提示还有1次
//      *         ({'remain':'\u8be5\u624b\u673a\u8fd8\u53ef\u83b7\u53d62\u6b21\u9a8c\u8bc1\u7801\uff0c\u8bf7\u5c3d\u5feb\u5b8c\u6210\u9a8c\u8bc1'})
//      *                      第四次提示此号码发送短信已达上限 请于1小时后尝试
//      *         ({"rs":-1})  网络繁忙
//      */
//     @RequestMapping(value = "/mobileNotify/{mobile}",method = RequestMethod.POST)
//     String mobileNotify(@PathVariable("mobile") String mobile);
// 
// }
// 
// Path: xbin-store-cloud-common/src/main/java/cn/binux/utils/JedisClient.java
// public interface JedisClient {
// 
//     String get(String key);
// 
//     String set(String key, String value);
// 
//     String hget(String hkey, String key);
// 
//     long hset(String hkey, String key, String value);
// 
//     long incr(String key);
// 
//     long expire(String key, Integer second);
// 
//     long ttl(String key);
// 
//     long del(String key);
// 
//     long hdel(String hkey, String key);
// 
// 
// }


import cn.binux.notify.service.NotifyUserService;
import cn.binux.utils.FastJsonConvert;
import cn.binux.utils.JedisClient;
import io.swagger.annotations.*;
import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;
import java.util.HashMap;
package cn.binux.notify.service.impl;



/**
 * 用户通知服务实现
 *
 * @author xubin.
 * @create 2017-05-05
 */

@Api(value = "API - NotifyUserServiceImpl", description = "用户通知")
@RefreshScope
@RestController
public class NotifyUserServiceImpl implements NotifyUserService {

    private static final Logger logger = LoggerFactory.getLogger(NotifyUserServiceImpl.class);

    @Autowired
// Path: xbin-store-cloud-service-notify-api/src/main/java/cn/binux/notify/service/NotifyUserService.java
// @FeignClient(value = "xbin-store-cloud-service-notify",fallback = NotifyUserServiceHystrix.class)
// public interface NotifyUserService {
//     /**
//      * 发送短信
//      *
//      * @param mobile 手机号码 带国际区号
//      * @return ({"rs":1})   第一次
//      *         ({'remain':'\u8be5\u624b\u673a\u8fd8\u53ef\u83b7\u53d62\u6b21\u9a8c\u8bc1\u7801\uff0c\u8bf7\u5c3d\u5feb\u5b8c\u6210\u9a8c\u8bc1'})
//      *                      第二次提示还有2次
//      *         ({'remain':'\u8be5\u624b\u673a\u8fd8\u53ef\u83b7\u53d62\u6b21\u9a8c\u8bc1\u7801\uff0c\u8bf7\u5c3d\u5feb\u5b8c\u6210\u9a8c\u8bc1'})
//      *                      第三次提示还有1次
//      *         ({'remain':'\u8be5\u624b\u673a\u8fd8\u53ef\u83b7\u53d62\u6b21\u9a8c\u8bc1\u7801\uff0c\u8bf7\u5c3d\u5feb\u5b8c\u6210\u9a8c\u8bc1'})
//      *                      第四次提示此号码发送短信已达上限 请于1小时后尝试
//      *         ({"rs":-1})  网络繁忙
//      */
//     @RequestMapping(value = "/mobileNotify/{mobile}",method = RequestMethod.POST)
//     String mobileNotify(@PathVariable("mobile") String mobile);
// 
// }
// 
// Path: xbin-store-cloud-common/src/main/java/cn/binux/utils/JedisClient.java
// public interface JedisClient {
// 
//     String get(String key);
// 
//     String set(String key, String value);
// 
//     String hget(String hkey, String key);
// 
//     long hset(String hkey, String key, String value);
// 
//     long incr(String key);
// 
//     long expire(String key, Integer second);
// 
//     long ttl(String key);
// 
//     long del(String key);
// 
//     long hdel(String hkey, String key);
// 
// 
// }


// Path: xbin-store-cloud-service-notify/src/main/java/cn/binux/notify/service/impl/NotifyUserServiceImpl.java
import cn.binux.notify.service.NotifyUserService;
import cn.binux.utils.FastJsonConvert;
import cn.binux.utils.JedisClient;
import io.swagger.annotations.*;
import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;
import java.util.HashMap;

package cn.binux.notify.service.impl;



/**
 * 用户通知服务实现
 *
 * @author xubin.
 * @create 2017-05-05
 */

@Api(value = "API - NotifyUserServiceImpl", description = "用户通知")
@RefreshScope
@RestController
public class NotifyUserServiceImpl implements NotifyUserService {

    private static final Logger logger = LoggerFactory.getLogger(NotifyUserServiceImpl.class);

    @Autowired
    private JedisClient jedisClient;