Skip to content

Commit

Permalink
xx
Browse files Browse the repository at this point in the history
  • Loading branch information
shuigedeng committed Sep 30, 2024
1 parent 0149e76 commit f72fa59
Show file tree
Hide file tree
Showing 26 changed files with 602 additions and 101 deletions.
15 changes: 0 additions & 15 deletions .github/scripts/import-certificate.sh

This file was deleted.

6 changes: 0 additions & 6 deletions .github/scripts/import-profile.sh

This file was deleted.

27 changes: 7 additions & 20 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -338,24 +338,11 @@ subprojects {
apply from: rootProject.file('gradle/spotless.gradle')
apply from: rootProject.file('gradle/spotbugs.gradle')
apply from: rootProject.file('gradle/pmd.gradle')
apply from: rootProject.file('gradle/springboot.gradle')
//apply from: rootProject.file('gradle/sonar.gradle')


dependencies {
implementation platform("io.github.shuigedeng:taotao-cloud-dependencies:$ttcVersion")


//developmentOnly "org.springframework.boot:spring-boot-devtools"
//developmentOnly "org.springframework.boot:spring-boot-docker-compose"

testImplementation("io.github.shuigedeng:taotao-boot-starter-test") {
exclude group: "org.mybatis.spring.boot", module: "mybatis-spring-boot-starter-test"
exclude group: "com.baomidou", module: "mybatis-plus-spring-boot3-starter-test"
}

testRuntimeOnly 'org.junit.platform:junit-platform-launcher'

implementation "org.projectlombok:lombok"
annotationProcessor "org.projectlombok:lombok:${lombokVersion}"
annotationProcessor "org.projectlombok:lombok-mapstruct-binding:${lombokMapstructBindingVersion}"
Expand Down Expand Up @@ -393,13 +380,13 @@ subprojects {
// 编译
compileJava {
options.compilerArgs += ['-Xlint:unchecked',
'-Xlint:deprecation',
'--enable-preview',
'--add-exports=java.desktop/sun.font=ALL-UNNAMED',
'--add-exports=java.base/sun.reflect.generics.tree=ALL-UNNAMED',
'--add-exports=java.base/sun.net.www.protocol.ftp=ALL-UNNAMED',
'--add-exports=java.desktop/sun.awt=ALL-UNNAMED',
'--add-exports=java.desktop/sun.font=ALL-UNNAMED']
'-Xlint:deprecation',
'--enable-preview',
'--add-exports=java.desktop/sun.font=ALL-UNNAMED',
'--add-exports=java.base/sun.reflect.generics.tree=ALL-UNNAMED',
'--add-exports=java.base/sun.net.www.protocol.ftp=ALL-UNNAMED',
'--add-exports=java.desktop/sun.awt=ALL-UNNAMED',
'--add-exports=java.desktop/sun.font=ALL-UNNAMED']
}

// 执行
Expand Down
30 changes: 15 additions & 15 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,21 @@
#\u901A\u8FC7\u5F00\u542F\u5B88\u62A4\u8FDB\u7A0B\uFF0C\u4E0B\u4E00\u6B21\u6784\u5EFA\u7684\u65F6\u5019\uFF0C\u5C06\u4F1A\u8FDE\u63A5\u8FD9\u4E2A\u5B88\u62A4\u8FDB\u7A0B\u8FDB\u884C\u6784\u5EFA\uFF0C\u800C\u4E0D\u662F\u91CD\u65B0 fork \u4E00\u4E2A gradle\u6784\u5EFA\u8FDB\u7A0B
org.gradle.daemon=true
#JVM\u5806\u5185\u5B58\u5927\u5C0F
org.gradle.jvmargs=-Xmx4096m \
-Xms1024m \
-XX:ReservedCodeCacheSize=1024m \
-XX:+HeapDumpOnOutOfMemoryError \
-XX:+UseZGC \
-XX:SoftRefLRUPolicyMSPerMB=50 \
-XX:CICompilerCount=2 \
-XX:+HeapDumpOnOutOfMemoryError \
-XX:-OmitStackTraceInFastThrow \
-Dfile.encoding=UTF-8 \
--add-exports jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED \
--add-exports jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED \
--add-exports jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED \
--add-exports jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED \
--add-exports jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED
org.gradle.jvmargs=-Xmx8192m \
-Xms1024m \
-XX:ReservedCodeCacheSize=1024m \
-XX:+HeapDumpOnOutOfMemoryError \
-XX:+UseZGC \
-XX:SoftRefLRUPolicyMSPerMB=50 \
-XX:CICompilerCount=2 \
-XX:+HeapDumpOnOutOfMemoryError \
-XX:-OmitStackTraceInFastThrow \
-Dfile.encoding=UTF-8 \
--add-exports jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED \
--add-exports jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED \
--add-exports jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED \
--add-exports jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED \
--add-exports jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED

#\u5E76\u884C\u7F16\u8BD1
org.gradle.parallel=true
Expand Down
8 changes: 4 additions & 4 deletions s.yml
Original file line number Diff line number Diff line change
@@ -1,28 +1,28 @@
# aliyun serverless 配置

edition: 2024.11
name: taotao-cloud-microservice
name: taotao-cloud-ddd
access: default
vars:
region: cn-hangzhou


# Define the Serverless-Devs services. Each service is a FC function.
services:
taotao-cloud-file:
taotao-cloud-ddd:
component: devsapp/fc
props:
region: ${vars.region}
# Define the AlibabaCloud FunctionCompute Service.
service:
name: taotao-cloud-file
name: taotao-cloud-ddd
internetAccess: true
# Let the serverless-devs create a shared logstore automatically.
# All FC services share the same logstore.
logConfig: auto
# Define the AlibabaCloud FunctionCompute Function.
function:
name: taotao-cloud-file
name: taotao-cloud-ddd
description: The mall project based on SpringBoot+MyBatis.
caPort: 8080
memorySize: 3072
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public interface LogisticsApi {
* @since 2022-04-25 16:47:29
*/
@GetMapping("/sys/feign/logistic/codes")
LogisticsApiResponse getById(@RequestParam Long logisticsId);
LogisticsApiResponse getById(@RequestParam(value = "logisticsId") Long logisticsId);

/**
* 得到物流
Expand All @@ -58,8 +58,8 @@ public interface LogisticsApi {
* @since 2022-04-25 16:47:32
*/
@GetMapping("/sys/feign/logistic/info")
TracesApiResponse getLogistic(@RequestParam Long logisticsId,
@RequestParam String logisticsNo);
TracesApiResponse getLogistic(@RequestParam(value = "logisticsId") Long logisticsId,
@RequestParam(value = "logisticsNo") String logisticsNo);

@GetMapping("/sys/feign/logistic/list")
List<LogisticsApiResponse> list();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ public interface SettingApi {
SettingApiResponse get(@RequestParam(value = "key") String key);

@GetMapping("/sys/feign/tools/setting/base")
BaseSettingApiResponse getBaseSetting(String name);
BaseSettingApiResponse getBaseSetting(@RequestParam(value = "name") String name);

/**
* 获得商品设置
Expand All @@ -68,29 +68,29 @@ public interface SettingApi {
* @since 2022-04-25 16:47:40
*/
@GetMapping("/sys/feign/tools/setting/goods")
GoodsSettingApiResponse getGoodsSetting(String name);
GoodsSettingApiResponse getGoodsSetting(@RequestParam(value = "name") String name);

@GetMapping("/sys/feign/tools/setting/order")
OrderSettingApiResponse getOrderSetting(String name);
OrderSettingApiResponse getOrderSetting(@RequestParam(value = "name") String name);

@GetMapping("/sys/feign/tools/setting/experience")
ExperienceSettingApiResponse getExperienceSetting(String name);
ExperienceSettingApiResponse getExperienceSetting(@RequestParam(value = "name") String name);

@GetMapping("/sys/feign/tools/setting/point")
PointSettingApiResponse getPointSetting(String name);
PointSettingApiResponse getPointSetting(@RequestParam(value = "name") String name);

@GetMapping("/sys/feign/tools/setting/qq/connect")
QQConnectSettingApiResponse getQQConnectSetting(String name);
QQConnectSettingApiResponse getQQConnectSetting(@RequestParam(value = "name") String name);

@GetMapping("/sys/feign/tools/setting/wechat/connect")
WechatConnectSettingApiResponse getWechatConnectSetting(String name);
WechatConnectSettingApiResponse getWechatConnectSetting(@RequestParam(value = "name") String name);

@GetMapping("/sys/feign/tools/setting/seckill")
SeckillSettingApiResponse getSeckillSetting(String name);
SeckillSettingApiResponse getSeckillSetting(@RequestParam(value = "name") String name);

@GetMapping("/sys/feign/tools/setting/ali")
AlipayPaymentSettingApiResponse getAlipayPaymentSetting(String name);
AlipayPaymentSettingApiResponse getAlipayPaymentSetting(@RequestParam(value = "name") String name);

@GetMapping("/sys/feign/tools/setting/wechat")
WechatPaymentSettingApiResponse getWechatPaymentSetting(String name);
WechatPaymentSettingApiResponse getWechatPaymentSetting(@RequestParam(value = "name") String name);
}
Original file line number Diff line number Diff line change
Expand Up @@ -98,5 +98,5 @@ BaseSecurityUser getUserInfoBySocial(
}
)
@GetMapping(value = "/sys/feign/info/security")
BaseSecurityUser getSysSecurityUser(String nicknameOrUserNameOrPhoneOrEmail);
BaseSecurityUser getSysSecurityUser(@RequestParam("nicknameOrUserNameOrPhoneOrEmail") String nicknameOrUserNameOrPhoneOrEmail);
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@ com.taotao.cloud.ddd.api.feign.fallback.MenuApiFallback, \
com.taotao.cloud.ddd.api.feign.fallback.QuartzJobApiFallback, \
com.taotao.cloud.ddd.api.feign.fallback.RoleApiFallback, \
com.taotao.cloud.ddd.api.feign.fallback.SettingApiFallback, \
com.taotao.cloud.ddd.api.feign.fallback.sysLogApiFallback, \
com.taotao.cloud.ddd.api.feign.fallback.sysLogLoginApiFallback, \
com.taotao.cloud.ddd.api.feign.fallback.SysLogApiFallback, \
com.taotao.cloud.ddd.api.feign.fallback.SysLogLoginApiFallback, \
com.taotao.cloud.ddd.api.feign.fallback.UserApiFallback
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ com.taotao.cloud.ddd.api.feign.fallback.MenuApiFallback
com.taotao.cloud.ddd.api.feign.fallback.QuartzJobApiFallback
com.taotao.cloud.ddd.api.feign.fallback.RoleApiFallback
com.taotao.cloud.ddd.api.feign.fallback.SettingApiFallback
com.taotao.cloud.ddd.api.feign.fallback.sysLogApiFallback
com.taotao.cloud.ddd.api.feign.fallback.sysLogLoginApiFallback
com.taotao.cloud.ddd.api.feign.fallback.SysLogApiFallback
com.taotao.cloud.ddd.api.feign.fallback.SysLogLoginApiFallback
com.taotao.cloud.ddd.api.feign.fallback.UserApiFallback


Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,10 @@
import com.taotao.cloud.ddd.application.command.dict.dto.DictGetQry;
import com.taotao.cloud.ddd.application.command.dict.dto.clientobject.DictCO;
import com.taotao.cloud.ddd.application.converter.DictConvert;
import com.taotao.cloud.ddd.domain.dict.entity.DictEntity;
import com.taotao.cloud.ddd.domain.dict.service.DictDomainService;
import com.taotao.cloud.ddd.infrastructure.persistent.dict.mapper.DictMapper;
import com.taotao.cloud.ddd.infrastructure.persistent.dict.po.DictPO;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Component;

Expand All @@ -22,18 +24,18 @@ public class DictGetQryExe {

private final DictDomainService dictDomainService;
//private final DictAdapter dictAdapter;
//private final DictConvert dictConvert;
private final DictConvert dictConvert;
private final DictMapper dictMapper;

/**
* 执行查看字典.
* @param qry 查看字典参数
* @param dictGetQry 查看字典参数
* @return 字典
*/
//@DS(TENANT)
public DictCO execute(DictGetQry qry) {
// return dictConvert.convert(dictDomainService.getById(qry.getId()));
return null;
public DictCO execute(DictGetQry dictGetQry) {
DictPO dictPO = dictMapper.selectById(dictGetQry.getId());
return dictConvert.convert(dictPO);
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
import com.taotao.cloud.ddd.application.command.dict.dto.DictListQry;
import com.taotao.cloud.ddd.application.command.dict.dto.clientobject.DictCO;
import com.taotao.cloud.ddd.domain.dict.entity.DictEntity;
import com.taotao.cloud.ddd.infrastructure.persistent.dict.po.DictPO;
import org.mapstruct.Mapper;
import org.mapstruct.ReportingPolicy;
import org.mapstruct.factory.Mappers;
Expand All @@ -30,7 +31,7 @@
* @version 2022.04
* @since 2022-04-28 13:39:18
*/
@Mapper(unmappedSourcePolicy = ReportingPolicy.IGNORE, unmappedTargetPolicy = ReportingPolicy.IGNORE)
@Mapper(componentModel = "spring", unmappedSourcePolicy = ReportingPolicy.IGNORE, unmappedTargetPolicy = ReportingPolicy.IGNORE)
public interface DictConvert {

/** 实例 */
Expand All @@ -40,5 +41,7 @@ public interface DictConvert {

DictCO convert(DictEntity dictEntity);

DictCO convert(DictPO dictEntity);


}
21 changes: 18 additions & 3 deletions taotao-cloud-ddd-assembly/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,11 @@ apply from: rootProject.file('gradle/springdoc-openapi.gradle')
apply from: rootProject.file('gradle/docker.gradle')
apply from: rootProject.file('gradle/google-tools-jib.gradle')
apply from: rootProject.file('gradle/shadow.gradle')
apply from: rootProject.file('gradle/graalvm.gradle')
//apply from: rootProject.file('gradle/graalvm.gradle')
apply from: rootProject.file('gradle/swagger.gradle')
apply from: rootProject.file('gradle/test.gradle')
apply from: rootProject.file('gradle/mybatis-generator.gradle')
apply from: rootProject.file('gradle/springboot.gradle')

dependencies {
implementation project(":taotao-cloud-ddd-application")
Expand All @@ -19,6 +20,21 @@ dependencies {
implementation project(":taotao-cloud-ddd-integration")
implementation project(":taotao-cloud-ddd-infrastructure")
implementation project(":taotao-cloud-ddd-common")

//developmentOnly "org.springframework.boot:spring-boot-devtools"
//developmentOnly "org.springframework.boot:spring-boot-docker-compose"

// testImplementation 'org.springframework.boot:spring-boot-starter-test'
// testImplementation 'org.springframework.boot:spring-boot-testcontainers'
// testImplementation 'org.testcontainers:junit-jupiter'
// testRuntimeOnly 'org.junit.platform:junit-platform-launcher'

testImplementation("io.github.shuigedeng:taotao-boot-starter-test") {
exclude group: "org.mybatis.spring.boot", module: "mybatis-spring-boot-starter-test"
exclude group: "com.baomidou", module: "mybatis-plus-spring-boot3-starter-test"
}

testRuntimeOnly 'org.junit.platform:junit-platform-launcher'
}


Expand All @@ -44,7 +60,6 @@ processResources {
//过滤器会将用 @var@ 包裹的变量,替换为指定的值。
filter ReplaceTokens, tokens: [activeProfile: getProperty("profile", "dev")]


//${profile}变量
//filesMatching("**/*.yml"){
// expand(project.properties)
Expand Down Expand Up @@ -86,7 +101,7 @@ classes {
task bootJarTest {
dependsOn 'clean'
doFirst {
System.setProperty("profile", "test")
System.setProperty("profile", "dev")
}
finalizedBy("bootJar")
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,10 @@
* @version 2022.03
* @since 2020/11/30 下午3:33
*/
@MapperScan(basePackages = {"com.taotao.cloud.ddd.infrastructure.persistent.*.mapper"})
@EnableJpaRepositories(
basePackages = {"com.taotao.cloud.ddd.infrastructure.persistent.*.repository.inf"},
repositoryFactoryBeanClass = JpaExtendRepositoryFactoryBean.class)
//@MapperScan(basePackages = {"com.taotao.cloud.ddd.infrastructure.persistent.*.mapper"})
//@EnableJpaRepositories(
// basePackages = {"com.taotao.cloud.ddd.infrastructure.persistent.*.repository.inf"},
// repositoryFactoryBeanClass = JpaExtendRepositoryFactoryBean.class)
//@ComponentScan(basePackages = {
// "com.taotao.cloud.ddd.biz.repository.cls"
//} )
Expand All @@ -70,6 +70,8 @@
public class TaoTaoCloudDDDApplication {

public static void main(String[] args) {
System.setProperty("arthas.outputPath", "${user.home}/logs/taotao-cloud-ddd/arthas-output");

new StartupSpringApplication(TaoTaoCloudDDDApplication.class)
.setTtcBanner()
.setTtcProfileIfNotExists("dev")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1104,6 +1104,9 @@ spring:
#cacheDuration: # ResourceBundle 加载后的过期时间(s),不设置则不过期,默认不过期
alwaysUseMessageFormat: false # 是否始终应用MessageFormat规则,甚至不带参数地解析消息,默认false
useCodeAsDefaultMessage: false #找不到对应的区域的语言(包括回退)时,直接返回 code 值,否则抛出异常, 默认flase
output:
ansi:
enabled: always # 自动检测是否支持 ANSI 输出,默认 detect

art:
xss:
Expand Down Expand Up @@ -1420,6 +1423,8 @@ management:
show-details: ALWAYS
shutdown:
enabled: true
arthas:
enabled: true
health:
mail:
enabled: false
Expand Down
Loading

0 comments on commit f72fa59

Please sign in to comment.