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
902572ae
Commit
902572ae
authored
Jan 14, 2025
by
shiyu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
动态查询
parent
f0ada315
Changes
13
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
249 additions
and
22 deletions
+249
-22
ch-dao/src/main/java/com/wwdz/ch/db/dao/qiandao/QdUserSignInNoteDao.java
.../java/com/wwdz/ch/db/dao/qiandao/QdUserSignInNoteDao.java
+7
-0
ch-dao/src/main/java/com/wwdz/ch/db/domain/qiandao/QdUserSignInNote.java
.../java/com/wwdz/ch/db/domain/qiandao/QdUserSignInNote.java
+10
-1
ch-dao/src/main/java/com/wwdz/ch/db/domain/qiandao/QdUserSignInNoteExample.java
...om/wwdz/ch/db/domain/qiandao/QdUserSignInNoteExample.java
+132
-0
ch-dao/src/main/java/com/wwdz/ch/db/dto/request/qiandao/QdUserSignInNoteRequestDto.java
...ch/db/dto/request/qiandao/QdUserSignInNoteRequestDto.java
+6
-0
ch-dao/src/main/java/com/wwdz/ch/db/dto/request/qiandao/QdUserSignInRequestDto.java
...wdz/ch/db/dto/request/qiandao/QdUserSignInRequestDto.java
+6
-0
ch-dao/src/main/java/com/wwdz/ch/db/impl/qiandao/QdUserSignInNoteDaoImpl.java
.../com/wwdz/ch/db/impl/qiandao/QdUserSignInNoteDaoImpl.java
+23
-1
ch-dao/src/main/resources/com/wwdz/ch/db/mapper/qiandao/QdUserSignInNoteMapper.xml
.../com/wwdz/ch/db/mapper/qiandao/QdUserSignInNoteMapper.xml
+29
-14
ch-dao/src/main/resources/generatorConfig_new.xml
ch-dao/src/main/resources/generatorConfig_new.xml
+1
-1
ch-wx-api/src/main/java/com/wwdz/ch/wx/entity/vo/qiandao/QdSignInNoteVo.java
...java/com/wwdz/ch/wx/entity/vo/qiandao/QdSignInNoteVo.java
+5
-0
ch-wx-api/src/main/java/com/wwdz/ch/wx/impl/qiandao/QdSignInTaskServiceImpl.java
.../com/wwdz/ch/wx/impl/qiandao/QdSignInTaskServiceImpl.java
+3
-1
ch-wx-api/src/main/java/com/wwdz/ch/wx/impl/qiandao/QdUserSignInNoteServiceImpl.java
.../wwdz/ch/wx/impl/qiandao/QdUserSignInNoteServiceImpl.java
+4
-4
ch-wx-api/src/main/java/com/wwdz/ch/wx/impl/qiandao/QdUserSignInServiceImpl.java
.../com/wwdz/ch/wx/impl/qiandao/QdUserSignInServiceImpl.java
+1
-0
ch-wx-api/src/main/java/com/wwdz/ch/wx/impl/qiandao/QdUserSignInTaskServiceImpl.java
.../wwdz/ch/wx/impl/qiandao/QdUserSignInTaskServiceImpl.java
+22
-0
No files found.
ch-dao/src/main/java/com/wwdz/ch/db/dao/qiandao/QdUserSignInNoteDao.java
View file @
902572ae
...
...
@@ -11,6 +11,13 @@ public interface QdUserSignInNoteDao {
List
<
QdUserSignInNote
>
findByPage
(
QdUserSignInNoteRequestDto
dto
);
/**
* 查询笔记,包含自己的私密笔记
* @param dto
* @return
*/
List
<
QdUserSignInNote
>
findSelfNoteByPage
(
QdUserSignInNoteRequestDto
dto
);
QdUserSignInNote
findByNoteId
(
long
noteId
);
boolean
updateByPrimaryKey
(
QdUserSignInNote
qdUserSignInNote
);
...
...
ch-dao/src/main/java/com/wwdz/ch/db/domain/qiandao/QdUserSignInNote.java
View file @
902572ae
...
...
@@ -10,7 +10,7 @@ import lombok.Data;
/**
* @author shiyu
* @date 202
4/12/23
* @date 202
5/01/14
*/
@Data
public
class
QdUserSignInNote
implements
Entity
{
...
...
@@ -46,6 +46,11 @@ public class QdUserSignInNote implements Entity {
*/
private
String
audio
;
/**
* 音频时长
*/
private
Integer
audioLength
;
/**
* 对应签到的日期
*/
...
...
@@ -96,6 +101,7 @@ public class QdUserSignInNote implements Entity {
sb
.
append
(
", content="
).
append
(
content
);
sb
.
append
(
", image="
).
append
(
image
);
sb
.
append
(
", audio="
).
append
(
audio
);
sb
.
append
(
", audioLength="
).
append
(
audioLength
);
sb
.
append
(
", signInDate="
).
append
(
signInDate
);
sb
.
append
(
", recordId="
).
append
(
recordId
);
sb
.
append
(
", isPrivate="
).
append
(
isPrivate
);
...
...
@@ -127,6 +133,7 @@ public class QdUserSignInNote implements Entity {
&&
(
this
.
getContent
()
==
null
?
other
.
getContent
()
==
null
:
this
.
getContent
().
equals
(
other
.
getContent
()))
&&
(
this
.
getImage
()
==
null
?
other
.
getImage
()
==
null
:
this
.
getImage
().
equals
(
other
.
getImage
()))
&&
(
this
.
getAudio
()
==
null
?
other
.
getAudio
()
==
null
:
this
.
getAudio
().
equals
(
other
.
getAudio
()))
&&
(
this
.
getAudioLength
()
==
null
?
other
.
getAudioLength
()
==
null
:
this
.
getAudioLength
().
equals
(
other
.
getAudioLength
()))
&&
(
this
.
getSignInDate
()
==
null
?
other
.
getSignInDate
()
==
null
:
this
.
getSignInDate
().
equals
(
other
.
getSignInDate
()))
&&
(
this
.
getRecordId
()
==
null
?
other
.
getRecordId
()
==
null
:
this
.
getRecordId
().
equals
(
other
.
getRecordId
()))
&&
(
this
.
getIsPrivate
()
==
null
?
other
.
getIsPrivate
()
==
null
:
this
.
getIsPrivate
().
equals
(
other
.
getIsPrivate
()))
...
...
@@ -147,6 +154,7 @@ public class QdUserSignInNote implements Entity {
result
=
prime
*
result
+
((
getContent
()
==
null
)
?
0
:
getContent
().
hashCode
());
result
=
prime
*
result
+
((
getImage
()
==
null
)
?
0
:
getImage
().
hashCode
());
result
=
prime
*
result
+
((
getAudio
()
==
null
)
?
0
:
getAudio
().
hashCode
());
result
=
prime
*
result
+
((
getAudioLength
()
==
null
)
?
0
:
getAudioLength
().
hashCode
());
result
=
prime
*
result
+
((
getSignInDate
()
==
null
)
?
0
:
getSignInDate
().
hashCode
());
result
=
prime
*
result
+
((
getRecordId
()
==
null
)
?
0
:
getRecordId
().
hashCode
());
result
=
prime
*
result
+
((
getIsPrivate
()
==
null
)
?
0
:
getIsPrivate
().
hashCode
());
...
...
@@ -172,6 +180,7 @@ public class QdUserSignInNote implements Entity {
content
(
"content"
,
"content"
,
"VARCHAR"
,
false
),
image
(
"image"
,
"image"
,
"VARCHAR"
,
false
),
audio
(
"audio"
,
"audio"
,
"VARCHAR"
,
false
),
audioLength
(
"audio_length"
,
"audioLength"
,
"INTEGER"
,
false
),
signInDate
(
"sign_in_date"
,
"signInDate"
,
"VARCHAR"
,
false
),
recordId
(
"record_id"
,
"recordId"
,
"BIGINT"
,
false
),
isPrivate
(
"is_private"
,
"isPrivate"
,
"BIT"
,
false
),
...
...
ch-dao/src/main/java/com/wwdz/ch/db/domain/qiandao/QdUserSignInNoteExample.java
View file @
902572ae
...
...
@@ -1112,6 +1112,138 @@ public class QdUserSignInNoteExample {
return
(
Criteria
)
this
;
}
public
Criteria
andAudioLengthIsNull
()
{
addCriterion
(
"audio_length is null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andAudioLengthIsNotNull
()
{
addCriterion
(
"audio_length is not null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andAudioLengthEqualTo
(
Integer
value
)
{
addCriterion
(
"audio_length ="
,
value
,
"audioLength"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table qd_user_sign_in_note
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andAudioLengthEqualToColumn
(
QdUserSignInNote
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"audio_length = "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andAudioLengthNotEqualTo
(
Integer
value
)
{
addCriterion
(
"audio_length <>"
,
value
,
"audioLength"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table qd_user_sign_in_note
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andAudioLengthNotEqualToColumn
(
QdUserSignInNote
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"audio_length <> "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andAudioLengthGreaterThan
(
Integer
value
)
{
addCriterion
(
"audio_length >"
,
value
,
"audioLength"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table qd_user_sign_in_note
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andAudioLengthGreaterThanColumn
(
QdUserSignInNote
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"audio_length > "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andAudioLengthGreaterThanOrEqualTo
(
Integer
value
)
{
addCriterion
(
"audio_length >="
,
value
,
"audioLength"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table qd_user_sign_in_note
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andAudioLengthGreaterThanOrEqualToColumn
(
QdUserSignInNote
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"audio_length >= "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andAudioLengthLessThan
(
Integer
value
)
{
addCriterion
(
"audio_length <"
,
value
,
"audioLength"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table qd_user_sign_in_note
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andAudioLengthLessThanColumn
(
QdUserSignInNote
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"audio_length < "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andAudioLengthLessThanOrEqualTo
(
Integer
value
)
{
addCriterion
(
"audio_length <="
,
value
,
"audioLength"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table qd_user_sign_in_note
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andAudioLengthLessThanOrEqualToColumn
(
QdUserSignInNote
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"audio_length <= "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andAudioLengthIn
(
List
<
Integer
>
values
)
{
addCriterion
(
"audio_length in"
,
values
,
"audioLength"
);
return
(
Criteria
)
this
;
}
public
Criteria
andAudioLengthNotIn
(
List
<
Integer
>
values
)
{
addCriterion
(
"audio_length not in"
,
values
,
"audioLength"
);
return
(
Criteria
)
this
;
}
public
Criteria
andAudioLengthBetween
(
Integer
value1
,
Integer
value2
)
{
addCriterion
(
"audio_length between"
,
value1
,
value2
,
"audioLength"
);
return
(
Criteria
)
this
;
}
public
Criteria
andAudioLengthNotBetween
(
Integer
value1
,
Integer
value2
)
{
addCriterion
(
"audio_length not between"
,
value1
,
value2
,
"audioLength"
);
return
(
Criteria
)
this
;
}
public
Criteria
andSignInDateIsNull
()
{
addCriterion
(
"sign_in_date is null"
);
return
(
Criteria
)
this
;
...
...
ch-dao/src/main/java/com/wwdz/ch/db/dto/request/qiandao/QdUserSignInNoteRequestDto.java
View file @
902572ae
...
...
@@ -41,6 +41,12 @@ public class QdUserSignInNoteRequestDto extends BaseRequestDto implements Entity
*/
private
String
audio
;
/**
* 音频时长
*/
private
Integer
audioLength
;
/**
* 对应签到的日期
*/
...
...
ch-dao/src/main/java/com/wwdz/ch/db/dto/request/qiandao/QdUserSignInRequestDto.java
View file @
902572ae
...
...
@@ -94,6 +94,12 @@ public class QdUserSignInRequestDto extends BaseRequestDto implements Entity {
private
String
audio
;
/**
* 音频时长
*/
private
Integer
audioLength
;
private
String
userOpenId
;
/**
...
...
ch-dao/src/main/java/com/wwdz/ch/db/impl/qiandao/QdUserSignInNoteDaoImpl.java
View file @
902572ae
...
...
@@ -4,6 +4,7 @@ import com.github.pagehelper.PageHelper;
import
com.wwdz.ch.db.dao.qiandao.QdUserSignInNoteDao
;
import
com.wwdz.ch.db.domain.qiandao.QdUserSignInNote
;
import
com.wwdz.ch.db.domain.qiandao.QdUserSignInNoteExample
;
import
com.wwdz.ch.db.domain.qiandao.SignInTaskExample
;
import
com.wwdz.ch.db.dto.request.qiandao.QdUserSignInNoteRequestDto
;
import
com.wwdz.ch.db.mapper.qiandao.QdUserSignInNoteMapper
;
import
com.xxdxxs.db.component.JdbcHelper
;
...
...
@@ -29,8 +30,8 @@ public class QdUserSignInNoteDaoImpl implements QdUserSignInNoteDao {
public
List
<
QdUserSignInNote
>
findByPage
(
QdUserSignInNoteRequestDto
dto
)
{
QdUserSignInNoteExample
example
=
new
QdUserSignInNoteExample
();
QdUserSignInNoteExample
.
Criteria
criteria
=
example
.
createCriteria
();
JdbcHelper
.
ifPresent
(
dto
.
getTaskId
(),
criteria
::
andTaskIdEqualTo
);
JdbcHelper
.
ifPresent
(
dto
.
getUserId
(),
criteria
::
andUserIdEqualTo
);
JdbcHelper
.
ifPresent
(
dto
.
getTaskId
(),
criteria
::
andTaskIdEqualTo
);
JdbcHelper
.
ifPresent
(
dto
.
getIsPrivate
(),
criteria
::
andIsPrivateEqualTo
);
criteria
.
andIsDeletedEqualTo
(
false
);
PageHelper
.
startPage
(
dto
.
getPage
(),
dto
.
getLimit
());
...
...
@@ -42,6 +43,27 @@ public class QdUserSignInNoteDaoImpl implements QdUserSignInNoteDao {
return
qdUserSignInNoteMapper
.
selectByExample
(
example
);
}
@Override
public
List
<
QdUserSignInNote
>
findSelfNoteByPage
(
QdUserSignInNoteRequestDto
dto
)
{
QdUserSignInNoteExample
example
=
new
QdUserSignInNoteExample
();
QdUserSignInNoteExample
.
Criteria
criteria
=
example
.
createCriteria
();
JdbcHelper
.
ifPresent
(
dto
.
getTaskId
(),
criteria
::
andTaskIdEqualTo
);
criteria
.
andIsDeletedEqualTo
(
false
);
criteria
.
andIsPrivateEqualTo
(
false
);
if
(
dto
.
getOnlySelf
()
!=
null
&&
dto
.
getOnlySelf
())
{
QdUserSignInNoteExample
.
Criteria
orCriteria
=
example
.
createCriteria
();
JdbcHelper
.
ifPresent
(
dto
.
getUserId
(),
orCriteria
::
andUserIdEqualTo
);
JdbcHelper
.
ifPresent
(
dto
.
getTaskId
(),
orCriteria
::
andTaskIdEqualTo
);
orCriteria
.
andIsDeletedEqualTo
(
false
);
}
if
(
StringUtils
.
hasLength
(
dto
.
getSortColumn
()))
{
example
.
setOrderByClause
(
dto
.
getSortColumn
()
+
" "
+
dto
.
getOrder
());
}
else
{
example
.
setOrderByClause
(
"create_time desc"
);
}
return
qdUserSignInNoteMapper
.
selectByExample
(
example
);
}
@Override
public
QdUserSignInNote
findByNoteId
(
long
noteId
)
{
QdUserSignInNoteExample
example
=
new
QdUserSignInNoteExample
();
...
...
ch-dao/src/main/resources/com/wwdz/ch/db/mapper/qiandao/QdUserSignInNoteMapper.xml
View file @
902572ae
...
...
@@ -9,6 +9,7 @@
<result
column=
"content"
jdbcType=
"VARCHAR"
property=
"content"
/>
<result
column=
"image"
jdbcType=
"VARCHAR"
property=
"image"
/>
<result
column=
"audio"
jdbcType=
"VARCHAR"
property=
"audio"
/>
<result
column=
"audio_length"
jdbcType=
"INTEGER"
property=
"audioLength"
/>
<result
column=
"sign_in_date"
jdbcType=
"VARCHAR"
property=
"signInDate"
/>
<result
column=
"record_id"
jdbcType=
"BIGINT"
property=
"recordId"
/>
<result
column=
"is_private"
jdbcType=
"BIT"
property=
"isPrivate"
/>
...
...
@@ -76,8 +77,8 @@
</where>
</sql>
<sql
id=
"Base_Column_List"
>
id, user_id, task_id, title, content, image, audio,
sign_in_date, record_id, is_private
,
create_time, update_time, is_deleted, like_num
id, user_id, task_id, title, content, image, audio,
audio_length, sign_in_date, record_id
,
is_private,
create_time, update_time, is_deleted, like_num
</sql>
<select
id=
"selectByExample"
parameterType=
"com.wwdz.ch.db.domain.qiandao.QdUserSignInNoteExample"
resultMap=
"BaseResultMap"
>
select
...
...
@@ -112,8 +113,8 @@
</foreach>
</when>
<otherwise>
id, user_id, task_id, title, content, image, audio,
sign_in_date, record_id, is_private
,
create_time, update_time, is_deleted, like_num
id, user_id, task_id, title, content, image, audio,
audio_length, sign_in_date, record_id
,
is_private,
create_time, update_time, is_deleted, like_num
</otherwise>
</choose>
from qd_user_sign_in_note
...
...
@@ -144,8 +145,8 @@
</foreach>
</when>
<otherwise>
id, user_id, task_id, title, content, image, audio,
sign_in_date, record_id, is_private
,
create_time, update_time, is_deleted, like_num
id, user_id, task_id, title, content, image, audio,
audio_length, sign_in_date, record_id
,
is_private,
create_time, update_time, is_deleted, like_num
</otherwise>
</choose>
from qd_user_sign_in_note
...
...
@@ -167,14 +168,14 @@
</selectKey>
insert into qd_user_sign_in_note (user_id, task_id, title,
content, image, audio,
sign_in_date, record_id, is_private
,
create_time, update_time, is_deleted
,
like_num)
audio_length, sign_in_date, record_id
,
is_private, create_time, update_time
,
is_deleted,
like_num)
values (#{userId,jdbcType=BIGINT}, #{taskId,jdbcType=BIGINT}, #{title,jdbcType=VARCHAR},
#{content,jdbcType=VARCHAR}, #{image,jdbcType=VARCHAR}, #{audio,jdbcType=VARCHAR},
#{
signInDate,jdbcType=VARCHAR}, #{recordId,jdbcType=BIGINT}, #{isPrivate,jdbcType=BI
T},
#{
createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}, #{isDeleted,jdbcType=BIT
},
#{likeNum,jdbcType=INTEGER})
#{
audioLength,jdbcType=INTEGER}, #{signInDate,jdbcType=VARCHAR}, #{recordId,jdbcType=BIGIN
T},
#{
isPrivate,jdbcType=BIT}, #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP
},
#{
isDeleted,jdbcType=BIT}, #{
likeNum,jdbcType=INTEGER})
</insert>
<insert
id=
"insertSelective"
parameterType=
"com.wwdz.ch.db.domain.qiandao.QdUserSignInNote"
>
<selectKey
keyProperty=
"id"
order=
"AFTER"
resultType=
"java.lang.Long"
>
...
...
@@ -200,6 +201,9 @@
<if
test=
"audio != null"
>
audio,
</if>
<if
test=
"audioLength != null"
>
audio_length,
</if>
<if
test=
"signInDate != null"
>
sign_in_date,
</if>
...
...
@@ -241,6 +245,9 @@
<if
test=
"audio != null"
>
#{audio,jdbcType=VARCHAR},
</if>
<if
test=
"audioLength != null"
>
#{audioLength,jdbcType=INTEGER},
</if>
<if
test=
"signInDate != null"
>
#{signInDate,jdbcType=VARCHAR},
</if>
...
...
@@ -294,6 +301,9 @@
<if
test=
"record.audio != null"
>
audio = #{record.audio,jdbcType=VARCHAR},
</if>
<if
test=
"record.audioLength != null"
>
audio_length = #{record.audioLength,jdbcType=INTEGER},
</if>
<if
test=
"record.signInDate != null"
>
sign_in_date = #{record.signInDate,jdbcType=VARCHAR},
</if>
...
...
@@ -329,6 +339,7 @@
content = #{record.content,jdbcType=VARCHAR},
image = #{record.image,jdbcType=VARCHAR},
audio = #{record.audio,jdbcType=VARCHAR},
audio_length = #{record.audioLength,jdbcType=INTEGER},
sign_in_date = #{record.signInDate,jdbcType=VARCHAR},
record_id = #{record.recordId,jdbcType=BIGINT},
is_private = #{record.isPrivate,jdbcType=BIT},
...
...
@@ -361,6 +372,9 @@
<if
test=
"audio != null"
>
audio = #{audio,jdbcType=VARCHAR},
</if>
<if
test=
"audioLength != null"
>
audio_length = #{audioLength,jdbcType=INTEGER},
</if>
<if
test=
"signInDate != null"
>
sign_in_date = #{signInDate,jdbcType=VARCHAR},
</if>
...
...
@@ -393,6 +407,7 @@
content = #{content,jdbcType=VARCHAR},
image = #{image,jdbcType=VARCHAR},
audio = #{audio,jdbcType=VARCHAR},
audio_length = #{audioLength,jdbcType=INTEGER},
sign_in_date = #{signInDate,jdbcType=VARCHAR},
record_id = #{recordId,jdbcType=BIGINT},
is_private = #{isPrivate,jdbcType=BIT},
...
...
@@ -435,8 +450,8 @@
</foreach>
</when>
<otherwise>
id, user_id, task_id, title, content, image, audio,
sign_in_date, record_id, is_private
,
create_time, update_time, is_deleted, like_num
id, user_id, task_id, title, content, image, audio,
audio_length, sign_in_date, record_id
,
is_private,
create_time, update_time, is_deleted, like_num
</otherwise>
</choose>
from qd_user_sign_in_note
...
...
ch-dao/src/main/resources/generatorConfig_new.xml
View file @
902572ae
...
...
@@ -72,7 +72,7 @@
<javaClientGenerator
type=
"XMLMAPPER"
targetPackage=
"com.wwdz.ch.db.mapper.qiandao"
targetProject=
"ch-dao/src/main/java"
/>
<table
tableName=
"qd_
official_account_subscribe_record
"
enableCountByExample=
"true"
enableUpdateByExample=
"true"
enableDeleteByExample=
"true"
enableSelectByExample=
"true"
selectByExampleQueryId=
"true"
>
<table
tableName=
"qd_
user_sign_in_note
"
enableCountByExample=
"true"
enableUpdateByExample=
"true"
enableDeleteByExample=
"true"
enableSelectByExample=
"true"
selectByExampleQueryId=
"true"
>
<generatedKey
column=
"id"
sqlStatement=
"Mysql"
identity=
"true"
/>
</table>
...
...
ch-wx-api/src/main/java/com/wwdz/ch/wx/entity/vo/qiandao/QdSignInNoteVo.java
View file @
902572ae
...
...
@@ -69,6 +69,11 @@ public class QdSignInNoteVo implements Entity {
*/
private
String
audio
;
/**
* 音频时长
*/
private
Integer
audioLength
;
/**
* 对应签到的日期
*/
...
...
ch-wx-api/src/main/java/com/wwdz/ch/wx/impl/qiandao/QdSignInTaskServiceImpl.java
View file @
902572ae
...
...
@@ -85,7 +85,9 @@ public class QdSignInTaskServiceImpl implements QdSignInTaskService {
public
Result
findList
(
SignInTaskRequestDto
dto
)
{
try
{
List
<
SignInTaskVo
>
signInTaskVoList
=
new
ArrayList
<>();
List
<
SignInTask
>
taskList
=
signInTaskDao
.
findDataByPage
(
dto
);
dto
.
setCreatorId
(
CommConsts
.
SYSTEM_ACCOUNT
.
longValue
());
dto
.
setState
(
SignInTaskEnum
.
StateEnum
.
PROCESSING
.
getCode
());
List
<
SignInTask
>
taskList
=
signInTaskDao
.
findByPage
(
dto
);
PageInfo
pageInfo
=
new
PageInfo
<>(
taskList
);
for
(
SignInTask
task
:
taskList
)
{
SignInTaskVo
signInTaskVo
=
new
SignInTaskVo
();
...
...
ch-wx-api/src/main/java/com/wwdz/ch/wx/impl/qiandao/QdUserSignInNoteServiceImpl.java
View file @
902572ae
...
...
@@ -49,13 +49,13 @@ public class QdUserSignInNoteServiceImpl implements QdUserSignInNoteService {
public
Result
findSignInNoteList
(
QdUserSignInNoteRequestDto
dto
)
{
try
{
Long
userId
=
dto
.
getUserId
();
//查询
多有
动态,查询时剔除指定用户
if
(
dto
.
getOnlySelf
()
==
null
||
!
dto
.
getOnlySelf
())
{
//查询
d多种
动态,查询时剔除指定用户
/*
if (dto.getOnlySelf() == null || !dto.getOnlySelf()) {
dto.setUserId(null);
dto.setIsPrivate(false);
}
}
*/
List
<
QdSignInNoteVo
>
list
=
new
ArrayList
<>();
List
<
QdUserSignInNote
>
qdUserSignInNoteList
=
qdUserSignInNoteDao
.
findByPage
(
dto
);
List
<
QdUserSignInNote
>
qdUserSignInNoteList
=
qdUserSignInNoteDao
.
find
SelfNote
ByPage
(
dto
);
PageInfo
<
QdUserSignInNote
>
pageInfo
=
new
PageInfo
<>(
qdUserSignInNoteList
);
for
(
QdUserSignInNote
qdUserSignInNote
:
qdUserSignInNoteList
)
{
QdSignInNoteVo
qdSignInNoteVo
=
new
QdSignInNoteVo
();
...
...
ch-wx-api/src/main/java/com/wwdz/ch/wx/impl/qiandao/QdUserSignInServiceImpl.java
View file @
902572ae
...
...
@@ -161,6 +161,7 @@ public class QdUserSignInServiceImpl implements QdUserSignInService {
qdUserSignInNote
.
setContent
(
dto
.
getContent
());
qdUserSignInNote
.
setImage
(
String
.
join
(
";"
,
dto
.
getImages
()));
qdUserSignInNote
.
setAudio
(
dto
.
getAudio
());
qdUserSignInNote
.
setAudioLength
(
dto
.
getAudioLength
());
qdUserSignInNote
.
setRecordId
(
recordId
);
qdUserSignInNote
.
setCreateTime
(
now
);
qdUserSignInNote
.
setUpdateTime
(
now
);
...
...
ch-wx-api/src/main/java/com/wwdz/ch/wx/impl/qiandao/QdUserSignInTaskServiceImpl.java
View file @
902572ae
...
...
@@ -13,6 +13,7 @@ import com.wwdz.ch.db.dto.request.qiandao.QdUserSignInRequestDto;
import
com.wwdz.ch.db.dto.request.qiandao.QdUserSignInTaskRequestDto
;
import
com.wwdz.ch.db.dto.request.qiandao.SignInTaskRequestDto
;
import
com.wwdz.ch.wx.entity.vo.qiandao.SignInTaskVo
;
import
com.wwdz.ch.wx.service.qiandao.QdUserSignInService
;
import
com.wwdz.ch.wx.service.qiandao.QdUserSignInTaskService
;
import
com.xxdxxs.utils.EntityMapper
;
import
org.slf4j.Logger
;
...
...
@@ -43,6 +44,9 @@ public class QdUserSignInTaskServiceImpl implements QdUserSignInTaskService {
@Autowired
QdUserSignInNoteDao
qdUserSignInNoteDao
;
@Autowired
QdUserSignInService
qdUserSignInService
;
@Override
public
Result
join
(
QdUserSignInTaskRequestDto
dto
)
{
try
{
...
...
@@ -124,6 +128,15 @@ public class QdUserSignInTaskServiceImpl implements QdUserSignInTaskService {
signInTaskVo
.
setIsSignInAble
(
false
);
}
}
QdUserSignInRequestDto
qdUserSignInRequestDto
=
new
QdUserSignInRequestDto
();
qdUserSignInRequestDto
.
setUserId
(
qdUserSignInTask
.
getUserId
());
qdUserSignInRequestDto
.
setTaskId
(
qdUserSignInTask
.
getTaskId
());
Result
result
=
qdUserSignInService
.
findInfo
(
qdUserSignInRequestDto
);
if
(
result
.
getSuccess
())
{
Map
<
String
,
Object
>
dataMap
=
(
Map
<
String
,
Object
>)
result
.
getData
();
signInTaskVo
.
setConsecutiveDays
((
Integer
)
dataMap
.
get
(
"consecutiveDays"
));
signInTaskVo
.
setTotalDays
((
Long
)
dataMap
.
get
(
"totalDays"
));
}
selfTaskVoList
.
add
(
signInTaskVo
);
}
map
.
put
(
"selfTaskVoList"
,
selfTaskVoList
);
...
...
@@ -159,6 +172,15 @@ public class QdUserSignInTaskServiceImpl implements QdUserSignInTaskService {
if
(
signInTask
.
getEndValidTime
()
!=
null
&&
signInTask
.
getEndValidTime
().
before
(
new
Date
()))
{
signInTaskVo
.
setIsExpire
(
true
);
}
QdUserSignInRequestDto
qdUserSignInRequestDto
=
new
QdUserSignInRequestDto
();
qdUserSignInRequestDto
.
setUserId
(
qdUserSignInTask
.
getUserId
());
qdUserSignInRequestDto
.
setTaskId
(
qdUserSignInTask
.
getTaskId
());
Result
result
=
qdUserSignInService
.
findInfo
(
qdUserSignInRequestDto
);
if
(
result
.
getSuccess
())
{
Map
<
String
,
Object
>
dataMap
=
(
Map
<
String
,
Object
>)
result
.
getData
();
signInTaskVo
.
setConsecutiveDays
((
Integer
)
dataMap
.
get
(
"consecutiveDays"
));
signInTaskVo
.
setTotalDays
((
Long
)
dataMap
.
get
(
"totalDays"
));
}
otherTaskVoList
.
add
(
signInTaskVo
);
}
map
.
put
(
"otherTaskVoList"
,
otherTaskVoList
);
...
...
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