Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Q
qk_backend
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
quanku
qk_backend
Commits
5f68865b
Commit
5f68865b
authored
Dec 19, 2024
by
shiyu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
签到任务
parent
a927eafa
Changes
5
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
414 additions
and
12 deletions
+414
-12
ch-dao/src/main/java/com/wwdz/ch/db/domain/qiandao/SignInTask.java
...c/main/java/com/wwdz/ch/db/domain/qiandao/SignInTask.java
+21
-1
ch-dao/src/main/java/com/wwdz/ch/db/domain/qiandao/SignInTaskExample.java
...java/com/wwdz/ch/db/domain/qiandao/SignInTaskExample.java
+264
-0
ch-dao/src/main/java/com/wwdz/ch/db/dto/request/qiandao/SignInTaskRequestDto.java
.../wwdz/ch/db/dto/request/qiandao/SignInTaskRequestDto.java
+82
-0
ch-dao/src/main/java/com/wwdz/ch/db/mapper/qiandao/SignInTaskMapper.java
.../java/com/wwdz/ch/db/mapper/qiandao/SignInTaskMapper.java
+3
-0
ch-dao/src/main/resources/com/wwdz/ch/db/mapper/qiandao/SignInTaskMapper.xml
...ources/com/wwdz/ch/db/mapper/qiandao/SignInTaskMapper.xml
+44
-11
No files found.
ch-dao/src/main/java/com/wwdz/ch/db/domain/qiandao/SignInTask.java
View file @
5f68865b
package
com.wwdz.ch.db.domain.qiandao
;
package
com.wwdz.ch.db.domain.qiandao
;
import
java.io.Serializable
;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
import
java.util.Arrays
;
import
java.util.Arrays
;
import
java.util.Date
;
import
java.util.Date
;
import
com.xxdxxs.entity.Entity
;
import
com.xxdxxs.entity.Entity
;
import
lombok.Data
;
import
lombok.Data
;
/**
/**
* @author shiyu
* @author shiyu
* @date 2024/12/1
8
* @date 2024/12/1
9
*/
*/
@Data
@Data
public
class
SignInTask
implements
Entity
{
public
class
SignInTask
implements
Entity
{
...
@@ -69,6 +71,16 @@ public class SignInTask implements Entity {
...
@@ -69,6 +71,16 @@ public class SignInTask implements Entity {
*/
*/
private
Long
creatorId
;
private
Long
creatorId
;
/**
* 创建时间
*/
private
Date
createTime
;
/**
* 更新时间
*/
private
Date
updateTime
;
/**
/**
* 是否私有
* 是否私有
*/
*/
...
@@ -94,6 +106,8 @@ public class SignInTask implements Entity {
...
@@ -94,6 +106,8 @@ public class SignInTask implements Entity {
sb
.
append
(
", state="
).
append
(
state
);
sb
.
append
(
", state="
).
append
(
state
);
sb
.
append
(
", desc="
).
append
(
desc
);
sb
.
append
(
", desc="
).
append
(
desc
);
sb
.
append
(
", creatorId="
).
append
(
creatorId
);
sb
.
append
(
", creatorId="
).
append
(
creatorId
);
sb
.
append
(
", createTime="
).
append
(
createTime
);
sb
.
append
(
", updateTime="
).
append
(
updateTime
);
sb
.
append
(
", isPrivate="
).
append
(
isPrivate
);
sb
.
append
(
", isPrivate="
).
append
(
isPrivate
);
sb
.
append
(
", serialVersionUID="
).
append
(
serialVersionUID
);
sb
.
append
(
", serialVersionUID="
).
append
(
serialVersionUID
);
sb
.
append
(
"]"
);
sb
.
append
(
"]"
);
...
@@ -124,6 +138,8 @@ public class SignInTask implements Entity {
...
@@ -124,6 +138,8 @@ public class SignInTask implements Entity {
&&
(
this
.
getState
()
==
null
?
other
.
getState
()
==
null
:
this
.
getState
().
equals
(
other
.
getState
()))
&&
(
this
.
getState
()
==
null
?
other
.
getState
()
==
null
:
this
.
getState
().
equals
(
other
.
getState
()))
&&
(
this
.
getDesc
()
==
null
?
other
.
getDesc
()
==
null
:
this
.
getDesc
().
equals
(
other
.
getDesc
()))
&&
(
this
.
getDesc
()
==
null
?
other
.
getDesc
()
==
null
:
this
.
getDesc
().
equals
(
other
.
getDesc
()))
&&
(
this
.
getCreatorId
()
==
null
?
other
.
getCreatorId
()
==
null
:
this
.
getCreatorId
().
equals
(
other
.
getCreatorId
()))
&&
(
this
.
getCreatorId
()
==
null
?
other
.
getCreatorId
()
==
null
:
this
.
getCreatorId
().
equals
(
other
.
getCreatorId
()))
&&
(
this
.
getCreateTime
()
==
null
?
other
.
getCreateTime
()
==
null
:
this
.
getCreateTime
().
equals
(
other
.
getCreateTime
()))
&&
(
this
.
getUpdateTime
()
==
null
?
other
.
getUpdateTime
()
==
null
:
this
.
getUpdateTime
().
equals
(
other
.
getUpdateTime
()))
&&
(
this
.
getIsPrivate
()
==
null
?
other
.
getIsPrivate
()
==
null
:
this
.
getIsPrivate
().
equals
(
other
.
getIsPrivate
()));
&&
(
this
.
getIsPrivate
()
==
null
?
other
.
getIsPrivate
()
==
null
:
this
.
getIsPrivate
().
equals
(
other
.
getIsPrivate
()));
}
}
...
@@ -143,6 +159,8 @@ public class SignInTask implements Entity {
...
@@ -143,6 +159,8 @@ public class SignInTask implements Entity {
result
=
prime
*
result
+
((
getState
()
==
null
)
?
0
:
getState
().
hashCode
());
result
=
prime
*
result
+
((
getState
()
==
null
)
?
0
:
getState
().
hashCode
());
result
=
prime
*
result
+
((
getDesc
()
==
null
)
?
0
:
getDesc
().
hashCode
());
result
=
prime
*
result
+
((
getDesc
()
==
null
)
?
0
:
getDesc
().
hashCode
());
result
=
prime
*
result
+
((
getCreatorId
()
==
null
)
?
0
:
getCreatorId
().
hashCode
());
result
=
prime
*
result
+
((
getCreatorId
()
==
null
)
?
0
:
getCreatorId
().
hashCode
());
result
=
prime
*
result
+
((
getCreateTime
()
==
null
)
?
0
:
getCreateTime
().
hashCode
());
result
=
prime
*
result
+
((
getUpdateTime
()
==
null
)
?
0
:
getUpdateTime
().
hashCode
());
result
=
prime
*
result
+
((
getIsPrivate
()
==
null
)
?
0
:
getIsPrivate
().
hashCode
());
result
=
prime
*
result
+
((
getIsPrivate
()
==
null
)
?
0
:
getIsPrivate
().
hashCode
());
return
result
;
return
result
;
}
}
...
@@ -167,6 +185,8 @@ public class SignInTask implements Entity {
...
@@ -167,6 +185,8 @@ public class SignInTask implements Entity {
state
(
"state"
,
"state"
,
"INTEGER"
,
true
),
state
(
"state"
,
"state"
,
"INTEGER"
,
true
),
desc
(
"desc"
,
"desc"
,
"VARCHAR"
,
true
),
desc
(
"desc"
,
"desc"
,
"VARCHAR"
,
true
),
creatorId
(
"creator_id"
,
"creatorId"
,
"BIGINT"
,
false
),
creatorId
(
"creator_id"
,
"creatorId"
,
"BIGINT"
,
false
),
createTime
(
"create_time"
,
"createTime"
,
"TIMESTAMP"
,
false
),
updateTime
(
"update_time"
,
"updateTime"
,
"TIMESTAMP"
,
false
),
isPrivate
(
"is_private"
,
"isPrivate"
,
"BIT"
,
false
);
isPrivate
(
"is_private"
,
"isPrivate"
,
"BIT"
,
false
);
/**
/**
...
...
ch-dao/src/main/java/com/wwdz/ch/db/domain/qiandao/SignInTaskExample.java
View file @
5f68865b
This diff is collapsed.
Click to expand it.
ch-dao/src/main/java/com/wwdz/ch/db/dto/request/qiandao/SignInTaskRequestDto.java
0 → 100644
View file @
5f68865b
package
com.wwdz.ch.db.dto.request.qiandao
;
import
com.xxdxxs.entity.Entity
;
import
lombok.Data
;
import
java.util.Date
;
@Data
public
class
SignInTaskRequestDto
implements
Entity
{
private
Long
id
;
/**
* 签到任务名称
*/
private
String
name
;
/**
* 图片
*/
private
String
image
;
/**
* 开始生效时间
*/
private
Date
startValidTime
;
/**
* 有效截止时间
*/
private
Date
endValidTime
;
/**
* 打卡开始时间
*/
private
Date
signInStartTime
;
/**
* 打卡结束时间
*/
private
Date
signInEndTime
;
/**
* 打卡目标天数
*/
private
Integer
goalDays
;
/**
* 打开类型(1连续,2累计)
*/
private
Integer
type
;
/**
* 状态
*/
private
Integer
state
;
/**
* 描述
*/
private
String
desc
;
/**
* 创建人id
*/
private
Long
creatorId
;
/**
* 创建时间
*/
private
Date
createTime
;
/**
* 更新时间
*/
private
Date
updateTime
;
/**
* 是否私有
*/
private
Boolean
isPrivate
;
}
ch-dao/src/main/java/com/wwdz/ch/db/mapper/qiandao/SignInTaskMapper.java
View file @
5f68865b
...
@@ -3,8 +3,11 @@ package com.wwdz.ch.db.mapper.qiandao;
...
@@ -3,8 +3,11 @@ package com.wwdz.ch.db.mapper.qiandao;
import
com.wwdz.ch.db.domain.qiandao.SignInTask
;
import
com.wwdz.ch.db.domain.qiandao.SignInTask
;
import
com.wwdz.ch.db.domain.qiandao.SignInTaskExample
;
import
com.wwdz.ch.db.domain.qiandao.SignInTaskExample
;
import
java.util.List
;
import
java.util.List
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Param
;
import
org.apache.ibatis.annotations.Param
;
@Mapper
public
interface
SignInTaskMapper
{
public
interface
SignInTaskMapper
{
long
countByExample
(
SignInTaskExample
example
);
long
countByExample
(
SignInTaskExample
example
);
...
...
ch-dao/src/main/resources/com/wwdz/ch/db/mapper/qiandao/SignInTaskMapper.xml
View file @
5f68865b
...
@@ -14,6 +14,8 @@
...
@@ -14,6 +14,8 @@
<result
column=
"state"
jdbcType=
"INTEGER"
property=
"state"
/>
<result
column=
"state"
jdbcType=
"INTEGER"
property=
"state"
/>
<result
column=
"desc"
jdbcType=
"VARCHAR"
property=
"desc"
/>
<result
column=
"desc"
jdbcType=
"VARCHAR"
property=
"desc"
/>
<result
column=
"creator_id"
jdbcType=
"BIGINT"
property=
"creatorId"
/>
<result
column=
"creator_id"
jdbcType=
"BIGINT"
property=
"creatorId"
/>
<result
column=
"create_time"
jdbcType=
"TIMESTAMP"
property=
"createTime"
/>
<result
column=
"update_time"
jdbcType=
"TIMESTAMP"
property=
"updateTime"
/>
<result
column=
"is_private"
jdbcType=
"BIT"
property=
"isPrivate"
/>
<result
column=
"is_private"
jdbcType=
"BIT"
property=
"isPrivate"
/>
</resultMap>
</resultMap>
<sql
id=
"Example_Where_Clause"
>
<sql
id=
"Example_Where_Clause"
>
...
@@ -76,7 +78,7 @@
...
@@ -76,7 +78,7 @@
</sql>
</sql>
<sql
id=
"Base_Column_List"
>
<sql
id=
"Base_Column_List"
>
id, `name`, image, start_valid_time, end_valid_time, sign_in_start_time, sign_in_end_time,
id, `name`, image, start_valid_time, end_valid_time, sign_in_start_time, sign_in_end_time,
goal_days, `type`, `state`, `desc`, creator_id, is_private
goal_days, `type`, `state`, `desc`, creator_id,
create_time, update_time,
is_private
</sql>
</sql>
<select
id=
"selectByExample"
parameterType=
"com.wwdz.ch.db.domain.qiandao.SignInTaskExample"
resultMap=
"BaseResultMap"
>
<select
id=
"selectByExample"
parameterType=
"com.wwdz.ch.db.domain.qiandao.SignInTaskExample"
resultMap=
"BaseResultMap"
>
select
select
...
@@ -105,14 +107,15 @@
...
@@ -105,14 +107,15 @@
distinct
distinct
</if>
</if>
<choose>
<choose>
<when
test=
"selective != null and selective.length
>
0"
>
<when
test=
"selective != null and selective.length
>
0"
>
<foreach
collection=
"selective"
item=
"column"
separator=
","
>
<foreach
collection=
"selective"
item=
"column"
separator=
","
>
${column.escapedColumnName}
${column.escapedColumnName}
</foreach>
</foreach>
</when>
</when>
<otherwise>
<otherwise>
id, `name`, image, start_valid_time, end_valid_time, sign_in_start_time, sign_in_end_time,
id, `name`, image, start_valid_time, end_valid_time, sign_in_start_time, sign_in_end_time,
goal_days, `type`, `state`, `desc`, creator_id, is_private
goal_days, `type`, `state`, `desc`, creator_id, create_time, update_time, is_private
</otherwise>
</otherwise>
</choose>
</choose>
from sign_in_task
from sign_in_task
...
@@ -137,14 +140,15 @@
...
@@ -137,14 +140,15 @@
-->
-->
select
select
<choose>
<choose>
<when
test=
"selective != null and selective.length
>
0"
>
<when
test=
"selective != null and selective.length
>
0"
>
<foreach
collection=
"selective"
item=
"column"
separator=
","
>
<foreach
collection=
"selective"
item=
"column"
separator=
","
>
${column.escapedColumnName}
${column.escapedColumnName}
</foreach>
</foreach>
</when>
</when>
<otherwise>
<otherwise>
id, `name`, image, start_valid_time, end_valid_time, sign_in_start_time, sign_in_end_time,
id, `name`, image, start_valid_time, end_valid_time, sign_in_start_time, sign_in_end_time,
goal_days, `type`, `state`, `desc`, creator_id, is_private
goal_days, `type`, `state`, `desc`, creator_id, create_time, update_time, is_private
</otherwise>
</otherwise>
</choose>
</choose>
from sign_in_task
from sign_in_task
...
@@ -167,13 +171,13 @@
...
@@ -167,13 +171,13 @@
insert into sign_in_task (`name`, image, start_valid_time,
insert into sign_in_task (`name`, image, start_valid_time,
end_valid_time, sign_in_start_time, sign_in_end_time,
end_valid_time, sign_in_start_time, sign_in_end_time,
goal_days, `type`, `state`,
goal_days, `type`, `state`,
`desc`, creator_id,
is_private
`desc`, creator_id,
create_time,
)
update_time, is_private
)
values (#{name,jdbcType=VARCHAR}, #{image,jdbcType=VARCHAR}, #{startValidTime,jdbcType=TIMESTAMP},
values (#{name,jdbcType=VARCHAR}, #{image,jdbcType=VARCHAR}, #{startValidTime,jdbcType=TIMESTAMP},
#{endValidTime,jdbcType=TIMESTAMP}, #{signInStartTime,jdbcType=TIMESTAMP}, #{signInEndTime,jdbcType=TIMESTAMP},
#{endValidTime,jdbcType=TIMESTAMP}, #{signInStartTime,jdbcType=TIMESTAMP}, #{signInEndTime,jdbcType=TIMESTAMP},
#{goalDays,jdbcType=INTEGER}, #{type,jdbcType=INTEGER}, #{state,jdbcType=INTEGER},
#{goalDays,jdbcType=INTEGER}, #{type,jdbcType=INTEGER}, #{state,jdbcType=INTEGER},
#{desc,jdbcType=VARCHAR}, #{creatorId,jdbcType=BIGINT}, #{
isPrivate,jdbcType=BIT}
#{desc,jdbcType=VARCHAR}, #{creatorId,jdbcType=BIGINT}, #{
createTime,jdbcType=TIMESTAMP},
)
#{updateTime,jdbcType=TIMESTAMP}, #{isPrivate,jdbcType=BIT}
)
</insert>
</insert>
<insert
id=
"insertSelective"
parameterType=
"com.wwdz.ch.db.domain.qiandao.SignInTask"
>
<insert
id=
"insertSelective"
parameterType=
"com.wwdz.ch.db.domain.qiandao.SignInTask"
>
<selectKey
keyProperty=
"id"
order=
"AFTER"
resultType=
"java.lang.Long"
>
<selectKey
keyProperty=
"id"
order=
"AFTER"
resultType=
"java.lang.Long"
>
...
@@ -214,6 +218,12 @@
...
@@ -214,6 +218,12 @@
<if
test=
"creatorId != null"
>
<if
test=
"creatorId != null"
>
creator_id,
creator_id,
</if>
</if>
<if
test=
"createTime != null"
>
create_time,
</if>
<if
test=
"updateTime != null"
>
update_time,
</if>
<if
test=
"isPrivate != null"
>
<if
test=
"isPrivate != null"
>
is_private,
is_private,
</if>
</if>
...
@@ -252,6 +262,12 @@
...
@@ -252,6 +262,12 @@
<if
test=
"creatorId != null"
>
<if
test=
"creatorId != null"
>
#{creatorId,jdbcType=BIGINT},
#{creatorId,jdbcType=BIGINT},
</if>
</if>
<if
test=
"createTime != null"
>
#{createTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"updateTime != null"
>
#{updateTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"isPrivate != null"
>
<if
test=
"isPrivate != null"
>
#{isPrivate,jdbcType=BIT},
#{isPrivate,jdbcType=BIT},
</if>
</if>
...
@@ -302,6 +318,12 @@
...
@@ -302,6 +318,12 @@
<if
test=
"record.creatorId != null"
>
<if
test=
"record.creatorId != null"
>
creator_id = #{record.creatorId,jdbcType=BIGINT},
creator_id = #{record.creatorId,jdbcType=BIGINT},
</if>
</if>
<if
test=
"record.createTime != null"
>
create_time = #{record.createTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"record.updateTime != null"
>
update_time = #{record.updateTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"record.isPrivate != null"
>
<if
test=
"record.isPrivate != null"
>
is_private = #{record.isPrivate,jdbcType=BIT},
is_private = #{record.isPrivate,jdbcType=BIT},
</if>
</if>
...
@@ -324,6 +346,8 @@
...
@@ -324,6 +346,8 @@
`state` = #{record.state,jdbcType=INTEGER},
`state` = #{record.state,jdbcType=INTEGER},
`desc` = #{record.desc,jdbcType=VARCHAR},
`desc` = #{record.desc,jdbcType=VARCHAR},
creator_id = #{record.creatorId,jdbcType=BIGINT},
creator_id = #{record.creatorId,jdbcType=BIGINT},
create_time = #{record.createTime,jdbcType=TIMESTAMP},
update_time = #{record.updateTime,jdbcType=TIMESTAMP},
is_private = #{record.isPrivate,jdbcType=BIT}
is_private = #{record.isPrivate,jdbcType=BIT}
<if
test=
"_parameter != null"
>
<if
test=
"_parameter != null"
>
<include
refid=
"Update_By_Example_Where_Clause"
/>
<include
refid=
"Update_By_Example_Where_Clause"
/>
...
@@ -365,6 +389,12 @@
...
@@ -365,6 +389,12 @@
<if
test=
"creatorId != null"
>
<if
test=
"creatorId != null"
>
creator_id = #{creatorId,jdbcType=BIGINT},
creator_id = #{creatorId,jdbcType=BIGINT},
</if>
</if>
<if
test=
"createTime != null"
>
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"updateTime != null"
>
update_time = #{updateTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"isPrivate != null"
>
<if
test=
"isPrivate != null"
>
is_private = #{isPrivate,jdbcType=BIT},
is_private = #{isPrivate,jdbcType=BIT},
</if>
</if>
...
@@ -384,6 +414,8 @@
...
@@ -384,6 +414,8 @@
`state` = #{state,jdbcType=INTEGER},
`state` = #{state,jdbcType=INTEGER},
`desc` = #{desc,jdbcType=VARCHAR},
`desc` = #{desc,jdbcType=VARCHAR},
creator_id = #{creatorId,jdbcType=BIGINT},
creator_id = #{creatorId,jdbcType=BIGINT},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP},
is_private = #{isPrivate,jdbcType=BIT}
is_private = #{isPrivate,jdbcType=BIT}
where id = #{id,jdbcType=BIGINT}
where id = #{id,jdbcType=BIGINT}
</update>
</update>
...
@@ -414,14 +446,15 @@
...
@@ -414,14 +446,15 @@
select
select
'true' as QUERYID,
'true' as QUERYID,
<choose>
<choose>
<when
test=
"selective != null and selective.length
>
0"
>
<when
test=
"selective != null and selective.length
>
0"
>
<foreach
collection=
"selective"
item=
"column"
separator=
","
>
<foreach
collection=
"selective"
item=
"column"
separator=
","
>
${column.escapedColumnName}
${column.escapedColumnName}
</foreach>
</foreach>
</when>
</when>
<otherwise>
<otherwise>
id, `name`, image, start_valid_time, end_valid_time, sign_in_start_time, sign_in_end_time,
id, `name`, image, start_valid_time, end_valid_time, sign_in_start_time, sign_in_end_time,
goal_days, `type`, `state`, `desc`, creator_id, is_private
goal_days, `type`, `state`, `desc`, creator_id, create_time, update_time, is_private
</otherwise>
</otherwise>
</choose>
</choose>
from sign_in_task
from sign_in_task
...
...
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