parent
94b6eb6f5f
commit
79caae0ea3
@ -0,0 +1,60 @@
|
||||
#spring:
|
||||
# datasource:
|
||||
# driver-class-name: com.mysql.cj.jdbc.Driver
|
||||
# url: jdbc:mysql://127.0.0.1:3306/test?useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai
|
||||
# username: root
|
||||
# password: 123456
|
||||
|
||||
#服务配置
|
||||
server:
|
||||
port: 8081
|
||||
##mybatis 日志
|
||||
mybatis-plus:
|
||||
configuration:
|
||||
log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
|
||||
|
||||
spring:
|
||||
datasource:
|
||||
dynamic:
|
||||
primary: first #设置默认的数据源或者数据源组,默认值即为master
|
||||
strict: false #严格匹配数据源,默认false. true未匹配到指定数据源时抛异常,false使用默认数据源
|
||||
datasource:
|
||||
first: #Asia/Shanghai
|
||||
url: jdbc:mysql://127.0.0.1:3306/testweb?useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai
|
||||
username: root
|
||||
password: 123456
|
||||
driver-class-name: com.mysql.cj.jdbc.Driver # 3.2.0开始支持SPI可省略此配置
|
||||
second:
|
||||
url: jdbc:mysql://127.0.0.1:3306/test?useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai
|
||||
username: root
|
||||
password: 123456
|
||||
driver-class-name: com.mysql.cj.jdbc.Driver
|
||||
three:
|
||||
url: jdbc:mysql://127.0.0.1:3306/bq_spring?useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai
|
||||
username: root
|
||||
password: 123456
|
||||
driver-class-name: com.mysql.cj.jdbc.Driver
|
||||
four:
|
||||
url: jdbc:mysql://47.118.35.61:3306/bq_spring_festival?useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai
|
||||
username: root
|
||||
password: zp511020
|
||||
driver-class-name: com.mysql.cj.jdbc.Driver
|
||||
|
||||
#spring:
|
||||
# datasource:
|
||||
# dynamic:
|
||||
# primary: first #设置默认的数据源或者数据源组,默认值即为master
|
||||
# strict: false #设置严格模式,默认false不启动. 启动后在未匹配到指定数据源时候会抛出异常,不启动则使用默认数据源.
|
||||
# datasource:
|
||||
# first:
|
||||
# driver-class-name: com.mysql.cj.jdbc.Driver
|
||||
# url: jdbc:mysql://127.0.0.1:3306/testweb?useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai
|
||||
# username: root
|
||||
# password: 123456
|
||||
# second:
|
||||
# driver-class-name: com.mysql.cj.jdbc.Driver
|
||||
# url: jdbc:mysql://127.0.0.1:3306/test?useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai
|
||||
# username: root
|
||||
# password: 12345
|
||||
|
||||
|
@ -0,0 +1,24 @@
|
||||
#spring相关配置
|
||||
spring:
|
||||
profiles:
|
||||
active: local
|
||||
|
||||
|
||||
|
||||
|
||||
#spring:
|
||||
# datasource:
|
||||
# dynamic:
|
||||
# primary: first #设置默认的数据源或者数据源组,默认值即为master
|
||||
# strict: false #设置严格模式,默认false不启动. 启动后在未匹配到指定数据源时候会抛出异常,不启动则使用默认数据源.
|
||||
# datasource:
|
||||
# first:
|
||||
# driver-class-name: com.mysql.cj.jdbc.Driver
|
||||
# url: jdbc:mysql://127.0.0.1:3306/testweb?useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai
|
||||
# username: root
|
||||
# password: 123456
|
||||
# second:
|
||||
# driver-class-name: com.mysql.cj.jdbc.Driver
|
||||
# url: jdbc:mysql://127.0.0.1:3306/test?useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai
|
||||
# username: root
|
||||
# password: 12345
|
@ -0,0 +1,6 @@
|
||||
<?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.study.viewpoint.mapper.firstmapper.WageMapper">
|
||||
|
||||
|
||||
</mapper>
|
@ -0,0 +1,6 @@
|
||||
<?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.study.viewpoint.mapper.secondmapper.AddressMapper">
|
||||
|
||||
|
||||
</mapper>
|
@ -0,0 +1,40 @@
|
||||
<?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.study.viewpoint.mapper.three.BagMapper">
|
||||
|
||||
<!--integrity work develop innovation country industry universal more_better-->
|
||||
<update id="updateBge">
|
||||
update bag set integrity=integrity-1,work=work-1, develop=develop-1, innovation=innovation-1,
|
||||
country=country-1, industry=industry-1, more_better=more_better+1
|
||||
where employee_id=#{employeeId}
|
||||
</update>
|
||||
|
||||
<update id="updateBge1">
|
||||
update bag
|
||||
<trim prefix="set" prefixOverrides=",">
|
||||
<if test="integrity != 0 and integrity > 0">
|
||||
integrity=integrity-1,
|
||||
</if>
|
||||
<if test="work != 0 and work > 0">
|
||||
work=work-1,
|
||||
</if>
|
||||
<if test="develop != 0 and develop > 0">
|
||||
develop=develop-1,
|
||||
</if>
|
||||
<if test="industry != 0 and industry > 0">
|
||||
industry=industry-1,
|
||||
</if>
|
||||
<if test="innovation != 0 and innovation > 0">
|
||||
innovation=innovation-1,
|
||||
</if>
|
||||
<if test="country != 0 and country > 0">
|
||||
country=country-1,
|
||||
</if>
|
||||
<if test="universal != 0 and universal > 0">
|
||||
universal=universal-1,
|
||||
</if>
|
||||
more_better=more_better+1
|
||||
</trim>
|
||||
where employee_id=#{employeeId}
|
||||
</update>
|
||||
</mapper>
|
After Width: | Height: | Size: 246 KiB |
Loading…
Reference in new issue