feat(user): 新增客服邮箱获取接口
通过 @Value 注入 customer_mail 配置,提供 /user/customerMail 端点供前端获取客服邮箱地址。
This commit is contained in:
@@ -22,6 +22,7 @@ import io.swagger.v3.oas.annotations.tags.Tag;
|
|||||||
import jakarta.annotation.Resource;
|
import jakarta.annotation.Resource;
|
||||||
import jakarta.servlet.http.HttpServletRequest;
|
import jakarta.servlet.http.HttpServletRequest;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.springframework.beans.factory.annotation.Value;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
import java.text.SimpleDateFormat;
|
import java.text.SimpleDateFormat;
|
||||||
@@ -49,6 +50,9 @@ public class UserController {
|
|||||||
|
|
||||||
@Resource
|
@Resource
|
||||||
private KeyboardUserInviteCodesService inviteCodesService;
|
private KeyboardUserInviteCodesService inviteCodesService;
|
||||||
|
|
||||||
|
@Value("${customer_mail}")
|
||||||
|
private String customerMail;
|
||||||
/**
|
/**
|
||||||
* 苹果登录
|
* 苹果登录
|
||||||
*
|
*
|
||||||
@@ -145,4 +149,10 @@ public class UserController {
|
|||||||
long userId = StpUtil.getLoginIdAsLong();
|
long userId = StpUtil.getLoginIdAsLong();
|
||||||
return ResultUtils.success( inviteCodesService.getUserInviteCode(userId));
|
return ResultUtils.success( inviteCodesService.getUserInviteCode(userId));
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
@GetMapping("/customerMail")
|
||||||
|
@Operation(summary = "获取客服邮箱", description = "获取 customer_mail 配置的客服邮箱地址")
|
||||||
|
public BaseResponse<String> getCustomerMail() {
|
||||||
|
return ResultUtils.success(customerMail);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
@@ -59,4 +59,6 @@ mybatis-plus:
|
|||||||
appid: loveKeyboard
|
appid: loveKeyboard
|
||||||
appsecret: kZJM39HYvhxwbJkG1fmquQRVkQiLAh2H
|
appsecret: kZJM39HYvhxwbJkG1fmquQRVkQiLAh2H
|
||||||
|
|
||||||
mail_access_token: mlsn.3b1a3387055e0f53c0869cad91c6acad5401e9dcb4511ace2f82ab31d897fba6
|
mail_access_token: mlsn.3b1a3387055e0f53c0869cad91c6acad5401e9dcb4511ace2f82ab31d897fba6
|
||||||
|
|
||||||
|
customer_mail: 123@mail.com
|
||||||
Reference in New Issue
Block a user