Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Kwan的解忧杂货铺@新空间代码工作室
SpringBoot-kwan
提交
4f94774e
S
SpringBoot-kwan
项目概览
Kwan的解忧杂货铺@新空间代码工作室
/
SpringBoot-kwan
通知
2
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
S
SpringBoot-kwan
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
提交
4f94774e
编写于
12月 22, 2022
作者:
Q
qinyingjie
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix:mybatis-plus自动生成代码
上级
9306a2c1
变更
8
显示空白变更内容
内联
并排
Showing
8 changed file
with
223 addition
and
2 deletion
+223
-2
pom.xml
pom.xml
+5
-0
src/main/java/com/kwan/springbootkwan/controller/AdsDimFinancialYearWeekInfoController.java
...wan/controller/AdsDimFinancialYearWeekInfoController.java
+39
-0
src/main/java/com/kwan/springbootkwan/entity/AdsDimFinancialYearWeekInfo.java
...an/springbootkwan/entity/AdsDimFinancialYearWeekInfo.java
+90
-0
src/main/java/com/kwan/springbootkwan/mapper/AdsDimFinancialYearWeekInfoMapper.java
...ingbootkwan/mapper/AdsDimFinancialYearWeekInfoMapper.java
+19
-0
src/main/java/com/kwan/springbootkwan/service/AdsDimFinancialYearWeekInfoService.java
...gbootkwan/service/AdsDimFinancialYearWeekInfoService.java
+15
-0
src/main/java/com/kwan/springbootkwan/service/impl/AdsDimFinancialYearWeekInfoServiceImpl.java
.../service/impl/AdsDimFinancialYearWeekInfoServiceImpl.java
+19
-0
src/main/resources/application.yaml
src/main/resources/application.yaml
+2
-2
src/main/resources/mapper/AdsDimFinancialYearWeekInfoDao.xml
src/main/resources/mapper/AdsDimFinancialYearWeekInfoDao.xml
+34
-0
未找到文件。
pom.xml
浏览文件 @
4f94774e
...
...
@@ -124,6 +124,11 @@
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-starter-batch
</artifactId>
</dependency>
<dependency>
<groupId>
com.baomidou
</groupId>
<artifactId>
mybatis-plus-extension
</artifactId>
<version>
3.5.1
</version>
</dependency>
</dependencies>
<build>
<plugins>
...
...
src/main/java/com/kwan/springbootkwan/controller/AdsDimFinancialYearWeekInfoController.java
0 → 100644
浏览文件 @
4f94774e
package
com.kwan.springbootkwan.controller
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.kwan.springbootkwan.entity.AdsDimFinancialYearWeekInfo
;
import
com.kwan.springbootkwan.service.AdsDimFinancialYearWeekInfoService
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.PathVariable
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
javax.annotation.Resource
;
import
java.util.List
;
/**
* (AdsDimFinancialYearWeekInfo)表控制层
*
* @author makejava
* @since 2022-12-22 17:25:11
*/
@RestController
@RequestMapping
(
"adsDimFinancialYearWeekInfo"
)
public
class
AdsDimFinancialYearWeekInfoController
{
/**
* 服务对象
*/
@Resource
private
AdsDimFinancialYearWeekInfoService
adsDimFinancialYearWeekInfoService
;
/**
* 通过主键查询单条数据
*/
@GetMapping
(
"/{financialYear}/{financialYearWeek}"
)
public
List
<
AdsDimFinancialYearWeekInfo
>
selectOne
(
@PathVariable
Integer
financialYear
,
@PathVariable
Integer
financialYearWeek
)
{
return
this
.
adsDimFinancialYearWeekInfoService
.
list
(
new
QueryWrapper
<
AdsDimFinancialYearWeekInfo
>()
.
ne
(
"financial_year"
,
financialYear
)
.
ne
(
"financial_year_week"
,
financialYearWeek
)
);
}
}
\ No newline at end of file
src/main/java/com/kwan/springbootkwan/entity/AdsDimFinancialYearWeekInfo.java
0 → 100644
浏览文件 @
4f94774e
package
com.kwan.springbootkwan.entity
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
com.baomidou.mybatisplus.extension.activerecord.Model
;
import
io.swagger.annotations.ApiModel
;
import
lombok.Builder
;
import
lombok.Data
;
import
java.io.Serializable
;
import
java.util.Date
;
@TableName
(
value
=
"ads_dim_financial_year_week_info"
)
@ApiModel
(
value
=
"财年周"
)
public
class
AdsDimFinancialYearWeekInfo
extends
Model
<
AdsDimFinancialYearWeekInfo
>
{
//财年
private
Integer
financialYear
;
//第n财年周
private
Integer
financialYearWeek
;
//财年开始日期
private
Date
financialYearStart
;
//财年结束日期
private
Date
financialYearEnd
;
//周开始
private
Date
weekStartDay
;
//周结束
private
Date
weekEndDay
;
//财年周所在季节区间,0:跨9月1号,1:3月到8月,2:9月到2月
private
Integer
weekInSeason
;
public
Integer
getFinancialYear
()
{
return
financialYear
;
}
public
void
setFinancialYear
(
Integer
financialYear
)
{
this
.
financialYear
=
financialYear
;
}
public
Integer
getFinancialYearWeek
()
{
return
financialYearWeek
;
}
public
void
setFinancialYearWeek
(
Integer
financialYearWeek
)
{
this
.
financialYearWeek
=
financialYearWeek
;
}
public
Date
getFinancialYearStart
()
{
return
financialYearStart
;
}
public
void
setFinancialYearStart
(
Date
financialYearStart
)
{
this
.
financialYearStart
=
financialYearStart
;
}
public
Date
getFinancialYearEnd
()
{
return
financialYearEnd
;
}
public
void
setFinancialYearEnd
(
Date
financialYearEnd
)
{
this
.
financialYearEnd
=
financialYearEnd
;
}
public
Date
getWeekStartDay
()
{
return
weekStartDay
;
}
public
void
setWeekStartDay
(
Date
weekStartDay
)
{
this
.
weekStartDay
=
weekStartDay
;
}
public
Date
getWeekEndDay
()
{
return
weekEndDay
;
}
public
void
setWeekEndDay
(
Date
weekEndDay
)
{
this
.
weekEndDay
=
weekEndDay
;
}
public
Integer
getWeekInSeason
()
{
return
weekInSeason
;
}
public
void
setWeekInSeason
(
Integer
weekInSeason
)
{
this
.
weekInSeason
=
weekInSeason
;
}
}
src/main/java/com/kwan/springbootkwan/mapper/AdsDimFinancialYearWeekInfoMapper.java
0 → 100644
浏览文件 @
4f94774e
package
com.kwan.springbootkwan.mapper
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.kwan.springbootkwan.entity.AdsDimFinancialYearWeekInfo
;
import
org.apache.ibatis.annotations.Mapper
;
/**
* mapper文件
*
* @author : qinyingjie
* @version : 2.2.0
* @date : 2022/12/19 16:12
*/
@Mapper
public
interface
AdsDimFinancialYearWeekInfoMapper
extends
BaseMapper
<
AdsDimFinancialYearWeekInfo
>
{
}
src/main/java/com/kwan/springbootkwan/service/AdsDimFinancialYearWeekInfoService.java
0 → 100644
浏览文件 @
4f94774e
package
com.kwan.springbootkwan.service
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
com.kwan.springbootkwan.entity.AdsDimFinancialYearWeekInfo
;
/**
* (AdsDimFinancialYearWeekInfo)表服务接口
*
* @author makejava
* @since 2022-12-22 17:25:11
*/
public
interface
AdsDimFinancialYearWeekInfoService
extends
IService
<
AdsDimFinancialYearWeekInfo
>
{
}
src/main/java/com/kwan/springbootkwan/service/impl/AdsDimFinancialYearWeekInfoServiceImpl.java
0 → 100644
浏览文件 @
4f94774e
package
com.kwan.springbootkwan.service.impl
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.kwan.springbootkwan.entity.AdsDimFinancialYearWeekInfo
;
import
com.kwan.springbootkwan.mapper.AdsDimFinancialYearWeekInfoMapper
;
import
com.kwan.springbootkwan.service.AdsDimFinancialYearWeekInfoService
;
import
org.springframework.stereotype.Service
;
/**
* (AdsDimFinancialYearWeekInfo)表服务实现类
*
* @author makejava
* @since 2022-12-22 17:25:11
*/
@Service
(
"adsDimFinancialYearWeekInfoService"
)
public
class
AdsDimFinancialYearWeekInfoServiceImpl
extends
ServiceImpl
<
AdsDimFinancialYearWeekInfoMapper
,
AdsDimFinancialYearWeekInfo
>
implements
AdsDimFinancialYearWeekInfoService
{
}
src/main/resources/application.yaml
浏览文件 @
4f94774e
...
...
@@ -49,9 +49,9 @@ spring:
# mysql
datasource
:
driver-class-name
:
com.mysql.cj.jdbc.Driver
url
:
jdbc:mysql://
120.79.36.53
:3306/kwan?useSSL=false&useUnicode=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai
url
:
jdbc:mysql://
localhost
:3306/kwan?useSSL=false&useUnicode=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai
username
:
root
password
:
15671628341Qwe.
password
:
716288qwe
#mybatis-plus配置
mybatis-plus
:
...
...
src/main/resources/mapper/AdsDimFinancialYearWeekInfoDao.xml
0 → 100644
浏览文件 @
4f94774e
<?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.kwan.springbootkwan.mapper.AdsDimFinancialYearWeekInfoDao"
>
<resultMap
type=
"com.kwan.springbootkwan.entity.AdsDimFinancialYearWeekInfo"
id=
"AdsDimFinancialYearWeekInfoMap"
>
<result
property=
"financialYear"
column=
"financial_year"
jdbcType=
"INTEGER"
/>
<result
property=
"financialYearWeek"
column=
"financial_year_week"
jdbcType=
"INTEGER"
/>
<result
property=
"financialYearStart"
column=
"financial_year_start"
jdbcType=
"TIMESTAMP"
/>
<result
property=
"financialYearEnd"
column=
"financial_year_end"
jdbcType=
"TIMESTAMP"
/>
<result
property=
"weekStartDay"
column=
"week_start_day"
jdbcType=
"TIMESTAMP"
/>
<result
property=
"weekEndDay"
column=
"week_end_day"
jdbcType=
"TIMESTAMP"
/>
<result
property=
"weekInSeason"
column=
"week_in_season"
jdbcType=
"INTEGER"
/>
</resultMap>
<!-- 批量插入 -->
<insert
id=
"insertBatch"
keyProperty=
""
useGeneratedKeys=
"true"
>
insert into kwan.ads_dim_financial_year_week_info(financial_year, financial_year_week, financial_year_start, financial_year_end, week_start_day, week_end_day, week_in_season)
values
<foreach
collection=
"entities"
item=
"entity"
separator=
","
>
(#{entity.financialYear}, #{entity.financialYearWeek}, #{entity.financialYearStart}, #{entity.financialYearEnd}, #{entity.weekStartDay}, #{entity.weekEndDay}, #{entity.weekInSeason})
</foreach>
</insert>
<!-- 批量插入或按主键更新 -->
<insert
id=
"insertOrUpdateBatch"
keyProperty=
""
useGeneratedKeys=
"true"
>
insert into kwan.ads_dim_financial_year_week_info(financial_year, financial_year_week, financial_year_start, financial_year_end, week_start_day, week_end_day, week_in_season)
values
<foreach
collection=
"entities"
item=
"entity"
separator=
","
>
(#{entity.financialYear}, #{entity.financialYearWeek}, #{entity.financialYearStart}, #{entity.financialYearEnd}, #{entity.weekStartDay}, #{entity.weekEndDay}, #{entity.weekInSeason})
</foreach>
on duplicate key update
financial_year = values(financial_year) , financial_year_week = values(financial_year_week) , financial_year_start = values(financial_year_start) , financial_year_end = values(financial_year_end) , week_start_day = values(week_start_day) , week_end_day = values(week_end_day) , week_in_season = values(week_in_season)
</insert>
</mapper>
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录