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
ff17aa7f
Commit
ff17aa7f
authored
Jun 24, 2024
by
shiyu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
小程序首页展示预览中专场
parent
27467570
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
15 additions
and
8 deletions
+15
-8
ch-dao/src/main/java/com/wwdz/ch/db/dao/distribution/SpecialPerformanceDao.java
...om/wwdz/ch/db/dao/distribution/SpecialPerformanceDao.java
+1
-1
ch-dao/src/main/java/com/wwdz/ch/db/dto/request/distribution/SpecialPerformanceRequestDto.java
...to/request/distribution/SpecialPerformanceRequestDto.java
+3
-0
ch-dao/src/main/java/com/wwdz/ch/db/impl/distribution/SpecialPerformanceDaoImpl.java
...dz/ch/db/impl/distribution/SpecialPerformanceDaoImpl.java
+3
-3
ch-wx-api/src/main/java/com/wwdz/ch/wx/impl/distribution/SpecialPerformanceServiceImpl.java
...h/wx/impl/distribution/SpecialPerformanceServiceImpl.java
+6
-2
ch-wx-api/src/main/java/com/wwdz/ch/wx/job/SpecialPerformanceNoticeJob.java
.../java/com/wwdz/ch/wx/job/SpecialPerformanceNoticeJob.java
+2
-2
No files found.
ch-dao/src/main/java/com/wwdz/ch/db/dao/distribution/SpecialPerformanceDao.java
View file @
ff17aa7f
...
@@ -9,7 +9,7 @@ public interface SpecialPerformanceDao {
...
@@ -9,7 +9,7 @@ public interface SpecialPerformanceDao {
List
<
SpecialPerformance
>
find
(
SpecialPerformanceRequestDto
dto
);
List
<
SpecialPerformance
>
find
(
SpecialPerformanceRequestDto
dto
);
SpecialPerformance
findByType
(
int
type
);
SpecialPerformance
findByType
(
SpecialPerformanceRequestDto
dto
);
SpecialPerformance
findById
(
int
id
);
SpecialPerformance
findById
(
int
id
);
...
...
ch-dao/src/main/java/com/wwdz/ch/db/dto/request/distribution/SpecialPerformanceRequestDto.java
View file @
ff17aa7f
...
@@ -5,6 +5,7 @@ import com.xxdxxs.entity.Entity;
...
@@ -5,6 +5,7 @@ import com.xxdxxs.entity.Entity;
import
lombok.Data
;
import
lombok.Data
;
import
java.util.Date
;
import
java.util.Date
;
import
java.util.List
;
@Data
@Data
public
class
SpecialPerformanceRequestDto
extends
BaseRequestDto
implements
Entity
{
public
class
SpecialPerformanceRequestDto
extends
BaseRequestDto
implements
Entity
{
...
@@ -57,6 +58,8 @@ public class SpecialPerformanceRequestDto extends BaseRequestDto implements Enti
...
@@ -57,6 +58,8 @@ public class SpecialPerformanceRequestDto extends BaseRequestDto implements Enti
*/
*/
private
Integer
state
;
private
Integer
state
;
private
List
<
Integer
>
stateList
;
/**
/**
* 排除的状态
* 排除的状态
*/
*/
...
...
ch-dao/src/main/java/com/wwdz/ch/db/impl/distribution/SpecialPerformanceDaoImpl.java
View file @
ff17aa7f
...
@@ -35,11 +35,11 @@ public class SpecialPerformanceDaoImpl implements SpecialPerformanceDao {
...
@@ -35,11 +35,11 @@ public class SpecialPerformanceDaoImpl implements SpecialPerformanceDao {
}
}
@Override
@Override
public
SpecialPerformance
findByType
(
int
type
)
{
public
SpecialPerformance
findByType
(
SpecialPerformanceRequestDto
dto
)
{
SpecialPerformanceExample
example
=
new
SpecialPerformanceExample
();
SpecialPerformanceExample
example
=
new
SpecialPerformanceExample
();
SpecialPerformanceExample
.
Criteria
criteria
=
example
.
createCriteria
();
SpecialPerformanceExample
.
Criteria
criteria
=
example
.
createCriteria
();
criteria
.
andTypeEqualTo
(
type
);
criteria
.
andTypeEqualTo
(
dto
.
getType
()
);
criteria
.
andStateEqualTo
(
2
);
JdbcHelper
.
ifPresent
(
dto
.
getStateList
(),
criteria:
:
andStateIn
);
return
specialPerformanceMapper
.
selectOneByExample
(
example
);
return
specialPerformanceMapper
.
selectOneByExample
(
example
);
}
}
...
...
ch-wx-api/src/main/java/com/wwdz/ch/wx/impl/distribution/SpecialPerformanceServiceImpl.java
View file @
ff17aa7f
...
@@ -94,7 +94,8 @@ public class SpecialPerformanceServiceImpl implements SpecialPerformanceService
...
@@ -94,7 +94,8 @@ public class SpecialPerformanceServiceImpl implements SpecialPerformanceService
}
}
SpecialPerformanceVo
specialPerformanceVo
=
new
SpecialPerformanceVo
();
SpecialPerformanceVo
specialPerformanceVo
=
new
SpecialPerformanceVo
();
SpecialPerformance
specialPerformance
=
specialPerformanceDao
.
findByType
(
dto
.
getType
());
dto
.
setStateList
(
Arrays
.
asList
(
SpecialPerformanceEnum
.
StateEnum
.
PREVIEW
.
getCode
(),
SpecialPerformanceEnum
.
StateEnum
.
PROCESSING
.
getCode
()));
SpecialPerformance
specialPerformance
=
specialPerformanceDao
.
findByType
(
dto
);
if
(
specialPerformance
==
null
)
{
if
(
specialPerformance
==
null
)
{
return
Result
.
success
(
specialPerformanceVo
);
return
Result
.
success
(
specialPerformanceVo
);
}
}
...
@@ -252,7 +253,10 @@ public class SpecialPerformanceServiceImpl implements SpecialPerformanceService
...
@@ -252,7 +253,10 @@ public class SpecialPerformanceServiceImpl implements SpecialPerformanceService
@Override
@Override
public
Result
sendMsg
()
{
public
Result
sendMsg
()
{
try
{
try
{
SpecialPerformance
specialPerformance
=
specialPerformanceDao
.
findByType
(
SpecialPerformanceEnum
.
TypeEnum
.
AUCTION
.
getCode
());
SpecialPerformanceRequestDto
specialPerformanceRequestDto
=
new
SpecialPerformanceRequestDto
();
specialPerformanceRequestDto
.
setType
(
SpecialPerformanceEnum
.
TypeEnum
.
AUCTION
.
getCode
());
specialPerformanceRequestDto
.
setState
(
SpecialPerformanceEnum
.
StateEnum
.
PROCESSING
.
getCode
());
SpecialPerformance
specialPerformance
=
specialPerformanceDao
.
findByType
(
specialPerformanceRequestDto
);
if
(
specialPerformance
==
null
)
{
if
(
specialPerformance
==
null
)
{
return
Result
.
failed
(
"专场信息为空"
);
return
Result
.
failed
(
"专场信息为空"
);
}
}
...
...
ch-wx-api/src/main/java/com/wwdz/ch/wx/job/SpecialPerformanceNoticeJob.java
View file @
ff17aa7f
...
@@ -164,7 +164,7 @@ public class SpecialPerformanceNoticeJob {
...
@@ -164,7 +164,7 @@ public class SpecialPerformanceNoticeJob {
specialPerformanceRequestDto
.
setFilterState
(
SpecialPerformanceEnum
.
StateEnum
.
END
.
getCode
());
specialPerformanceRequestDto
.
setFilterState
(
SpecialPerformanceEnum
.
StateEnum
.
END
.
getCode
());
List
<
SpecialPerformance
>
specialPerformanceList
=
specialPerformanceDao
.
find
(
specialPerformanceRequestDto
);
List
<
SpecialPerformance
>
specialPerformanceList
=
specialPerformanceDao
.
find
(
specialPerformanceRequestDto
);
Date
now
=
new
Date
();
Date
now
=
new
Date
();
Instant
startInstant
=
now
.
toInstant
().
min
us
(
Duration
.
ofDays
(
1
));
Instant
startInstant
=
now
.
toInstant
().
pl
us
(
Duration
.
ofDays
(
1
));
Date
startTime
=
Date
.
from
(
startInstant
);
Date
startTime
=
Date
.
from
(
startInstant
);
for
(
SpecialPerformance
specialPerformance
:
specialPerformanceList
)
{
for
(
SpecialPerformance
specialPerformance
:
specialPerformanceList
)
{
if
(
specialPerformance
.
getState
().
intValue
()
==
SpecialPerformanceEnum
.
StateEnum
.
DELETED
.
getCode
())
{
if
(
specialPerformance
.
getState
().
intValue
()
==
SpecialPerformanceEnum
.
StateEnum
.
DELETED
.
getCode
())
{
...
@@ -172,7 +172,7 @@ public class SpecialPerformanceNoticeJob {
...
@@ -172,7 +172,7 @@ public class SpecialPerformanceNoticeJob {
}
else
if
(
specialPerformance
.
getState
().
intValue
()
==
SpecialPerformanceEnum
.
StateEnum
.
NOT_START
.
getCode
())
{
}
else
if
(
specialPerformance
.
getState
().
intValue
()
==
SpecialPerformanceEnum
.
StateEnum
.
NOT_START
.
getCode
())
{
//未开始的专场判断是否需要改为预展中,开始时间提前一天预展
//未开始的专场判断是否需要改为预展中,开始时间提前一天预展
//设置为预展中
//设置为预展中
if
(
now
.
after
(
specialPerformance
.
getStartTime
())
&&
specialPerformance
.
getStartTime
().
after
(
startTime
))
{
if
(
startTime
.
after
(
specialPerformance
.
getStartTime
())
&&
specialPerformance
.
getStartTime
().
after
(
now
))
{
if
(
specialPerformance
.
getState
().
intValue
()
!=
SpecialPerformanceEnum
.
StateEnum
.
PREVIEW
.
getCode
())
{
if
(
specialPerformance
.
getState
().
intValue
()
!=
SpecialPerformanceEnum
.
StateEnum
.
PREVIEW
.
getCode
())
{
specialPerformanceDao
.
updateState
(
specialPerformance
.
getId
(),
SpecialPerformanceEnum
.
StateEnum
.
PREVIEW
.
getCode
());
specialPerformanceDao
.
updateState
(
specialPerformance
.
getId
(),
SpecialPerformanceEnum
.
StateEnum
.
PREVIEW
.
getCode
());
}
}
...
...
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