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
025cfa1b
Commit
025cfa1b
authored
May 22, 2020
by
huluobin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
同步款式服务类型id
parent
e27ee912
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
25 additions
and
0 deletions
+25
-0
BaseProduceMapper.java
...nfrastructure/mapper/product/serve/BaseProduceMapper.java
+5
-0
Schedule.java
...ain/java/com/gogirl/infrastructure/schedule/Schedule.java
+13
-0
BaseProduceMapper.xml
src/main/resources/mapper/product/BaseProduceMapper.xml
+7
-0
No files found.
src/main/java/com/gogirl/infrastructure/mapper/product/serve/BaseProduceMapper.java
View file @
025cfa1b
...
@@ -36,4 +36,9 @@ public interface BaseProduceMapper extends BaseMapper<BaseProduce> {
...
@@ -36,4 +36,9 @@ public interface BaseProduceMapper extends BaseMapper<BaseProduce> {
@Param
(
"featuresId"
)
Integer
featuresId
,
@Param
(
"featuresId"
)
Integer
featuresId
,
@Param
(
"serveTypeId"
)
Integer
serveTypeId
,
@Param
(
"serveTypeId"
)
Integer
serveTypeId
,
@Param
(
"sort"
)
Integer
sort
);
@Param
(
"sort"
)
Integer
sort
);
/**
* 同步款式服务类型id
*/
void
syncProduceServeTypeId
();
}
}
src/main/java/com/gogirl/infrastructure/schedule/Schedule.java
View file @
025cfa1b
...
@@ -37,6 +37,7 @@ import com.gogirl.infrastructure.mapper.order.serve.ScheduleManageMapper;
...
@@ -37,6 +37,7 @@ import com.gogirl.infrastructure.mapper.order.serve.ScheduleManageMapper;
import
com.gogirl.infrastructure.mapper.product.mall.MallCategoryMapper
;
import
com.gogirl.infrastructure.mapper.product.mall.MallCategoryMapper
;
import
com.gogirl.infrastructure.mapper.product.mall.MallProductMapper
;
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.BaseProduceMapper
;
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
;
import
com.gogirl.infrastructure.mapper.store.career.CareerMapper
;
import
com.gogirl.infrastructure.mapper.store.career.CareerMapper
;
...
@@ -680,4 +681,16 @@ public class Schedule {
...
@@ -680,4 +681,16 @@ public class Schedule {
}
}
private
final
BaseProduceMapper
baseProduceMapper
;
/**
* 每天凌晨3点同步款式的服务类型id
*/
@Scheduled
(
cron
=
"0 0 3 * * ?"
)
public
void
syncProduceServeTypeId
()
{
log
.
info
(
"同步款式的服务类型id开始"
);
baseProduceMapper
.
syncProduceServeTypeId
();
log
.
info
(
"同步款式的服务类型id结束"
);
}
}
}
src/main/resources/mapper/product/BaseProduceMapper.xml
View file @
025cfa1b
...
@@ -69,6 +69,13 @@
...
@@ -69,6 +69,13 @@
<sql
id=
"bpSql"
>
<sql
id=
"bpSql"
>
bp.id, bp.name, bp.picture_path picturePath, bp.type, bp.label, bp.shop_sort shopSort, bp.req_grade reqQrade, bp.status, bp.remark, bp.details, bs.id serveId, bs.name serveName
bp.id, bp.name, bp.picture_path picturePath, bp.type, bp.label, bp.shop_sort shopSort, bp.req_grade reqQrade, bp.status, bp.remark, bp.details, bs.id serveId, bs.name serveName
</sql>
</sql>
<update
id=
"syncProduceServeTypeId"
>
update base_produce t1
LEFT JOIN base_serve t2 on t1.service_id = t2.id
set t1.serve_type_id = t2.type_id
where t1.serve_type_id is null
and t2.id is not null
</update>
<select
id=
"getProduceForDetail"
resultMap=
"produceResultMap"
>
<select
id=
"getProduceForDetail"
resultMap=
"produceResultMap"
>
select
select
...
...
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