feat:模块名称调整

This commit is contained in:
曾文豪
2023-01-11 11:21:01 +08:00
parent 61a4a6494a
commit c721e4877f
125 changed files with 56 additions and 56 deletions

View File

@@ -0,0 +1,65 @@
package com.tiesheng.demo.controller;
import cn.hutool.json.JSONUtil;
import com.tiesheng.annotation.token.TokenIgnore;
import com.tiesheng.message.config.aliyun.AliyunSmsConfig;
import com.tiesheng.message.pojos.MessageReqResp;
import com.tiesheng.util.config.GlobalConfig;
import com.tiesheng.util.pojos.ApiResp;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import javax.servlet.http.HttpServletResponse;
/**
* @author hao
*/
@RestController
@RequestMapping("/test")
public class TestController {
@Autowired
GlobalConfig globalConfig;
@Autowired
AliyunSmsConfig aliyunSmsConfig;
@RequestMapping("/index")
@TokenIgnore
public ApiResp<String> index() {
return ApiResp.respOK("hello world");
}
@RequestMapping("/redirect")
@TokenIgnore
public void redirect(HttpServletResponse response) {
globalConfig.redirect("mobile", "/test", response);
}
@RequestMapping("/send")
@TokenIgnore
public ApiResp<MessageReqResp> sendMessage() {
MessageReqResp reqResp = aliyunSmsConfig.sendSms("13567116463", "SMS_154950909",
JSONUtil.createObj().putOpt("code", "123456"));
return ApiResp.respOK(reqResp);
}
@RequestMapping("/export")
@TokenIgnore
public ApiResp<String> export() {
// List<TestFile> list = new ArrayList<>();
// list.add(new TestFile("11111"));
// list.add(new TestFile("22222"));
// list.add(new TestFile("33333"));
// list.add(new TestFile("44444"));
//
// FileUploadPath fileUploadPath = FileUploadPath.random("xlsx");
// PoiWriteUtil.export(list, TestFile.class, fileUploadPath.getAbsolutePath(), "hahah");
return ApiResp.respOK("");
}
}