package com.sptg.permissions.biz.controller;

import com.sptg.permissions.api.entity.SmsTemplate;
import com.sptg.permissions.api.feigns.SmsTemplateFeign;
import com.sptg.permissions.biz.service.SmsTemplateServiceInterface;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author zwx
 * @create 2020/11/2 16:00
 */
@RestController
@RequiredArgsConstructor
public class SmsTemplateController implements SmsTemplateFeign {

    private final SmsTemplateServiceInterface smsTemplateServiceInterface;

    @Override
    @PostMapping(value = "/smsTemplate/getByCode/{code}")
    public SmsTemplate getByCode(@PathVariable(value = "code") String code) {
        SmsTemplate smsTemplate = this.smsTemplateServiceInterface.getByCode(code);
        return smsTemplate;
    }
}
