Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gogirl-miniapp-backend
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
huluobin
gogirl-miniapp-backend
Commits
e4c4c1c3
Commit
e4c4c1c3
authored
Apr 24, 2020
by
huluobin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
首页标题
parent
a194b4c0
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
33 additions
and
0 deletions
+33
-0
MallProductMapper.java
...infrastructure/mapper/product/mall/MallProductMapper.java
+7
-0
Schedule.java
...ain/java/com/gogirl/infrastructure/schedule/Schedule.java
+18
-0
MallProductMapper.xml
src/main/resources/mapper/product/MallProductMapper.xml
+8
-0
No files found.
src/main/java/com/gogirl/infrastructure/mapper/product/mall/MallProductMapper.java
View file @
e4c4c1c3
...
@@ -16,4 +16,11 @@ public interface MallProductMapper extends BaseMapper<MallProduct> {
...
@@ -16,4 +16,11 @@ public interface MallProductMapper extends BaseMapper<MallProduct> {
* @return
* @return
*/
*/
IPage
<
MallProduct
>
queryPageProduct
(
@Param
(
"page"
)
IPage
<
MallProduct
>
productIPage
,
@Param
(
"param"
)
ProductQuery
param
);
IPage
<
MallProduct
>
queryPageProduct
(
@Param
(
"page"
)
IPage
<
MallProduct
>
productIPage
,
@Param
(
"param"
)
ProductQuery
param
);
/**
* 同步色胶标题
*
* @param id
*/
void
syncMallProductIndexTitle
(
Long
id
);
}
}
src/main/java/com/gogirl/infrastructure/schedule/Schedule.java
View file @
e4c4c1c3
...
@@ -12,6 +12,7 @@ import com.gogirl.domain.order.mall.MallOrder;
...
@@ -12,6 +12,7 @@ import com.gogirl.domain.order.mall.MallOrder;
import
com.gogirl.domain.order.serve.OrderManage
;
import
com.gogirl.domain.order.serve.OrderManage
;
import
com.gogirl.domain.order.serve.ScheduleManage
;
import
com.gogirl.domain.order.serve.ScheduleManage
;
import
com.gogirl.domain.order.serve.ScheduleServe
;
import
com.gogirl.domain.order.serve.ScheduleServe
;
import
com.gogirl.domain.product.mall.MallCategory
;
import
com.gogirl.domain.product.serve.BaseFeatures
;
import
com.gogirl.domain.product.serve.BaseFeatures
;
import
com.gogirl.domain.product.serve.FeaturesMapping
;
import
com.gogirl.domain.product.serve.FeaturesMapping
;
import
com.gogirl.domain.product.serve.ProduceSales
;
import
com.gogirl.domain.product.serve.ProduceSales
;
...
@@ -34,6 +35,8 @@ import com.gogirl.infrastructure.mapper.order.mall.MallOrderMapper;
...
@@ -34,6 +35,8 @@ import com.gogirl.infrastructure.mapper.order.mall.MallOrderMapper;
import
com.gogirl.infrastructure.mapper.order.serve.OrderManageMapper
;
import
com.gogirl.infrastructure.mapper.order.serve.OrderManageMapper
;
import
com.gogirl.infrastructure.mapper.order.serve.OrderServeMapper
;
import
com.gogirl.infrastructure.mapper.order.serve.OrderServeMapper
;
import
com.gogirl.infrastructure.mapper.order.serve.ScheduleManageMapper
;
import
com.gogirl.infrastructure.mapper.order.serve.ScheduleManageMapper
;
import
com.gogirl.infrastructure.mapper.product.mall.MallCategoryMapper
;
import
com.gogirl.infrastructure.mapper.product.mall.MallProductMapper
;
import
com.gogirl.infrastructure.mapper.product.serve.BaseFeaturesMapper
;
import
com.gogirl.infrastructure.mapper.product.serve.BaseFeaturesMapper
;
import
com.gogirl.infrastructure.mapper.product.serve.FeaturesMappingMapper
;
import
com.gogirl.infrastructure.mapper.product.serve.FeaturesMappingMapper
;
import
com.gogirl.infrastructure.mapper.product.serve.ProduceSalesMapper
;
import
com.gogirl.infrastructure.mapper.product.serve.ProduceSalesMapper
;
...
@@ -640,4 +643,19 @@ public class Schedule {
...
@@ -640,4 +643,19 @@ public class Schedule {
public
void
syncBalanceLevel
()
{
public
void
syncBalanceLevel
()
{
balanceRecordDao
.
syncBalanceLevel
();
balanceRecordDao
.
syncBalanceLevel
();
}
}
private
final
MallProductMapper
mallProductMapper
;
private
final
MallCategoryMapper
mallCategoryMapper
;
/**
* 每天三点处理色胶的首页标题
*/
@Scheduled
(
cron
=
"0 0 3 * * ?"
)
public
void
syncMallProductIndexTitle
()
{
MallCategory
mallCategory
=
mallCategoryMapper
.
selectOne
(
new
LambdaQueryWrapper
<
MallCategory
>().
eq
(
MallCategory:
:
getCategoryName
,
"日式基础色胶"
));
mallProductMapper
.
syncMallProductIndexTitle
(
mallCategory
.
getId
());
}
}
}
src/main/resources/mapper/product/MallProductMapper.xml
View file @
e4c4c1c3
...
@@ -2,6 +2,14 @@
...
@@ -2,6 +2,14 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper
namespace=
"com.gogirl.infrastructure.mapper.product.mall.MallProductMapper"
>
<mapper
namespace=
"com.gogirl.infrastructure.mapper.product.mall.MallProductMapper"
>
<update
id=
"syncMallProductIndexTitle"
>
update mall_product t1
LEFT JOIN mall_category_product_ref t2 on t1.id = t2.mall_product_id
LEFT JOIN mall_category t3 on t2.mall_category_id = t3.id
set t1.index_title =t1.color
where t3.parent_id = #{id}
</update>
<select
id=
"queryPageProduct"
resultType=
"com.gogirl.domain.product.mall.MallProduct"
>
<select
id=
"queryPageProduct"
resultType=
"com.gogirl.domain.product.mall.MallProduct"
>
select * from mall_product t1
select * from mall_product t1
left join mall_category_product_ref mcpr on t1.id = mcpr.mall_product_id
left join mall_category_product_ref mcpr on t1.id = mcpr.mall_product_id
...
...
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