将 onemall 老代码,统一到归档目录,后续不断迁移移除

This commit is contained in:
YunaiV
2022-06-16 09:06:44 +08:00
parent 64c478a45b
commit 71930d492e
1095 changed files with 0 additions and 16 deletions

View File

@@ -0,0 +1,107 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<artifactId>system</artifactId>
<groupId>cn.iocoder.mall</groupId>
<version>1.0-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>system-start</artifactId>
<dependencies>
<!-- Mall 相关 -->
<dependency>
<groupId>cn.iocoder.mall</groupId>
<artifactId>common-framework</artifactId>
<version>1.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>cn.iocoder.mall</groupId>
<artifactId>mall-spring-boot</artifactId>
<version>1.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>cn.iocoder.mall</groupId>
<artifactId>system-service-impl</artifactId>
<version>1.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>cn.iocoder.mall</groupId>
<artifactId>system-sdk</artifactId>
<version>1.0-SNAPSHOT</version>
</dependency>
<!-- Web 相关 -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>io.springfox</groupId>
<artifactId>springfox-swagger2</artifactId>
</dependency>
<dependency>
<groupId>com.github.xiaoymin</groupId>
<artifactId>swagger-bootstrap-ui</artifactId>
</dependency>
<!-- 云服务相关 -->
<dependency>
<groupId>com.qiniu</groupId>
<artifactId>qiniu-java-sdk</artifactId>
</dependency>
<!-- 服务保障相关 -->
<dependency>
<groupId>com.alibaba.cloud</groupId>
<artifactId>spring-cloud-starter-alibaba-sentinel</artifactId>
</dependency>
<!-- 监控相关 -->
<dependency>
<groupId>de.codecentric</groupId>
<artifactId>spring-boot-admin-starter-client</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
</dependency>
<dependency>
<groupId>io.micrometer</groupId>
<artifactId>micrometer-registry-prometheus</artifactId>
</dependency>
<!-- 测试相关 -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
<!-- 提供给 mapstruct 使用 -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
</plugin>
<!-- 打包 -->
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
</project>

View File

@@ -0,0 +1,33 @@
package cn.iocoder.mall.system.application.controller.admins;
import cn.iocoder.common.framework.vo.CommonResult;
import com.qiniu.util.Auth;
import io.swagger.annotations.Api;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
@RestController
@RequestMapping("admins/file")
@Api("文件模块")
public class FileController {
private Logger logger = LoggerFactory.getLogger(getClass());
@Autowired
private Auth auth;
@Value("${qiniu.bucket}")
private String bucket;
@GetMapping("/get-qiniu-token")
public CommonResult<String> getQiniuToken() {
String token = auth.uploadToken(bucket);
logger.info("[qiniu_token][token({}) get]", token);
return CommonResult.success(token);
}
}

View File

@@ -0,0 +1,56 @@
package cn.iocoder.mall.system.application.controller.admins;
import cn.iocoder.common.framework.vo.CommonResult;
import cn.iocoder.mall.system.api.SmsService;
import cn.iocoder.mall.system.api.bo.sms.PageSmsSignBO;
import cn.iocoder.mall.system.api.dto.sms.PageQuerySmsSignDTO;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
/**
* 短信服务
*
* @author Sin
* @time 2019/5/26 12:26 PM
*/
@RestController
@RequestMapping("admins/sms/sign")
@Api("短信服务(签名)")
public class SmsSignController {
@Autowired
private SmsService smsService;
@GetMapping("page")
@ApiOperation("签名-page")
public CommonResult<PageSmsSignBO> pageSign(@Validated PageQuerySmsSignDTO querySmsSignDTO) {
return CommonResult.success(smsService.pageSmsSign(querySmsSignDTO));
}
@PostMapping("add")
@ApiOperation("签名-添加")
public CommonResult addSign(@RequestParam("sign") String sign,
@RequestParam("platform") Integer platform) {
smsService.addSign(sign, platform);
return CommonResult.success(null);
}
@PutMapping("update")
@ApiOperation("签名-更新")
public CommonResult updateSign(@RequestParam("id") Integer id,
@RequestParam("sign") String sign,
@RequestParam("platform") Integer platform) {
smsService.updateSign(id, sign, platform);
return CommonResult.success(null);
}
@DeleteMapping("deleted")
@ApiOperation("签名-删除")
public CommonResult deletedSign(@RequestParam("id") Integer id) {
smsService.deleteSign(id);
return CommonResult.success(null);
}
}

View File

@@ -0,0 +1,65 @@
package cn.iocoder.mall.system.application.controller.admins;
import cn.iocoder.common.framework.vo.CommonResult;
import cn.iocoder.mall.system.api.SmsService;
import cn.iocoder.mall.system.api.bo.sms.PageSmsTemplateBO;
import cn.iocoder.mall.system.api.dto.sms.PageQuerySmsTemplateDTO;
import cn.iocoder.mall.system.application.po.sms.SmsTemplateAddPO;
import cn.iocoder.mall.system.application.po.sms.SmsTemplateUpdatePO;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
/**
* 短信服务
*
* @author Sin
* @time 2019/5/26 12:26 PM
*/
@RestController
@RequestMapping("admins/sms/template")
@Api("短信服务(短信模板)")
public class SmsTemplateController {
@Autowired
private SmsService smsService;
@GetMapping("page")
@ApiOperation("短信模板-page")
public CommonResult<PageSmsTemplateBO> pageSign(PageQuerySmsTemplateDTO pageQuerySmsTemplateDTO) {
return CommonResult.success(smsService.pageSmsTemplate(pageQuerySmsTemplateDTO));
}
@PostMapping("add")
@ApiOperation("短信模板-添加")
public CommonResult addSign(SmsTemplateAddPO smsTemplateAddPO) {
smsService.addTemplate(
smsTemplateAddPO.getSmsSignId(),
smsTemplateAddPO.getTemplateCode(),
smsTemplateAddPO.getTemplate(),
smsTemplateAddPO.getPlatform(),
smsTemplateAddPO.getSmsType());
return CommonResult.success(null);
}
@PutMapping("update")
@ApiOperation("短信模板-更新")
public CommonResult updateSign(SmsTemplateUpdatePO smsTemplateUpdatePO) {
smsService.updateTemplate(
smsTemplateUpdatePO.getId(),
smsTemplateUpdatePO.getSmsSignId(),
smsTemplateUpdatePO.getTemplateCode(),
smsTemplateUpdatePO.getTemplate(),
smsTemplateUpdatePO.getPlatform(),
smsTemplateUpdatePO.getSmsType());
return CommonResult.success(null);
}
@DeleteMapping("deleted")
@ApiOperation("短信模板-删除")
public CommonResult deletedSign(@RequestParam("id") Integer id) {
smsService.deleteTemplate(id);
return CommonResult.success(null);
}
}

View File

@@ -0,0 +1,34 @@
spring:
application:
name: admin-application
# Spring Cloud 配置项
cloud:
# Spring Cloud Sentinel 配置项
sentinel:
transport:
dashboard: s1.iocoder.cn:12088 # Sentinel Dashboard 服务地址
eager: true # 项目启动时,直接连接到 Sentinel
# server
server:
port: 18083
servlet:
context-path: /admin-api/
admins:
security:
ignore_urls: /admin-api/admins/passport/login, /admin-api/admins/file/get-qiniu-token
# qiniu
qiniu:
access-key: YldfyUC7OewoWM63TPYTairqnq8GMJvNek9EGoID
secret-key: zZ7Q8wwZRyaklVvkyLmVydA4WygOBqtc_gTYzalS
bucket: onemall
swagger:
enable: true # 暂时不去掉
title: 管理员子系统
description: 管理员子系统
version: 1.0.0
base-package: cn.iocoder.mall.admin.application.controller