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
9b917a2e
Commit
9b917a2e
authored
Nov 25, 2024
by
shiyu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
查询签到分享信息
parent
2c7799e2
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
1343 additions
and
8 deletions
+1343
-8
ch-dao/src/main/java/com/wwdz/ch/db/dao/SignInShareImageDao.java
...src/main/java/com/wwdz/ch/db/dao/SignInShareImageDao.java
+8
-0
ch-dao/src/main/java/com/wwdz/ch/db/domain/SignInShareImage.java
...src/main/java/com/wwdz/ch/db/domain/SignInShareImage.java
+240
-0
ch-dao/src/main/java/com/wwdz/ch/db/domain/SignInShareImageExample.java
...n/java/com/wwdz/ch/db/domain/SignInShareImageExample.java
+709
-0
ch-dao/src/main/java/com/wwdz/ch/db/impl/SignInShareImageDaoImpl.java
...ain/java/com/wwdz/ch/db/impl/SignInShareImageDaoImpl.java
+22
-0
ch-dao/src/main/java/com/wwdz/ch/db/mapper/SignInShareImageMapper.java
...in/java/com/wwdz/ch/db/mapper/SignInShareImageMapper.java
+69
-0
ch-dao/src/main/resources/com/wwdz/ch/db/mapper/SignInShareImageMapper.xml
...esources/com/wwdz/ch/db/mapper/SignInShareImageMapper.xml
+274
-0
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/impl/UserSigninServiceImpl.java
.../main/java/com/wwdz/ch/wx/impl/UserSigninServiceImpl.java
+20
-7
No files found.
ch-dao/src/main/java/com/wwdz/ch/db/dao/SignInShareImageDao.java
0 → 100644
View file @
9b917a2e
package
com.wwdz.ch.db.dao
;
import
com.wwdz.ch.db.domain.SignInShareImage
;
public
interface
SignInShareImageDao
{
SignInShareImage
findOne
();
}
ch-dao/src/main/java/com/wwdz/ch/db/domain/SignInShareImage.java
0 → 100644
View file @
9b917a2e
package
com.wwdz.ch.db.domain
;
import
java.util.ArrayList
;
import
java.util.Arrays
;
import
java.util.Date
;
import
com.xxdxxs.entity.Entity
;
import
lombok.Data
;
/**
* @author shiyu
* @date 2024/11/25
*/
@Data
public
class
SignInShareImage
implements
Entity
{
private
Integer
id
;
private
String
image
;
private
Date
createTime
;
private
static
final
long
serialVersionUID
=
1L
;
@Override
public
String
toString
()
{
StringBuilder
sb
=
new
StringBuilder
();
sb
.
append
(
getClass
().
getSimpleName
());
sb
.
append
(
" ["
);
sb
.
append
(
"Hash = "
).
append
(
hashCode
());
sb
.
append
(
", id="
).
append
(
id
);
sb
.
append
(
", image="
).
append
(
image
);
sb
.
append
(
", createTime="
).
append
(
createTime
);
sb
.
append
(
", serialVersionUID="
).
append
(
serialVersionUID
);
sb
.
append
(
"]"
);
return
sb
.
toString
();
}
@Override
public
boolean
equals
(
Object
that
)
{
if
(
this
==
that
)
{
return
true
;
}
if
(
that
==
null
)
{
return
false
;
}
if
(
getClass
()
!=
that
.
getClass
())
{
return
false
;
}
SignInShareImage
other
=
(
SignInShareImage
)
that
;
return
(
this
.
getId
()
==
null
?
other
.
getId
()
==
null
:
this
.
getId
().
equals
(
other
.
getId
()))
&&
(
this
.
getImage
()
==
null
?
other
.
getImage
()
==
null
:
this
.
getImage
().
equals
(
other
.
getImage
()))
&&
(
this
.
getCreateTime
()
==
null
?
other
.
getCreateTime
()
==
null
:
this
.
getCreateTime
().
equals
(
other
.
getCreateTime
()));
}
@Override
public
int
hashCode
()
{
final
int
prime
=
31
;
int
result
=
1
;
result
=
prime
*
result
+
((
getId
()
==
null
)
?
0
:
getId
().
hashCode
());
result
=
prime
*
result
+
((
getImage
()
==
null
)
?
0
:
getImage
().
hashCode
());
result
=
prime
*
result
+
((
getCreateTime
()
==
null
)
?
0
:
getCreateTime
().
hashCode
());
return
result
;
}
/**
* This enum was generated by MyBatis Generator.
* This enum corresponds to the database table sign_in_share_image
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
enum
Column
{
id
(
"id"
,
"id"
,
"INTEGER"
,
false
),
image
(
"image"
,
"image"
,
"VARCHAR"
,
false
),
createTime
(
"create_time"
,
"createTime"
,
"TIMESTAMP"
,
false
);
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table sign_in_share_image
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
private
static
final
String
BEGINNING_DELIMITER
=
"`"
;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table sign_in_share_image
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
private
static
final
String
ENDING_DELIMITER
=
"`"
;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table sign_in_share_image
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
private
final
String
column
;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table sign_in_share_image
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
private
final
boolean
isColumnNameDelimited
;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table sign_in_share_image
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
private
final
String
javaProperty
;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table sign_in_share_image
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
private
final
String
jdbcType
;
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table sign_in_share_image
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
String
value
()
{
return
this
.
column
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table sign_in_share_image
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
String
getValue
()
{
return
this
.
column
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table sign_in_share_image
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
String
getJavaProperty
()
{
return
this
.
javaProperty
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table sign_in_share_image
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
String
getJdbcType
()
{
return
this
.
jdbcType
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table sign_in_share_image
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
Column
(
String
column
,
String
javaProperty
,
String
jdbcType
,
boolean
isColumnNameDelimited
)
{
this
.
column
=
column
;
this
.
javaProperty
=
javaProperty
;
this
.
jdbcType
=
jdbcType
;
this
.
isColumnNameDelimited
=
isColumnNameDelimited
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table sign_in_share_image
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
String
desc
()
{
return
this
.
getEscapedColumnName
()
+
" DESC"
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table sign_in_share_image
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
String
asc
()
{
return
this
.
getEscapedColumnName
()
+
" ASC"
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table sign_in_share_image
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
static
Column
[]
excludes
(
Column
...
excludes
)
{
ArrayList
<
Column
>
columns
=
new
ArrayList
<>(
Arrays
.
asList
(
Column
.
values
()));
if
(
excludes
!=
null
&&
excludes
.
length
>
0
)
{
columns
.
removeAll
(
new
ArrayList
<>(
Arrays
.
asList
(
excludes
)));
}
return
columns
.
toArray
(
new
Column
[]{});
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table sign_in_share_image
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
String
getEscapedColumnName
()
{
if
(
this
.
isColumnNameDelimited
)
{
return
new
StringBuilder
().
append
(
BEGINNING_DELIMITER
).
append
(
this
.
column
).
append
(
ENDING_DELIMITER
).
toString
();
}
else
{
return
this
.
column
;
}
}
}
}
\ No newline at end of file
ch-dao/src/main/java/com/wwdz/ch/db/domain/SignInShareImageExample.java
0 → 100644
View file @
9b917a2e
package
com.wwdz.ch.db.domain
;
import
java.util.ArrayList
;
import
java.util.Date
;
import
java.util.List
;
public
class
SignInShareImageExample
{
protected
String
orderByClause
;
protected
boolean
distinct
;
protected
List
<
Criteria
>
oredCriteria
;
public
SignInShareImageExample
()
{
oredCriteria
=
new
ArrayList
<
Criteria
>();
}
public
void
setOrderByClause
(
String
orderByClause
)
{
this
.
orderByClause
=
orderByClause
;
}
public
String
getOrderByClause
()
{
return
orderByClause
;
}
public
void
setDistinct
(
boolean
distinct
)
{
this
.
distinct
=
distinct
;
}
public
boolean
isDistinct
()
{
return
distinct
;
}
public
List
<
Criteria
>
getOredCriteria
()
{
return
oredCriteria
;
}
public
void
or
(
Criteria
criteria
)
{
oredCriteria
.
add
(
criteria
);
}
public
Criteria
or
()
{
Criteria
criteria
=
createCriteriaInternal
();
oredCriteria
.
add
(
criteria
);
return
criteria
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table sign_in_share_image
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
SignInShareImageExample
orderBy
(
String
orderByClause
)
{
this
.
setOrderByClause
(
orderByClause
);
return
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table sign_in_share_image
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
SignInShareImageExample
orderBy
(
String
...
orderByClauses
)
{
StringBuffer
sb
=
new
StringBuffer
();
for
(
int
i
=
0
;
i
<
orderByClauses
.
length
;
i
++)
{
sb
.
append
(
orderByClauses
[
i
]);
if
(
i
<
orderByClauses
.
length
-
1
)
{
sb
.
append
(
" , "
);
}
}
this
.
setOrderByClause
(
sb
.
toString
());
return
this
;
}
public
Criteria
createCriteria
()
{
Criteria
criteria
=
createCriteriaInternal
();
if
(
oredCriteria
.
size
()
==
0
)
{
oredCriteria
.
add
(
criteria
);
}
return
criteria
;
}
protected
Criteria
createCriteriaInternal
()
{
Criteria
criteria
=
new
Criteria
(
this
);
return
criteria
;
}
public
void
clear
()
{
oredCriteria
.
clear
();
orderByClause
=
null
;
distinct
=
false
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table sign_in_share_image
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
static
Criteria
newAndCreateCriteria
()
{
SignInShareImageExample
example
=
new
SignInShareImageExample
();
return
example
.
createCriteria
();
}
protected
abstract
static
class
GeneratedCriteria
{
protected
List
<
Criterion
>
criteria
;
protected
GeneratedCriteria
()
{
super
();
criteria
=
new
ArrayList
<
Criterion
>();
}
public
boolean
isValid
()
{
return
criteria
.
size
()
>
0
;
}
public
List
<
Criterion
>
getAllCriteria
()
{
return
criteria
;
}
public
List
<
Criterion
>
getCriteria
()
{
return
criteria
;
}
protected
void
addCriterion
(
String
condition
)
{
if
(
condition
==
null
)
{
throw
new
RuntimeException
(
"Value for condition cannot be null"
);
}
criteria
.
add
(
new
Criterion
(
condition
));
}
protected
void
addCriterion
(
String
condition
,
Object
value
,
String
property
)
{
if
(
value
==
null
)
{
throw
new
RuntimeException
(
"Value for "
+
property
+
" cannot be null"
);
}
criteria
.
add
(
new
Criterion
(
condition
,
value
));
}
protected
void
addCriterion
(
String
condition
,
Object
value1
,
Object
value2
,
String
property
)
{
if
(
value1
==
null
||
value2
==
null
)
{
throw
new
RuntimeException
(
"Between values for "
+
property
+
" cannot be null"
);
}
criteria
.
add
(
new
Criterion
(
condition
,
value1
,
value2
));
}
public
Criteria
andIdIsNull
()
{
addCriterion
(
"id is null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIdIsNotNull
()
{
addCriterion
(
"id is not null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIdEqualTo
(
Integer
value
)
{
addCriterion
(
"id ="
,
value
,
"id"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table sign_in_share_image
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andIdEqualToColumn
(
SignInShareImage
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"id = "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andIdNotEqualTo
(
Integer
value
)
{
addCriterion
(
"id <>"
,
value
,
"id"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table sign_in_share_image
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andIdNotEqualToColumn
(
SignInShareImage
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"id <> "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andIdGreaterThan
(
Integer
value
)
{
addCriterion
(
"id >"
,
value
,
"id"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table sign_in_share_image
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andIdGreaterThanColumn
(
SignInShareImage
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"id > "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andIdGreaterThanOrEqualTo
(
Integer
value
)
{
addCriterion
(
"id >="
,
value
,
"id"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table sign_in_share_image
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andIdGreaterThanOrEqualToColumn
(
SignInShareImage
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"id >= "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andIdLessThan
(
Integer
value
)
{
addCriterion
(
"id <"
,
value
,
"id"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table sign_in_share_image
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andIdLessThanColumn
(
SignInShareImage
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"id < "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andIdLessThanOrEqualTo
(
Integer
value
)
{
addCriterion
(
"id <="
,
value
,
"id"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table sign_in_share_image
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andIdLessThanOrEqualToColumn
(
SignInShareImage
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"id <= "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andIdIn
(
List
<
Integer
>
values
)
{
addCriterion
(
"id in"
,
values
,
"id"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIdNotIn
(
List
<
Integer
>
values
)
{
addCriterion
(
"id not in"
,
values
,
"id"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIdBetween
(
Integer
value1
,
Integer
value2
)
{
addCriterion
(
"id between"
,
value1
,
value2
,
"id"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIdNotBetween
(
Integer
value1
,
Integer
value2
)
{
addCriterion
(
"id not between"
,
value1
,
value2
,
"id"
);
return
(
Criteria
)
this
;
}
public
Criteria
andImageIsNull
()
{
addCriterion
(
"image is null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andImageIsNotNull
()
{
addCriterion
(
"image is not null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andImageEqualTo
(
String
value
)
{
addCriterion
(
"image ="
,
value
,
"image"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table sign_in_share_image
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andImageEqualToColumn
(
SignInShareImage
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"image = "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andImageNotEqualTo
(
String
value
)
{
addCriterion
(
"image <>"
,
value
,
"image"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table sign_in_share_image
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andImageNotEqualToColumn
(
SignInShareImage
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"image <> "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andImageGreaterThan
(
String
value
)
{
addCriterion
(
"image >"
,
value
,
"image"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table sign_in_share_image
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andImageGreaterThanColumn
(
SignInShareImage
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"image > "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andImageGreaterThanOrEqualTo
(
String
value
)
{
addCriterion
(
"image >="
,
value
,
"image"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table sign_in_share_image
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andImageGreaterThanOrEqualToColumn
(
SignInShareImage
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"image >= "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andImageLessThan
(
String
value
)
{
addCriterion
(
"image <"
,
value
,
"image"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table sign_in_share_image
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andImageLessThanColumn
(
SignInShareImage
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"image < "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andImageLessThanOrEqualTo
(
String
value
)
{
addCriterion
(
"image <="
,
value
,
"image"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table sign_in_share_image
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andImageLessThanOrEqualToColumn
(
SignInShareImage
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"image <= "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andImageLike
(
String
value
)
{
addCriterion
(
"image like"
,
value
,
"image"
);
return
(
Criteria
)
this
;
}
public
Criteria
andImageNotLike
(
String
value
)
{
addCriterion
(
"image not like"
,
value
,
"image"
);
return
(
Criteria
)
this
;
}
public
Criteria
andImageIn
(
List
<
String
>
values
)
{
addCriterion
(
"image in"
,
values
,
"image"
);
return
(
Criteria
)
this
;
}
public
Criteria
andImageNotIn
(
List
<
String
>
values
)
{
addCriterion
(
"image not in"
,
values
,
"image"
);
return
(
Criteria
)
this
;
}
public
Criteria
andImageBetween
(
String
value1
,
String
value2
)
{
addCriterion
(
"image between"
,
value1
,
value2
,
"image"
);
return
(
Criteria
)
this
;
}
public
Criteria
andImageNotBetween
(
String
value1
,
String
value2
)
{
addCriterion
(
"image not between"
,
value1
,
value2
,
"image"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCreateTimeIsNull
()
{
addCriterion
(
"create_time is null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCreateTimeIsNotNull
()
{
addCriterion
(
"create_time is not null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCreateTimeEqualTo
(
Date
value
)
{
addCriterion
(
"create_time ="
,
value
,
"createTime"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table sign_in_share_image
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andCreateTimeEqualToColumn
(
SignInShareImage
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"create_time = "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andCreateTimeNotEqualTo
(
Date
value
)
{
addCriterion
(
"create_time <>"
,
value
,
"createTime"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table sign_in_share_image
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andCreateTimeNotEqualToColumn
(
SignInShareImage
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"create_time <> "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andCreateTimeGreaterThan
(
Date
value
)
{
addCriterion
(
"create_time >"
,
value
,
"createTime"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table sign_in_share_image
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andCreateTimeGreaterThanColumn
(
SignInShareImage
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"create_time > "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andCreateTimeGreaterThanOrEqualTo
(
Date
value
)
{
addCriterion
(
"create_time >="
,
value
,
"createTime"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table sign_in_share_image
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andCreateTimeGreaterThanOrEqualToColumn
(
SignInShareImage
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"create_time >= "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andCreateTimeLessThan
(
Date
value
)
{
addCriterion
(
"create_time <"
,
value
,
"createTime"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table sign_in_share_image
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andCreateTimeLessThanColumn
(
SignInShareImage
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"create_time < "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andCreateTimeLessThanOrEqualTo
(
Date
value
)
{
addCriterion
(
"create_time <="
,
value
,
"createTime"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table sign_in_share_image
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andCreateTimeLessThanOrEqualToColumn
(
SignInShareImage
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"create_time <= "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andCreateTimeIn
(
List
<
Date
>
values
)
{
addCriterion
(
"create_time in"
,
values
,
"createTime"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCreateTimeNotIn
(
List
<
Date
>
values
)
{
addCriterion
(
"create_time not in"
,
values
,
"createTime"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCreateTimeBetween
(
Date
value1
,
Date
value2
)
{
addCriterion
(
"create_time between"
,
value1
,
value2
,
"createTime"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCreateTimeNotBetween
(
Date
value1
,
Date
value2
)
{
addCriterion
(
"create_time not between"
,
value1
,
value2
,
"createTime"
);
return
(
Criteria
)
this
;
}
}
public
static
class
Criteria
extends
GeneratedCriteria
{
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table sign_in_share_image
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
private
SignInShareImageExample
example
;
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table sign_in_share_image
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
protected
Criteria
(
SignInShareImageExample
example
)
{
super
();
this
.
example
=
example
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table sign_in_share_image
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
SignInShareImageExample
example
()
{
return
this
.
example
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table sign_in_share_image
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andIf
(
boolean
ifAdd
,
ICriteriaAdd
add
)
{
if
(
ifAdd
)
{
add
.
add
(
this
);
}
return
this
;
}
/**
* This interface was generated by MyBatis Generator.
* This interface corresponds to the database table sign_in_share_image
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
interface
ICriteriaAdd
{
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table sign_in_share_image
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
Criteria
add
(
Criteria
add
);
}
}
public
static
class
Criterion
{
private
String
condition
;
private
Object
value
;
private
Object
secondValue
;
private
boolean
noValue
;
private
boolean
singleValue
;
private
boolean
betweenValue
;
private
boolean
listValue
;
private
String
typeHandler
;
public
String
getCondition
()
{
return
condition
;
}
public
Object
getValue
()
{
return
value
;
}
public
Object
getSecondValue
()
{
return
secondValue
;
}
public
boolean
isNoValue
()
{
return
noValue
;
}
public
boolean
isSingleValue
()
{
return
singleValue
;
}
public
boolean
isBetweenValue
()
{
return
betweenValue
;
}
public
boolean
isListValue
()
{
return
listValue
;
}
public
String
getTypeHandler
()
{
return
typeHandler
;
}
protected
Criterion
(
String
condition
)
{
super
();
this
.
condition
=
condition
;
this
.
typeHandler
=
null
;
this
.
noValue
=
true
;
}
protected
Criterion
(
String
condition
,
Object
value
,
String
typeHandler
)
{
super
();
this
.
condition
=
condition
;
this
.
value
=
value
;
this
.
typeHandler
=
typeHandler
;
if
(
value
instanceof
List
<?>)
{
this
.
listValue
=
true
;
}
else
{
this
.
singleValue
=
true
;
}
}
protected
Criterion
(
String
condition
,
Object
value
)
{
this
(
condition
,
value
,
null
);
}
protected
Criterion
(
String
condition
,
Object
value
,
Object
secondValue
,
String
typeHandler
)
{
super
();
this
.
condition
=
condition
;
this
.
value
=
value
;
this
.
secondValue
=
secondValue
;
this
.
typeHandler
=
typeHandler
;
this
.
betweenValue
=
true
;
}
protected
Criterion
(
String
condition
,
Object
value
,
Object
secondValue
)
{
this
(
condition
,
value
,
secondValue
,
null
);
}
}
}
\ No newline at end of file
ch-dao/src/main/java/com/wwdz/ch/db/impl/SignInShareImageDaoImpl.java
0 → 100644
View file @
9b917a2e
package
com.wwdz.ch.db.impl
;
import
com.wwdz.ch.db.dao.SignInShareImageDao
;
import
com.wwdz.ch.db.domain.SignInShareImage
;
import
com.wwdz.ch.db.domain.SignInShareImageExample
;
import
com.wwdz.ch.db.mapper.SignInShareImageMapper
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Repository
;
@Repository
public
class
SignInShareImageDaoImpl
implements
SignInShareImageDao
{
@Autowired
SignInShareImageMapper
signInShareImageMapper
;
@Override
public
SignInShareImage
findOne
()
{
SignInShareImageExample
example
=
new
SignInShareImageExample
();
example
.
setOrderByClause
(
" rand()"
);
return
signInShareImageMapper
.
selectOneByExample
(
example
);
}
}
ch-dao/src/main/java/com/wwdz/ch/db/mapper/SignInShareImageMapper.java
0 → 100644
View file @
9b917a2e
package
com.wwdz.ch.db.mapper
;
import
com.wwdz.ch.db.domain.SignInShareImage
;
import
com.wwdz.ch.db.domain.SignInShareImageExample
;
import
java.util.List
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Param
;
@Mapper
public
interface
SignInShareImageMapper
{
long
countByExample
(
SignInShareImageExample
example
);
int
deleteByExample
(
SignInShareImageExample
example
);
int
deleteByPrimaryKey
(
Integer
id
);
int
insert
(
SignInShareImage
record
);
int
insertSelective
(
SignInShareImage
record
);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table sign_in_share_image
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
SignInShareImage
selectOneByExample
(
SignInShareImageExample
example
);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table sign_in_share_image
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
SignInShareImage
selectOneByExampleSelective
(
@Param
(
"example"
)
SignInShareImageExample
example
,
@Param
(
"selective"
)
SignInShareImage
.
Column
...
selective
);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table sign_in_share_image
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
List
<
SignInShareImage
>
selectByExampleSelective
(
@Param
(
"example"
)
SignInShareImageExample
example
,
@Param
(
"selective"
)
SignInShareImage
.
Column
...
selective
);
List
<
SignInShareImage
>
selectByExample
(
SignInShareImageExample
example
);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table sign_in_share_image
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
SignInShareImage
selectByPrimaryKeySelective
(
@Param
(
"id"
)
Integer
id
,
@Param
(
"selective"
)
SignInShareImage
.
Column
...
selective
);
SignInShareImage
selectByPrimaryKey
(
Integer
id
);
int
updateByExampleSelective
(
@Param
(
"record"
)
SignInShareImage
record
,
@Param
(
"example"
)
SignInShareImageExample
example
);
int
updateByExample
(
@Param
(
"record"
)
SignInShareImage
record
,
@Param
(
"example"
)
SignInShareImageExample
example
);
int
updateByPrimaryKeySelective
(
SignInShareImage
record
);
int
updateByPrimaryKey
(
SignInShareImage
record
);
}
\ No newline at end of file
ch-dao/src/main/resources/com/wwdz/ch/db/mapper/SignInShareImageMapper.xml
0 → 100644
View file @
9b917a2e
<?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.wwdz.ch.db.mapper.SignInShareImageMapper"
>
<resultMap
id=
"BaseResultMap"
type=
"com.wwdz.ch.db.domain.SignInShareImage"
>
<id
column=
"id"
jdbcType=
"INTEGER"
property=
"id"
/>
<result
column=
"image"
jdbcType=
"VARCHAR"
property=
"image"
/>
<result
column=
"create_time"
jdbcType=
"TIMESTAMP"
property=
"createTime"
/>
</resultMap>
<sql
id=
"Example_Where_Clause"
>
<where>
<foreach
collection=
"oredCriteria"
item=
"criteria"
separator=
"or"
>
<if
test=
"criteria.valid"
>
<trim
prefix=
"("
prefixOverrides=
"and"
suffix=
")"
>
<foreach
collection=
"criteria.criteria"
item=
"criterion"
>
<choose>
<when
test=
"criterion.noValue"
>
and ${criterion.condition}
</when>
<when
test=
"criterion.singleValue"
>
and ${criterion.condition} #{criterion.value}
</when>
<when
test=
"criterion.betweenValue"
>
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when
test=
"criterion.listValue"
>
and ${criterion.condition}
<foreach
close=
")"
collection=
"criterion.value"
item=
"listItem"
open=
"("
separator=
","
>
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql
id=
"Update_By_Example_Where_Clause"
>
<where>
<foreach
collection=
"example.oredCriteria"
item=
"criteria"
separator=
"or"
>
<if
test=
"criteria.valid"
>
<trim
prefix=
"("
prefixOverrides=
"and"
suffix=
")"
>
<foreach
collection=
"criteria.criteria"
item=
"criterion"
>
<choose>
<when
test=
"criterion.noValue"
>
and ${criterion.condition}
</when>
<when
test=
"criterion.singleValue"
>
and ${criterion.condition} #{criterion.value}
</when>
<when
test=
"criterion.betweenValue"
>
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when
test=
"criterion.listValue"
>
and ${criterion.condition}
<foreach
close=
")"
collection=
"criterion.value"
item=
"listItem"
open=
"("
separator=
","
>
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql
id=
"Base_Column_List"
>
id, image, create_time
</sql>
<select
id=
"selectByExample"
parameterType=
"com.wwdz.ch.db.domain.SignInShareImageExample"
resultMap=
"BaseResultMap"
>
select
<if
test=
"distinct"
>
distinct
</if>
'true' as QUERYID,
<include
refid=
"Base_Column_List"
/>
from sign_in_share_image
<if
test=
"_parameter != null"
>
<include
refid=
"Example_Where_Clause"
/>
</if>
<if
test=
"orderByClause != null"
>
order by ${orderByClause}
</if>
</select>
<select
id=
"selectByExampleSelective"
parameterType=
"map"
resultMap=
"BaseResultMap"
>
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
@project https://github.com/itfsw/mybatis-generator-plugin
-->
select
'true' as QUERYID,
<if
test=
"example.distinct"
>
distinct
</if>
<choose>
<when
test=
"selective != null and selective.length > 0"
>
<foreach
collection=
"selective"
item=
"column"
separator=
","
>
${column.escapedColumnName}
</foreach>
</when>
<otherwise>
id, image, create_time
</otherwise>
</choose>
from sign_in_share_image
<if
test=
"_parameter != null"
>
<include
refid=
"Update_By_Example_Where_Clause"
/>
</if>
<if
test=
"example.orderByClause != null"
>
order by ${example.orderByClause}
</if>
</select>
<select
id=
"selectByPrimaryKey"
parameterType=
"java.lang.Integer"
resultMap=
"BaseResultMap"
>
select
<include
refid=
"Base_Column_List"
/>
from sign_in_share_image
where id = #{id,jdbcType=INTEGER}
</select>
<select
id=
"selectByPrimaryKeySelective"
parameterType=
"map"
resultMap=
"BaseResultMap"
>
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
@project https://github.com/itfsw/mybatis-generator-plugin
-->
select
<choose>
<when
test=
"selective != null and selective.length > 0"
>
<foreach
collection=
"selective"
item=
"column"
separator=
","
>
${column.escapedColumnName}
</foreach>
</when>
<otherwise>
id, image, create_time
</otherwise>
</choose>
from sign_in_share_image
where id = #{id,jdbcType=INTEGER}
</select>
<delete
id=
"deleteByPrimaryKey"
parameterType=
"java.lang.Integer"
>
delete from sign_in_share_image
where id = #{id,jdbcType=INTEGER}
</delete>
<delete
id=
"deleteByExample"
parameterType=
"com.wwdz.ch.db.domain.SignInShareImageExample"
>
delete from sign_in_share_image
<if
test=
"_parameter != null"
>
<include
refid=
"Example_Where_Clause"
/>
</if>
</delete>
<insert
id=
"insert"
parameterType=
"com.wwdz.ch.db.domain.SignInShareImage"
>
<selectKey
keyProperty=
"id"
order=
"AFTER"
resultType=
"java.lang.Integer"
>
SELECT LAST_INSERT_ID()
</selectKey>
insert into sign_in_share_image (image, create_time)
values (#{image,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP})
</insert>
<insert
id=
"insertSelective"
parameterType=
"com.wwdz.ch.db.domain.SignInShareImage"
>
<selectKey
keyProperty=
"id"
order=
"AFTER"
resultType=
"java.lang.Integer"
>
SELECT LAST_INSERT_ID()
</selectKey>
insert into sign_in_share_image
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"image != null"
>
image,
</if>
<if
test=
"createTime != null"
>
create_time,
</if>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"image != null"
>
#{image,jdbcType=VARCHAR},
</if>
<if
test=
"createTime != null"
>
#{createTime,jdbcType=TIMESTAMP},
</if>
</trim>
</insert>
<select
id=
"countByExample"
parameterType=
"com.wwdz.ch.db.domain.SignInShareImageExample"
resultType=
"java.lang.Long"
>
select count(*) from sign_in_share_image
<if
test=
"_parameter != null"
>
<include
refid=
"Example_Where_Clause"
/>
</if>
</select>
<update
id=
"updateByExampleSelective"
parameterType=
"map"
>
update sign_in_share_image
<set>
<if
test=
"record.id != null"
>
id = #{record.id,jdbcType=INTEGER},
</if>
<if
test=
"record.image != null"
>
image = #{record.image,jdbcType=VARCHAR},
</if>
<if
test=
"record.createTime != null"
>
create_time = #{record.createTime,jdbcType=TIMESTAMP},
</if>
</set>
<if
test=
"_parameter != null"
>
<include
refid=
"Update_By_Example_Where_Clause"
/>
</if>
</update>
<update
id=
"updateByExample"
parameterType=
"map"
>
update sign_in_share_image
set id = #{record.id,jdbcType=INTEGER},
image = #{record.image,jdbcType=VARCHAR},
create_time = #{record.createTime,jdbcType=TIMESTAMP}
<if
test=
"_parameter != null"
>
<include
refid=
"Update_By_Example_Where_Clause"
/>
</if>
</update>
<update
id=
"updateByPrimaryKeySelective"
parameterType=
"com.wwdz.ch.db.domain.SignInShareImage"
>
update sign_in_share_image
<set>
<if
test=
"image != null"
>
image = #{image,jdbcType=VARCHAR},
</if>
<if
test=
"createTime != null"
>
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
</set>
where id = #{id,jdbcType=INTEGER}
</update>
<update
id=
"updateByPrimaryKey"
parameterType=
"com.wwdz.ch.db.domain.SignInShareImage"
>
update sign_in_share_image
set image = #{image,jdbcType=VARCHAR},
create_time = #{createTime,jdbcType=TIMESTAMP}
where id = #{id,jdbcType=INTEGER}
</update>
<select
id=
"selectOneByExample"
parameterType=
"com.wwdz.ch.db.domain.SignInShareImageExample"
resultMap=
"BaseResultMap"
>
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
@project https://github.com/itfsw/mybatis-generator-plugin
-->
select
'true' as QUERYID,
<include
refid=
"Base_Column_List"
/>
from sign_in_share_image
<if
test=
"_parameter != null"
>
<include
refid=
"Example_Where_Clause"
/>
</if>
<if
test=
"orderByClause != null"
>
order by ${orderByClause}
</if>
limit 1
</select>
<select
id=
"selectOneByExampleSelective"
parameterType=
"map"
resultMap=
"BaseResultMap"
>
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
@project https://github.com/itfsw/mybatis-generator-plugin
-->
select
'true' as QUERYID,
<choose>
<when
test=
"selective != null and selective.length > 0"
>
<foreach
collection=
"selective"
item=
"column"
separator=
","
>
${column.escapedColumnName}
</foreach>
</when>
<otherwise>
id, image, create_time
</otherwise>
</choose>
from sign_in_share_image
<if
test=
"_parameter != null"
>
<include
refid=
"Update_By_Example_Where_Clause"
/>
</if>
<if
test=
"example.orderByClause != null"
>
order by ${example.orderByClause}
</if>
limit 1
</select>
</mapper>
\ No newline at end of file
ch-dao/src/main/resources/generatorConfig_new.xml
View file @
9b917a2e
...
...
@@ -72,7 +72,7 @@
<javaClientGenerator
type=
"XMLMAPPER"
targetPackage=
"com.wwdz.ch.db.mapper"
targetProject=
"ch-dao/src/main/java"
/>
<table
tableName=
"
user_sign_in
"
enableCountByExample=
"true"
enableUpdateByExample=
"true"
enableDeleteByExample=
"true"
enableSelectByExample=
"true"
selectByExampleQueryId=
"true"
>
<table
tableName=
"
sign_in_share_image
"
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/impl/UserSigninServiceImpl.java
View file @
9b917a2e
...
...
@@ -6,12 +6,11 @@ import com.wwdz.ch.core.consts.DistributionEnum;
import
com.wwdz.ch.core.consts.SigninEnum
;
import
com.wwdz.ch.core.entity.SignDateRecord
;
import
com.wwdz.ch.core.type.Result
;
import
com.wwdz.ch.core.util.CacheUtil
;
import
com.wwdz.ch.core.util.DateTimeUtil
;
import
com.wwdz.ch.core.util.IdUtils
;
import
com.wwdz.ch.core.util.OkHttpUtil
;
import
com.wwdz.ch.core.util.*
;
import
com.wwdz.ch.db.dao.SignInShareImageDao
;
import
com.wwdz.ch.db.dao.UserSignInDao
;
import
com.wwdz.ch.db.dao.distribution.DistributionOrderDao
;
import
com.wwdz.ch.db.domain.SignInShareImage
;
import
com.wwdz.ch.db.domain.User
;
import
com.wwdz.ch.db.domain.UserSignIn
;
import
com.wwdz.ch.db.domain.distribution.DistributionOrder
;
...
...
@@ -50,6 +49,12 @@ public class UserSigninServiceImpl implements UserSigninService {
@Autowired
CacheUtil
cacheUtil
;
@Autowired
SignInShareImageDao
signInShareImageDao
;
@Autowired
RedisUtils
redisUtils
;
@Override
public
Result
signIn
(
UserSignInRequestDto
dto
)
{
try
{
...
...
@@ -320,19 +325,27 @@ public class UserSigninServiceImpl implements UserSigninService {
@Override
public
Result
getShareInfo
(
UserSignInRequestDto
dto
)
{
try
{
LocalDate
today
=
LocalDate
.
now
();
DateTimeFormatter
formatter
=
DateTimeFormatter
.
ofPattern
(
"yyyy/MM/dd"
);
String
formattedDate
=
today
.
format
(
formatter
);
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
String
url
=
"https://quanku.wanwudezhi.com/daily_data"
;
OkHttpUtil
okHttpUtil
=
OkHttpUtil
.
builder
().
url
(
url
);
String
responseStr
=
okHttpUtil
.
get
().
sync
();
map
.
put
(
"info"
,
JsonUtils
.
toMap
(
responseStr
));
String
backgroundImage
=
"https://cdn.wanwudezhi.com/static/web-static/image/a193ed538686e6921cd3d611569043f5_1974x2964.jpeg"
;
if
(
Objects
.
isNull
(
redisUtils
.
get
(
formattedDate
)))
{
SignInShareImage
signInShareImage
=
signInShareImageDao
.
findOne
();
backgroundImage
=
signInShareImage
.
getImage
();
redisUtils
.
set
(
formattedDate
,
backgroundImage
,
60
*
60
*
24
);
}
else
{
backgroundImage
=
redisUtils
.
get
(
formattedDate
).
toString
();
}
map
.
put
(
"backgroundImage"
,
backgroundImage
);
User
user
=
cacheUtil
.
getAppletUserById
(
dto
.
getUserId
());
map
.
put
(
"userName"
,
user
.
getNickname
());
map
.
put
(
"avatar"
,
user
.
getAvatar
());
LocalDate
today
=
LocalDate
.
now
();
DateTimeFormatter
formatter
=
DateTimeFormatter
.
ofPattern
(
"yyyy/MM/dd"
);
String
formattedDate
=
today
.
format
(
formatter
);
map
.
put
(
"date"
,
formattedDate
);
DayOfWeek
dayOfWeek
=
today
.
getDayOfWeek
();
String
weekDay
=
dayOfWeek
.
getDisplayName
(
java
.
time
.
format
.
TextStyle
.
FULL
,
java
.
util
.
Locale
.
CHINESE
);
...
...
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