forked from rongchao/epmet-cloud-rizhao
17 changed files with 222 additions and 48 deletions
@ -0,0 +1,24 @@ |
|||
package com.epmet.feign; |
|||
|
|||
import com.epmet.commons.tools.constant.ServiceConstant; |
|||
import com.epmet.commons.tools.utils.Result; |
|||
import com.epmet.dto.SysSmsDTO; |
|||
import com.epmet.feign.fallback.MessageFeignClientFallback; |
|||
import org.springframework.cloud.openfeign.FeignClient; |
|||
import org.springframework.web.bind.annotation.PostMapping; |
|||
import org.springframework.web.bind.annotation.RequestBody; |
|||
|
|||
@FeignClient(name = ServiceConstant.EPMET_MESSAGE_SERVER, fallback = MessageFeignClientFallback.class, url = "http://localhost:8085") |
|||
public interface MessageFeignClient { |
|||
|
|||
/** |
|||
* 发送短信 |
|||
* @return |
|||
*/ |
|||
@PostMapping(value = "message/sms/send") |
|||
Result send(@RequestBody SysSmsDTO smsDTO); |
|||
|
|||
//@PostMapping(value = "message/sms/send", consumes = "application/x-www-form-urlencoded")
|
|||
//Result send(Map<String, String> entityBody);
|
|||
|
|||
} |
@ -0,0 +1,21 @@ |
|||
package com.epmet.feign.fallback; |
|||
|
|||
import com.epmet.commons.tools.constant.ServiceConstant; |
|||
import com.epmet.commons.tools.utils.ModuleUtils; |
|||
import com.epmet.commons.tools.utils.Result; |
|||
import com.epmet.dto.SysSmsDTO; |
|||
import com.epmet.feign.MessageFeignClient; |
|||
import org.springframework.stereotype.Component; |
|||
|
|||
/** |
|||
* 消息服务降级 |
|||
*/ |
|||
@Component |
|||
public class MessageFeignClientFallback implements MessageFeignClient { |
|||
|
|||
|
|||
@Override |
|||
public Result send(SysSmsDTO smsDTO) { |
|||
return ModuleUtils.feignConError(ServiceConstant.EPMET_MESSAGE_SERVER, "send", smsDTO); |
|||
} |
|||
} |
@ -0,0 +1,60 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* <p> |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.epmet.dto.form; |
|||
|
|||
import com.epmet.dto.UserResiInfoDTO; |
|||
import lombok.Data; |
|||
|
|||
import java.io.Serializable; |
|||
import java.util.Date; |
|||
|
|||
|
|||
/** |
|||
* 用户居民端注册接口 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2020-03-30 |
|||
*/ |
|||
@Data |
|||
public class ResiInfoSubmitFormDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
|
|||
/** |
|||
* 客户Id (customer.id) |
|||
*/ |
|||
private String customerId; |
|||
|
|||
/** |
|||
* 网格Id (customer_grid.id) |
|||
*/ |
|||
private String gridId; |
|||
|
|||
/** |
|||
* 居民注册行为记录表Id resi_visit.id |
|||
*/ |
|||
private String resiVisitId; |
|||
|
|||
/** |
|||
* 用户在居民端完善的个人信息 |
|||
*/ |
|||
private UserResiInfoDTO resiInfo; |
|||
|
|||
|
|||
} |
Loading…
Reference in new issue