Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
I
ims
概览
概览
详情
活动
周期分析
版本库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
问题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
iuav
ims
Commits
095806d2
提交
095806d2
authored
6月 12, 2023
作者:
zhenjie
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'develop'
上级
705cea02
6abd5dc2
显示空白字符变更
内嵌
并排
正在显示
32 个修改的文件
包含
599 行增加
和
142 行删除
+599
-142
Dockerfile
Dockerfile
+1
-1
AllCategoryDTO.java
...in/java/com/mmc/csf/release/flyer/dto/AllCategoryDTO.java
+24
-0
CategoriesInfoListDTO.java
.../com/mmc/csf/release/flyer/dto/CategoriesInfoListDTO.java
+27
-0
CurriculumQo.java
.../main/java/com/mmc/csf/release/flyer/qo/CurriculumQo.java
+7
-2
CurriculumInfoVO.java
...n/java/com/mmc/csf/release/flyer/vo/CurriculumInfoVO.java
+29
-2
FlightSkillsVO.java
...ain/java/com/mmc/csf/release/flyer/vo/FlightSkillsVO.java
+3
-0
MaintainDTO.java
...-model/src/main/java/com/mmc/csf/web/dto/MaintainDTO.java
+24
-0
WebsiteRangeDTO.java
...el/src/main/java/com/mmc/csf/web/dto/WebsiteRangeDTO.java
+5
-11
deployment.yaml
kustomization/base/deployment.yaml
+8
-0
kustomization.yaml
kustomization/overlays/dev/kustomization.yaml
+1
-1
FlyerTrainingController.java
...m/mmc/csf/release/controller/FlyerTrainingController.java
+52
-9
WebsiteController.java
...ava/com/mmc/csf/release/controller/WebsiteController.java
+13
-23
FlyerTrainingDao.java
...c/main/java/com/mmc/csf/release/dao/FlyerTrainingDao.java
+25
-1
WebsiteDao.java
...ice/src/main/java/com/mmc/csf/release/dao/WebsiteDao.java
+9
-4
CurriculumInfoDO.java
...ain/java/com/mmc/csf/release/entity/CurriculumInfoDO.java
+22
-1
FlightSkillsDO.java
.../main/java/com/mmc/csf/release/entity/FlightSkillsDO.java
+7
-1
MaintainDO.java
.../src/main/java/com/mmc/csf/release/entity/MaintainDO.java
+43
-0
WebsiteInfoDO.java
...c/main/java/com/mmc/csf/release/entity/WebsiteInfoDO.java
+8
-29
PmsAppApi.java
...ce/src/main/java/com/mmc/csf/release/feign/PmsAppApi.java
+20
-0
FeignConfiguration.java
.../com/mmc/csf/release/feign/config/FeignConfiguration.java
+6
-0
PmsAppApHystrix.java
...va/com/mmc/csf/release/feign/hystrix/PmsAppApHystrix.java
+20
-0
FlyerTrainingService.java
...ava/com/mmc/csf/release/service/FlyerTrainingService.java
+26
-0
WebsiteService.java
...main/java/com/mmc/csf/release/service/WebsiteService.java
+3
-5
FlyerTrainingServiceImpl.java
...mc/csf/release/service/impl/FlyerTrainingServiceImpl.java
+65
-2
WebsiteServiceImpl.java
.../com/mmc/csf/release/service/impl/WebsiteServiceImpl.java
+15
-38
application-dev.yml
release-service/src/main/resources/application-dev.yml
+3
-1
application-local.yml
release-service/src/main/resources/application-local.yml
+3
-1
application-prod.yml
release-service/src/main/resources/application-prod.yml
+2
-0
application.yml
release-service/src/main/resources/application.yml
+5
-1
FlyerTrainingDao.xml
...vice/src/main/resources/mapper/flyer/FlyerTrainingDao.xml
+87
-5
WebsiteDao.xml
...-service/src/main/resources/mapper/website/WebsiteDao.xml
+33
-4
not-check.yml
release-service/src/main/resources/not-check.yml
+3
-0
没有找到文件。
Dockerfile
浏览文件 @
095806d2
FROM
openjdk:8-jdk-alpine
FROM
openjdk:8-jdk-alpine
#VOLUME ["/tmp","/files","/var/logs
/"]
VOLUME
["/var/log/app
/"]
ARG
JAVA_OPTS
ARG
JAVA_OPTS
ENV
JAVA_OPTS=$JAVA_OPTS
ENV
JAVA_OPTS=$JAVA_OPTS
RUN
ln
-sf
/usr/share/zoneinfo/Asia/Shanghai /etc/localtime
&&
echo
'Asia/Shanghai'
>
/etc/timezone
RUN
ln
-sf
/usr/share/zoneinfo/Asia/Shanghai /etc/localtime
&&
echo
'Asia/Shanghai'
>
/etc/timezone
...
...
csf-common/csf-common-model/src/main/java/com/mmc/csf/release/flyer/dto/AllCategoryDTO.java
0 → 100644
浏览文件 @
095806d2
package
com
.
mmc
.
csf
.
release
.
flyer
.
dto
;
import
lombok.AllArgsConstructor
;
import
lombok.Builder
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
import
java.io.Serializable
;
import
java.util.List
;
/**
* @author: zj
* @Date: 2023/6/10 20:34
*/
@Data
@NoArgsConstructor
@AllArgsConstructor
@Builder
public
class
AllCategoryDTO
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1171841063641249397L
;
private
Integer
directoryId
;
private
String
name
;
private
List
<
CategoriesInfoListDTO
>
categoriesInfoListDTO
;
}
csf-common/csf-common-model/src/main/java/com/mmc/csf/release/flyer/dto/CategoriesInfoListDTO.java
0 → 100644
浏览文件 @
095806d2
/** Copyright 2023 bejson.com */
package
com
.
mmc
.
csf
.
release
.
flyer
.
dto
;
import
lombok.AllArgsConstructor
;
import
lombok.Builder
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
import
java.io.Serializable
;
/**
* Auto-generated: 2023-06-08 16:2:43
*
* @author bejson.com (i@bejson.com)
* @website http://www.bejson.com/java2pojo/
*/
@Data
@NoArgsConstructor
@AllArgsConstructor
@Builder
public
class
CategoriesInfoListDTO
implements
Serializable
{
private
static
final
long
serialVersionUID
=
-
8381856228953745772L
;
private
Integer
id
;
private
Integer
directoryId
;
private
String
name
;
private
String
icon
;
}
csf-common/csf-common-model/src/main/java/com/mmc/csf/release/flyer/qo/CurriculumQo.java
浏览文件 @
095806d2
...
@@ -20,12 +20,17 @@ import java.io.Serializable;
...
@@ -20,12 +20,17 @@ import java.io.Serializable;
@NoArgsConstructor
@NoArgsConstructor
@AllArgsConstructor
@AllArgsConstructor
public
class
CurriculumQo
implements
Serializable
{
public
class
CurriculumQo
implements
Serializable
{
@ApiModelProperty
(
value
=
"地域id"
)
private
static
final
long
serialVersionUID
=
3124398495152234751L
;
private
Integer
regionId
;
@ApiModelProperty
(
value
=
"课程名称"
)
private
String
curriculumName
;
@ApiModelProperty
(
value
=
"省份编码"
)
private
Integer
provinceCode
;
@ApiModelProperty
(
value
=
"执照id"
)
@ApiModelProperty
(
value
=
"执照id"
)
private
Integer
licenseId
;
private
Integer
licenseId
;
@ApiModelProperty
(
value
=
"技能id"
)
@ApiModelProperty
(
value
=
"技能id"
)
private
Integer
flightSkillsId
;
private
Integer
flightSkillsId
;
@ApiModelProperty
(
value
=
"课程类型id"
)
private
Integer
categoriesId
;
@ApiModelProperty
(
value
=
"页码"
,
required
=
true
)
@ApiModelProperty
(
value
=
"页码"
,
required
=
true
)
@NotNull
(
message
=
"页码不能为空"
,
groups
=
{
Page
.
class
})
@NotNull
(
message
=
"页码不能为空"
,
groups
=
{
Page
.
class
})
@Min
(
value
=
1
,
groups
=
Page
.
class
)
@Min
(
value
=
1
,
groups
=
Page
.
class
)
...
...
csf-common/csf-common-model/src/main/java/com/mmc/csf/release/flyer/vo/CurriculumInfoVO.java
浏览文件 @
095806d2
package
com
.
mmc
.
csf
.
release
.
flyer
.
vo
;
package
com
.
mmc
.
csf
.
release
.
flyer
.
vo
;
import
com.mmc.csf.release.model.group.Insert
;
import
com.mmc.csf.release.model.group.Update
;
import
io.swagger.annotations.ApiModelProperty
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.AllArgsConstructor
;
import
lombok.AllArgsConstructor
;
import
lombok.Builder
;
import
lombok.Builder
;
import
lombok.Data
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
import
lombok.NoArgsConstructor
;
import
org.hibernate.validator.constraints.Length
;
import
javax.validation.constraints.NotNull
;
import
java.io.Serializable
;
import
java.io.Serializable
;
import
java.math.BigDecimal
;
import
java.math.BigDecimal
;
...
@@ -19,7 +23,9 @@ import java.math.BigDecimal;
...
@@ -19,7 +23,9 @@ import java.math.BigDecimal;
@AllArgsConstructor
@AllArgsConstructor
@Builder
@Builder
public
class
CurriculumInfoVO
implements
Serializable
{
public
class
CurriculumInfoVO
implements
Serializable
{
private
static
final
long
serialVersionUID
=
-
7343885960160805850L
;
@ApiModelProperty
(
value
=
"课程id"
)
@ApiModelProperty
(
value
=
"课程id"
)
@NotNull
(
message
=
"课程id不能为空"
,
groups
=
{
Update
.
class
})
private
Integer
id
;
private
Integer
id
;
@ApiModelProperty
(
value
=
"价格"
)
@ApiModelProperty
(
value
=
"价格"
)
...
@@ -28,15 +34,36 @@ public class CurriculumInfoVO implements Serializable {
...
@@ -28,15 +34,36 @@ public class CurriculumInfoVO implements Serializable {
@ApiModelProperty
(
value
=
"供应商名称"
)
@ApiModelProperty
(
value
=
"供应商名称"
)
private
String
supplierName
;
private
String
supplierName
;
@ApiModelProperty
(
value
=
"课程名称"
)
@ApiModelProperty
(
value
=
"课程名称,长度30"
)
@Length
(
max
=
30
)
private
String
curriculumName
;
private
String
curriculumName
;
@ApiModelProperty
(
value
=
"课程是否免费 0:免费 1:付费"
)
@ApiModelProperty
(
value
=
"课程是否免费 0:免费 1:付费"
)
private
Integer
free
;
private
Integer
free
;
@ApiModelProperty
(
value
=
"课程介绍"
)
@ApiModelProperty
(
value
=
"课程类型,二级id"
)
@NotNull
(
message
=
"课程类型id不能为空"
,
groups
=
{
Insert
.
class
})
private
Integer
categoriesId
;
@ApiModelProperty
(
value
=
"目录名称"
,
example
=
"技能"
)
private
String
directoryName
;
@ApiModelProperty
(
value
=
"课程类型名称"
,
example
=
"通用巡检"
)
private
String
categoriesName
;
@ApiModelProperty
(
value
=
"课程技能类型,二级id"
)
private
Integer
flightSkills
;
@ApiModelProperty
(
value
=
"课程介绍(简介), 长度255"
)
@Length
(
max
=
255
)
private
String
curriculumDesc
;
private
String
curriculumDesc
;
@ApiModelProperty
(
value
=
"课程封面"
)
private
String
surfaceUrl
;
@ApiModelProperty
(
value
=
"课程视频"
)
@ApiModelProperty
(
value
=
"课程视频"
)
private
String
videoUrl
;
private
String
videoUrl
;
@ApiModelProperty
(
value
=
"课程详情"
)
private
String
detailContent
;
}
}
csf-common/csf-common-model/src/main/java/com/mmc/csf/release/flyer/vo/FlightSkillsVO.java
浏览文件 @
095806d2
...
@@ -7,6 +7,7 @@ import lombok.Data;
...
@@ -7,6 +7,7 @@ import lombok.Data;
import
lombok.NoArgsConstructor
;
import
lombok.NoArgsConstructor
;
import
java.io.Serializable
;
import
java.io.Serializable
;
import
java.util.List
;
/**
/**
* @Author LW
* @Author LW
...
@@ -23,4 +24,6 @@ public class FlightSkillsVO implements Serializable {
...
@@ -23,4 +24,6 @@ public class FlightSkillsVO implements Serializable {
private
Integer
id
;
private
Integer
id
;
@ApiModelProperty
(
value
=
"行业认证名称"
)
@ApiModelProperty
(
value
=
"行业认证名称"
)
private
String
skillsName
;
private
String
skillsName
;
@ApiModelProperty
(
value
=
"课程技能"
)
private
List
<
FlightSkillsVO
>
flightSkills
;
}
}
csf-common/csf-common-model/src/main/java/com/mmc/csf/web/dto/MaintainDTO.java
0 → 100644
浏览文件 @
095806d2
package
com
.
mmc
.
csf
.
web
.
dto
;
import
lombok.AllArgsConstructor
;
import
lombok.Builder
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
import
java.io.Serializable
;
/**
* Date: 2022/5/24 15:18
* @author 23214
*/
@Builder
@Data
@AllArgsConstructor
@NoArgsConstructor
public
class
MaintainDTO
implements
Serializable
{
private
String
address
;
private
String
name
;
private
Double
lon
;
private
Double
lat
;
private
Double
distance
;
}
csf-common/csf-common-model/src/main/java/com/mmc/csf/web/dto/WebsiteRangeDTO.java
浏览文件 @
095806d2
package
com
.
mmc
.
csf
.
web
.
dto
;
package
com
.
mmc
.
csf
.
web
.
dto
;
import
com.mmc.csf.web.vo.LocationVO
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.AllArgsConstructor
;
import
lombok.AllArgsConstructor
;
import
lombok.Builder
;
import
lombok.Builder
;
import
lombok.Data
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
import
lombok.NoArgsConstructor
;
import
java.io.Serializable
;
import
java.io.Serializable
;
import
java.util.List
;
/**
/**
* @Author LW
* @Author LW
...
@@ -20,12 +17,9 @@ import java.util.List;
...
@@ -20,12 +17,9 @@ import java.util.List;
@NoArgsConstructor
@NoArgsConstructor
@AllArgsConstructor
@AllArgsConstructor
public
class
WebsiteRangeDTO
implements
Serializable
{
public
class
WebsiteRangeDTO
implements
Serializable
{
@ApiModelProperty
(
value
=
"id"
)
private
String
address
;
private
Integer
id
;
private
String
name
;
@ApiModelProperty
(
value
=
"省编码"
)
private
Double
lon
;
private
String
adCode
;
private
Double
lat
;
@ApiModelProperty
(
value
=
"省"
)
private
Double
distance
;
private
String
province
;
@ApiModelProperty
(
value
=
"地址经纬度"
)
private
List
<
LocationVO
>
locationList
;
}
}
kustomization/base/deployment.yaml
浏览文件 @
095806d2
...
@@ -18,6 +18,9 @@ spec:
...
@@ -18,6 +18,9 @@ spec:
containers
:
containers
:
-
name
:
ims
-
name
:
ims
image
:
REGISTRY/NAMESPACE/IMAGE:TAG
image
:
REGISTRY/NAMESPACE/IMAGE:TAG
volumeMounts
:
-
name
:
log-of-app
mountPath
:
/var/log/app
resources
:
resources
:
limits
:
limits
:
memory
:
1024Mi
memory
:
1024Mi
...
@@ -30,3 +33,7 @@ spec:
...
@@ -30,3 +33,7 @@ spec:
configMapKeyRef
:
configMapKeyRef
:
name
:
ims-map
name
:
ims-map
key
:
SPRING_PROFILES_ACTIVE
key
:
SPRING_PROFILES_ACTIVE
volumes
:
-
name
:
log-of-app
hostPath
:
path
:
/var/log/app
\ No newline at end of file
kustomization/overlays/dev/kustomization.yaml
浏览文件 @
095806d2
...
@@ -18,4 +18,4 @@ patches:
...
@@ -18,4 +18,4 @@ patches:
images
:
images
:
-
name
:
REGISTRY/NAMESPACE/IMAGE:TAG
-
name
:
REGISTRY/NAMESPACE/IMAGE:TAG
newName
:
mmc-registry.cn-shenzhen.cr.aliyuncs.com/sharefly-dev/ims
newName
:
mmc-registry.cn-shenzhen.cr.aliyuncs.com/sharefly-dev/ims
newTag
:
97f99e63e08fa6cbe292cec793f623d7cd8765d1
newTag
:
614d4cd45ce2d0d352b2d900d6d24dbf1dc24e7b
release-service/src/main/java/com/mmc/csf/release/controller/FlyerTrainingController.java
浏览文件 @
095806d2
package
com
.
mmc
.
csf
.
release
.
controller
;
package
com
.
mmc
.
csf
.
release
.
controller
;
import
com.mmc.csf.common.util.web.ResultBody
;
import
com.mmc.csf.common.util.web.ResultBody
;
import
com.mmc.csf.release.feign.PmsAppApi
;
import
com.mmc.csf.release.flyer.qo.CurriculumQo
;
import
com.mmc.csf.release.flyer.qo.CurriculumQo
;
import
com.mmc.csf.release.flyer.vo.CurriculumInfoVO
;
import
com.mmc.csf.release.flyer.vo.CurriculumInfoVO
;
import
com.mmc.csf.release.model.group.Insert
;
import
com.mmc.csf.release.model.group.Update
;
import
com.mmc.csf.release.service.FlyerTrainingService
;
import
com.mmc.csf.release.service.FlyerTrainingService
;
import
com.mmc.csf.release.flyer.vo.DronePilotLicenseVO
;
import
com.mmc.csf.release.flyer.vo.DronePilotLicenseVO
;
import
com.mmc.csf.release.flyer.vo.FlightSkillsVO
;
import
com.mmc.csf.release.flyer.vo.FlightSkillsVO
;
import
com.mmc.csf.release.flyer.vo.RegistrationVO
;
import
com.mmc.csf.release.flyer.vo.RegistrationVO
;
import
io.swagger.annotations.*
;
import
io.swagger.annotations.*
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.validation.annotation.Validated
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.bind.annotation.*
;
import
javax.annotation.Resource
;
import
javax.annotation.Resource
;
...
@@ -42,20 +47,13 @@ public class FlyerTrainingController extends BaseController{
...
@@ -42,20 +47,13 @@ public class FlyerTrainingController extends BaseController{
return
flyerTrainingService
.
getDronePilotLicense
();
return
flyerTrainingService
.
getDronePilotLicense
();
}
}
@ApiOperation
(
value
=
"行业应用认证-下拉列表"
)
@ApiOperation
(
value
=
"行业应用认证-下拉列表
(课程技能列表)
"
)
@ApiResponses
({
@ApiResponse
(
code
=
200
,
message
=
"OK"
,
response
=
FlightSkillsVO
.
class
)})
@ApiResponses
({
@ApiResponse
(
code
=
200
,
message
=
"OK"
,
response
=
FlightSkillsVO
.
class
)})
@GetMapping
(
"/getIndustryFlightSkills"
)
@GetMapping
(
"/getIndustryFlightSkills"
)
public
ResultBody
getIndustryFlightSkills
()
{
public
ResultBody
getIndustryFlightSkills
()
{
return
flyerTrainingService
.
getIndustryFlightSkills
();
return
flyerTrainingService
.
getIndustryFlightSkills
();
}
}
@ApiOperation
(
value
=
"课程视频列表"
)
@ApiResponses
({
@ApiResponse
(
code
=
200
,
message
=
"OK"
,
response
=
CurriculumInfoVO
.
class
)})
@PostMapping
(
"/queryCurriculumInfoList"
)
public
ResultBody
queryCurriculumInfoList
(
@RequestBody
CurriculumQo
curriculumQo
)
{
return
ResultBody
.
success
(
flyerTrainingService
.
queryCurriculumInfoList
(
curriculumQo
));
}
@ApiOperation
(
value
=
"考证-技能"
)
@ApiOperation
(
value
=
"考证-技能"
)
@ApiResponses
({
@ApiResponse
(
code
=
200
,
message
=
"OK"
,
response
=
CurriculumInfoVO
.
class
)})
@ApiResponses
({
@ApiResponse
(
code
=
200
,
message
=
"OK"
,
response
=
CurriculumInfoVO
.
class
)})
@GetMapping
(
"/licenseOrSkillQueryCurriculum"
)
@GetMapping
(
"/licenseOrSkillQueryCurriculum"
)
...
@@ -63,10 +61,55 @@ public class FlyerTrainingController extends BaseController{
...
@@ -63,10 +61,55 @@ public class FlyerTrainingController extends BaseController{
return
flyerTrainingService
.
licenseOrSkillQueryCurriculum
(
type
);
return
flyerTrainingService
.
licenseOrSkillQueryCurriculum
(
type
);
}
}
@ApiOperation
(
value
=
"课程视频详情"
)
@ApiOperation
(
value
=
"飞手技能列表"
)
@ApiResponses
({
@ApiResponse
(
code
=
200
,
message
=
"OK"
,
response
=
FlightSkillsVO
.
class
)})
@GetMapping
(
"treeCurriculumSkill"
)
public
ResultBody
treeCurriculumSkill
()
{
return
flyerTrainingService
.
treeCurriculumSkill
();
}
@ApiOperation
(
value
=
"V1.0.1课程视频列表"
)
@ApiResponses
({
@ApiResponse
(
code
=
200
,
message
=
"OK"
,
response
=
CurriculumInfoVO
.
class
)})
@PostMapping
(
"/queryCurriculumInfoList"
)
public
ResultBody
queryCurriculumInfoList
(
@RequestBody
CurriculumQo
curriculumQo
)
{
return
ResultBody
.
success
(
flyerTrainingService
.
queryCurriculumInfoList
(
curriculumQo
));
}
@ApiOperation
(
value
=
"V1.0.1课程视频详情"
)
@ApiResponses
({
@ApiResponse
(
code
=
200
,
message
=
"OK"
,
response
=
CurriculumInfoVO
.
class
)})
@ApiResponses
({
@ApiResponse
(
code
=
200
,
message
=
"OK"
,
response
=
CurriculumInfoVO
.
class
)})
@GetMapping
(
"/curriculumDetails"
)
@GetMapping
(
"/curriculumDetails"
)
public
ResultBody
curriculumDetails
(
@ApiParam
(
value
=
"课程id"
)
@RequestParam
(
value
=
"id"
)
Integer
id
)
{
public
ResultBody
curriculumDetails
(
@ApiParam
(
value
=
"课程id"
)
@RequestParam
(
value
=
"id"
)
Integer
id
)
{
return
flyerTrainingService
.
curriculumDetails
(
id
);
return
flyerTrainingService
.
curriculumDetails
(
id
);
}
}
@ApiOperation
(
value
=
"V1.0.1新增课程"
)
@ApiResponses
({
@ApiResponse
(
code
=
200
,
message
=
"OK"
,
response
=
CurriculumInfoVO
.
class
)})
@PostMapping
(
"addCurriculum"
)
public
ResultBody
addCurriculum
(
@Validated
(
Insert
.
class
)
@RequestBody
CurriculumInfoVO
curriculumInfoVO
)
{
return
ResultBody
.
success
(
flyerTrainingService
.
addCurriculum
(
curriculumInfoVO
));
}
@ApiOperation
(
value
=
"V1.0.1修改课程"
)
@ApiResponses
({
@ApiResponse
(
code
=
200
,
message
=
"OK"
,
response
=
CurriculumInfoVO
.
class
)})
@PostMapping
(
"updateCurriculum"
)
public
ResultBody
updateCurriculum
(
@Validated
(
Update
.
class
)
@RequestBody
CurriculumInfoVO
curriculumInfoVO
)
{
return
ResultBody
.
success
(
flyerTrainingService
.
updateCurriculum
(
curriculumInfoVO
));
}
@ApiOperation
(
value
=
"V1.0.1删除课程"
)
@ApiResponses
({
@ApiResponse
(
code
=
200
,
message
=
"OK"
,
response
=
ResultBody
.
class
)})
@GetMapping
(
"removeCurriculum"
)
public
ResultBody
removeCurriculum
(
@RequestParam
Integer
id
)
{
return
ResultBody
.
success
(
flyerTrainingService
.
removeCurriculum
(
id
));
}
@Autowired
private
PmsAppApi
pmsAppApi
;
@ApiOperation
(
value
=
"V1.0.1test"
)
@ApiResponses
({
@ApiResponse
(
code
=
200
,
message
=
"OK"
,
response
=
ResultBody
.
class
)})
@GetMapping
(
"test"
)
public
ResultBody
test
()
{
return
ResultBody
.
success
(
pmsAppApi
.
feignQqueryCategoryInfoByType
(
3
));
}
}
}
release-service/src/main/java/com/mmc/csf/release/controller/WebsiteController.java
浏览文件 @
095806d2
...
@@ -4,12 +4,13 @@ import com.mmc.csf.common.util.web.ResultBody;
...
@@ -4,12 +4,13 @@ import com.mmc.csf.common.util.web.ResultBody;
import
com.mmc.csf.release.service.FlyerDummyService
;
import
com.mmc.csf.release.service.FlyerDummyService
;
import
com.mmc.csf.release.service.UavDummyService
;
import
com.mmc.csf.release.service.UavDummyService
;
import
com.mmc.csf.release.service.WebsiteService
;
import
com.mmc.csf.release.service.WebsiteService
;
import
com.mmc.csf.web.dto.WebsiteDTO
;
import
com.mmc.csf.web.dto.WebsiteRangeDTO
;
import
com.mmc.csf.web.dto.WebsiteRangeDTO
;
import
com.mmc.csf.web.vo.WebsiteVO
;
import
io.swagger.annotations.*
;
import
io.swagger.annotations.*
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.bind.annotation.RestController
;
/**
/**
* @Author LW
* @Author LW
...
@@ -30,31 +31,13 @@ public class WebsiteController {
...
@@ -30,31 +31,13 @@ public class WebsiteController {
@Autowired
@Autowired
private
UavDummyService
uavDummyService
;
private
UavDummyService
uavDummyService
;
@ApiOperation
(
value
=
"小程序--获取本省网点"
)
@ApiResponses
(
value
=
{
@ApiResponse
(
code
=
200
,
message
=
"OK"
,
response
=
WebsiteDTO
.
class
)})
@GetMapping
(
"getWebsiteByAdCode"
)
public
ResultBody
getWebsiteByAdCode
(
@ApiParam
(
value
=
"省编码"
)
@RequestParam
(
value
=
"code"
)
String
adCode
)
{
return
websiteService
.
getWebsiteByAdCode
(
adCode
);
}
@ApiOperation
(
value
=
"获取全国网点"
)
@ApiOperation
(
value
=
"获取全国网点"
)
@ApiResponses
(
value
=
{
@ApiResponse
(
code
=
200
,
message
=
"OK"
,
response
=
WebsiteRangeDTO
.
class
)})
@ApiResponses
(
value
=
{
@ApiResponse
(
code
=
200
,
message
=
"OK"
,
response
=
WebsiteRangeDTO
.
class
)})
@GetMapping
(
"getWebsiteList"
)
@GetMapping
(
"getWebsiteList"
)
public
ResultBody
getWebsiteList
(
@ApiParam
(
value
=
"用户当前经度"
,
required
=
true
)
@RequestParam
(
value
=
"lon"
)
Double
lon
,
public
ResultBody
getWebsiteList
(
@RequestParam
Integer
pageNo
,
@RequestParam
Integer
pageSize
,
@RequestParam
Double
lon
,
@RequestParam
Double
lat
)
{
@ApiParam
(
value
=
"用户当前纬度"
,
required
=
true
)
@RequestParam
(
value
=
"lat"
)
Double
lat
)
{
return
ResultBody
.
success
(
websiteService
.
getWebsiteList
(
pageNo
,
pageSize
,
lon
,
lat
));
return
websiteService
.
getWebsiteList
(
lon
,
lat
);
}
@ApiOperation
(
value
=
"获取当前省份距离最近的网点"
)
@ApiResponses
(
value
=
{
@ApiResponse
(
code
=
200
,
message
=
"OK"
,
response
=
WebsiteRangeDTO
.
class
)})
@PostMapping
(
"getProvinceWebsiteRange"
)
public
ResultBody
getProvinceWebsiteRange
(
@RequestBody
WebsiteVO
websiteVO
)
{
return
websiteService
.
getProvinceWebsiteRange
(
websiteVO
);
}
}
@ApiOperation
(
value
=
"全国飞手-海点数据-fake"
)
@ApiOperation
(
value
=
"全国飞手-海点数据-fake"
)
@ApiResponses
({
@ApiResponse
(
code
=
200
,
message
=
"OK"
,
response
=
ResultBody
.
class
)})
@ApiResponses
({
@ApiResponse
(
code
=
200
,
message
=
"OK"
,
response
=
ResultBody
.
class
)})
@GetMapping
(
"/flyer/bitmap"
)
@GetMapping
(
"/flyer/bitmap"
)
...
@@ -68,4 +51,11 @@ public class WebsiteController {
...
@@ -68,4 +51,11 @@ public class WebsiteController {
public
ResultBody
listUavDummys
(
@RequestParam
Integer
pageNo
,
@RequestParam
Integer
pageSize
,
@RequestParam
Double
lon
,
@RequestParam
Double
lat
)
{
public
ResultBody
listUavDummys
(
@RequestParam
Integer
pageNo
,
@RequestParam
Integer
pageSize
,
@RequestParam
Double
lon
,
@RequestParam
Double
lat
)
{
return
ResultBody
.
success
(
uavDummyService
.
listDummyUav
(
pageNo
,
pageSize
,
lon
,
lat
));
return
ResultBody
.
success
(
uavDummyService
.
listDummyUav
(
pageNo
,
pageSize
,
lon
,
lat
));
}
}
@ApiOperation
(
value
=
"全国维修-海点数据"
)
@ApiResponses
({
@ApiResponse
(
code
=
200
,
message
=
"OK"
,
response
=
ResultBody
.
class
)})
@GetMapping
(
"/maintain/bitmap"
)
public
ResultBody
listMaintainData
(
@RequestParam
Integer
pageNo
,
@RequestParam
Integer
pageSize
,
@RequestParam
Double
lon
,
@RequestParam
Double
lat
)
{
return
ResultBody
.
success
(
websiteService
.
listMaintainData
(
pageNo
,
pageSize
,
lon
,
lat
));
}
}
}
release-service/src/main/java/com/mmc/csf/release/dao/FlyerTrainingDao.java
浏览文件 @
095806d2
...
@@ -27,7 +27,7 @@ public interface FlyerTrainingDao {
...
@@ -27,7 +27,7 @@ public interface FlyerTrainingDao {
List
<
DronePilotLicenseVO
>
selectAllLicenses
();
List
<
DronePilotLicenseVO
>
selectAllLicenses
();
/**
/**
*
行业飞行
技能列表
*
课程
技能列表
*
*
* @return {@link List}<{@link FlightSkillsDO}>
* @return {@link List}<{@link FlightSkillsDO}>
*/
*/
...
@@ -59,4 +59,28 @@ public interface FlyerTrainingDao {
...
@@ -59,4 +59,28 @@ public interface FlyerTrainingDao {
List
<
CurriculumInfoDO
>
selectSkillCurriculum
(
Integer
type
);
List
<
CurriculumInfoDO
>
selectSkillCurriculum
(
Integer
type
);
CurriculumInfoDO
curriculumDetails
(
Integer
id
);
CurriculumInfoDO
curriculumDetails
(
Integer
id
);
/**
* 添加课程信息
* @param currInfoDO
*/
Integer
addCurriculum
(
CurriculumInfoDO
currInfoDO
);
/**
* 修改课程信息
* @param currInfoDO
*/
Integer
updateCurriculum
(
CurriculumInfoDO
currInfoDO
);
/**
* 删除课程
* @param id
*/
Integer
removeCurriculum
(
Integer
id
);
/**
* 课程技能列表
* @return
*/
List
<
FlightSkillsDO
>
treeCurriculumSkill
();
}
}
release-service/src/main/java/com/mmc/csf/release/dao/WebsiteDao.java
浏览文件 @
095806d2
...
@@ -3,6 +3,7 @@ package com.mmc.csf.release.dao;
...
@@ -3,6 +3,7 @@ package com.mmc.csf.release.dao;
import
com.mmc.csf.release.entity.DummyFlyerDO
;
import
com.mmc.csf.release.entity.DummyFlyerDO
;
import
com.mmc.csf.release.entity.DummyUavDO
;
import
com.mmc.csf.release.entity.DummyUavDO
;
import
com.mmc.csf.release.entity.MaintainDO
;
import
com.mmc.csf.release.entity.WebsiteInfoDO
;
import
com.mmc.csf.release.entity.WebsiteInfoDO
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Mapper
;
...
@@ -15,10 +16,6 @@ import java.util.List;
...
@@ -15,10 +16,6 @@ import java.util.List;
*/
*/
@Mapper
@Mapper
public
interface
WebsiteDao
{
public
interface
WebsiteDao
{
WebsiteInfoDO
getWebsiteByAdCode
(
String
adCode
);
List
<
WebsiteInfoDO
>
getWebsiteList
();
int
countDummyFlyer
();
int
countDummyFlyer
();
List
<
DummyFlyerDO
>
listDummyFlyer
(
Double
lon
,
Double
lat
,
Integer
pageNo
,
Integer
pageSize
);
List
<
DummyFlyerDO
>
listDummyFlyer
(
Double
lon
,
Double
lat
,
Integer
pageNo
,
Integer
pageSize
);
...
@@ -27,4 +24,12 @@ public interface WebsiteDao {
...
@@ -27,4 +24,12 @@ public interface WebsiteDao {
List
<
DummyUavDO
>
listDummyUav
(
Double
lon
,
Double
lat
,
Integer
pageNo
,
Integer
pageSize
);
List
<
DummyUavDO
>
listDummyUav
(
Double
lon
,
Double
lat
,
Integer
pageNo
,
Integer
pageSize
);
int
countMaintain
();
List
<
MaintainDO
>
listMaintain
(
Double
lon
,
Double
lat
,
Integer
pageNo
,
Integer
pageSize
);
List
<
WebsiteInfoDO
>
getWebsiteList
(
Double
lon
,
Double
lat
,
Integer
pageNo
,
Integer
pageSize
);
int
countWebsiteList
();
}
}
release-service/src/main/java/com/mmc/csf/release/entity/CurriculumInfoDO.java
浏览文件 @
095806d2
...
@@ -65,10 +65,31 @@ public class CurriculumInfoDO implements Serializable {
...
@@ -65,10 +65,31 @@ public class CurriculumInfoDO implements Serializable {
private
String
videoUrl
;
private
String
videoUrl
;
private
String
surfaceUrl
;
private
String
detailContent
;
/**
* 课程类型id
*/
private
Integer
categoriesId
;
public
CurriculumInfoDO
(
CurriculumInfoVO
curriculumInfoVO
)
{
this
.
id
=
curriculumInfoVO
.
getId
();
this
.
curriculumName
=
curriculumInfoVO
.
getCurriculumName
();
this
.
curriculumDesc
=
curriculumInfoVO
.
getCurriculumDesc
();
this
.
flightSkills
=
curriculumInfoVO
.
getFlightSkills
();
this
.
surfaceUrl
=
curriculumInfoVO
.
getSurfaceUrl
();
this
.
detailContent
=
curriculumInfoVO
.
getDetailContent
();
this
.
videoUrl
=
curriculumInfoVO
.
getVideoUrl
();
this
.
categoriesId
=
curriculumInfoVO
.
getCategoriesId
();
}
public
CurriculumInfoVO
buildCurriculumInfoVO
(){
public
CurriculumInfoVO
buildCurriculumInfoVO
(){
return
CurriculumInfoVO
.
builder
().
id
(
id
).
curriculumDesc
(
curriculumDesc
).
price
(
curriculumPrice
)
return
CurriculumInfoVO
.
builder
().
id
(
id
).
curriculumDesc
(
curriculumDesc
).
price
(
curriculumPrice
)
.
free
(
free
).
supplierName
(
"浙江科比特创新科技有限公司"
).
curriculumName
(
curriculumName
)
.
free
(
free
).
supplierName
(
"浙江科比特创新科技有限公司"
).
curriculumName
(
curriculumName
)
.
videoUrl
(
videoUrl
).
build
();
.
videoUrl
(
videoUrl
).
surfaceUrl
(
this
.
surfaceUrl
).
flightSkills
(
this
.
flightSkills
).
detailContent
(
this
.
detailContent
)
.
categoriesId
(
this
.
categoriesId
).
build
();
}
}
}
}
...
...
release-service/src/main/java/com/mmc/csf/release/entity/FlightSkillsDO.java
浏览文件 @
095806d2
...
@@ -7,6 +7,8 @@ import lombok.Data;
...
@@ -7,6 +7,8 @@ import lombok.Data;
import
lombok.NoArgsConstructor
;
import
lombok.NoArgsConstructor
;
import
java.io.Serializable
;
import
java.io.Serializable
;
import
java.util.List
;
import
java.util.stream.Collectors
;
/**
/**
* @Author LW
* @Author LW
...
@@ -20,10 +22,14 @@ public class FlightSkillsDO implements Serializable {
...
@@ -20,10 +22,14 @@ public class FlightSkillsDO implements Serializable {
private
static
final
long
serialVersionUID
=
-
6326079527453519916L
;
private
static
final
long
serialVersionUID
=
-
6326079527453519916L
;
@ApiModelProperty
(
value
=
"id"
)
@ApiModelProperty
(
value
=
"id"
)
private
Integer
id
;
private
Integer
id
;
@ApiModelProperty
(
value
=
"pid"
)
private
Integer
pid
;
@ApiModelProperty
(
value
=
"行业认证名称"
)
@ApiModelProperty
(
value
=
"行业认证名称"
)
private
String
skillsName
;
private
String
skillsName
;
@ApiModelProperty
(
value
=
"子技能"
)
private
List
<
FlightSkillsDO
>
childrenSkills
;
public
FlightSkillsVO
buildFlightSkillsVO
()
{
public
FlightSkillsVO
buildFlightSkillsVO
()
{
return
FlightSkillsVO
.
builder
().
id
(
id
).
skillsName
(
skillsName
).
build
();
return
FlightSkillsVO
.
builder
().
id
(
this
.
id
).
skillsName
(
this
.
skillsName
).
flightSkills
(
this
.
childrenSkills
==
null
?
null
:
this
.
childrenSkills
.
stream
().
map
(
FlightSkillsDO:
:
buildFlightSkillsVO
).
collect
(
Collectors
.
toList
())
).
build
();
}
}
}
}
release-service/src/main/java/com/mmc/csf/release/entity/MaintainDO.java
0 → 100644
浏览文件 @
095806d2
package
com
.
mmc
.
csf
.
release
.
entity
;
import
com.mmc.csf.web.dto.MaintainDTO
;
import
lombok.AllArgsConstructor
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
import
java.io.Serializable
;
import
java.math.BigDecimal
;
/**
* (MaintainDO)实体类
*
* @author makejava
* @since 2023-06-10 21:42:42
*/
@Data
@AllArgsConstructor
@NoArgsConstructor
public
class
MaintainDO
implements
Serializable
{
private
static
final
long
serialVersionUID
=
-
53401640557659711L
;
private
Integer
id
;
private
String
name
;
private
String
address
;
private
Double
lon
;
private
Double
lat
;
private
Double
distance
;
public
MaintainDTO
buildMaintainDTO
()
{
this
.
distance
=
this
.
distance
==
null
?
0
:
(
BigDecimal
.
valueOf
(
this
.
distance
).
setScale
(
2
,
BigDecimal
.
ROUND_HALF_DOWN
)).
doubleValue
();
return
MaintainDTO
.
builder
().
name
(
name
).
address
(
address
).
lon
(
this
.
lon
).
lat
(
this
.
lat
).
distance
(
this
.
distance
/
1000
).
build
();
}
}
release-service/src/main/java/com/mmc/csf/release/entity/WebsiteInfoDO.java
浏览文件 @
095806d2
package
com
.
mmc
.
csf
.
release
.
entity
;
package
com
.
mmc
.
csf
.
release
.
entity
;
import
com.alibaba.fastjson.JSONArray
;
import
com.alibaba.fastjson.JSONObject
;
import
com.mmc.csf.web.dto.WebsiteDTO
;
import
com.mmc.csf.web.dto.WebsiteRangeDTO
;
import
com.mmc.csf.web.dto.WebsiteRangeDTO
;
import
com.mmc.csf.web.vo.LocationVO
;
import
lombok.AllArgsConstructor
;
import
lombok.AllArgsConstructor
;
import
lombok.Data
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
import
lombok.NoArgsConstructor
;
import
java.io.Serializable
;
import
java.io.Serializable
;
import
java.util.Date
;
import
java.math.BigDecimal
;
import
java.util.List
;
/**
/**
* @Author LW
* @Author LW
...
@@ -23,31 +18,15 @@ import java.util.List;
...
@@ -23,31 +18,15 @@ import java.util.List;
@AllArgsConstructor
@AllArgsConstructor
public
class
WebsiteInfoDO
implements
Serializable
{
public
class
WebsiteInfoDO
implements
Serializable
{
private
Integer
id
;
private
Integer
id
;
private
String
adCod
e
;
private
String
nam
e
;
private
String
province
;
private
String
address
;
private
String
location
;
private
Double
lat
;
private
D
ate
createTime
;
private
D
ouble
lon
;
private
D
ate
updateTim
e
;
private
D
ouble
distanc
e
;
public
WebsiteDTO
buildWebsiteDTO
()
{
JSONArray
json
=
(
JSONArray
)
JSONObject
.
parse
(
this
.
location
);
return
WebsiteDTO
.
builder
()
.
id
(
this
.
id
)
.
adCode
(
this
.
adCode
)
.
province
(
this
.
province
)
.
location
(
json
)
.
createTime
(
this
.
createTime
)
.
build
();
}
public
WebsiteRangeDTO
buildWebsiteRangeDTO
()
{
public
WebsiteRangeDTO
buildWebsiteRangeDTO
()
{
List
<
LocationVO
>
list
=
JSONArray
.
parseArray
(
this
.
location
,
LocationVO
.
class
);
this
.
distance
=
this
.
distance
==
null
?
0
:
(
BigDecimal
.
valueOf
(
this
.
distance
).
setScale
(
2
,
BigDecimal
.
ROUND_HALF_DOWN
)).
doubleValue
();
return
WebsiteRangeDTO
.
builder
()
return
WebsiteRangeDTO
.
builder
().
name
(
name
).
address
(
address
).
lon
(
this
.
lon
).
lat
(
this
.
lat
).
distance
(
this
.
distance
/
1000
).
build
();
.
id
(
this
.
id
)
.
province
(
this
.
province
)
.
adCode
(
this
.
adCode
)
.
locationList
(
list
)
.
build
();
}
}
}
}
release-service/src/main/java/com/mmc/csf/release/feign/PmsAppApi.java
0 → 100644
浏览文件 @
095806d2
package
com
.
mmc
.
csf
.
release
.
feign
;
import
com.mmc.csf.release.feign.hystrix.PmsAppApHystrix
;
import
com.mmc.csf.release.flyer.dto.AllCategoryDTO
;
import
org.springframework.cloud.openfeign.FeignClient
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMethod
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
java.util.List
;
/**
* @author: zj
* @Date: 2023/6/10 20:23
*/
@FeignClient
(
url
=
"${iuav.pmsapp.url}"
,
name
=
"pms-svc"
,
fallback
=
PmsAppApHystrix
.
class
)
public
interface
PmsAppApi
{
@RequestMapping
(
value
=
"/pms/classify/feignQqueryCategoryInfoByType"
,
method
=
RequestMethod
.
GET
)
public
List
<
AllCategoryDTO
>
feignQqueryCategoryInfoByType
(
@RequestParam
Integer
type
);
}
release-service/src/main/java/com/mmc/csf/release/feign/config/FeignConfiguration.java
浏览文件 @
095806d2
package
com
.
mmc
.
csf
.
release
.
feign
.
config
;
package
com
.
mmc
.
csf
.
release
.
feign
.
config
;
import
com.mmc.csf.release.feign.hystrix.PmsAppApHystrix
;
import
com.mmc.csf.release.feign.hystrix.UserAppApiHystrix
;
import
com.mmc.csf.release.feign.hystrix.UserAppApiHystrix
;
import
org.springframework.context.annotation.Bean
;
import
org.springframework.context.annotation.Bean
;
import
org.springframework.context.annotation.ComponentScan
;
import
org.springframework.context.annotation.ComponentScan
;
...
@@ -18,4 +19,9 @@ public class FeignConfiguration {
...
@@ -18,4 +19,9 @@ public class FeignConfiguration {
public
UserAppApiHystrix
userAppApi
(){
public
UserAppApiHystrix
userAppApi
(){
return
new
UserAppApiHystrix
();
return
new
UserAppApiHystrix
();
}
}
@Bean
(
name
=
"PmsAppApHystrix"
)
public
PmsAppApHystrix
pmsAppApi
(){
return
new
PmsAppApHystrix
();
}
}
}
release-service/src/main/java/com/mmc/csf/release/feign/hystrix/PmsAppApHystrix.java
0 → 100644
浏览文件 @
095806d2
package
com
.
mmc
.
csf
.
release
.
feign
.
hystrix
;
import
com.mmc.csf.release.feign.PmsAppApi
;
import
com.mmc.csf.release.flyer.dto.AllCategoryDTO
;
import
lombok.extern.slf4j.Slf4j
;
import
java.util.List
;
/**
* @author: zj
* @Date: 2023/6/10 20:24
*/
@Slf4j
public
class
PmsAppApHystrix
implements
PmsAppApi
{
@Override
public
List
<
AllCategoryDTO
>
feignQqueryCategoryInfoByType
(
Integer
type
)
{
log
.
info
(
"熔断--feignQqueryCategoryInfoByType:"
+
type
);
return
null
;
}
}
release-service/src/main/java/com/mmc/csf/release/service/FlyerTrainingService.java
浏览文件 @
095806d2
...
@@ -3,7 +3,9 @@ package com.mmc.csf.release.service;
...
@@ -3,7 +3,9 @@ package com.mmc.csf.release.service;
import
com.mmc.csf.common.util.page.PageResult
;
import
com.mmc.csf.common.util.page.PageResult
;
import
com.mmc.csf.common.util.web.ResultBody
;
import
com.mmc.csf.common.util.web.ResultBody
;
import
com.mmc.csf.release.flyer.qo.CurriculumQo
;
import
com.mmc.csf.release.flyer.qo.CurriculumQo
;
import
com.mmc.csf.release.flyer.vo.CurriculumInfoVO
;
import
com.mmc.csf.release.flyer.vo.RegistrationVO
;
import
com.mmc.csf.release.flyer.vo.RegistrationVO
;
import
io.swagger.models.auth.In
;
/**
/**
* @Author LW
* @Author LW
...
@@ -50,4 +52,28 @@ public interface FlyerTrainingService {
...
@@ -50,4 +52,28 @@ public interface FlyerTrainingService {
ResultBody
licenseOrSkillQueryCurriculum
(
Integer
type
);
ResultBody
licenseOrSkillQueryCurriculum
(
Integer
type
);
ResultBody
curriculumDetails
(
Integer
id
);
ResultBody
curriculumDetails
(
Integer
id
);
/**
* 添加课程
* @param curriculumInfoVO
*/
Integer
addCurriculum
(
CurriculumInfoVO
curriculumInfoVO
);
/**
* 修改课程
* @param curriculumInfoVO
*/
Integer
updateCurriculum
(
CurriculumInfoVO
curriculumInfoVO
);
/**
* 删除课程
* @param id
*/
Integer
removeCurriculum
(
Integer
id
);
/**
* 课程列表
* @return
*/
ResultBody
treeCurriculumSkill
();
}
}
release-service/src/main/java/com/mmc/csf/release/service/WebsiteService.java
浏览文件 @
095806d2
package
com
.
mmc
.
csf
.
release
.
service
;
package
com
.
mmc
.
csf
.
release
.
service
;
import
com.mmc.csf.common.util.web.ResultBody
;
import
com.mmc.csf.common.util.page.PageResult
;
import
com.mmc.csf.web.vo.WebsiteVO
;
/**
/**
* @Author LW
* @Author LW
...
@@ -9,9 +8,8 @@ import com.mmc.csf.web.vo.WebsiteVO;
...
@@ -9,9 +8,8 @@ import com.mmc.csf.web.vo.WebsiteVO;
* 概要:
* 概要:
*/
*/
public
interface
WebsiteService
{
public
interface
WebsiteService
{
ResultBody
getWebsiteByAdCode
(
String
adCode
);
ResultBody
getWebsiteList
(
Double
lon
,
Double
lat
);
PageResult
listMaintainData
(
Integer
pageNo
,
Integer
pageSize
,
Double
lon
,
Double
lat
);
ResultBody
getProvinceWebsiteRange
(
WebsiteVO
websiteVO
);
PageResult
getWebsiteList
(
Integer
pageNo
,
Integer
pageSize
,
Double
lon
,
Double
lat
);
}
}
release-service/src/main/java/com/mmc/csf/release/service/impl/FlyerTrainingServiceImpl.java
浏览文件 @
095806d2
...
@@ -6,12 +6,18 @@ import com.mmc.csf.release.dao.FlyerTrainingDao;
...
@@ -6,12 +6,18 @@ import com.mmc.csf.release.dao.FlyerTrainingDao;
import
com.mmc.csf.release.entity.CurriculumInfoDO
;
import
com.mmc.csf.release.entity.CurriculumInfoDO
;
import
com.mmc.csf.release.entity.FlightSkillsDO
;
import
com.mmc.csf.release.entity.FlightSkillsDO
;
import
com.mmc.csf.release.entity.PilotRegistrationDO
;
import
com.mmc.csf.release.entity.PilotRegistrationDO
;
import
com.mmc.csf.release.feign.PmsAppApi
;
import
com.mmc.csf.release.flyer.dto.AllCategoryDTO
;
import
com.mmc.csf.release.flyer.dto.CategoriesInfoListDTO
;
import
com.mmc.csf.release.flyer.qo.CurriculumQo
;
import
com.mmc.csf.release.flyer.qo.CurriculumQo
;
import
com.mmc.csf.release.flyer.vo.CurriculumInfoVO
;
import
com.mmc.csf.release.flyer.vo.CurriculumInfoVO
;
import
com.mmc.csf.release.flyer.vo.DronePilotLicenseVO
;
import
com.mmc.csf.release.flyer.vo.DronePilotLicenseVO
;
import
com.mmc.csf.release.flyer.vo.FlightSkillsVO
;
import
com.mmc.csf.release.flyer.vo.RegistrationVO
;
import
com.mmc.csf.release.flyer.vo.RegistrationVO
;
import
com.mmc.csf.release.service.FlyerTrainingService
;
import
com.mmc.csf.release.service.FlyerTrainingService
;
import
io.swagger.models.auth.In
;
import
org.apache.commons.collections4.CollectionUtils
;
import
org.apache.commons.collections4.CollectionUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
javax.annotation.Resource
;
import
javax.annotation.Resource
;
...
@@ -32,6 +38,9 @@ public class FlyerTrainingServiceImpl implements FlyerTrainingService {
...
@@ -32,6 +38,9 @@ public class FlyerTrainingServiceImpl implements FlyerTrainingService {
@Resource
@Resource
private
FlyerTrainingDao
flyerTrainingDao
;
private
FlyerTrainingDao
flyerTrainingDao
;
@Autowired
private
PmsAppApi
pmsAppApi
;
@Override
@Override
public
ResultBody
pilotRegistration
(
RegistrationVO
registrationVO
,
Integer
userAccountId
)
{
public
ResultBody
pilotRegistration
(
RegistrationVO
registrationVO
,
Integer
userAccountId
)
{
PilotRegistrationDO
pilotRegistrationDO
=
new
PilotRegistrationDO
(
registrationVO
);
PilotRegistrationDO
pilotRegistrationDO
=
new
PilotRegistrationDO
(
registrationVO
);
...
@@ -79,7 +88,7 @@ public class FlyerTrainingServiceImpl implements FlyerTrainingService {
...
@@ -79,7 +88,7 @@ public class FlyerTrainingServiceImpl implements FlyerTrainingService {
@Override
@Override
public
PageResult
queryCurriculumInfoList
(
CurriculumQo
curriculumQo
)
{
public
PageResult
queryCurriculumInfoList
(
CurriculumQo
curriculumQo
)
{
Integer
SZ
=
440300
;
Integer
SZ
=
440300
;
if
(
curriculumQo
.
get
RegionId
()
!=
null
&&
!
curriculumQo
.
getRegionId
().
equals
(
SZ
))
{
if
(
curriculumQo
.
get
ProvinceCode
()
!=
null
&&
!
curriculumQo
.
getProvinceCode
().
equals
(
SZ
))
{
return
PageResult
.
buildPage
(
curriculumQo
.
getPageNo
(),
curriculumQo
.
getPageSize
(),
0
);
return
PageResult
.
buildPage
(
curriculumQo
.
getPageNo
(),
curriculumQo
.
getPageSize
(),
0
);
}
}
int
count
=
flyerTrainingDao
.
countCurriculumInfoList
(
curriculumQo
);
int
count
=
flyerTrainingDao
.
countCurriculumInfoList
(
curriculumQo
);
...
@@ -89,7 +98,22 @@ public class FlyerTrainingServiceImpl implements FlyerTrainingService {
...
@@ -89,7 +98,22 @@ public class FlyerTrainingServiceImpl implements FlyerTrainingService {
Integer
pageNo
=
curriculumQo
.
getPageNo
();
Integer
pageNo
=
curriculumQo
.
getPageNo
();
curriculumQo
.
buildCurrentPage
();
curriculumQo
.
buildCurrentPage
();
List
<
CurriculumInfoDO
>
curriculumList
=
flyerTrainingDao
.
listPageCurriculumInfo
(
curriculumQo
);
List
<
CurriculumInfoDO
>
curriculumList
=
flyerTrainingDao
.
listPageCurriculumInfo
(
curriculumQo
);
List
<
AllCategoryDTO
>
allCategoryDTOS
=
pmsAppApi
.
feignQqueryCategoryInfoByType
(
3
);
List
<
CurriculumInfoVO
>
list
=
curriculumList
.
stream
().
map
(
CurriculumInfoDO:
:
buildCurriculumInfoVO
).
collect
(
Collectors
.
toList
());
List
<
CurriculumInfoVO
>
list
=
curriculumList
.
stream
().
map
(
CurriculumInfoDO:
:
buildCurriculumInfoVO
).
collect
(
Collectors
.
toList
());
if
(
CollectionUtils
.
isNotEmpty
(
allCategoryDTOS
)){
list
.
stream
().
forEach
(
curriculumInfoVO
->
{
allCategoryDTOS
.
stream
().
forEach
(
directory
->
{
if
(
CollectionUtils
.
isNotEmpty
(
directory
.
getCategoriesInfoListDTO
())){
directory
.
getCategoriesInfoListDTO
().
stream
().
forEach
(
category
->
{
if
(
curriculumInfoVO
.
getCategoriesId
().
equals
(
category
.
getId
())){
curriculumInfoVO
.
setDirectoryName
(
directory
.
getName
());
curriculumInfoVO
.
setCategoriesName
(
category
.
getName
());
}
});
}
});
});
}
return
PageResult
.
buildPage
(
pageNo
,
curriculumQo
.
getPageSize
(),
count
,
list
);
return
PageResult
.
buildPage
(
pageNo
,
curriculumQo
.
getPageSize
(),
count
,
list
);
}
}
...
@@ -113,7 +137,46 @@ public class FlyerTrainingServiceImpl implements FlyerTrainingService {
...
@@ -113,7 +137,46 @@ public class FlyerTrainingServiceImpl implements FlyerTrainingService {
if
(
curriculumInfoDO
==
null
)
{
if
(
curriculumInfoDO
==
null
)
{
return
ResultBody
.
error
(
"课程不存在或已下架!"
);
return
ResultBody
.
error
(
"课程不存在或已下架!"
);
}
else
{
}
else
{
return
ResultBody
.
success
(
curriculumInfoDO
.
buildCurriculumInfoVO
());
CurriculumInfoVO
curriculumInfoVO
=
curriculumInfoDO
.
buildCurriculumInfoVO
();
List
<
AllCategoryDTO
>
allCategoryDTOS
=
pmsAppApi
.
feignQqueryCategoryInfoByType
(
3
);
for
(
AllCategoryDTO
directory
:
allCategoryDTOS
)
{
if
(
CollectionUtils
.
isNotEmpty
(
directory
.
getCategoriesInfoListDTO
())){
for
(
CategoriesInfoListDTO
category
:
directory
.
getCategoriesInfoListDTO
())
{
if
(
curriculumInfoVO
.
getCategoriesId
().
equals
(
category
.
getId
())){
curriculumInfoVO
.
setDirectoryName
(
directory
.
getName
());
curriculumInfoVO
.
setCategoriesName
(
category
.
getName
());
break
;
}
}
}
}
return
ResultBody
.
success
(
curriculumInfoVO
);
}
}
@Override
public
Integer
addCurriculum
(
CurriculumInfoVO
curriculumInfoVO
)
{
CurriculumInfoDO
currInfoDO
=
new
CurriculumInfoDO
(
curriculumInfoVO
);
// TODO Auto-generated method stub 暂时先设置科比特单位ID
currInfoDO
.
setSupplierId
(
1
);
return
flyerTrainingDao
.
addCurriculum
(
currInfoDO
);
}
@Override
public
Integer
updateCurriculum
(
CurriculumInfoVO
curriculumInfoVO
)
{
CurriculumInfoDO
currInfoDO
=
new
CurriculumInfoDO
(
curriculumInfoVO
);
return
flyerTrainingDao
.
updateCurriculum
(
currInfoDO
);
}
}
@Override
public
Integer
removeCurriculum
(
Integer
id
)
{
return
flyerTrainingDao
.
removeCurriculum
(
id
);
}
@Override
public
ResultBody
treeCurriculumSkill
()
{
List
<
FlightSkillsDO
>
flightSkillsList
=
flyerTrainingDao
.
treeCurriculumSkill
();
List
<
FlightSkillsVO
>
collect
=
flightSkillsList
.
stream
().
map
(
FlightSkillsDO:
:
buildFlightSkillsVO
).
collect
(
Collectors
.
toList
());
return
ResultBody
.
success
(
collect
);
}
}
}
}
release-service/src/main/java/com/mmc/csf/release/service/impl/WebsiteServiceImpl.java
浏览文件 @
095806d2
package
com
.
mmc
.
csf
.
release
.
service
.
impl
;
package
com
.
mmc
.
csf
.
release
.
service
.
impl
;
import
com.mmc.csf.common.util.other.LocationUtils
;
import
com.mmc.csf.common.util.page.PageResult
;
import
com.mmc.csf.common.util.web.ResultBody
;
import
com.mmc.csf.release.dao.WebsiteDao
;
import
com.mmc.csf.release.dao.WebsiteDao
;
import
com.mmc.csf.release.entity.MaintainDO
;
import
com.mmc.csf.release.entity.WebsiteInfoDO
;
import
com.mmc.csf.release.entity.WebsiteInfoDO
;
import
com.mmc.csf.release.service.WebsiteService
;
import
com.mmc.csf.release.service.WebsiteService
;
import
com.mmc.csf.web.dto.MaintainDTO
;
import
com.mmc.csf.web.dto.WebsiteRangeDTO
;
import
com.mmc.csf.web.dto.WebsiteRangeDTO
;
import
com.mmc.csf.web.vo.LocationVO
;
import
com.mmc.csf.web.vo.WebsiteVO
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
java.util.Comparator
;
import
java.util.List
;
import
java.util.List
;
import
java.util.stream.Collectors
;
import
java.util.stream.Collectors
;
...
@@ -25,45 +23,24 @@ public class WebsiteServiceImpl implements WebsiteService {
...
@@ -25,45 +23,24 @@ public class WebsiteServiceImpl implements WebsiteService {
@Autowired
@Autowired
private
WebsiteDao
websiteDao
;
private
WebsiteDao
websiteDao
;
@Override
public
ResultBody
getWebsiteByAdCode
(
String
adCode
)
{
WebsiteInfoDO
websiteInfoDO
=
websiteDao
.
getWebsiteByAdCode
(
adCode
);
return
ResultBody
.
success
(
websiteInfoDO
.
buildWebsiteDTO
());
}
@Override
@Override
public
ResultBody
getWebsiteList
(
Double
lon
,
Double
lat
)
{
public
PageResult
listMaintainData
(
Integer
pageNo
,
Integer
pageSize
,
Double
lon
,
Double
lat
)
{
List
<
WebsiteInfoDO
>
list
=
websiteDao
.
getWebsiteList
();
int
count
=
websiteDao
.
countMaintain
();
List
<
WebsiteRangeDTO
>
rangeList
=
list
.
stream
()
if
(
count
==
0
)
{
.
map
(
WebsiteInfoDO:
:
buildWebsiteRangeDTO
)
return
PageResult
.
buildPage
(
pageNo
,
pageSize
,
count
);
.
collect
(
Collectors
.
toList
());
for
(
WebsiteRangeDTO
websiteRangeDTO
:
rangeList
)
{
for
(
LocationVO
d
:
websiteRangeDTO
.
getLocationList
())
{
double
distance
=
0
;
if
(
d
.
getJd
()
!=
null
&&
d
.
getJd
()
!=
0
&&
d
.
getWd
()
!=
null
&&
d
.
getWd
()
!=
0
)
{
distance
=
LocationUtils
.
getDistance
(
d
.
getWd
(),
d
.
getJd
(),
lat
,
lon
);
}
d
.
setRange
(
distance
);
}
}
websiteRangeDTO
.
getLocationList
().
sort
(
Comparator
.
comparing
(
LocationVO:
:
getRange
));
List
<
MaintainDTO
>
list
=
websiteDao
.
listMaintain
(
lon
,
lat
,
(
pageNo
-
1
)
*
pageSize
,
pageSize
).
stream
().
map
(
MaintainDO:
:
buildMaintainDTO
).
collect
(
Collectors
.
toList
());
}
return
PageResult
.
buildPage
(
pageNo
,
pageSize
,
count
,
list
);
return
ResultBody
.
success
(
rangeList
);
}
}
@Override
@Override
public
ResultBody
getProvinceWebsiteRange
(
WebsiteVO
websiteVO
)
{
public
PageResult
getWebsiteList
(
Integer
pageNo
,
Integer
pageSize
,
Double
lon
,
Double
lat
)
{
WebsiteInfoDO
website
=
websiteDao
.
getWebsiteByAdCode
(
websiteVO
.
getAdCode
());
int
count
=
websiteDao
.
countWebsiteList
();
WebsiteRangeDTO
websiteRangeDTO
=
website
.
buildWebsiteRangeDTO
();
if
(
count
==
0
)
{
// 获取位置信息
return
PageResult
.
buildPage
(
pageNo
,
pageSize
,
count
);
List
<
LocationVO
>
locationList
=
websiteRangeDTO
.
getLocationList
();
for
(
LocationVO
d
:
locationList
)
{
double
distance
=
0
;
if
(
d
.
getJd
()
!=
null
&&
d
.
getJd
()
!=
0
&&
d
.
getWd
()
!=
null
&&
d
.
getWd
()
!=
0
)
{
distance
=
LocationUtils
.
getDistance
(
d
.
getWd
(),
d
.
getJd
(),
websiteVO
.
getLat
(),
websiteVO
.
getLon
());
}
d
.
setRange
(
distance
);
}
}
locationList
.
sort
(
Comparator
.
comparing
(
LocationVO:
:
getRange
));
List
<
WebsiteRangeDTO
>
list
=
websiteDao
.
getWebsiteList
(
lon
,
lat
,
(
pageNo
-
1
)
*
pageSize
,
pageSize
).
stream
().
map
(
WebsiteInfoDO:
:
buildWebsiteRangeDTO
).
collect
(
Collectors
.
toList
(
));
return
ResultBody
.
success
(
locationL
ist
);
return
PageResult
.
buildPage
(
pageNo
,
pageSize
,
count
,
l
ist
);
}
}
}
}
release-service/src/main/resources/application-dev.yml
浏览文件 @
095806d2
...
@@ -10,7 +10,7 @@ spring:
...
@@ -10,7 +10,7 @@ spring:
#Database
#Database
datasource
:
datasource
:
driver-class-name
:
com.mysql.cj.jdbc.Driver
driver-class-name
:
com.mysql.cj.jdbc.Driver
url
:
jdbc:mysql://mysql.default:3306/iuav_ims?allowMultiQueries=true&useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=GMT%2B8
url
:
jdbc:mysql://mysql.default:3306/iuav_ims
_dev
?allowMultiQueries=true&useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=GMT%2B8
username
:
tmj
username
:
tmj
password
:
MMC@2022&MYSQL
password
:
MMC@2022&MYSQL
# Druid数据源配置
# Druid数据源配置
...
@@ -144,6 +144,8 @@ ribbon:
...
@@ -144,6 +144,8 @@ ribbon:
iuav
:
iuav
:
userapp
:
userapp
:
url
:
http://cms-svc:35150
url
:
http://cms-svc:35150
pmsapp
:
url
:
http://pms-svc:8099
#mmc:
#mmc:
# appid: 80001
# appid: 80001
...
...
release-service/src/main/resources/application-local.yml
浏览文件 @
095806d2
...
@@ -10,7 +10,7 @@ spring:
...
@@ -10,7 +10,7 @@ spring:
#Database
#Database
datasource
:
datasource
:
driver-class-name
:
com.mysql.cj.jdbc.Driver
driver-class-name
:
com.mysql.cj.jdbc.Driver
url
:
jdbc:mysql://rm-wz9dd796t4j1giz6t2o.mysql.rds.aliyuncs.com:3306/iuav_ims?allowMultiQueries=true&useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=GMT%2B8
url
:
jdbc:mysql://rm-wz9dd796t4j1giz6t2o.mysql.rds.aliyuncs.com:3306/iuav_ims
_dev
?allowMultiQueries=true&useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=GMT%2B8
username
:
tmj
username
:
tmj
password
:
MMC@2022&MYSQL
password
:
MMC@2022&MYSQL
# Druid数据源配置
# Druid数据源配置
...
@@ -118,6 +118,8 @@ mybatis:
...
@@ -118,6 +118,8 @@ mybatis:
iuav
:
iuav
:
userapp
:
userapp
:
url
:
http://cms-svc:35150
url
:
http://cms-svc:35150
pmsapp
:
url
:
http://127.0.0.1:8099
##feign
##feign
#feign:
#feign:
...
...
release-service/src/main/resources/application-prod.yml
浏览文件 @
095806d2
...
@@ -144,6 +144,8 @@ ribbon:
...
@@ -144,6 +144,8 @@ ribbon:
iuav
:
iuav
:
userapp
:
userapp
:
url
:
http://cms-svc:35150
url
:
http://cms-svc:35150
pmsapp
:
url
:
http://pms-svc:8099
#mmc:
#mmc:
# appid: 80001
# appid: 80001
...
...
release-service/src/main/resources/application.yml
浏览文件 @
095806d2
spring
:
spring
:
profiles
:
profiles
:
active
:
local
active
:
local
main
:
banner-mode
:
off
logging
:
file
:
name
:
"
/var/log/app/${spring.application.name}.log"
---
---
spring
:
spring
:
...
...
release-service/src/main/resources/mapper/flyer/FlyerTrainingDao.xml
浏览文件 @
095806d2
...
@@ -4,6 +4,17 @@
...
@@ -4,6 +4,17 @@
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.mmc.csf.release.dao.FlyerTrainingDao"
>
<mapper
namespace=
"com.mmc.csf.release.dao.FlyerTrainingDao"
>
<resultMap
id=
"flightSkillsResultMap"
type=
"com.mmc.csf.release.entity.FlightSkillsDO"
>
<id
column=
"id"
property=
"id"
/>
<result
column=
"pid"
property=
"pid"
/>
<result
column=
"skills_name"
property=
"skillsName"
/>
<collection
property=
"childrenSkills"
ofType=
"com.mmc.csf.release.entity.FlightSkillsDO"
javaType=
"java.util.List"
>
<id
column=
"childId"
property=
"id"
/>
<result
column=
"childIdPid"
property=
"pid"
/>
<result
column=
"childIdSkillsName"
property=
"skillsName"
/>
</collection>
</resultMap>
<insert
id=
"insertPilotRegistrationInfo"
parameterType=
"com.mmc.csf.release.entity.PilotRegistrationDO"
<insert
id=
"insertPilotRegistrationInfo"
parameterType=
"com.mmc.csf.release.entity.PilotRegistrationDO"
useGeneratedKeys=
"true"
keyProperty=
"id"
>
useGeneratedKeys=
"true"
keyProperty=
"id"
>
INSERT INTO pilot_registration(apply_user_id, `name`, city, telephone, driving_license, province,
INSERT INTO pilot_registration(apply_user_id, `name`, city, telephone, driving_license, province,
...
@@ -12,6 +23,48 @@
...
@@ -12,6 +23,48 @@
VALUES (#{applyUserId}, #{name}, #{city}, #{telephone}, #{drivingLicense}, #{province}, #{uavLicenseLevelOne},
VALUES (#{applyUserId}, #{name}, #{city}, #{telephone}, #{drivingLicense}, #{province}, #{uavLicenseLevelOne},
#{uavLicenseLevelTwo}, #{uavLicenseLevelThree}, #{industryAppAuth}, #{remark})
#{uavLicenseLevelTwo}, #{uavLicenseLevelThree}, #{industryAppAuth}, #{remark})
</insert>
</insert>
<insert
id=
"addCurriculum"
keyProperty=
"id"
useGeneratedKeys=
"true"
parameterType=
"com.mmc.csf.release.entity.CurriculumInfoDO"
>
INSERT INTO `curriculum_info`(`curriculum_name`, `supplier_id`, `curriculum_desc`, `drone_pilot_license_id`, `flight_skills`, `categories_id`, `surface_url`, `video_url`, `detail_content`)
VALUES (#{curriculumName},#{supplierId},#{curriculumDesc},#{dronePilotLicenseId},#{flightSkills},#{categoriesId},#{surfaceUrl},#{videoUrl},#{detailContent});
</insert>
<update
id=
"updateCurriculum"
parameterType=
"com.mmc.csf.release.entity.CurriculumInfoDO"
>
UPDATE curriculum_info
<set>
<if
test=
"curriculumName != null"
>
curriculum_name = #{curriculumName},
</if>
<if
test=
"curriculumDesc != null"
>
curriculum_desc = #{curriculumDesc},
</if>
<if
test=
"dronePilotLicenseId != null"
>
drone_pilot_license_id = #{dronePilotLicenseId},
</if>
<if
test=
"flightSkills != null"
>
flight_skills = #{flightSkills},
</if>
<if
test=
"categoriesId != null"
>
categories_id = #{categoriesId},
</if>
<if
test=
"surfaceUrl != null"
>
surface_url = #{surfaceUrl},
</if>
<if
test=
"videoUrl != null"
>
video_url = #{videoUrl},
</if>
<if
test=
"detailContent "
>
detail_content = #{detailContent},
</if>
</set>
<where>
id = #{id}
</where>
</update>
<update
id=
"removeCurriculum"
>
update curriculum_info set is_deleted = 1 where id = #{id}
</update>
<select
id=
"selectAllLicenses"
resultType=
"com.mmc.csf.release.flyer.vo.DronePilotLicenseVO"
>
<select
id=
"selectAllLicenses"
resultType=
"com.mmc.csf.release.flyer.vo.DronePilotLicenseVO"
>
select id,
select id,
parent_id,
parent_id,
...
@@ -23,6 +76,7 @@
...
@@ -23,6 +76,7 @@
</select>
</select>
<select
id=
"listIndustryFlightSkills"
resultType=
"com.mmc.csf.release.entity.FlightSkillsDO"
>
<select
id=
"listIndustryFlightSkills"
resultType=
"com.mmc.csf.release.entity.FlightSkillsDO"
>
select id,
select id,
pid,
skills_name
skills_name
from flight_skills
from flight_skills
</select>
</select>
...
@@ -30,9 +84,12 @@
...
@@ -30,9 +84,12 @@
SELECT
SELECT
count(*)
count(*)
FROM
FROM
curriculum_info ci
INNER JOIN curriculum_video cv ON ci.id = cv.curriculum_info_id
curriculum_info ci
<where>
<where>
and ci.is_deleted = 0
and ci.is_deleted = 0
<if
test=
"curriculumName != null"
>
and ci.curriculum_name like CONCAT("%", #{curriculumName}, "%")
</if>
<if
test=
"licenseId != null"
>
<if
test=
"licenseId != null"
>
and ci.drone_pilot_license_id = #{licenseId}
and ci.drone_pilot_license_id = #{licenseId}
</if>
</if>
...
@@ -51,16 +108,25 @@
...
@@ -51,16 +108,25 @@
ci.is_free free,
ci.is_free free,
ci.drone_pilot_license_id,
ci.drone_pilot_license_id,
ci.flight_skills,
ci.flight_skills,
cv.curriculum_url videoUrl
ci.detail_content,
from curriculum_info ci INNER JOIN curriculum_video cv ON ci.id = cv.curriculum_info_id
ci.video_url,
ci.categories_id,
ci.surface_url
from curriculum_info ci
<where>
<where>
and ci.is_deleted = 0
and ci.is_deleted = 0
<if
test=
"curriculumName != null"
>
and ci.curriculum_name like CONCAT("%", #{curriculumName}, "%")
</if>
<if
test=
"licenseId != null"
>
<if
test=
"licenseId != null"
>
and drone_pilot_license_id = #{licenseId}
and drone_pilot_license_id = #{licenseId}
</if>
</if>
<if
test=
"flightSkillsId != null"
>
<if
test=
"flightSkillsId != null"
>
and flight_skills = #{flightSkillsId}
and flight_skills = #{flightSkillsId}
</if>
</if>
<if
test=
"categoriesId != null"
>
and categories_id = #{categoriesId}
</if>
</where>
</where>
order by ci.create_time desc
order by ci.create_time desc
LIMIT #{pageNo},#{pageSize}
LIMIT #{pageNo},#{pageSize}
...
@@ -102,10 +168,25 @@
...
@@ -102,10 +168,25 @@
ci.is_free free,
ci.is_free free,
ci.drone_pilot_license_id,
ci.drone_pilot_license_id,
ci.flight_skills,
ci.flight_skills,
cv.curriculum_url videoUrl
ci.detail_content,
ci.video_url,
ci.categories_id,
ci.surface_url
from curriculum_info ci
from curriculum_info ci
INNER JOIN curriculum_video cv ON ci.id = cv.curriculum_info_id
where ci.id = #{id}
where ci.id = #{id}
and ci.is_deleted = 0
and ci.is_deleted = 0
</select>
</select>
<select
id=
"treeCurriculumSkill"
resultMap=
"flightSkillsResultMap"
>
SELECT
fs0.id,
fs0.pid,
fs0.skills_name,
fs1.id as childId,
fs1.pid as childIdPid,
fs1.skills_name as childIdSkillsName
FROM
flight_skills fs0
INNER JOIN flight_skills fs1 ON fs0.id = fs1.pid
</select>
</mapper>
</mapper>
\ No newline at end of file
release-service/src/main/resources/mapper/website/WebsiteDao.xml
浏览文件 @
095806d2
...
@@ -28,10 +28,6 @@
...
@@ -28,10 +28,6 @@
from website_info
from website_info
where ad_code = #{adCode}
where ad_code = #{adCode}
</select>
</select>
<select
id=
"getWebsiteList"
resultType=
"com.mmc.csf.release.entity.WebsiteInfoDO"
>
select id, ad_code adCode, province, location, create_time createTime
from website_info
</select>
<select
id=
"countDummyFlyer"
resultType=
"Integer"
>
<select
id=
"countDummyFlyer"
resultType=
"Integer"
>
select count(*) from dummy_flyer
select count(*) from dummy_flyer
...
@@ -56,4 +52,36 @@
...
@@ -56,4 +52,36 @@
ORDER BY distance ASC
ORDER BY distance ASC
LIMIT #{pageNo},#{pageSize}
LIMIT #{pageNo},#{pageSize}
</select>
</select>
<select
id=
"countMaintain"
resultType=
"java.lang.Integer"
>
select count(*) from maintain
</select>
<select
id=
"listMaintain"
resultType=
"com.mmc.csf.release.entity.MaintainDO"
>
SELECT
id,
`name`,
address,
lon,
lat, st_distance_sphere (point (lon,lat),point (${lon},${lat})) AS distance
FROM
maintain
ORDER BY
distance ASC
LIMIT #{pageNo},#{pageSize}
</select>
<select
id=
"countWebsiteList"
resultType=
"java.lang.Integer"
>
select count(*) from website_info
</select>
<select
id=
"getWebsiteList"
resultType=
"com.mmc.csf.release.entity.WebsiteInfoDO"
>
SELECT
id,
`name`,
address,
lon,
lat, st_distance_sphere (point (lon,lat),point (${lon},${lat})) AS distance
FROM
website_info
ORDER BY
distance ASC
LIMIT #{pageNo},#{pageSize}
</select>
</mapper>
</mapper>
\ No newline at end of file
release-service/src/main/resources/not-check.yml
浏览文件 @
095806d2
...
@@ -23,6 +23,8 @@ data-filter:
...
@@ -23,6 +23,8 @@ data-filter:
-
/release/website/getWebsiteList
-
/release/website/getWebsiteList
-
/release/website/flyer/bitmap
-
/release/website/flyer/bitmap
-
/release/website/uav/bitmap
-
/release/website/uav/bitmap
-
/release/website/maintain/bitmap
-
/release/website/getProvinceWebsiteRange
-
/release/website/getProvinceWebsiteRange
-
/release/curriculum/getIndustryFlightSkills
-
/release/curriculum/getIndustryFlightSkills
-
/release/curriculum/getDronePilotLicense
-
/release/curriculum/getDronePilotLicense
-
/release/module/listBannerImg
\ No newline at end of file
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论