Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
I
ims
概览
概览
详情
活动
周期分析
版本库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
问题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
iuav
ims
Commits
e12bed6a
提交
e12bed6a
authored
7月 19, 2023
作者:
zhenjie
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'develop'
上级
074dac33
b23e2129
显示空白字符变更
内嵌
并排
正在显示
18 个修改的文件
包含
279 行增加
和
148 行删除
+279
-148
pom.xml
csf-common/csf-common-model/pom.xml
+1
-0
LicenseOrganizationsDTO.java
...java/com/mmc/csf/licence/dto/LicenseOrganizationsDTO.java
+27
-9
LicenseTrainingProgramsDTO.java
...a/com/mmc/csf/licence/dto/LicenseTrainingProgramsDTO.java
+2
-1
LicenseOrganizationsQO.java
...n/java/com/mmc/csf/licence/qo/LicenseOrganizationsQO.java
+1
-1
LicenseOrganizationsVO.java
...n/java/com/mmc/csf/licence/vo/LicenseOrganizationsVO.java
+26
-15
LicenseTrainingProgramsVO.java
...ava/com/mmc/csf/licence/vo/LicenseTrainingProgramsVO.java
+9
-4
ResultEnum.java
...src/main/java/com/mmc/csf/common/util/web/ResultEnum.java
+1
-1
deployment.yaml
kustomization/base/deployment.yaml
+4
-6
kustomization.yaml
kustomization/overlays/dev/kustomization.yaml
+1
-1
LicenceBackgroundDao.java
...com/mmc/csf/release/dao/licence/LicenceBackgroundDao.java
+2
-9
LicenseOrganizationsDO.java
...mc/csf/release/entity/licence/LicenseOrganizationsDO.java
+22
-0
LicenseProgramsDO.java
...com/mmc/csf/release/entity/licence/LicenseProgramsDO.java
+2
-1
LicenseTrainingProgramsDO.java
...csf/release/entity/licence/LicenseTrainingProgramsDO.java
+7
-3
GlobalExceptionHandler.java
...ava/com/mmc/csf/release/error/GlobalExceptionHandler.java
+93
-0
LicenceBackgroundServiceImpl.java
...se/service/licence/impl/LicenceBackgroundServiceImpl.java
+29
-10
application-local.yml
release-service/src/main/resources/application-local.yml
+10
-0
LicenceBackgroundDao.xml
...rc/main/resources/mapper/licence/LicenceBackgroundDao.xml
+40
-87
not-check.yml
release-service/src/main/resources/not-check.yml
+2
-0
没有找到文件。
csf-common/csf-common-model/pom.xml
浏览文件 @
e12bed6a
...
@@ -27,6 +27,7 @@
...
@@ -27,6 +27,7 @@
<dependency>
<dependency>
<groupId>
org.hibernate.validator
</groupId>
<groupId>
org.hibernate.validator
</groupId>
<artifactId>
hibernate-validator
</artifactId>
<artifactId>
hibernate-validator
</artifactId>
<version>
6.0.7.Final
</version>
</dependency>
</dependency>
<dependency>
<dependency>
<groupId>
cn.afterturn
</groupId>
<groupId>
cn.afterturn
</groupId>
...
...
csf-common/csf-common-model/src/main/java/com/mmc/csf/licence/dto/LicenseOrganizationsDTO.java
浏览文件 @
e12bed6a
...
@@ -7,10 +7,12 @@ import lombok.AllArgsConstructor;
...
@@ -7,10 +7,12 @@ import lombok.AllArgsConstructor;
import
lombok.Builder
;
import
lombok.Builder
;
import
lombok.Data
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
import
lombok.NoArgsConstructor
;
import
org.springframework.format.annotation.DateTimeFormat
;
import
javax.validation.constraints.NotBlank
;
import
javax.validation.constraints.NotBlank
;
import
javax.validation.constraints.NotNull
;
import
javax.validation.constraints.NotNull
;
import
javax.validation.constraints.Size
;
import
javax.validation.constraints.Size
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.List
;
/**
/**
...
@@ -45,37 +47,53 @@ public class LicenseOrganizationsDTO {
...
@@ -45,37 +47,53 @@ public class LicenseOrganizationsDTO {
@Size
(
max
=
25
,
message
=
"机构名称不能超过25个字符"
)
@Size
(
max
=
25
,
message
=
"机构名称不能超过25个字符"
)
private
String
name
;
private
String
name
;
@ApiModelProperty
(
nam
e
=
"机构地区"
,
example
=
"110000,110100"
)
@ApiModelProperty
(
valu
e
=
"机构地区"
,
example
=
"110000,110100"
)
@NotBlank
(
message
=
"机构地区不能为空"
,
groups
=
{
Create
.
class
,
Update
.
class
})
@NotBlank
(
message
=
"机构地区不能为空"
,
groups
=
{
Create
.
class
,
Update
.
class
})
private
String
region
;
private
String
region
;
@ApiModelProperty
(
nam
e
=
"机构地区名称"
,
example
=
"河北省,石家庄市"
,
required
=
true
)
@ApiModelProperty
(
valu
e
=
"机构地区名称"
,
example
=
"河北省,石家庄市"
,
required
=
true
)
@NotBlank
(
message
=
"机构地区名称"
,
groups
=
{
Create
.
class
,
Update
.
class
})
@NotBlank
(
message
=
"机构地区名称"
,
groups
=
{
Create
.
class
,
Update
.
class
})
private
String
regionName
;
private
String
regionName
;
@ApiModelProperty
(
nam
e
=
"机构详细地址"
,
example
=
"南山区"
)
@ApiModelProperty
(
valu
e
=
"机构详细地址"
,
example
=
"南山区"
)
@NotBlank
(
message
=
"机构详细地址不能为空"
,
groups
=
{
Create
.
class
,
Update
.
class
})
@NotBlank
(
message
=
"机构详细地址不能为空"
,
groups
=
{
Create
.
class
,
Update
.
class
})
private
String
detailedAddress
;
private
String
detailedAddress
;
@ApiModelProperty
(
nam
e
=
"是否是考点机构 0否 1是"
,
example
=
"0"
,
required
=
true
)
@ApiModelProperty
(
valu
e
=
"是否是考点机构 0否 1是"
,
example
=
"0"
,
required
=
true
)
@NotNull
(
message
=
"考点机构不能为空"
,
groups
=
{
Create
.
class
,
Update
.
class
})
@NotNull
(
message
=
"考点机构不能为空"
,
groups
=
{
Create
.
class
,
Update
.
class
})
private
Integer
testCenter
;
private
Integer
testCenter
;
@ApiModelProperty
(
nam
e
=
"机构规模id不能为空 "
,
example
=
"1"
)
@ApiModelProperty
(
valu
e
=
"机构规模id不能为空 "
,
example
=
"1"
)
//@NotNull(message = "机构规模id不能为空", groups = {Create.class, Update.class})
//@NotNull(message = "机构规模id不能为空", groups = {Create.class, Update.class})
private
Integer
scaleId
;
private
Integer
scaleId
;
@ApiModelProperty
(
nam
e
=
"机构规模名称"
,
example
=
"1"
)
@ApiModelProperty
(
valu
e
=
"机构规模名称"
,
example
=
"1"
)
private
String
scaleName
;
private
String
scaleName
;
@ApiModelProperty
(
nam
e
=
"机构描述"
,
example
=
"机构描述0001"
)
@ApiModelProperty
(
valu
e
=
"机构描述"
,
example
=
"机构描述0001"
)
//@NotNull(message = "机构描述", groups = {Create.class, Update.class})
//@NotNull(message = "机构描述", groups = {Create.class, Update.class})
private
String
description
;
private
String
description
;
@ApiModelProperty
(
nam
e
=
"机构详情"
,
example
=
"机构详情0001"
)
@ApiModelProperty
(
valu
e
=
"机构详情"
,
example
=
"机构详情0001"
)
//@NotNull(message = "机构描述", groups = {Create.class, Update.class})
//@NotNull(message = "机构描述", groups = {Create.class, Update.class})
private
String
detail
;
private
String
detail
;
@ApiModelProperty
(
nam
e
=
"培训项目"
,
required
=
false
)
@ApiModelProperty
(
valu
e
=
"培训项目"
,
required
=
false
)
private
List
<
LicenseTrainingProgramsDTO
>
programsDOList
;
private
List
<
LicenseTrainingProgramsDTO
>
programsDOList
;
@ApiModelProperty
(
value
=
"经度"
,
example
=
"40.892313123"
,
required
=
true
)
private
Double
longitude
;
@ApiModelProperty
(
value
=
"纬度"
,
example
=
"50.892313123"
,
required
=
true
)
private
Double
latitude
;
@DateTimeFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
@ApiModelProperty
(
value
=
"创建时间"
,
example
=
"2023-07-14"
,
required
=
true
)
private
Date
createTime
;
@DateTimeFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
@ApiModelProperty
(
value
=
"更新时间"
,
example
=
"2023-07-14"
,
required
=
true
)
private
Date
updateTime
;
}
}
csf-common/csf-common-model/src/main/java/com/mmc/csf/licence/dto/LicenseTrainingProgramsDTO.java
浏览文件 @
e12bed6a
...
@@ -11,6 +11,7 @@ import lombok.NoArgsConstructor;
...
@@ -11,6 +11,7 @@ import lombok.NoArgsConstructor;
import
javax.validation.constraints.NotBlank
;
import
javax.validation.constraints.NotBlank
;
import
javax.validation.constraints.NotNull
;
import
javax.validation.constraints.NotNull
;
import
javax.validation.constraints.Size
;
import
javax.validation.constraints.Size
;
import
java.math.BigDecimal
;
/**
/**
* @Author small
* @Author small
...
@@ -54,7 +55,7 @@ public class LicenseTrainingProgramsDTO {
...
@@ -54,7 +55,7 @@ public class LicenseTrainingProgramsDTO {
@ApiModelProperty
(
value
=
"培训价格"
,
example
=
"1000"
,
required
=
true
)
@ApiModelProperty
(
value
=
"培训价格"
,
example
=
"1000"
,
required
=
true
)
@NotNull
(
message
=
"培训价格不能为空"
,
groups
=
{
Create
.
class
,
Update
.
class
})
@NotNull
(
message
=
"培训价格不能为空"
,
groups
=
{
Create
.
class
,
Update
.
class
})
@Size
(
min
=
0
,
max
=
100000
,
message
=
"价格不能超过100000"
)
@Size
(
min
=
0
,
max
=
100000
,
message
=
"价格不能超过100000"
)
private
Integer
price
;
private
BigDecimal
price
;
@ApiModelProperty
(
value
=
"培训地点不能为空"
,
example
=
"广东省深圳市南山区XXX001"
,
required
=
true
)
@ApiModelProperty
(
value
=
"培训地点不能为空"
,
example
=
"广东省深圳市南山区XXX001"
,
required
=
true
)
@NotBlank
(
message
=
"培训地点不能为空"
,
groups
=
{
Create
.
class
,
Update
.
class
})
@NotBlank
(
message
=
"培训地点不能为空"
,
groups
=
{
Create
.
class
,
Update
.
class
})
...
...
csf-common/csf-common-model/src/main/java/com/mmc/csf/licence/qo/LicenseOrganizationsQO.java
浏览文件 @
e12bed6a
...
@@ -35,7 +35,7 @@ public class LicenseOrganizationsQO {
...
@@ -35,7 +35,7 @@ public class LicenseOrganizationsQO {
private
Integer
typeId
;
private
Integer
typeId
;
@ApiModelProperty
(
value
=
"开始时间,如果只有一个日期,就开始时间与结束时间一致"
,
example
=
"2023-07-14"
,
required
=
false
)
@ApiModelProperty
(
value
=
"开始时间,如果只有一个日期,就开始时间与结束时间一致"
,
example
=
"2023-07-14"
,
required
=
false
)
private
String
statTime
;
private
String
sta
r
tTime
;
@ApiModelProperty
(
value
=
"结束时间"
,
example
=
"2023-07-14"
,
required
=
false
)
@ApiModelProperty
(
value
=
"结束时间"
,
example
=
"2023-07-14"
,
required
=
false
)
private
String
endTime
;
private
String
endTime
;
...
...
csf-common/csf-common-model/src/main/java/com/mmc/csf/licence/vo/LicenseOrganizationsVO.java
浏览文件 @
e12bed6a
package
com
.
mmc
.
csf
.
licence
.
vo
;
package
com
.
mmc
.
csf
.
licence
.
vo
;
import
com.mmc.csf.release.model.group.Create
;
import
com.mmc.csf.release.model.group.Create
;
import
com.mmc.csf.release.model.group.Page
;
import
com.mmc.csf.release.model.group.Update
;
import
com.mmc.csf.release.model.group.Update
;
import
io.swagger.annotations.ApiModelProperty
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
lombok.Data
;
import
lombok.Value
;
import
org.springframework.validation.annotation.Validated
;
import
javax.validation.constraints.NotBlank
;
import
javax.validation.Valid
;
import
javax.validation.constraints.NotNull
;
import
javax.validation.constraints.*
;
import
javax.validation.constraints.Size
;
import
java.util.List
;
import
java.util.List
;
/**
/**
...
@@ -27,7 +29,7 @@ public class LicenseOrganizationsVO {
...
@@ -27,7 +29,7 @@ public class LicenseOrganizationsVO {
private
String
mainImage
;
private
String
mainImage
;
@ApiModelProperty
(
value
=
"机构副图不能为空"
,
example
=
"http://"
,
required
=
true
)
@ApiModelProperty
(
value
=
"机构副图不能为空"
,
example
=
"http://"
,
required
=
true
)
@NotBlank
(
message
=
"机构副图不能为空"
,
groups
=
{
Create
.
class
,
Update
.
class
})
//
@NotBlank(message = "机构副图不能为空", groups = {Create.class, Update.class})
private
String
auxiliaryPicture
;
private
String
auxiliaryPicture
;
@ApiModelProperty
(
value
=
"机构视频"
,
example
=
"http://"
)
@ApiModelProperty
(
value
=
"机构视频"
,
example
=
"http://"
)
...
@@ -38,37 +40,46 @@ public class LicenseOrganizationsVO {
...
@@ -38,37 +40,46 @@ public class LicenseOrganizationsVO {
@Size
(
max
=
25
,
message
=
"机构名称不能超过25个字符"
)
@Size
(
max
=
25
,
message
=
"机构名称不能超过25个字符"
)
private
String
name
;
private
String
name
;
@ApiModelProperty
(
nam
e
=
"机构地区编号"
,
example
=
"110000,130100"
,
required
=
true
)
@ApiModelProperty
(
valu
e
=
"机构地区编号"
,
example
=
"110000,130100"
,
required
=
true
)
@NotBlank
(
message
=
"机构地区不能为空"
,
groups
=
{
Create
.
class
,
Update
.
class
})
@NotBlank
(
message
=
"机构地区不能为空"
,
groups
=
{
Create
.
class
,
Update
.
class
})
private
String
region
;
private
String
region
;
@ApiModelProperty
(
name
=
"机构地区名称"
,
example
=
"河北省,石家庄市"
,
required
=
tru
e
)
@ApiModelProperty
(
value
=
"机构地区名称"
,
example
=
"河北省,石家庄市"
,
required
=
fals
e
)
@NotBlank
(
message
=
"机构地区名称"
,
groups
=
{
Create
.
class
,
Update
.
class
})
//
@NotBlank(message = "机构地区名称", groups = {Create.class, Update.class})
private
String
regionName
;
private
String
regionName
;
@ApiModelProperty
(
name
=
"机构详细地址"
,
example
=
"南山区"
,
required
=
true
)
@ApiModelProperty
(
value
=
"经度"
,
example
=
"40.892313123"
,
required
=
true
)
@NotBlank
(
message
=
"机构详细地址不能为空"
,
groups
=
{
Create
.
class
,
Update
.
class
})
private
Double
longitude
;
@ApiModelProperty
(
value
=
"纬度"
,
example
=
"50.892313123"
,
required
=
true
)
private
Double
latitude
;
@ApiModelProperty
(
value
=
"机构详细地址"
,
example
=
"南山区"
,
required
=
false
)
//@NotBlank(message = "机构详细地址不能为空", groups = {Create.class, Update.class})
private
String
detailedAddress
;
private
String
detailedAddress
;
@ApiModelProperty
(
nam
e
=
"是否是考点机构 0否 1是"
,
example
=
"0"
,
required
=
true
)
@ApiModelProperty
(
valu
e
=
"是否是考点机构 0否 1是"
,
example
=
"0"
,
required
=
true
)
@NotNull
(
message
=
"考点机构不能为空 0否 1是"
,
groups
=
{
Create
.
class
,
Update
.
class
})
@NotNull
(
message
=
"考点机构不能为空 0否 1是"
,
groups
=
{
Create
.
class
,
Update
.
class
})
private
Integer
testCenter
;
private
Integer
testCenter
;
@ApiModelProperty
(
nam
e
=
"机构规模id不能为空"
,
example
=
"1"
)
@ApiModelProperty
(
valu
e
=
"机构规模id不能为空"
,
example
=
"1"
)
//@NotNull(message = "机构规模id不能为空", groups = {Create.class, Update.class})
//@NotNull(message = "机构规模id不能为空", groups = {Create.class, Update.class})
// @Size(max = 4, message = "机构规模id不能超过4", groups = {Create.class, Update.class})
@Max
(
value
=
4
,
groups
=
{
Create
.
class
,
Update
.
class
},
message
=
"机构规模id不能超过4"
)
private
Integer
scaleId
;
private
Integer
scaleId
;
@ApiModelProperty
(
nam
e
=
"机构描述"
,
example
=
"机构描述0001"
)
@ApiModelProperty
(
valu
e
=
"机构描述"
,
example
=
"机构描述0001"
)
//@NotNull(message = "机构描述", groups = {Create.class, Update.class})
//@NotNull(message = "机构描述", groups = {Create.class, Update.class})
private
String
description
;
private
String
description
;
@ApiModelProperty
(
nam
e
=
"机构详情"
,
example
=
"机构详情0001"
,
required
=
true
)
@ApiModelProperty
(
valu
e
=
"机构详情"
,
example
=
"机构详情0001"
,
required
=
true
)
@NotNull
(
message
=
"机构详情"
,
groups
=
{
Create
.
class
,
Update
.
class
})
@NotNull
(
message
=
"机构详情"
,
groups
=
{
Create
.
class
,
Update
.
class
})
private
String
detail
;
private
String
detail
;
@ApiModelProperty
(
name
=
"培训项目"
,
required
=
true
)
@ApiModelProperty
(
value
=
"培训项目"
,
required
=
true
)
@NotNull
(
message
=
"培训项目"
,
groups
=
{
Create
.
class
,
Update
.
class
})
@NotNull
(
message
=
"培训项目不能为空"
,
groups
=
{
Create
.
class
,
Update
.
class
})
@Valid
private
List
<
LicenseTrainingProgramsVO
>
trainingProgramsVOS
;
private
List
<
LicenseTrainingProgramsVO
>
trainingProgramsVOS
;
...
...
csf-common/csf-common-model/src/main/java/com/mmc/csf/licence/vo/LicenseTrainingProgramsVO.java
浏览文件 @
e12bed6a
...
@@ -6,8 +6,10 @@ import io.swagger.annotations.ApiModelProperty;
...
@@ -6,8 +6,10 @@ import io.swagger.annotations.ApiModelProperty;
import
lombok.Data
;
import
lombok.Data
;
import
org.hibernate.validator.constraints.Range
;
import
org.hibernate.validator.constraints.Range
;
import
javax.validation.constraints.Max
;
import
javax.validation.constraints.NotBlank
;
import
javax.validation.constraints.NotBlank
;
import
javax.validation.constraints.NotNull
;
import
javax.validation.constraints.NotNull
;
import
java.math.BigDecimal
;
import
java.util.Objects
;
import
java.util.Objects
;
/**
/**
...
@@ -20,28 +22,31 @@ public class LicenseTrainingProgramsVO {
...
@@ -20,28 +22,31 @@ public class LicenseTrainingProgramsVO {
private
static
final
long
serialVersionUID
=
-
5814724843819090363L
;
private
static
final
long
serialVersionUID
=
-
5814724843819090363L
;
@ApiModelProperty
(
value
=
"培训id"
,
example
=
"1"
)
@ApiModelProperty
(
value
=
"培训id"
,
example
=
"1"
)
@NotNull
(
message
=
"培训id不能为空"
,
groups
=
Update
.
class
)
//
@NotNull(message = "培训id不能为空", groups = Update.class)
private
Integer
id
;
private
Integer
id
;
@ApiModelProperty
(
value
=
"培训等级id"
,
example
=
"1"
,
required
=
true
)
@ApiModelProperty
(
value
=
"培训等级id"
,
example
=
"1"
,
required
=
true
)
@NotNull
(
message
=
"培训等级id不能为空"
,
groups
=
{
Create
.
class
,
Update
.
class
})
@NotNull
(
message
=
"培训等级id不能为空"
,
groups
=
{
Create
.
class
,
Update
.
class
})
@Max
(
value
=
3
,
groups
=
{
Create
.
class
,
Update
.
class
},
message
=
"培训等级id不能超过3"
)
private
Integer
gradeId
;
private
Integer
gradeId
;
@ApiModelProperty
(
value
=
"培训机型id"
,
example
=
"1"
,
required
=
true
)
@ApiModelProperty
(
value
=
"培训机型id"
,
example
=
"1"
,
required
=
true
)
@NotNull
(
message
=
"培训机型id不能为空"
,
groups
=
{
Create
.
class
,
Update
.
class
})
@NotNull
(
message
=
"培训机型id不能为空"
,
groups
=
{
Create
.
class
,
Update
.
class
})
@Max
(
value
=
4
,
groups
=
{
Create
.
class
,
Update
.
class
},
message
=
"培训机型id不能超过4"
)
private
Integer
modelsId
;
private
Integer
modelsId
;
@ApiModelProperty
(
value
=
"培训类型id"
,
example
=
"1"
,
required
=
true
)
@ApiModelProperty
(
value
=
"培训类型id"
,
example
=
"1"
,
required
=
true
)
@NotNull
(
message
=
"培训类型id不能为空"
,
groups
=
{
Create
.
class
,
Update
.
class
})
@NotNull
(
message
=
"培训类型id不能为空"
,
groups
=
{
Create
.
class
,
Update
.
class
})
@Max
(
value
=
2
,
groups
=
{
Create
.
class
,
Update
.
class
},
message
=
"培训类型id不能超过2"
)
private
Integer
typeId
;
private
Integer
typeId
;
@ApiModelProperty
(
value
=
"培训价格"
,
example
=
"1000"
,
required
=
true
)
@ApiModelProperty
(
value
=
"培训价格"
,
example
=
"1000"
,
required
=
true
)
@NotNull
(
message
=
"培训价格不能为空"
,
groups
=
{
Create
.
class
,
Update
.
class
})
@NotNull
(
message
=
"培训价格不能为空"
,
groups
=
{
Create
.
class
,
Update
.
class
})
@Range
(
min
=
0
,
max
=
100000
,
message
=
"价格不能超过100000"
)
@Range
(
min
=
0
,
max
=
100000
,
message
=
"价格不能超过100000"
)
private
Integer
price
;
private
BigDecimal
price
;
@ApiModelProperty
(
value
=
"培训地点不能为空"
,
example
=
"广东省深圳市南山区XXX001"
,
required
=
true
)
//
@ApiModelProperty(value = "培训地点不能为空", example = "广东省深圳市南山区XXX001", required = true)
@NotBlank
(
message
=
"培训地点不能为空"
,
groups
=
{
Create
.
class
,
Update
.
class
})
//
@NotBlank(message = "培训地点不能为空", groups = {Create.class, Update.class})
private
String
place
;
private
String
place
;
@ApiModelProperty
(
value
=
"培训主图不能为空"
,
example
=
"http://"
,
required
=
true
)
@ApiModelProperty
(
value
=
"培训主图不能为空"
,
example
=
"http://"
,
required
=
true
)
...
...
csf-common/csf-common-util/src/main/java/com/mmc/csf/common/util/web/ResultEnum.java
浏览文件 @
e12bed6a
...
@@ -404,7 +404,7 @@ public enum ResultEnum implements BaseErrorInfoInterface {
...
@@ -404,7 +404,7 @@ public enum ResultEnum implements BaseErrorInfoInterface {
// 论坛
// 论坛
DYNAMIC_SENSITIVE_INFO
(
"50100"
,
"发布信息涉及敏感信息!"
),
DYNAMIC_SENSITIVE_INFO
(
"50100"
,
"发布信息涉及敏感信息!"
),
THE_ORGANIZATION_NAME_ALREADY_EXISTS
(
"60001"
,
"机构名称已存在"
),
THE_ORGANIZATION_NAME_ALREADY_EXISTS
(
"60001"
,
"机构名称已存在"
),
THREE_FIELDS_CAN_BE_REPEATED
(
"60002"
,
"机型、等级、
价格
存在重复"
);
THREE_FIELDS_CAN_BE_REPEATED
(
"60002"
,
"机型、等级、
类型
存在重复"
);
/**
/**
* 错误码
* 错误码
*
*
...
...
kustomization/base/deployment.yaml
浏览文件 @
e12bed6a
...
@@ -19,9 +19,9 @@ spec:
...
@@ -19,9 +19,9 @@ spec:
-
name
:
ims
-
name
:
ims
image
:
REGISTRY/NAMESPACE/IMAGE:TAG
image
:
REGISTRY/NAMESPACE/IMAGE:TAG
readinessProbe
:
readinessProbe
:
initialDelaySeconds
:
480
initialDelaySeconds
:
15
periodSeconds
:
10
periodSeconds
:
5
failureThreshold
:
2
0
failureThreshold
:
1
0
httpGet
:
httpGet
:
path
:
/release/actuator/health/readiness
path
:
/release/actuator/health/readiness
port
:
ims-port
port
:
ims-port
...
@@ -31,9 +31,7 @@ spec:
...
@@ -31,9 +31,7 @@ spec:
-
name
:
localtime
-
name
:
localtime
mountPath
:
/etc/localtime
mountPath
:
/etc/localtime
readOnly
:
true
readOnly
:
true
resources
:
resources
:
{
}
limits
:
cpu
:
100m
ports
:
ports
:
-
containerPort
:
10001
-
containerPort
:
10001
name
:
ims-port
name
:
ims-port
...
...
kustomization/overlays/dev/kustomization.yaml
浏览文件 @
e12bed6a
...
@@ -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
:
533f6e1055f6df81c13c487255ce13cff5add01d
newTag
:
8741c5ccb039f019178fcca3aa909112dae7fafe
release-service/src/main/java/com/mmc/csf/release/dao/licence/LicenceBackgroundDao.java
浏览文件 @
e12bed6a
...
@@ -19,19 +19,12 @@ public interface LicenceBackgroundDao {
...
@@ -19,19 +19,12 @@ public interface LicenceBackgroundDao {
void
insertOrganizations
(
LicenseOrganizationsDO
organizationsDO
);
void
insertOrganizations
(
LicenseOrganizationsDO
organizationsDO
);
void
insertLicenseOrgTraining
(
List
<
Integer
>
orgTrainingIds
,
Integer
orgId
);
int
countId
(
LicenseOrganizationsDO
organizationsDO
);
int
countId
(
LicenseOrganizationsDO
organizationsDO
);
void
removeOrgAndTraining
(
Integer
id
);
void
removeOrgAndTraining
(
Integer
id
);
void
updateOrganizations
(
LicenseOrganizationsDO
organizationsDO
);
void
updateOrganizations
(
LicenseOrganizationsDO
organizationsDO
);
void
removeOrganizations
(
Integer
id
);
void
removeOrgTraining
(
Integer
id
);
int
countPro
(
Integer
modelsId
,
Integer
gradeId
,
Integer
typeId
,
Integer
id
);
void
insertProject
(
LicenseTrainingProgramsDO
programsDO
);
void
insertProject
(
LicenseTrainingProgramsDO
programsDO
);
...
@@ -39,8 +32,6 @@ public interface LicenceBackgroundDao {
...
@@ -39,8 +32,6 @@ public interface LicenceBackgroundDao {
void
removeProject
(
Integer
id
);
void
removeProject
(
Integer
id
);
List
<
LicenseProgramsDO
>
LicenseTrainingProgramsDTO
(
Integer
id
);
int
countListOrgPage
(
LicenseOrganizationsQO
organizationsQO
);
int
countListOrgPage
(
LicenseOrganizationsQO
organizationsQO
);
List
<
LicenseOrganizationsDO
>
listOrgPage
(
LicenseOrganizationsQO
organizationsQO
);
List
<
LicenseOrganizationsDO
>
listOrgPage
(
LicenseOrganizationsQO
organizationsQO
);
...
@@ -49,4 +40,6 @@ public interface LicenceBackgroundDao {
...
@@ -49,4 +40,6 @@ public interface LicenceBackgroundDao {
List
<
LicenseProgramsDO
>
trainingProgram
(
LicenseOrganizationsQO
organizationsQO
);
List
<
LicenseProgramsDO
>
trainingProgram
(
LicenseOrganizationsQO
organizationsQO
);
int
removeOrg
(
Integer
id
);
int
removeOrg
(
Integer
id
);
List
<
String
>
getOrgName
(
List
<
Integer
>
orgCode
);
}
}
release-service/src/main/java/com/mmc/csf/release/entity/licence/LicenseOrganizationsDO.java
浏览文件 @
e12bed6a
...
@@ -9,9 +9,11 @@ import io.swagger.annotations.ApiModelProperty;
...
@@ -9,9 +9,11 @@ import io.swagger.annotations.ApiModelProperty;
import
lombok.AllArgsConstructor
;
import
lombok.AllArgsConstructor
;
import
lombok.Data
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
import
lombok.NoArgsConstructor
;
import
org.springframework.format.annotation.DateTimeFormat
;
import
javax.validation.constraints.NotBlank
;
import
javax.validation.constraints.NotBlank
;
import
javax.validation.constraints.NotNull
;
import
javax.validation.constraints.NotNull
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.List
;
/**
/**
...
@@ -77,6 +79,20 @@ public class LicenseOrganizationsDO {
...
@@ -77,6 +79,20 @@ public class LicenseOrganizationsDO {
private
List
<
LicenseTrainingProgramsDTO
>
programsDOList
;
private
List
<
LicenseTrainingProgramsDTO
>
programsDOList
;
@ApiModelProperty
(
value
=
"经度"
,
example
=
"40.892313123"
,
required
=
true
)
private
Double
longitude
;
@ApiModelProperty
(
value
=
"纬度"
,
example
=
"50.892313123"
,
required
=
true
)
private
Double
latitude
;
@DateTimeFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
@ApiModelProperty
(
value
=
"创建时间"
,
example
=
"2023-07-14"
,
required
=
true
)
private
Date
createTime
;
@DateTimeFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
@ApiModelProperty
(
value
=
"更新时间"
,
example
=
"2023-07-14"
,
required
=
true
)
private
Date
updateTime
;
/**
/**
* VO类转换
* VO类转换
*/
*/
...
@@ -93,6 +109,8 @@ public class LicenseOrganizationsDO {
...
@@ -93,6 +109,8 @@ public class LicenseOrganizationsDO {
this
.
detail
=
organizationsVO
.
getDetail
();
this
.
detail
=
organizationsVO
.
getDetail
();
this
.
detailedAddress
=
organizationsVO
.
getDetailedAddress
();
this
.
detailedAddress
=
organizationsVO
.
getDetailedAddress
();
this
.
regionName
=
organizationsVO
.
getRegionName
();
this
.
regionName
=
organizationsVO
.
getRegionName
();
this
.
longitude
=
organizationsVO
.
getLongitude
();
this
.
latitude
=
organizationsVO
.
getLatitude
();
}
}
...
@@ -117,6 +135,10 @@ public class LicenseOrganizationsDO {
...
@@ -117,6 +135,10 @@ public class LicenseOrganizationsDO {
.
detail
(
this
.
detail
)
.
detail
(
this
.
detail
)
.
programsDOList
(
this
.
programsDOList
)
.
programsDOList
(
this
.
programsDOList
)
.
regionName
(
this
.
regionName
)
.
regionName
(
this
.
regionName
)
.
longitude
(
this
.
longitude
)
.
latitude
(
this
.
latitude
)
.
createTime
(
this
.
createTime
)
.
updateTime
(
this
.
updateTime
)
.
build
();
.
build
();
}
}
}
}
release-service/src/main/java/com/mmc/csf/release/entity/licence/LicenseProgramsDO.java
浏览文件 @
e12bed6a
...
@@ -12,6 +12,7 @@ import lombok.NoArgsConstructor;
...
@@ -12,6 +12,7 @@ import lombok.NoArgsConstructor;
import
javax.validation.constraints.NotBlank
;
import
javax.validation.constraints.NotBlank
;
import
javax.validation.constraints.NotNull
;
import
javax.validation.constraints.NotNull
;
import
javax.validation.constraints.Size
;
import
javax.validation.constraints.Size
;
import
java.math.BigDecimal
;
/**
/**
* @Author small
* @Author small
...
@@ -55,7 +56,7 @@ public class LicenseProgramsDO {
...
@@ -55,7 +56,7 @@ public class LicenseProgramsDO {
@ApiModelProperty
(
value
=
"培训价格"
,
example
=
"1000"
,
required
=
true
)
@ApiModelProperty
(
value
=
"培训价格"
,
example
=
"1000"
,
required
=
true
)
@NotNull
(
message
=
"培训价格不能为空"
,
groups
=
{
Create
.
class
,
Update
.
class
})
@NotNull
(
message
=
"培训价格不能为空"
,
groups
=
{
Create
.
class
,
Update
.
class
})
@Size
(
min
=
0
,
max
=
100000
,
message
=
"价格不能超过100000"
)
@Size
(
min
=
0
,
max
=
100000
,
message
=
"价格不能超过100000"
)
private
Integer
price
;
private
BigDecimal
price
;
@ApiModelProperty
(
value
=
"培训地点不能为空"
,
example
=
"广东省深圳市南山区XXX001"
,
required
=
true
)
@ApiModelProperty
(
value
=
"培训地点不能为空"
,
example
=
"广东省深圳市南山区XXX001"
,
required
=
true
)
@NotBlank
(
message
=
"培训地点不能为空"
,
groups
=
{
Create
.
class
,
Update
.
class
})
@NotBlank
(
message
=
"培训地点不能为空"
,
groups
=
{
Create
.
class
,
Update
.
class
})
...
...
release-service/src/main/java/com/mmc/csf/release/entity/licence/LicenseTrainingProgramsDO.java
浏览文件 @
e12bed6a
...
@@ -10,6 +10,7 @@ import lombok.NoArgsConstructor;
...
@@ -10,6 +10,7 @@ import lombok.NoArgsConstructor;
import
javax.validation.constraints.NotBlank
;
import
javax.validation.constraints.NotBlank
;
import
javax.validation.constraints.NotNull
;
import
javax.validation.constraints.NotNull
;
import
java.math.BigDecimal
;
/**
/**
* @Author small
* @Author small
...
@@ -40,16 +41,19 @@ public class LicenseTrainingProgramsDO {
...
@@ -40,16 +41,19 @@ public class LicenseTrainingProgramsDO {
@ApiModelProperty
(
value
=
"培训价格"
,
example
=
"1000"
,
required
=
true
)
@ApiModelProperty
(
value
=
"培训价格"
,
example
=
"1000"
,
required
=
true
)
@NotNull
(
message
=
"培训价格不能为空"
,
groups
=
{
Create
.
class
,
Update
.
class
})
@NotNull
(
message
=
"培训价格不能为空"
,
groups
=
{
Create
.
class
,
Update
.
class
})
private
Integer
price
;
private
BigDecimal
price
;
@ApiModelProperty
(
value
=
"培训地点不能为空"
,
example
=
"1"
,
required
=
true
)
//
@ApiModelProperty(value = "培训地点不能为空", example = "1", required = true)
@NotBlank
(
message
=
"培训地点不能为空"
,
groups
=
{
Create
.
class
,
Update
.
class
})
//
@NotBlank(message = "培训地点不能为空", groups = {Create.class, Update.class})
private
String
place
;
private
String
place
;
@ApiModelProperty
(
value
=
"培训主图不能为空"
,
example
=
"1"
,
required
=
true
)
@ApiModelProperty
(
value
=
"培训主图不能为空"
,
example
=
"1"
,
required
=
true
)
@NotBlank
(
message
=
"培训主图不能为空"
,
groups
=
{
Create
.
class
,
Update
.
class
})
@NotBlank
(
message
=
"培训主图不能为空"
,
groups
=
{
Create
.
class
,
Update
.
class
})
private
String
mainImage
;
private
String
mainImage
;
@ApiModelProperty
(
value
=
"机构id"
,
example
=
"1"
,
required
=
true
)
private
Integer
orgId
;
/**
/**
* VO类转换
* VO类转换
...
...
release-service/src/main/java/com/mmc/csf/release/error/GlobalExceptionHandler.java
0 → 100644
浏览文件 @
e12bed6a
package
com
.
mmc
.
csf
.
release
.
error
;
import
com.mmc.csf.common.util.web.BizException
;
import
com.mmc.csf.common.util.web.ResultBody
;
import
com.mmc.csf.common.util.web.ResultEnum
;
import
org.springframework.context.support.DefaultMessageSourceResolvable
;
import
org.springframework.validation.BindException
;
import
org.springframework.validation.ObjectError
;
import
org.springframework.web.bind.MethodArgumentNotValidException
;
import
org.springframework.web.bind.MissingPathVariableException
;
import
org.springframework.web.bind.MissingServletRequestParameterException
;
import
org.springframework.web.bind.annotation.ControllerAdvice
;
import
org.springframework.web.bind.annotation.ExceptionHandler
;
import
org.springframework.web.bind.annotation.ResponseBody
;
import
javax.validation.ConstraintViolation
;
import
javax.validation.ConstraintViolationException
;
import
java.util.List
;
import
java.util.stream.Collectors
;
/**
* @author 作者 geDuo
* @version 创建时间:2021年8月27日 上午10:15:30
* @explain 类说明
*/
@ControllerAdvice
public
class
GlobalExceptionHandler
{
/**
* 统一处理参数校验错误异常(非Spring接口数据绑定验证)
*
* @param e
* @return
*/
@ExceptionHandler
(
BindException
.
class
)
@ResponseBody
public
ResultBody
processValidException
(
BindException
e
)
{
// 获取校验错误结果信息,并将信息组装
List
<
String
>
errorStringList
=
e
.
getBindingResult
().
getAllErrors
().
stream
().
map
(
ObjectError:
:
getDefaultMessage
)
.
collect
(
Collectors
.
toList
());
String
errorMessage
=
String
.
join
(
"; "
,
errorStringList
);
return
ResultBody
.
error
(
ResultEnum
.
BODY_NOT_MATCH
.
getResultCode
(),
errorMessage
);
}
/**
* 统一处理参数校验错误异常
*
* @param e
* @return
*/
@ExceptionHandler
(
IllegalArgumentException
.
class
)
@ResponseBody
public
ResultBody
processValidException
(
IllegalArgumentException
e
)
{
String
errorMessage
=
String
.
join
(
"; "
,
e
.
getMessage
());
return
ResultBody
.
error
(
ResultEnum
.
BODY_NOT_MATCH
.
getResultCode
(),
errorMessage
);
}
@ExceptionHandler
(
ConstraintViolationException
.
class
)
@ResponseBody
public
ResultBody
processValidException
(
ConstraintViolationException
e
)
{
String
errorMessage
=
e
.
getConstraintViolations
().
stream
().
map
(
ConstraintViolation:
:
getMessage
)
.
collect
(
Collectors
.
joining
(
","
));
return
ResultBody
.
error
(
ResultEnum
.
BODY_NOT_MATCH
.
getResultCode
(),
errorMessage
);
}
@ExceptionHandler
(
MethodArgumentNotValidException
.
class
)
@ResponseBody
public
ResultBody
processValidException
(
MethodArgumentNotValidException
e
)
{
String
errorMessage
=
e
.
getBindingResult
().
getAllErrors
().
stream
()
.
map
(
DefaultMessageSourceResolvable:
:
getDefaultMessage
).
collect
(
Collectors
.
joining
(
","
));
return
ResultBody
.
error
(
ResultEnum
.
BODY_NOT_MATCH
.
getResultCode
(),
errorMessage
);
}
@ExceptionHandler
(
MissingServletRequestParameterException
.
class
)
@ResponseBody
public
ResultBody
processValidException
(
MissingServletRequestParameterException
e
)
{
String
errorMessage
=
e
.
getParameterName
()
+
" 不能为空"
;
return
ResultBody
.
error
(
ResultEnum
.
BODY_NOT_MATCH
.
getResultCode
(),
errorMessage
);
}
@ExceptionHandler
(
MissingPathVariableException
.
class
)
@ResponseBody
public
ResultBody
processValidException
(
MissingPathVariableException
e
)
{
String
errorMessage
=
e
.
getVariableName
()
+
" 不能为空"
;
return
ResultBody
.
error
(
ResultEnum
.
BODY_NOT_MATCH
.
getResultCode
(),
errorMessage
);
}
@ExceptionHandler
(
BizException
.
class
)
@ResponseBody
public
ResultBody
processValidException
(
BizException
e
)
{
return
ResultBody
.
error
(
e
.
getErrorCode
(),
e
.
getErrorMsg
());
}
}
release-service/src/main/java/com/mmc/csf/release/service/licence/impl/LicenceBackgroundServiceImpl.java
浏览文件 @
e12bed6a
...
@@ -15,10 +15,12 @@ import com.mmc.csf.release.entity.licence.LicenseProgramsDO;
...
@@ -15,10 +15,12 @@ import com.mmc.csf.release.entity.licence.LicenseProgramsDO;
import
com.mmc.csf.release.entity.licence.LicenseTrainingProgramsDO
;
import
com.mmc.csf.release.entity.licence.LicenseTrainingProgramsDO
;
import
com.mmc.csf.release.service.licence.LicenceBackgroundService
;
import
com.mmc.csf.release.service.licence.LicenceBackgroundService
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.lang.StringUtils
;
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.ArrayList
;
import
java.util.ArrayList
;
import
java.util.Arrays
;
import
java.util.HashMap
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.List
;
import
java.util.stream.Collectors
;
import
java.util.stream.Collectors
;
...
@@ -41,27 +43,31 @@ public class LicenceBackgroundServiceImpl implements LicenceBackgroundService {
...
@@ -41,27 +43,31 @@ public class LicenceBackgroundServiceImpl implements LicenceBackgroundService {
if
(
count
>
0
)
{
if
(
count
>
0
)
{
return
ResultBody
.
error
(
ResultEnum
.
THE_ORGANIZATION_NAME_ALREADY_EXISTS
);
return
ResultBody
.
error
(
ResultEnum
.
THE_ORGANIZATION_NAME_ALREADY_EXISTS
);
}
}
getOrgName
(
organizations
);
LicenseOrganizationsDO
organizationsDO
=
new
LicenseOrganizationsDO
(
organizations
);
LicenseOrganizationsDO
organizationsDO
=
new
LicenseOrganizationsDO
(
organizations
);
List
<
Integer
>
list
=
new
ArrayList
<>();
List
<
Integer
>
list
=
new
ArrayList
<>();
LicenseTrainingProgramsDO
programsDO
=
null
;
LicenseTrainingProgramsDO
programsDO
=
null
;
if
(
organizations
.
getTrainingProgramsVOS
()
!=
null
&&
organizations
.
getTrainingProgramsVOS
().
size
()
!=
0
)
{
if
(
organizations
.
getTrainingProgramsVOS
()
!=
null
&&
organizations
.
getTrainingProgramsVOS
().
size
()
!=
0
)
{
HashMap
<
LicenseTrainingProgramsVO
,
Integer
>
hashMap
=
new
HashMap
<>();
HashMap
<
LicenseTrainingProgramsVO
,
Integer
>
hashMap
=
new
HashMap
<>();
licenceBackgroundDao
.
insertOrganizations
(
organizationsDO
);
for
(
LicenseTrainingProgramsVO
trainingProgramsVO
:
organizations
.
getTrainingProgramsVOS
())
{
for
(
LicenseTrainingProgramsVO
trainingProgramsVO
:
organizations
.
getTrainingProgramsVOS
())
{
Integer
pro
=
hashMap
.
get
(
trainingProgramsVO
);
Integer
pro
=
hashMap
.
get
(
trainingProgramsVO
);
if
(
pro
==
null
)
{
if
(
pro
==
null
)
{
hashMap
.
put
(
trainingProgramsVO
,
1
);
hashMap
.
put
(
trainingProgramsVO
,
1
);
programsDO
=
new
LicenseTrainingProgramsDO
(
trainingProgramsVO
);
programsDO
=
new
LicenseTrainingProgramsDO
(
trainingProgramsVO
);
Integer
id
=
organizationsDO
.
getId
();
programsDO
.
setOrgId
(
id
);
licenceBackgroundDao
.
insertProject
(
programsDO
);
licenceBackgroundDao
.
insertProject
(
programsDO
);
list
.
add
(
programsDO
.
getId
());
list
.
add
(
programsDO
.
getId
());
organizationsDO
.
setOrgTrainingIds
(
list
);
organizationsDO
.
setOrgTrainingIds
(
list
);
}
else
{
}
else
{
licenceBackgroundDao
.
removeProject
(
programsDO
.
getId
());
licenceBackgroundDao
.
removeProject
(
programsDO
.
getId
());
licenceBackgroundDao
.
removeOrg
(
organizationsDO
.
getId
());
hashMap
.
put
(
trainingProgramsVO
,
pro
++);
hashMap
.
put
(
trainingProgramsVO
,
pro
++);
return
ResultBody
.
error
(
ResultEnum
.
THREE_FIELDS_CAN_BE_REPEATED
);
return
ResultBody
.
error
(
ResultEnum
.
THREE_FIELDS_CAN_BE_REPEATED
);
}
}
}
}
licenceBackgroundDao
.
insertOrganizations
(
organizationsDO
);
// licenceBackgroundDao.insertLicenseOrgTraining(organizationsDO.getOrgTrainingIds(), organizationsDO.getId());
licenceBackgroundDao
.
insertLicenseOrgTraining
(
organizationsDO
.
getOrgTrainingIds
(),
organizationsDO
.
getId
());
}
}
return
ResultBody
.
success
();
return
ResultBody
.
success
();
}
}
...
@@ -73,6 +79,8 @@ public class LicenceBackgroundServiceImpl implements LicenceBackgroundService {
...
@@ -73,6 +79,8 @@ public class LicenceBackgroundServiceImpl implements LicenceBackgroundService {
if
(
count
>
0
)
{
if
(
count
>
0
)
{
return
ResultBody
.
error
(
ResultEnum
.
THE_ORGANIZATION_NAME_ALREADY_EXISTS
);
return
ResultBody
.
error
(
ResultEnum
.
THE_ORGANIZATION_NAME_ALREADY_EXISTS
);
}
}
getOrgName
(
organizations
);
licenceBackgroundDao
.
removeOrgAndTraining
(
organizations
.
getId
());
licenceBackgroundDao
.
removeOrgAndTraining
(
organizations
.
getId
());
LicenseTrainingProgramsDO
programsDO
=
null
;
LicenseTrainingProgramsDO
programsDO
=
null
;
List
<
Integer
>
list
=
new
ArrayList
<>();
List
<
Integer
>
list
=
new
ArrayList
<>();
...
@@ -86,23 +94,34 @@ public class LicenceBackgroundServiceImpl implements LicenceBackgroundService {
...
@@ -86,23 +94,34 @@ public class LicenceBackgroundServiceImpl implements LicenceBackgroundService {
hashMap
.
put
(
trainingProgramsVO
,
pro
++);
hashMap
.
put
(
trainingProgramsVO
,
pro
++);
return
ResultBody
.
error
(
ResultEnum
.
THREE_FIELDS_CAN_BE_REPEATED
);
return
ResultBody
.
error
(
ResultEnum
.
THREE_FIELDS_CAN_BE_REPEATED
);
}
}
licenceBackgroundDao
.
removeOrganizations
(
organizations
.
getId
());
//
licenceBackgroundDao.removeOrganizations(organizations.getId());
programsDO
=
new
LicenseTrainingProgramsDO
(
trainingProgramsVO
);
programsDO
=
new
LicenseTrainingProgramsDO
(
trainingProgramsVO
);
Integer
id
=
organizations
.
getId
();
programsDO
.
setOrgId
(
id
);
licenceBackgroundDao
.
insertProject
(
programsDO
);
licenceBackgroundDao
.
insertProject
(
programsDO
);
list
.
add
(
programsDO
.
getId
());
list
.
add
(
programsDO
.
getId
());
organizationsDO
.
setOrgTrainingIds
(
list
);
organizationsDO
.
setOrgTrainingIds
(
list
);
}
}
licenceBackgroundDao
.
updateOrganizations
(
organizationsDO
);
licenceBackgroundDao
.
updateOrganizations
(
organizationsDO
);
licenceBackgroundDao
.
insertLicenseOrgTraining
(
organizationsDO
.
getOrgTrainingIds
(),
organizationsDO
.
getId
());
//
licenceBackgroundDao.insertLicenseOrgTraining(organizationsDO.getOrgTrainingIds(), organizationsDO.getId());
}
}
return
ResultBody
.
success
();
return
ResultBody
.
success
();
}
}
private
void
getOrgName
(
LicenseOrganizationsVO
organizations
)
{
String
region
=
organizations
.
getRegion
();
List
<
String
>
strings
=
Arrays
.
asList
(
region
.
split
(
","
));
List
<
Integer
>
collect
=
strings
.
stream
().
map
(
Integer:
:
valueOf
).
collect
(
Collectors
.
toList
());
List
<
String
>
orgName
=
licenceBackgroundDao
.
getOrgName
(
collect
);
String
join
=
StringUtils
.
join
(
orgName
,
","
);
organizations
.
setRegionName
(
join
);
}
@Override
@Override
public
ResultBody
removeOrganizations
(
Integer
id
)
{
public
ResultBody
removeOrganizations
(
Integer
id
)
{
licenceBackgroundDao
.
removeOrg
(
id
);
licenceBackgroundDao
.
removeOrg
(
id
);
licenceBackgroundDao
.
removeOrg
anizations
(
id
);
licenceBackgroundDao
.
removeOrg
AndTraining
(
id
);
return
ResultBody
.
success
();
return
ResultBody
.
success
();
}
}
...
@@ -114,7 +133,6 @@ public class LicenceBackgroundServiceImpl implements LicenceBackgroundService {
...
@@ -114,7 +133,6 @@ public class LicenceBackgroundServiceImpl implements LicenceBackgroundService {
}
}
Integer
pageNo
=
organizationsQO
.
getPageNo
();
Integer
pageNo
=
organizationsQO
.
getPageNo
();
organizationsQO
.
buildCurrentPage
();
organizationsQO
.
buildCurrentPage
();
List
<
LicenseOrganizationsDO
>
licenseOrganizationsDOS
=
licenceBackgroundDao
.
listOrgPage
(
organizationsQO
);
List
<
LicenseOrganizationsDO
>
licenseOrganizationsDOS
=
licenceBackgroundDao
.
listOrgPage
(
organizationsQO
);
List
<
LicenseOrganizationsDTO
>
orgList
=
licenseOrganizationsDOS
.
stream
().
map
(
t
->
t
.
organizationsDTO
()).
collect
(
Collectors
.
toList
());
List
<
LicenseOrganizationsDTO
>
orgList
=
licenseOrganizationsDOS
.
stream
().
map
(
t
->
t
.
organizationsDTO
()).
collect
(
Collectors
.
toList
());
//培训项目数据
//培训项目数据
...
@@ -135,10 +153,11 @@ public class LicenceBackgroundServiceImpl implements LicenceBackgroundService {
...
@@ -135,10 +153,11 @@ public class LicenceBackgroundServiceImpl implements LicenceBackgroundService {
}
}
return
true
;
return
true
;
}).
collect
(
Collectors
.
toList
());
}).
collect
(
Collectors
.
toList
());
if
(
collect
.
size
()
==
0
)
{
count
=
0
;
}
List
<
LicenseOrganizationsDTO
>
subList
=
collect
.
stream
().
skip
((
pageNo
-
1
)
*
organizationsQO
.
getPageSize
()).
limit
(
organizationsQO
.
getPageSize
()).
return
PageResult
.
buildPage
(
pageNo
,
organizationsQO
.
getPageSize
(),
count
,
collect
);
collect
(
Collectors
.
toList
());
return
PageResult
.
buildPage
(
pageNo
,
organizationsQO
.
getPageSize
(),
collect
.
size
(),
subList
);
}
}
...
...
release-service/src/main/resources/application-local.yml
浏览文件 @
e12bed6a
...
@@ -110,6 +110,16 @@ iuav:
...
@@ -110,6 +110,16 @@ iuav:
pmsapp
:
pmsapp
:
url
:
http://127.0.0.1:8099
url
:
http://127.0.0.1:8099
wx
:
sub
:
appid
:
wx5c6a105a0ddca4c5
secret
:
96c75255dd26f82f8d55e15b59e101c7
app
:
id
:
wx18b7883acd204278
secret
:
28afe74ba373830237a8133a7431ee82
miniprogram-state
:
trial
env-version
:
trial
##feign
##feign
#feign:
#feign:
# client:
# client:
...
...
release-service/src/main/resources/mapper/licence/LicenceBackgroundDao.xml
浏览文件 @
e12bed6a
...
@@ -19,20 +19,14 @@
...
@@ -19,20 +19,14 @@
insert into license_organizations(main_image, auxiliary_picture, video, `name`, region, region_name,
insert into license_organizations(main_image, auxiliary_picture, video, `name`, region, region_name,
detailed_address,
detailed_address,
test_center, scale_id,
test_center, scale_id,
description, detail, create_time, update_time)
description, detail, create_time, update_time
, longitude, latitude
)
values (#{mainImage}, #{auxiliaryPicture}, #{video}, #{name}, #{region}, #{regionName}, #{detailedAddress},
values (#{mainImage}, #{auxiliaryPicture}, #{video}, #{name}, #{region}, #{regionName}, #{detailedAddress},
#{testCenter},
#{testCenter},
#{scaleId},
#{scaleId},
#{description}, #{detail}, NOW(), NOW())
#{description}, #{detail}, NOW(), NOW()
, #{longitude}, #{latitude}
)
</insert>
</insert>
<insert
id=
"insertLicenseOrgTraining"
>
insert into license_org_training(training_programs_id,organizations_id) values
<foreach
item=
"list"
index=
"index"
collection=
"orgTrainingIds"
separator=
","
>
(#{list},#{orgId})
</foreach>
</insert>
<select
id=
"countId"
resultType=
"java.lang.Integer"
>
<select
id=
"countId"
resultType=
"java.lang.Integer"
>
select count(*)
select count(*)
...
@@ -47,15 +41,9 @@
...
@@ -47,15 +41,9 @@
</select>
</select>
<delete
id=
"removeOrgAndTraining"
parameterType=
"java.lang.Integer"
>
<delete
id=
"removeOrgAndTraining"
parameterType=
"java.lang.Integer"
>
DELETE
delete
license_org_training,
from license_training_programs
license_training_programs
where org_id = #{id}
FROM
license_org_training
LEFT JOIN license_training_programs ON license_org_training.training_programs_id = license_training_programs.id
WHERE
license_org_training.organizations_id =
#{id}
</delete>
</delete>
<update
id=
"updateOrganizations"
parameterType=
"com.mmc.csf.release.entity.licence.LicenseOrganizationsDO"
>
<update
id=
"updateOrganizations"
parameterType=
"com.mmc.csf.release.entity.licence.LicenseOrganizationsDO"
>
...
@@ -94,58 +82,29 @@
...
@@ -94,58 +82,29 @@
<if
test=
" detail != null and detail != '' "
>
<if
test=
" detail != null and detail != '' "
>
detail = #{detail},
detail = #{detail},
</if>
</if>
<if
test=
" longitude != null and longitude != '' "
>
longitude = #{longitude},
</if>
<if
test=
" latitude != null and latitude != '' "
>
latitude = #{latitude},
</if>
update_time=NOW()
update_time=NOW()
</set>
</set>
where id = #{id}
where id = #{id}
</update>
</update>
<delete
id=
"removeOrganizations"
parameterType=
"java.lang.Integer"
>
DELETE
license_org_training,
license_training_programs
FROM
license_org_training
LEFT JOIN license_training_programs ON license_org_training.training_programs_id = license_training_programs.id
WHERE
license_org_training.organizations_id =
#{id}
</delete>
<delete
id=
"removeOrgTraining"
parameterType=
"java.lang.Integer"
>
delete
from license_org_training
where organizations_id = #{id}
</delete>
<select
id=
"countPro"
resultType=
"java.lang.Integer"
>
SELECT
count(*)
FROM
license_training_programs ltp
LEFT JOIN license_org_training lot ON ltp.id = lot.training_programs_id
LEFT JOIN license_organizations lo ON lo.id = lot.organizations_id
WHERE
1 =1
<if
test=
" modelsId != null and modelsId != '' "
>
and ltp.models_id = #{modelsId}
</if>
<if
test=
" gradeId != null and gradeId != '' "
>
and ltp.grade_id = #{gradeId}
</if>
<if
test=
" typeId != null and typeId != '' "
>
and ltp.type_id = #{typeId}
</if>
<if
test=
" id != null and id != '' "
>
and lot.organizations_id = #{id}
</if>
</select>
<insert
id=
"insertProject"
useGeneratedKeys=
"true"
keyProperty=
"id"
<insert
id=
"insertProject"
useGeneratedKeys=
"true"
keyProperty=
"id"
parameterType=
"com.mmc.csf.release.entity.licence.LicenseOrganizationsDO"
>
parameterType=
"com.mmc.csf.release.entity.licence.LicenseOrganizationsDO"
>
insert into license_training_programs(grade_id, models_id, type_id, price, place, main_image, create_time,
insert into license_training_programs(grade_id, models_id, type_id, price, place, main_image, create_time,
update_time)
update_time
,org_id
)
values (#{gradeId}, #{modelsId}, #{typeId}, #{price}, #{place}, #{mainImage}, NOW(), NOW())
values (#{gradeId}, #{modelsId}, #{typeId}, #{price}, #{place}, #{mainImage}, NOW(), NOW()
,#{orgId}
)
</insert>
</insert>
<update
id=
"updateProject"
parameterType=
"com.mmc.csf.release.entity.licence.LicenseTrainingProgramsDO"
>
<update
id=
"updateProject"
parameterType=
"com.mmc.csf.release.entity.licence.LicenseTrainingProgramsDO"
>
...
@@ -186,23 +145,12 @@
...
@@ -186,23 +145,12 @@
where id = #{id}
where id = #{id}
</delete>
</delete>
<select
id=
"LicenseTrainingProgramsDTO"
resultType=
"com.mmc.csf.release.entity.licence.LicenseProgramsDO"
>
SELECT ltp.id,
<select
id=
"getOrgName"
resultType=
"java.lang.String"
>
ltp.grade_id AS gradeId,
select `name` from sys_district where id in
lg.`name` AS gradeName,
<foreach
collection=
"list"
open=
"("
close=
")"
item=
"id"
separator=
","
>
ltp.models_id AS modelsId,
#{id}
lm.`name` AS modelsName,
</foreach>
ltp.type_id AS typeId,
lt.`name` AS typeName,
ltp.price,
ltp.place,
ltp.main_image AS mainImage
FROM license_training_programs ltp
INNER JOIN licence_type lt ON ltp.type_id = lt.id
INNER JOIN licence_grade lg ON ltp.grade_id = lg.id
INNER JOIN licence_models lm ON ltp.models_id = lm.id
INNER JOIN license_org_training lot ON lot.training_programs_id = ltp.id
WHERE lot.organizations_id = #{id}
</select>
</select>
...
@@ -214,8 +162,8 @@
...
@@ -214,8 +162,8 @@
<if
test=
" name != null and name != '' "
>
<if
test=
" name != null and name != '' "
>
and lo.`name` =#{name}
and lo.`name` =#{name}
</if>
</if>
<if
test=
" sta
tTime != null and sta
tTime != '' and endTime != null and endTime != '' "
>
<if
test=
" sta
rtTime != null and star
tTime != '' and endTime != null and endTime != '' "
>
and DATE_FORMAT(create_time,'%Y-%m-%d') BETWEEN #{statTime} and #{endTime}
and DATE_FORMAT(create_time,'%Y-%m-%d') BETWEEN #{sta
r
tTime} and #{endTime}
</if>
</if>
<if
test=
" region != null and region != '' "
>
<if
test=
" region != null and region != '' "
>
and lo.region like CONCAT('%',#{region},'%')
and lo.region like CONCAT('%',#{region},'%')
...
@@ -240,15 +188,19 @@
...
@@ -240,15 +188,19 @@
lo.create_time AS createTime,
lo.create_time AS createTime,
lo.update_time AS updateTime,
lo.update_time AS updateTime,
lo.detailed_address AS detailedAddress,
lo.detailed_address AS detailedAddress,
lo.region_name AS regionName
lo.region_name AS regionName,
lo.longitude,
lo.latitude,
lo.create_time AS createTime,
lo.update_time AS updateTime
FROM license_organizations lo
FROM license_organizations lo
LEFT JOIN licence_scale ls ON lo.scale_id = ls.id
LEFT JOIN licence_scale ls ON lo.scale_id = ls.id
where 1=1
where 1=1
<if
test=
" name != null and name != '' "
>
<if
test=
" name != null and name != '' "
>
and lo.`name` =#{name}
and lo.`name` =#{name}
</if>
</if>
<if
test=
" sta
tTime != null and sta
tTime != '' and endTime != null and endTime != '' "
>
<if
test=
" sta
rtTime != null and star
tTime != '' and endTime != null and endTime != '' "
>
and DATE_FORMAT(create_time,'%Y-%m-%d') BETWEEN #{statTime} and #{endTime}
and DATE_FORMAT(create_time,'%Y-%m-%d') BETWEEN #{sta
r
tTime} and #{endTime}
</if>
</if>
<if
test=
" region != null and region != '' "
>
<if
test=
" region != null and region != '' "
>
and lo.region like CONCAT('%',#{region},'%')
and lo.region like CONCAT('%',#{region},'%')
...
@@ -256,12 +208,12 @@
...
@@ -256,12 +208,12 @@
<if
test=
" id != null and id != '' "
>
<if
test=
" id != null and id != '' "
>
and lo.id =#{id}
and lo.id =#{id}
</if>
</if>
order by lo.id desc
order by lo.update_time desc, lo.create_time desc
limit #{pageNo}, #{pageSize}
</select>
</select>
<select
id=
"trainingProgram"
resultType=
"com.mmc.csf.release.entity.licence.LicenseProgramsDO"
>
<select
id=
"trainingProgram"
resultType=
"com.mmc.csf.release.entity.licence.LicenseProgramsDO"
>
SELECT DISTINCT ltp.id,
SELECT DISTINCT
ltp.id,
ltp.grade_id AS gradeId,
ltp.grade_id AS gradeId,
lg.`name` AS gradeName,
lg.`name` AS gradeName,
ltp.models_id AS modelsId,
ltp.models_id AS modelsId,
...
@@ -271,13 +223,14 @@
...
@@ -271,13 +223,14 @@
ltp.price,
ltp.price,
ltp.place,
ltp.place,
ltp.main_image AS mainImage,
ltp.main_image AS mainImage,
lot.organizations_id AS orgId
ltp.org_id AS orgId
FROM license_training_programs ltp
FROM
license_training_programs ltp
LEFT JOIN licence_grade lg ON ltp.grade_id = lg.id
LEFT JOIN licence_grade lg ON ltp.grade_id = lg.id
LEFT JOIN licence_models lm ON ltp.models_id = lm.id
LEFT JOIN licence_models lm ON ltp.models_id = lm.id
LEFT JOIN licence_type lt ON ltp.type_id = lt.id
LEFT JOIN licence_type lt ON ltp.type_id = lt.id
LEFT JOIN license_org_training lot ON ltp.id = lot.training_programs_id
WHERE
where 1
=1
1
=1
<if
test=
" modelsId != null and modelsId != '' "
>
<if
test=
" modelsId != null and modelsId != '' "
>
and ltp.models_id =#{modelsId}
and ltp.models_id =#{modelsId}
</if>
</if>
...
...
release-service/src/main/resources/not-check.yml
浏览文件 @
e12bed6a
...
@@ -35,3 +35,5 @@ data-filter:
...
@@ -35,3 +35,5 @@ data-filter:
-
/release/tender/infoById
-
/release/tender/infoById
-
/release/wechat/checkSignature
-
/release/wechat/checkSignature
-
/release/wechat/mediaCheckAsync
-
/release/wechat/mediaCheckAsync
-
/release/licence/background/appListOrgPage
-
/release/licence/background/webListOrgPage
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论