Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
amos-boot-biz
Project
Project
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
项目统一框架
amos-boot-biz
Commits
2d73c1b8
Commit
2d73c1b8
authored
Jun 01, 2024
by
kinky2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加气瓶单位数据
parent
f442a167
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
3 deletions
+17
-3
SyncCylinderDataService.java
...mos/api/openapi/face/service/SyncCylinderDataService.java
+5
-0
TmCylinderInfoService.java
.../amos/api/openapi/face/service/TmCylinderInfoService.java
+10
-1
CylinderUnitMapper.xml
...nder-api/src/main/resources/mapper/CylinderUnitMapper.xml
+2
-2
No files found.
amos-boot-data/amos-boot-data-openapi/src/main/java/com/yeejoin/amos/api/openapi/face/service/SyncCylinderDataService.java
View file @
2d73c1b8
...
...
@@ -8,6 +8,7 @@ import com.baomidou.dynamic.datasource.annotation.DS;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.yeejoin.amos.boot.module.cylinder.flc.api.dto.CylinderInfoDto
;
import
com.yeejoin.amos.boot.module.cylinder.flc.api.entity.CylinderUnit
;
import
com.yeejoin.amos.boot.module.cylinder.flc.api.dto.CylinderUnitDto
;
import
com.yeejoin.amos.boot.module.cylinder.flc.api.entity.CylinderUnitVideo
;
...
...
@@ -28,4 +29,8 @@ public class SyncCylinderDataService
List
<
CylinderUnit
>
cylinderUnitList
=
Bean
.
toModels
(
cylinderUnitDto
,
CylinderUnit
.
class
);
cylinderUnitMapper
.
saveOrUpdateBatch
(
cylinderUnitList
);
}
public
void
syncCylinderInfo
(
final
List
<
CylinderInfoDto
>
cylinderInfoDto
)
{
}
}
amos-boot-data/amos-boot-data-openapi/src/main/java/com/yeejoin/amos/api/openapi/face/service/TmCylinderInfoService.java
View file @
2d73c1b8
...
...
@@ -7,10 +7,12 @@ import java.util.Date;
import
java.util.List
;
import
com.google.common.collect.Lists
;
import
com.yeejoin.amos.api.openapi.face.model.TmCylinderUnitModel
;
import
com.yeejoin.amos.api.openapi.face.orm.dao.ESCylinderInfoRepository
;
import
com.yeejoin.amos.boot.biz.common.utils.DateUtils
;
import
com.yeejoin.amos.boot.module.cylinder.api.entity.ESCylinderInfoDto
;
import
com.yeejoin.amos.boot.module.cylinder.flc.api.dto.CylinderInfoDto
;
import
com.yeejoin.amos.boot.module.cylinder.flc.api.dto.CylinderUnitDto
;
import
com.yeejoin.amos.boot.module.cylinder.flc.api.mapper.CylinderInfoMapper
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.BeanUtils
;
...
...
@@ -22,6 +24,7 @@ import org.springframework.util.ObjectUtils;
import
org.springframework.util.StopWatch
;
import
org.typroject.tyboot.component.cache.Redis
;
import
org.typroject.tyboot.core.foundation.context.RequestContext
;
import
org.typroject.tyboot.core.foundation.utils.Bean
;
import
org.typroject.tyboot.core.foundation.utils.ValidationUtil
;
import
org.typroject.tyboot.core.rdbms.service.BaseService
;
import
org.typroject.tyboot.core.restful.exception.instance.BadRequest
;
...
...
@@ -50,7 +53,8 @@ public class TmCylinderInfoService extends BaseService<TmCylinderInfoModel, TmCy
@Autowired
CylinderInfoMapper
cylinderInfoMapper
;
@Autowired
private
SyncCylinderDataService
syncCylinderDataService
;
@Autowired
ESCylinderInfoRepository
esCylinderInfoRepository
;
...
...
@@ -67,6 +71,11 @@ public class TmCylinderInfoService extends BaseService<TmCylinderInfoModel, TmCy
}
return
"OK"
;
}
@Transactional
(
rollbackFor
=
{
Exception
.
class
})
private
void
syncCylinderUnitModel
(
List
<
TmCylinderInfoModel
>
model
)
{
List
<
CylinderInfoDto
>
cylinderInfoDto
=
Bean
.
toModels
(
model
,
CylinderInfoDto
.
class
);
syncCylinderDataService
.
syncCylinderInfo
(
cylinderInfoDto
);
}
private
String
getAppId
()
{
String
tokenKey
=
Redis
.
genKey
(
Constant
.
TOKEN_PREFIX
,
RequestContext
.
getToken
());
BizTokenModel
bizTokenModel
=
(
BizTokenModel
)
redisTemplate
.
opsForValue
().
get
(
tokenKey
);
...
...
amos-boot-system-tzs/amos-boot-module-cylinder/amos-boot-module-cylinder-api/src/main/resources/mapper/CylinderUnitMapper.xml
View file @
2d73c1b8
...
...
@@ -83,10 +83,10 @@
#{item.recUserId},
#{item.syncDate},
#{item.syncState},
#{item.appId}
)
,
#{item.appId},
#{item.securityAdm},
#{item.securityAdmPhone},
#{item.regionName}
#{item.regionName}
)
</foreach>
on conflict (app_id) do update set
"unit_id" = EXCLUDED."unit_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