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,22 @@
package com.tiesheng.demo;
import com.tiesheng.core.EnableTieshengWeb;
import com.tiesheng.demo.config.DemoWebConfigurer;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.transaction.annotation.EnableTransactionManagement;
/**
* @author hao
*/
@EnableTransactionManagement
@SpringBootApplication
@EnableTieshengWeb(webConfigurer = DemoWebConfigurer.class)
public class DemoApplication {
public static void main(String[] args) {
SpringApplication.run(DemoApplication.class, args);
}
}

View File

@@ -0,0 +1,19 @@
package com.tiesheng.demo.config;
import com.tiesheng.core.pojos.CurrentWebUser;
import com.tiesheng.core.service.TieshengWebConfigurer;
import org.springframework.stereotype.Component;
@Component
public class DemoWebConfigurer implements TieshengWebConfigurer {
@Override
public CurrentWebUser getCurrentUserName(String userId) {
return null;
}
@Override
public LoginConfigurer loginConfigurer() {
return null;
}
}

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("");
}
}

View File

@@ -0,0 +1,27 @@
//package com.tiesheng.demo.pojos;
//
//import com.alibaba.excel.annotation.ExcelProperty;
//import com.tiesheng.poi.pojos.PoiWriteBase;
//
//public class TestFile implements PoiWriteBase {
//
//
// @ExcelProperty("测试")
// private String test;
//
// public TestFile(String test) {
// this.test = test;
// }
//
// ///////////////////////////////////////////////////////////////////////////
// // setter、getter
// ///////////////////////////////////////////////////////////////////////////
//
// public String getTest() {
// return test;
// }
//
// public void setTest(String test) {
// this.test = test;
// }
//}