master
jia 2023-12-15 19:49:51 +08:00
parent 1deefc0846
commit 1f179cdf17
55 changed files with 262 additions and 38 deletions

38
.gitignore vendored
View File

@ -1,38 +0,0 @@
target/
!.mvn/wrapper/maven-wrapper.jar
!**/src/main/**/target/
!**/src/test/**/target/
### IntelliJ IDEA ###
.idea/modules.xml
.idea/jarRepositories.xml
.idea/compiler.xml
.idea/libraries/
*.iws
*.iml
*.ipr
### Eclipse ###
.apt_generated
.classpath
.factorypath
.project
.settings
.springBeans
.sts4-cache
### NetBeans ###
/nbproject/private/
/nbbuild/
/dist/
/nbdist/
/.nb-gradle/
build/
!**/src/main/**/build/
!**/src/test/**/build/
### VS Code ###
.vscode/
### Mac OS ###
.DS_Store

32
.idea/compiler.xml 100644
View File

@ -0,0 +1,32 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="CompilerConfiguration">
<annotationProcessing>
<profile name="Maven default annotation processors profile" enabled="true">
<sourceOutputDir name="target/generated-sources/annotations" />
<sourceTestOutputDir name="target/generated-test-sources/test-annotations" />
<outputRelativeToContentRoot value="true" />
<module name="bwie-gateway" />
<module name="bwie-modules" />
<module name="bwie-system" />
<module name="bwie-common" />
<module name="bwie-mq" />
<module name="bwie-opp" />
<module name="bwie-auth" />
<module name="bwie-goods" />
</profile>
</annotationProcessing>
</component>
<component name="JavacSettings">
<option name="ADDITIONAL_OPTIONS_OVERRIDE">
<module name="bwie-auth" options="-parameters" />
<module name="bwie-common" options="-parameters" />
<module name="bwie-gateway" options="-parameters" />
<module name="bwie-goods" options="-parameters" />
<module name="bwie-modules" options="-parameters" />
<module name="bwie-mq" options="-parameters" />
<module name="bwie-opp" options="-parameters" />
<module name="bwie-system" options="-parameters" />
</option>
</component>
</project>

View File

@ -0,0 +1,20 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="RemoteRepositoriesConfiguration">
<remote-repository>
<option name="id" value="central" />
<option name="name" value="Central Repository" />
<option name="url" value="http://maven.aliyun.com/nexus/content/groups/public/" />
</remote-repository>
<remote-repository>
<option name="id" value="central" />
<option name="name" value="Maven Central repository" />
<option name="url" value="https://repo1.maven.org/maven2" />
</remote-repository>
<remote-repository>
<option name="id" value="jboss.community" />
<option name="name" value="JBoss Community repository" />
<option name="url" value="https://repository.jboss.org/nexus/content/repositories/public/" />
</remote-repository>
</component>
</project>

View File

@ -0,0 +1,31 @@
# Tomcat
server:
port: 9001
# Spring
spring:
main:
allow-circular-references: true
allow-bean-definition-overriding: true
jackson:
date-format: yyyy-MM-dd HH:mm:ss
time-zone: GMT+8
application:
# 应用名称
name: bwie-auth
profiles:
# 环境配置
active: dev
cloud:
nacos:
discovery:
# 服务注册地址
server-addr: 124.221.177.197:8848
config:
# 配置中心地址
server-addr: 124.221.177.197:8848
# 配置文件格式
file-extension: yml
# 共享配置
shared-configs:
- application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension}

View File

@ -0,0 +1,29 @@
# Tomcat
server:
port: 18080
# Spring
spring:
application:
# 应用名称
name: bwie-gateway
profiles:
# 环境配置
active: dev
main:
# 允许使用循环引用
allow-circular-references: true
# 允许定义相同的bean对象 去覆盖原有的
allow-bean-definition-overriding: true
cloud:
nacos:
discovery:
# 服务注册地址
server-addr: 124.221.177.197:8848
config:
# 配置中心地址
server-addr: 124.221.177.197:8848
# 配置文件格式
file-extension: yml
# 共享配置
shared-configs:
- application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension}

View File

@ -0,0 +1,30 @@
# Tomcat
server:
port: 9003
# Spring
spring:
main:
allow-circular-references: true
allow-bean-definition-overriding: true
jackson:
date-format: yyyy-MM-dd HH:mm:ss
time-zone: GMT+8
application:
# 应用名称
name: bwie-goods
profiles:
# 环境配置
active: dev
cloud:
nacos:
discovery:
# 服务注册地址
server-addr: 124.221.177.197:8848
config:
# 配置中心地址
server-addr: 124.221.177.197:8848
# 配置文件格式
file-extension: yml
# 共享配置
shared-configs:
- application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension}

View File

@ -0,0 +1,26 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.bwie.goods.mapper.GoodsMapper">
<insert id="addopp">
insert into opp (`opp_status`,`user_id`)
values (1,#{userId})
</insert>
<select id="typelist" resultType="com.bwie.common.domain.Type">
select *
from type
</select>
<select id="show" resultType="com.bwie.common.domain.Goods">
select g.*,t.type_name
from goods g left join type t on t.type_id=g.type_id
<where>
<if test="null!=goodsName and ''!=goodsName">
and goods_name like concat('%',#{goodsName},'%')
</if>
<if test="null!=typeId">
and g.type_id=#{typeId}
</if>
</where>
</select>
</mapper>

View File

@ -0,0 +1,30 @@
# Tomcat
server:
port: 9004
# Spring
spring:
main:
allow-circular-references: true
allow-bean-definition-overriding: true
jackson:
date-format: yyyy-MM-dd HH:mm:ss
time-zone: GMT+8
application:
# 应用名称
name: bwie-opp
profiles:
# 环境配置
active: dev
cloud:
nacos:
discovery:
# 服务注册地址
server-addr: 124.221.177.197:8848
config:
# 配置中心地址
server-addr: 124.221.177.197:8848
# 配置文件格式
file-extension: yml
# 共享配置
shared-configs:
- application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension}

View File

@ -0,0 +1,24 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.bwie.opp.mapper.OppMapper">
<update id="updmoney">
update user set user_money=user_money-30 where user_id=#{userId}
</update>
<update id="updyue">
update opp set opp_status=2 where user_id =#{userId}
</update>
<update id="tuimoney">
update user set user_money=user_money+30 where user_id=#{userId}
</update>
<update id="updtui">
update opp set opp_status=3 where user_id =#{userId}
</update>
<update id="upddui">
update opp set opp_status=4 where user_id =#{userId}
</update>
<select id="findopp" resultType="com.bwie.common.domain.Opp">
select *
from opp where user_id=#{userId}
</select>
</mapper>

View File

@ -0,0 +1,30 @@
# Tomcat
server:
port: 9002
# Spring
spring:
main:
allow-circular-references: true
allow-bean-definition-overriding: true
jackson:
date-format: yyyy-MM-dd HH:mm:ss
time-zone: GMT+8
application:
# 应用名称
name: bwie-system
profiles:
# 环境配置
active: dev
cloud:
nacos:
discovery:
# 服务注册地址
server-addr: 124.221.177.197:8848
config:
# 配置中心地址
server-addr: 124.221.177.197:8848
# 配置文件格式
file-extension: yml
# 共享配置
shared-configs:
- application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension}

View File

@ -0,0 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.bwie.system.mapper.SysMapper">
<select id="findname" resultType="com.bwie.common.domain.SysUser">
select *
from user where user_phone=#{userPhone}
</select>
</mapper>