Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
D
data-server
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
licc
data-server
Commits
126db1de
Commit
126db1de
authored
Mar 10, 2021
by
licc
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
新增月度肥料实体类
parent
0c6e2c4d
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
122 additions
and
0 deletions
+122
-0
MonthManureMapper.java
.../src/main/java/cn/wisenergy/mapper/MonthManureMapper.java
+25
-0
MonthManureMapper.xml
...gy-mapper/src/main/resources/mapper/MonthManureMapper.xml
+64
-0
MonthManure.java
...del/src/main/java/cn/wisenergy/model/app/MonthManure.java
+33
-0
No files found.
wisenergy-mapper/src/main/java/cn/wisenergy/mapper/MonthManureMapper.java
0 → 100644
View file @
126db1de
package
cn
.
wisenergy
.
mapper
;
import
cn.wisenergy.model.app.MonthManure
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
/**
* @author 86187
*/
public
interface
MonthManureMapper
extends
BaseMapper
<
MonthManure
>
{
/**
* 添加月度肥料
*
* @param monthManure 月度肥料信息
* @return 1
*/
int
add
(
MonthManure
monthManure
);
/**
* 编辑月度肥料
*
* @param monthManure 月度肥料信息
* @return 1
*/
int
edit
(
MonthManure
monthManure
);
}
wisenergy-mapper/src/main/resources/mapper/MonthManureMapper.xml
0 → 100644
View file @
126db1de
<?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=
"cn.wisenergy.mapper.MonthManureMapper"
>
<resultMap
id=
"monthMap"
type=
"cn.wisenergy.model.app.MonthManure"
>
<id
column=
"id"
property=
"id"
/>
<result
column=
"year_month"
property=
"yearMonth"
/>
<result
column=
"manure_award"
property=
"manureAward"
/>
<result
column=
"create_time"
property=
"createTime"
/>
<result
column=
"update_time"
property=
"updateTime"
/>
</resultMap>
<sql
id=
"table"
>
month_manure
</sql>
<sql
id=
"cols_all"
>
id,
<include
refid=
"cols_exclude_id"
/>
</sql>
<sql
id=
"cols_exclude_id"
>
year_month,manure_award,create_time,update_time
</sql>
<sql
id=
"vals"
>
#{yearMonth},#{manureAward},now(),now()
</sql>
<sql
id=
"updateCondition"
>
<if
test=
"yearMonth != null"
>
year_month =#{yearMonth},
</if>
<if
test=
"manureAward != null"
>
manure_award = #{manureAward},
</if>
update_time =now()
</sql>
<sql
id=
"criteria"
>
<if
test=
"id != null"
>
id = #{id}
</if>
<if
test=
"yearMonth != null"
>
and year_month =#{yearMonth}
</if>
<if
test=
"manureAward != null"
>
and manure_award = #{manureAward}
</if>
<if
test=
"createTime != null"
>
and create_time
>
= #{createTime}
</if>
<if
test=
"updateTime != null"
>
and #{updateTime}
>
= update_time
</if>
</sql>
<insert
id=
"add"
parameterType=
"cn.wisenergy.model.app.MonthManure"
keyProperty=
"id"
useGeneratedKeys=
"true"
>
insert into
<include
refid=
"table"
/>
(
<include
refid=
"cols_exclude_id"
/>
)
value(
<include
refid=
"vals"
/>
)
</insert>
<update
id=
"edit"
parameterType=
"cn.wisenergy.model.app.MonthManure"
>
UPDATE
<include
refid=
"table"
/>
<set>
<include
refid=
"updateCondition"
/>
</set>
<where>
id = #{id}
</where>
</update>
</mapper>
\ No newline at end of file
wisenergy-model/src/main/java/cn/wisenergy/model/app/MonthManure.java
0 → 100644
View file @
126db1de
package
cn
.
wisenergy
.
model
.
app
;
import
lombok.Data
;
import
java.util.Date
;
/**
*@ Description: 月度肥料实体类
*@ Author : 86187
*@ Date : 2021/3/10 10:05
* @author 86187
*/
@Data
public
class
MonthManure
{
/**
* 主键id
*/
private
Integer
id
;
/**
* 年月
*/
private
String
yearMonth
;
/**
* 月度肥料余额
*/
private
Double
manureAward
;
private
Date
createTime
;
private
Date
updateTime
;
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment