Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
I
ims
概览
概览
详情
活动
周期分析
版本库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
问题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
iuav
ims
Commits
5c61feda
提交
5c61feda
authored
9月 06, 2023
作者:
余乾开
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'master' of
ssh://git.mmcuav.cn:8222/iuav/ims
上级
19ca0009
ff201a59
全部展开
隐藏空白字符变更
内嵌
并排
正在显示
73 个修改的文件
包含
3286 行增加
和
531 行删除
+3286
-531
develop.yml
.github/workflows/develop.yml
+1
-1
master.yml
.github/workflows/master.yml
+1
-1
pom.xml
csf-common/csf-common-model/pom.xml
+2
-2
UserAccountSimpleDTO.java
...java/com/mmc/csf/infomation/dto/UserAccountSimpleDTO.java
+2
-0
IndustryCaseQO.java
...c/main/java/com/mmc/csf/infomation/qo/IndustryCaseQO.java
+5
-5
RequirementsInfoVO.java
...in/java/com/mmc/csf/infomation/vo/RequirementsInfoVO.java
+87
-22
RequirementsTypeSubclassVO.java
...com/mmc/csf/infomation/vo/RequirementsTypeSubclassVO.java
+31
-0
RequirementsTypeVO.java
...in/java/com/mmc/csf/infomation/vo/RequirementsTypeVO.java
+6
-1
TenderApplyVO.java
...rc/main/java/com/mmc/csf/infomation/vo/TenderApplyVO.java
+2
-0
LicenceGradeDTO.java
...rc/main/java/com/mmc/csf/licence/dto/LicenceGradeDTO.java
+27
-0
LicenceModelsDTO.java
...c/main/java/com/mmc/csf/licence/dto/LicenceModelsDTO.java
+26
-0
LicenceScaleDTO.java
...rc/main/java/com/mmc/csf/licence/dto/LicenceScaleDTO.java
+25
-0
LicenceTypeDTO.java
...src/main/java/com/mmc/csf/licence/dto/LicenceTypeDTO.java
+26
-0
LicenseOrganizationsDTO.java
...java/com/mmc/csf/licence/dto/LicenseOrganizationsDTO.java
+99
-0
LicenseTrainingProgramsDTO.java
...a/com/mmc/csf/licence/dto/LicenseTrainingProgramsDTO.java
+71
-0
LicenseOrganizationsQO.java
...n/java/com/mmc/csf/licence/qo/LicenseOrganizationsQO.java
+63
-0
LicenseOrganizationsVO.java
...n/java/com/mmc/csf/licence/vo/LicenseOrganizationsVO.java
+86
-0
LicenseTrainingProgramsVO.java
...ava/com/mmc/csf/licence/vo/LicenseTrainingProgramsVO.java
+74
-0
DynamicInfoDTO.java
...in/java/com/mmc/csf/release/forum/dto/DynamicInfoDTO.java
+19
-13
Create.java
...src/main/java/com/mmc/csf/release/model/group/Create.java
+8
-5
Insert.java
...src/main/java/com/mmc/csf/release/model/group/Insert.java
+3
-1
Update.java
...src/main/java/com/mmc/csf/release/model/group/Update.java
+8
-5
pom.xml
csf-common/csf-common-util/pom.xml
+0
-7
ResultEnum.java
...src/main/java/com/mmc/csf/common/util/web/ResultEnum.java
+16
-7
WXMsgPushUtils.java
.../main/java/com/mmc/csf/common/util/wx/WXMsgPushUtils.java
+48
-0
deployment.yaml
kustomization/base/deployment.yaml
+34
-6
service.yaml
kustomization/base/service.yaml
+0
-2
kustomization.yaml
kustomization/overlays/dev/kustomization.yaml
+5
-5
kustomization.yaml
kustomization/overlays/prod/kustomization.yaml
+5
-5
UserSystemConstant.java
...java/com/mmc/csf/release/constant/UserSystemConstant.java
+40
-0
WxConstant.java
...rc/main/java/com/mmc/csf/release/constant/WxConstant.java
+26
-0
BackstageForumController.java
.../mmc/csf/release/controller/BackstageForumController.java
+38
-31
DynamicController.java
...ava/com/mmc/csf/release/controller/DynamicController.java
+46
-46
RequirementsController.java
...om/mmc/csf/release/controller/RequirementsController.java
+53
-18
LicenceBackgroundController.java
...lease/controller/licence/LicenceBackgroundController.java
+82
-0
LicenceCommonController.java
...f/release/controller/licence/LicenceCommonController.java
+61
-0
DynamicDAO.java
...ice/src/main/java/com/mmc/csf/release/dao/DynamicDAO.java
+131
-127
RequirementsDao.java
...rc/main/java/com/mmc/csf/release/dao/RequirementsDao.java
+21
-0
LicenceBackgroundDao.java
...com/mmc/csf/release/dao/licence/LicenceBackgroundDao.java
+45
-0
LicenceCommonDao.java
...ava/com/mmc/csf/release/dao/licence/LicenceCommonDao.java
+25
-0
ForumDynamicDO.java
...java/com/mmc/csf/release/entity/forum/ForumDynamicDO.java
+73
-51
LicenceGradeDO.java
...va/com/mmc/csf/release/entity/licence/LicenceGradeDO.java
+31
-0
LicenceModelsDO.java
...a/com/mmc/csf/release/entity/licence/LicenceModelsDO.java
+31
-0
LicenceScaleDO.java
...va/com/mmc/csf/release/entity/licence/LicenceScaleDO.java
+30
-0
LicenceTypeDO.java
...ava/com/mmc/csf/release/entity/licence/LicenceTypeDO.java
+30
-0
LicenseOrganizationsDO.java
...mc/csf/release/entity/licence/LicenseOrganizationsDO.java
+144
-0
LicenseProgramsDO.java
...com/mmc/csf/release/entity/licence/LicenseProgramsDO.java
+93
-0
LicenseTrainingProgramsDO.java
...csf/release/entity/licence/LicenseTrainingProgramsDO.java
+72
-0
RequirementsInfoDO.java
...c/csf/release/entity/requirements/RequirementsInfoDO.java
+63
-3
RequirementsTypeDO.java
...c/csf/release/entity/requirements/RequirementsTypeDO.java
+9
-2
RequirementsTypeSubclassDO.java
...lease/entity/requirements/RequirementsTypeSubclassDO.java
+32
-0
GlobalExceptionHandler.java
...ava/com/mmc/csf/release/error/GlobalExceptionHandler.java
+93
-0
BackstageForumService.java
...va/com/mmc/csf/release/service/BackstageForumService.java
+7
-5
DynamicService.java
...main/java/com/mmc/csf/release/service/DynamicService.java
+44
-45
RequirementsService.java
...java/com/mmc/csf/release/service/RequirementsService.java
+16
-1
WxApiService.java
...c/main/java/com/mmc/csf/release/service/WxApiService.java
+19
-0
BackstageForumServiceImpl.java
...c/csf/release/service/impl/BackstageForumServiceImpl.java
+0
-0
DynamicServiceImpl.java
.../com/mmc/csf/release/service/impl/DynamicServiceImpl.java
+0
-0
RequirementsServiceImpl.java
...mmc/csf/release/service/impl/RequirementsServiceImpl.java
+171
-13
WxApiServiceImpl.java
...va/com/mmc/csf/release/service/impl/WxApiServiceImpl.java
+92
-0
LicenceBackgroundService.java
...csf/release/service/licence/LicenceBackgroundService.java
+23
-0
LicenceCommonService.java
...mmc/csf/release/service/licence/LicenceCommonService.java
+18
-0
LicenceBackgroundServiceImpl.java
...se/service/licence/impl/LicenceBackgroundServiceImpl.java
+173
-0
LicenceCommonServiceImpl.java
...elease/service/licence/impl/LicenceCommonServiceImpl.java
+67
-0
application-dev.yml
release-service/src/main/resources/application-dev.yml
+19
-6
application-local.yml
release-service/src/main/resources/application-local.yml
+74
-62
application-prod.yml
release-service/src/main/resources/application-prod.yml
+17
-6
BackstageForumDao.xml
...ice/src/main/resources/mapper/forum/BackstageForumDao.xml
+1
-1
DynamicMapper.xml
...service/src/main/resources/mapper/forum/DynamicMapper.xml
+31
-6
LicenceBackgroundDao.xml
...rc/main/resources/mapper/licence/LicenceBackgroundDao.xml
+246
-0
LicenceCommonDao.xml
...ce/src/main/resources/mapper/licence/LicenceCommonDao.xml
+27
-0
RequirementsDao.xml
...rc/main/resources/mapper/requirements/RequirementsDao.xml
+187
-20
not-check.yml
release-service/src/main/resources/not-check.yml
+5
-0
没有找到文件。
.github/workflows/develop.yml
浏览文件 @
5c61feda
...
@@ -88,7 +88,7 @@ jobs:
...
@@ -88,7 +88,7 @@ jobs:
{
{
"msgtype": "markdown",
"msgtype": "markdown",
"markdown": {
"markdown": {
"content": "###
GitHub构建并推送镜像失败
\n
"content": "###
`GitHub构建并推送镜像失败`
\n
> - 提交人: ${{github.actor}} \n
> - 提交人: ${{github.actor}} \n
> - 提交信息: ${{github.event.head_commit.message}} \n
> - 提交信息: ${{github.event.head_commit.message}} \n
> - 提交到仓库: ${{github.repository}} \n
> - 提交到仓库: ${{github.repository}} \n
...
...
.github/workflows/master.yml
浏览文件 @
5c61feda
...
@@ -88,7 +88,7 @@ jobs:
...
@@ -88,7 +88,7 @@ jobs:
{
{
"msgtype": "markdown",
"msgtype": "markdown",
"markdown": {
"markdown": {
"content": "###
GitHub构建并推送镜像失败
\n
"content": "###
`GitHub构建并推送镜像失败`
\n
> - 提交人: ${{github.actor}} \n
> - 提交人: ${{github.actor}} \n
> - 提交信息: ${{github.event.head_commit.message}} \n
> - 提交信息: ${{github.event.head_commit.message}} \n
> - 提交到仓库: ${{github.repository}} \n
> - 提交到仓库: ${{github.repository}} \n
...
...
csf-common/csf-common-model/pom.xml
浏览文件 @
5c61feda
...
@@ -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.20.Final
</version>
</dependency>
</dependency>
<dependency>
<dependency>
<groupId>
cn.afterturn
</groupId>
<groupId>
cn.afterturn
</groupId>
...
@@ -38,4 +39,4 @@
...
@@ -38,4 +39,4 @@
<version>
1.5.22
</version>
<version>
1.5.22
</version>
</dependency>
</dependency>
</dependencies>
</dependencies>
</project>
</project>
\ No newline at end of file
csf-common/csf-common-model/src/main/java/com/mmc/csf/infomation/dto/UserAccountSimpleDTO.java
浏览文件 @
5c61feda
...
@@ -34,6 +34,8 @@ public class UserAccountSimpleDTO implements Serializable {
...
@@ -34,6 +34,8 @@ public class UserAccountSimpleDTO implements Serializable {
private
String
nickName
;
private
String
nickName
;
@ApiModelProperty
(
value
=
"用户头像"
)
@ApiModelProperty
(
value
=
"用户头像"
)
private
String
userImg
;
private
String
userImg
;
@ApiModelProperty
(
value
=
"openid"
)
private
String
openid
;
@ApiModelProperty
(
value
=
"用户性别:0未知、1男、2女"
)
@ApiModelProperty
(
value
=
"用户性别:0未知、1男、2女"
)
private
Integer
userSex
;
private
Integer
userSex
;
@ApiModelProperty
(
value
=
"用户邮箱"
)
@ApiModelProperty
(
value
=
"用户邮箱"
)
...
...
csf-common/csf-common-model/src/main/java/com/mmc/csf/infomation/qo/IndustryCaseQO.java
浏览文件 @
5c61feda
...
@@ -23,19 +23,19 @@ import java.util.List;
...
@@ -23,19 +23,19 @@ import java.util.List;
public
class
IndustryCaseQO
implements
Serializable
{
public
class
IndustryCaseQO
implements
Serializable
{
private
static
final
long
serialVersionUID
=
-
4615177472593013257L
;
private
static
final
long
serialVersionUID
=
-
4615177472593013257L
;
@ApiModelProperty
(
value
=
"关键字"
,
required
=
false
)
@ApiModelProperty
(
value
=
"关键字"
,
required
=
false
,
example
=
"张三"
)
private
String
keyword
;
private
String
keyword
;
@ApiModelProperty
(
value
=
"需求类型id"
,
required
=
false
)
@ApiModelProperty
(
value
=
"需求类型id"
,
required
=
false
,
example
=
"1"
)
private
Integer
requirementTypeId
;
private
Integer
requirementTypeId
;
@ApiModelProperty
(
value
=
"省份编码"
,
required
=
false
)
@ApiModelProperty
(
value
=
"省份编码"
,
required
=
false
,
example
=
"802323"
)
private
Integer
provinceCode
;
private
Integer
provinceCode
;
@ApiModelProperty
(
value
=
"市编码"
,
required
=
false
)
@ApiModelProperty
(
value
=
"市编码"
,
required
=
false
,
example
=
"802323"
)
private
Integer
cityCode
;
private
Integer
cityCode
;
@ApiModelProperty
(
value
=
"区编码"
,
required
=
false
)
@ApiModelProperty
(
value
=
"区编码"
,
required
=
false
,
example
=
"802323"
)
private
Integer
districtCode
;
private
Integer
districtCode
;
@ApiModelProperty
(
value
=
"时间:2023-05-19"
,
required
=
false
)
@ApiModelProperty
(
value
=
"时间:2023-05-19"
,
required
=
false
)
...
...
csf-common/csf-common-model/src/main/java/com/mmc/csf/infomation/vo/RequirementsInfoVO.java
浏览文件 @
5c61feda
package
com
.
mmc
.
csf
.
infomation
.
vo
;
package
com
.
mmc
.
csf
.
infomation
.
vo
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
com.mmc.csf.release.model.group.Insert
;
import
com.mmc.csf.release.model.group.Insert
;
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
;
...
@@ -9,8 +10,11 @@ import lombok.Data;
...
@@ -9,8 +10,11 @@ import lombok.Data;
import
lombok.NoArgsConstructor
;
import
lombok.NoArgsConstructor
;
import
org.hibernate.validator.constraints.Length
;
import
org.hibernate.validator.constraints.Length
;
import
javax.validation.constraints.NotBlank
;
import
javax.validation.constraints.NotNull
;
import
javax.validation.constraints.NotNull
;
import
javax.validation.constraints.Size
;
import
java.io.Serializable
;
import
java.io.Serializable
;
import
java.math.BigDecimal
;
import
java.util.Date
;
import
java.util.Date
;
/**
/**
...
@@ -26,6 +30,69 @@ public class RequirementsInfoVO implements Serializable {
...
@@ -26,6 +30,69 @@ public class RequirementsInfoVO implements Serializable {
@ApiModelProperty
(
value
=
"id"
)
@ApiModelProperty
(
value
=
"id"
)
@NotNull
(
message
=
"id不能为空"
,
groups
=
{
Update
.
class
})
@NotNull
(
message
=
"id不能为空"
,
groups
=
{
Update
.
class
})
private
Integer
id
;
private
Integer
id
;
@ApiModelProperty
(
value
=
"需求发布id"
,
hidden
=
true
)
private
Integer
requirementsInfoId
;
@ApiModelProperty
(
value
=
"需求类型id"
,
example
=
"1"
,
required
=
true
)
@NotNull
(
message
=
"需求类型id不能为空"
,
groups
=
{
Insert
.
class
,
Update
.
class
})
private
Integer
requirementTypeId
;
@ApiModelProperty
(
value
=
"任务标题"
,
example
=
"任务标题001"
,
required
=
true
)
@Size
(
max
=
15
,
message
=
"任务标题限制15个字"
)
@NotBlank
(
message
=
"任务标题不能为空"
,
groups
=
{
Insert
.
class
,
Update
.
class
})
private
String
taskTitle
;
@ApiModelProperty
(
value
=
"任务开始时间"
,
example
=
"2023-07-25"
,
required
=
true
)
@NotNull
(
message
=
"任务开始时间不能为空"
,
groups
=
{
Insert
.
class
,
Update
.
class
})
@JsonFormat
(
pattern
=
"yyyy-MM-dd"
,
timezone
=
"GMT+8"
)
private
Date
taskStartTime
;
@ApiModelProperty
(
value
=
"任务结束时间"
,
example
=
"2023-07-26"
,
required
=
true
)
@NotNull
(
message
=
"任务开始时间不能为空"
,
groups
=
{
Insert
.
class
,
Update
.
class
})
@JsonFormat
(
pattern
=
"yyyy-MM-dd"
,
timezone
=
"GMT+8"
)
private
Date
taskEndTime
;
@ApiModelProperty
(
value
=
"任务地址"
,
example
=
"广东省深圳市"
,
required
=
true
)
@NotBlank
(
message
=
"任务地址不能为空"
,
groups
=
{
Insert
.
class
,
Update
.
class
})
private
String
taskAddress
;
@ApiModelProperty
(
value
=
"任务经度"
,
example
=
"23.344324"
,
required
=
true
)
@NotNull
(
message
=
"任务经度不能为空"
,
groups
=
{
Insert
.
class
,
Update
.
class
})
private
Double
longitude
;
@ApiModelProperty
(
value
=
"任务纬度"
,
example
=
"44.344324"
,
required
=
true
)
@NotNull
(
message
=
"任务纬度不能为空"
,
groups
=
{
Insert
.
class
,
Update
.
class
})
private
Double
latitude
;
@ApiModelProperty
(
value
=
"需求描述"
,
example
=
"描述一下"
,
required
=
true
)
@NotNull
(
message
=
"需求描述不能为空"
,
groups
=
{
Insert
.
class
})
@Length
(
max
=
300
,
message
=
"字符过长"
)
private
String
requireDescription
;
@ApiModelProperty
(
value
=
"描述图片"
,
example
=
"http://,http://"
,
required
=
false
)
private
String
requireUrl
;
@ApiModelProperty
(
value
=
"发布者姓名"
,
example
=
"张三"
)
// @NotNull(message = "发布者姓名不能为空", groups = {Insert.class})
private
String
publishName
;
@ApiModelProperty
(
value
=
"发布者电话"
,
example
=
"1892994543"
,
required
=
true
)
@NotNull
(
message
=
"发布者电话不能为空"
,
groups
=
{
Insert
.
class
})
private
String
publishPhone
;
/**
* 后台获取token里面的用户id
*/
@ApiModelProperty
(
value
=
"用户id"
,
hidden
=
true
)
//@NotNull(message = "用户id不能为空", groups = {Insert.class})
private
Integer
userAccountId
;
@ApiModelProperty
(
value
=
"省份编码"
,
required
=
false
)
@ApiModelProperty
(
value
=
"省份编码"
,
required
=
false
)
//@NotNull(message = "省份编码不能为空", groups = {Insert.class})
//@NotNull(message = "省份编码不能为空", groups = {Insert.class})
private
Integer
provinceCode
;
private
Integer
provinceCode
;
...
@@ -33,28 +100,26 @@ public class RequirementsInfoVO implements Serializable {
...
@@ -33,28 +100,26 @@ public class RequirementsInfoVO implements Serializable {
private
Integer
cityCode
;
private
Integer
cityCode
;
@ApiModelProperty
(
value
=
"区编码"
,
required
=
false
)
@ApiModelProperty
(
value
=
"区编码"
,
required
=
false
)
private
Integer
districtCode
;
private
Integer
districtCode
;
@ApiModelProperty
(
value
=
"需求类型id"
)
@NotNull
(
message
=
"需求类型id不能为空"
,
groups
=
{
Insert
.
class
})
private
Integer
requirementTypeId
;
@ApiModelProperty
(
value
=
"需求类型名称"
)
private
String
requirementTypeName
;
@ApiModelProperty
(
value
=
"用户id"
)
//@NotNull(message = "用户id不能为空", groups = {Insert.class})
private
Integer
userAccountId
;
@ApiModelProperty
(
value
=
"发布者姓名"
)
@NotNull
(
message
=
"发布者姓名不能为空"
,
groups
=
{
Insert
.
class
})
private
String
publishName
;
@ApiModelProperty
(
value
=
"发布者电话"
)
@NotNull
(
message
=
"发布者电话不能为空"
,
groups
=
{
Insert
.
class
})
private
String
publishPhone
;
@ApiModelProperty
(
value
=
"需求描述"
)
@NotNull
(
message
=
"需求描述不能为空"
,
groups
=
{
Insert
.
class
})
@Length
(
max
=
256
,
message
=
"字符过长"
)
private
String
requireDescription
;
@ApiModelProperty
(
value
=
"是否已解决"
)
@ApiModelProperty
(
value
=
"是否已解决"
)
private
Boolean
solved
;
private
Boolean
solved
;
@ApiModelProperty
(
value
=
"创建时间"
)
private
Date
createTime
;
@ApiModelProperty
(
value
=
"更新时间"
)
@ApiModelProperty
(
value
=
"类型名称"
,
hidden
=
true
)
private
Date
updateTime
;
private
String
requirementTypeName
;
@ApiModelProperty
(
value
=
"订单编号"
)
private
String
orderNumber
;
@ApiModelProperty
(
value
=
"应支付金额 单位元"
,
example
=
"1.00"
)
private
BigDecimal
paramMoney
;
@ApiModelProperty
(
value
=
"发布者id"
,
example
=
"1"
,
required
=
true
)
private
Integer
publishAccountId
;
@ApiModelProperty
(
value
=
"发布者订单编号"
)
private
String
publisherNumber
;
}
}
csf-common/csf-common-model/src/main/java/com/mmc/csf/infomation/vo/RequirementsTypeSubclassVO.java
0 → 100644
浏览文件 @
5c61feda
package
com
.
mmc
.
csf
.
infomation
.
vo
;
import
lombok.AllArgsConstructor
;
import
lombok.Builder
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
/**
* @Author small
* @Date 2023/7/25 9:56
* @Version 1.0
*/
@Data
@NoArgsConstructor
@AllArgsConstructor
@Builder
public
class
RequirementsTypeSubclassVO
{
/**
* 二级分类的id
*/
private
Integer
id
;
/**
* 一级分类的id
*/
private
Integer
requirementsTypeId
;
/**
* 二级分类的名称
*/
private
String
name
;
}
csf-common/csf-common-model/src/main/java/com/mmc/csf/infomation/vo/RequirementsTypeVO.java
浏览文件 @
5c61feda
...
@@ -7,7 +7,7 @@ import lombok.Data;
...
@@ -7,7 +7,7 @@ import lombok.Data;
import
lombok.NoArgsConstructor
;
import
lombok.NoArgsConstructor
;
import
java.io.Serializable
;
import
java.io.Serializable
;
import
java.util.
Date
;
import
java.util.
List
;
/**
/**
* @author: zj
* @author: zj
...
@@ -23,4 +23,9 @@ public class RequirementsTypeVO implements Serializable {
...
@@ -23,4 +23,9 @@ public class RequirementsTypeVO implements Serializable {
private
Integer
id
;
private
Integer
id
;
@ApiModelProperty
(
value
=
"需求名称"
)
@ApiModelProperty
(
value
=
"需求名称"
)
private
String
typeName
;
private
String
typeName
;
/**
* 二级分类
*/
private
List
<
RequirementsTypeSubclassVO
>
typeSubclassList
;
}
}
csf-common/csf-common-model/src/main/java/com/mmc/csf/infomation/vo/TenderApplyVO.java
浏览文件 @
5c61feda
...
@@ -34,4 +34,6 @@ public class TenderApplyVO implements Serializable {
...
@@ -34,4 +34,6 @@ public class TenderApplyVO implements Serializable {
@ApiModelProperty
(
value
=
"联系电话"
,
hidden
=
true
)
@ApiModelProperty
(
value
=
"联系电话"
,
hidden
=
true
)
//@NotNull(message = "联系电话不能为空", groups = {Create.class})
//@NotNull(message = "联系电话不能为空", groups = {Create.class})
private
String
phoneNum
;
private
String
phoneNum
;
}
}
csf-common/csf-common-model/src/main/java/com/mmc/csf/licence/dto/LicenceGradeDTO.java
0 → 100644
浏览文件 @
5c61feda
package
com
.
mmc
.
csf
.
licence
.
dto
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.AllArgsConstructor
;
import
lombok.Builder
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
/**
* @Author small
* @Date 2023/7/13 14:42
* @Version 1.0
*/
@Builder
@Data
@AllArgsConstructor
@NoArgsConstructor
public
class
LicenceGradeDTO
{
private
static
final
long
serialVersionUID
=
-
4791023169682602298L
;
@ApiModelProperty
(
value
=
"执照等级id"
)
private
Integer
id
;
@ApiModelProperty
(
value
=
"执照等级名称"
)
private
String
name
;
}
csf-common/csf-common-model/src/main/java/com/mmc/csf/licence/dto/LicenceModelsDTO.java
0 → 100644
浏览文件 @
5c61feda
package
com
.
mmc
.
csf
.
licence
.
dto
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.AllArgsConstructor
;
import
lombok.Builder
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
/**
* @Author small
* @Date 2023/7/13 14:45
* @Version 1.0
*/
@Builder
@Data
@AllArgsConstructor
@NoArgsConstructor
public
class
LicenceModelsDTO
{
private
static
final
long
serialVersionUID
=
-
4791023169682602298L
;
@ApiModelProperty
(
value
=
"执照机型id"
)
private
Integer
id
;
@ApiModelProperty
(
value
=
"执照机型名称"
)
private
String
name
;
}
csf-common/csf-common-model/src/main/java/com/mmc/csf/licence/dto/LicenceScaleDTO.java
0 → 100644
浏览文件 @
5c61feda
package
com
.
mmc
.
csf
.
licence
.
dto
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.AllArgsConstructor
;
import
lombok.Builder
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
/**
* @Author small
* @Date 2023/7/13 14:46
* @Version 1.0
*/
@Builder
@Data
@AllArgsConstructor
@NoArgsConstructor
public
class
LicenceScaleDTO
{
private
static
final
long
serialVersionUID
=
-
4791023169682602298L
;
@ApiModelProperty
(
value
=
"执照机构规模id"
)
private
Integer
id
;
@ApiModelProperty
(
value
=
"执照机构规模名称"
)
private
String
name
;
}
csf-common/csf-common-model/src/main/java/com/mmc/csf/licence/dto/LicenceTypeDTO.java
0 → 100644
浏览文件 @
5c61feda
package
com
.
mmc
.
csf
.
licence
.
dto
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.AllArgsConstructor
;
import
lombok.Builder
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
/**
* @Author small
* @Date 2023/7/13 14:46
* @Version 1.0
*/
@Builder
@Data
@AllArgsConstructor
@NoArgsConstructor
public
class
LicenceTypeDTO
{
private
static
final
long
serialVersionUID
=
-
4791023169682602298L
;
@ApiModelProperty
(
value
=
"执照类型id"
)
private
Integer
id
;
@ApiModelProperty
(
value
=
"执照类型名称"
)
private
String
name
;
}
csf-common/csf-common-model/src/main/java/com/mmc/csf/licence/dto/LicenseOrganizationsDTO.java
0 → 100644
浏览文件 @
5c61feda
package
com
.
mmc
.
csf
.
licence
.
dto
;
import
com.mmc.csf.release.model.group.Create
;
import
com.mmc.csf.release.model.group.Update
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.AllArgsConstructor
;
import
lombok.Builder
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
import
org.springframework.format.annotation.DateTimeFormat
;
import
javax.validation.constraints.NotBlank
;
import
javax.validation.constraints.NotNull
;
import
javax.validation.constraints.Size
;
import
java.util.Date
;
import
java.util.List
;
/**
* @Author small
* @Date 2023/7/14 16:51
* @Version 1.0
*/
@Builder
@Data
@AllArgsConstructor
@NoArgsConstructor
public
class
LicenseOrganizationsDTO
{
private
static
final
long
serialVersionUID
=
-
5814724843819090363L
;
@ApiModelProperty
(
value
=
"机构id"
,
example
=
"1"
)
@NotNull
(
message
=
"机构id"
,
groups
=
Update
.
class
)
private
Integer
id
;
@ApiModelProperty
(
value
=
"机构主图不能为空"
,
example
=
"http://"
,
required
=
true
)
@NotBlank
(
message
=
"机构主图不能为空"
,
groups
=
{
Create
.
class
,
Update
.
class
})
private
String
mainImage
;
@ApiModelProperty
(
value
=
"机构副图不能为空"
,
example
=
"http://"
,
required
=
true
)
@NotBlank
(
message
=
"机构副图不能为空"
,
groups
=
{
Create
.
class
,
Update
.
class
})
private
String
auxiliaryPicture
;
@ApiModelProperty
(
value
=
"机构视频"
,
example
=
"http://"
)
private
String
video
;
@ApiModelProperty
(
value
=
"机构名称不能为空"
,
example
=
"科比特智能教育"
,
required
=
true
)
@NotBlank
(
message
=
"机构名称不能为空"
,
groups
=
{
Create
.
class
,
Update
.
class
})
@Size
(
max
=
25
,
message
=
"机构名称不能超过25个字符"
)
private
String
name
;
@ApiModelProperty
(
value
=
"机构地区"
,
example
=
"110000,110100"
)
@NotBlank
(
message
=
"机构地区不能为空"
,
groups
=
{
Create
.
class
,
Update
.
class
})
private
String
region
;
@ApiModelProperty
(
value
=
"机构地区名称"
,
example
=
"河北省,石家庄市"
,
required
=
true
)
@NotBlank
(
message
=
"机构地区名称"
,
groups
=
{
Create
.
class
,
Update
.
class
})
private
String
regionName
;
@ApiModelProperty
(
value
=
"机构详细地址"
,
example
=
"南山区"
)
@NotBlank
(
message
=
"机构详细地址不能为空"
,
groups
=
{
Create
.
class
,
Update
.
class
})
private
String
detailedAddress
;
@ApiModelProperty
(
value
=
"是否是考点机构 0否 1是"
,
example
=
"0"
,
required
=
true
)
@NotNull
(
message
=
"考点机构不能为空"
,
groups
=
{
Create
.
class
,
Update
.
class
})
private
Integer
testCenter
;
@ApiModelProperty
(
value
=
"机构规模id不能为空 "
,
example
=
"1"
)
//@NotNull(message = "机构规模id不能为空", groups = {Create.class, Update.class})
private
Integer
scaleId
;
@ApiModelProperty
(
value
=
"机构规模名称"
,
example
=
"1"
)
private
String
scaleName
;
@ApiModelProperty
(
value
=
"机构描述"
,
example
=
"机构描述0001"
)
//@NotNull(message = "机构描述", groups = {Create.class, Update.class})
private
String
description
;
@ApiModelProperty
(
value
=
"机构详情"
,
example
=
"机构详情0001"
)
//@NotNull(message = "机构描述", groups = {Create.class, Update.class})
private
String
detail
;
@ApiModelProperty
(
value
=
"培训项目"
,
required
=
false
)
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
0 → 100644
浏览文件 @
5c61feda
package
com
.
mmc
.
csf
.
licence
.
dto
;
import
com.mmc.csf.release.model.group.Create
;
import
com.mmc.csf.release.model.group.Update
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.AllArgsConstructor
;
import
lombok.Builder
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
import
javax.validation.constraints.NotBlank
;
import
javax.validation.constraints.NotNull
;
import
javax.validation.constraints.Size
;
import
java.math.BigDecimal
;
/**
* @Author small
* @Date 2023/7/14 13:30
* @Version 1.0
*/
@Builder
@Data
@AllArgsConstructor
@NoArgsConstructor
public
class
LicenseTrainingProgramsDTO
{
private
static
final
long
serialVersionUID
=
-
5814724843819090363L
;
@ApiModelProperty
(
value
=
"培训id"
,
example
=
"1"
)
@NotNull
(
message
=
"培训id不能为空"
,
groups
=
Update
.
class
)
private
Integer
id
;
@ApiModelProperty
(
value
=
"培训等级id"
,
example
=
"1"
,
required
=
true
)
@NotNull
(
message
=
"培训等级id不能为空"
,
groups
=
{
Create
.
class
,
Update
.
class
})
private
Integer
gradeId
;
@ApiModelProperty
(
value
=
"培训等级名称"
,
example
=
"1"
,
required
=
true
)
@NotNull
(
message
=
"培训等级名称不能为空"
,
groups
=
{
Create
.
class
,
Update
.
class
})
private
String
gradeName
;
@ApiModelProperty
(
value
=
"培训机型id"
,
example
=
"1"
,
required
=
true
)
@NotNull
(
message
=
"培训机型id不能为空"
,
groups
=
{
Create
.
class
,
Update
.
class
})
private
Integer
modelsId
;
@ApiModelProperty
(
value
=
"培训机型名称"
,
example
=
"1"
,
required
=
true
)
@NotNull
(
message
=
"培训机型名称不能为空"
,
groups
=
{
Create
.
class
,
Update
.
class
})
private
String
modelsName
;
@ApiModelProperty
(
value
=
"培训类型id"
,
example
=
"1"
,
required
=
true
)
@NotNull
(
message
=
"培训类型id不能为空"
,
groups
=
{
Create
.
class
,
Update
.
class
})
private
Integer
typeId
;
@ApiModelProperty
(
value
=
"培训类型名称"
,
example
=
"1"
,
required
=
true
)
@NotNull
(
message
=
"培训类型名称"
,
groups
=
{
Create
.
class
,
Update
.
class
})
private
String
typeName
;
@ApiModelProperty
(
value
=
"培训价格"
,
example
=
"1000"
,
required
=
true
)
@NotNull
(
message
=
"培训价格不能为空"
,
groups
=
{
Create
.
class
,
Update
.
class
})
@Size
(
min
=
0
,
max
=
100000
,
message
=
"价格不能超过100000"
)
private
BigDecimal
price
;
@ApiModelProperty
(
value
=
"培训地点不能为空"
,
example
=
"广东省深圳市南山区XXX001"
,
required
=
true
)
@NotBlank
(
message
=
"培训地点不能为空"
,
groups
=
{
Create
.
class
,
Update
.
class
})
private
String
place
;
@ApiModelProperty
(
value
=
"培训主图不能为空"
,
example
=
"http://"
,
required
=
true
)
@NotBlank
(
message
=
"培训主图不能为空"
,
groups
=
{
Create
.
class
,
Update
.
class
})
private
String
mainImage
;
@ApiModelProperty
(
value
=
"机构id"
,
example
=
"http://"
,
required
=
true
)
@NotBlank
(
message
=
"机构id"
,
groups
=
{
Create
.
class
,
Update
.
class
})
private
Integer
orgId
;
}
csf-common/csf-common-model/src/main/java/com/mmc/csf/licence/qo/LicenseOrganizationsQO.java
0 → 100644
浏览文件 @
5c61feda
package
com
.
mmc
.
csf
.
licence
.
qo
;
import
com.mmc.csf.release.model.group.Freeze
;
import
com.mmc.csf.release.model.group.Page
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.AllArgsConstructor
;
import
lombok.Builder
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
import
javax.validation.constraints.Min
;
import
javax.validation.constraints.NotNull
;
/**
* @Author small
* @Date 2023/7/14 16:58
* @Version 1.0
*/
@Builder
@Data
@AllArgsConstructor
@NoArgsConstructor
public
class
LicenseOrganizationsQO
{
@ApiModelProperty
(
value
=
"机构名称不能为空"
,
example
=
"科比特智能教育"
,
required
=
false
)
private
String
name
;
@ApiModelProperty
(
value
=
"培训等级id"
,
example
=
"1"
,
required
=
false
)
private
Integer
gradeId
;
@ApiModelProperty
(
value
=
"培训机型id"
,
example
=
"1"
,
required
=
false
)
private
Integer
modelsId
;
@ApiModelProperty
(
value
=
"培训类型id"
,
example
=
"1"
,
required
=
false
)
private
Integer
typeId
;
@ApiModelProperty
(
value
=
"开始时间,如果只有一个日期,就开始时间与结束时间一致"
,
example
=
"2023-07-14"
,
required
=
false
)
private
String
startTime
;
@ApiModelProperty
(
value
=
"结束时间"
,
example
=
"2023-07-14"
,
required
=
false
)
private
String
endTime
;
@ApiModelProperty
(
value
=
"机构id"
,
example
=
"1"
,
required
=
false
)
private
Integer
id
;
@ApiModelProperty
(
value
=
"地域region"
,
example
=
"110000"
,
required
=
false
)
private
String
region
;
@ApiModelProperty
(
value
=
"当前页"
,
required
=
true
,
example
=
"1"
)
@NotNull
(
message
=
"当前页不能为空"
,
groups
=
{
Page
.
class
,
Freeze
.
class
})
@Min
(
value
=
1
,
groups
=
Page
.
class
)
private
Integer
pageNo
;
@ApiModelProperty
(
value
=
"页大小"
,
required
=
true
,
example
=
"10"
)
@NotNull
(
message
=
"页大小不能为空"
,
groups
=
{
Page
.
class
,
Freeze
.
class
})
@Min
(
value
=
1
,
groups
=
Page
.
class
)
private
Integer
pageSize
;
public
void
buildCurrentPage
()
{
this
.
pageNo
=
(
pageNo
-
1
)
*
pageSize
;
}
}
csf-common/csf-common-model/src/main/java/com/mmc/csf/licence/vo/LicenseOrganizationsVO.java
0 → 100644
浏览文件 @
5c61feda
package
com
.
mmc
.
csf
.
licence
.
vo
;
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
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
lombok.Value
;
import
org.springframework.validation.annotation.Validated
;
import
javax.validation.Valid
;
import
javax.validation.constraints.*
;
import
java.util.List
;
/**
* @Author small
* @Date 2023/7/13 16:07
* @Version 1.0
*/
@Data
public
class
LicenseOrganizationsVO
{
private
static
final
long
serialVersionUID
=
-
5814724843819090363L
;
@ApiModelProperty
(
value
=
"机构id"
,
example
=
"1"
)
@NotNull
(
message
=
"机构id"
,
groups
=
Update
.
class
)
private
Integer
id
;
@ApiModelProperty
(
value
=
"机构主图不能为空"
,
example
=
"http://"
,
required
=
true
)
@NotBlank
(
message
=
"机构主图不能为空"
,
groups
=
{
Create
.
class
,
Update
.
class
})
private
String
mainImage
;
@ApiModelProperty
(
value
=
"机构副图不能为空"
,
example
=
"http://"
,
required
=
true
)
//@NotBlank(message = "机构副图不能为空", groups = {Create.class, Update.class})
private
String
auxiliaryPicture
;
@ApiModelProperty
(
value
=
"机构视频"
,
example
=
"http://"
)
private
String
video
;
@ApiModelProperty
(
value
=
"机构名称不能为空"
,
example
=
"科比特智能教育"
,
required
=
true
)
@NotBlank
(
message
=
"机构名称不能为空"
,
groups
=
{
Create
.
class
,
Update
.
class
})
@Size
(
max
=
25
,
message
=
"机构名称不能超过25个字符"
)
private
String
name
;
@ApiModelProperty
(
value
=
"机构地区编号"
,
example
=
"110000,130100"
,
required
=
true
)
@NotBlank
(
message
=
"机构地区不能为空"
,
groups
=
{
Create
.
class
,
Update
.
class
})
private
String
region
;
@ApiModelProperty
(
value
=
"机构地区名称"
,
example
=
"河北省,石家庄市"
,
required
=
false
)
//@NotBlank(message = "机构地区名称", groups = {Create.class, Update.class})
private
String
regionName
;
@ApiModelProperty
(
value
=
"经度"
,
example
=
"40.892313123"
,
required
=
true
)
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
;
@ApiModelProperty
(
value
=
"是否是考点机构 0否 1是"
,
example
=
"0"
,
required
=
true
)
@NotNull
(
message
=
"考点机构不能为空 0否 1是"
,
groups
=
{
Create
.
class
,
Update
.
class
})
private
Integer
testCenter
;
@ApiModelProperty
(
value
=
"机构规模id不能为空"
,
example
=
"1"
)
//@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
;
@ApiModelProperty
(
value
=
"机构描述"
,
example
=
"机构描述0001"
)
//@NotNull(message = "机构描述", groups = {Create.class, Update.class})
private
String
description
;
@ApiModelProperty
(
value
=
"机构详情"
,
example
=
"机构详情0001"
,
required
=
true
)
@NotNull
(
message
=
"机构详情"
,
groups
=
{
Create
.
class
,
Update
.
class
})
private
String
detail
;
@ApiModelProperty
(
value
=
"培训项目"
,
required
=
false
)
// @NotNull(message = "培训项目不能为空", groups = {Create.class, Update.class})
@Valid
private
List
<
LicenseTrainingProgramsVO
>
trainingProgramsVOS
;
}
csf-common/csf-common-model/src/main/java/com/mmc/csf/licence/vo/LicenseTrainingProgramsVO.java
0 → 100644
浏览文件 @
5c61feda
package
com
.
mmc
.
csf
.
licence
.
vo
;
import
com.mmc.csf.release.model.group.Create
;
import
com.mmc.csf.release.model.group.Update
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
org.hibernate.validator.constraints.Range
;
import
javax.validation.constraints.Max
;
import
javax.validation.constraints.NotBlank
;
import
javax.validation.constraints.NotNull
;
import
java.math.BigDecimal
;
import
java.util.Objects
;
/**
* @Author small
* @Date 2023/7/14 11:12
* @Version 1.0
*/
@Data
public
class
LicenseTrainingProgramsVO
{
private
static
final
long
serialVersionUID
=
-
5814724843819090363L
;
@ApiModelProperty
(
value
=
"培训id"
,
example
=
"1"
)
// @NotNull(message = "培训id不能为空", groups = Update.class)
private
Integer
id
;
@ApiModelProperty
(
value
=
"培训等级id"
,
example
=
"1"
,
required
=
false
)
//@NotNull(message = "培训等级id不能为空", groups = {Create.class, Update.class})
@Max
(
value
=
3
,
groups
=
{
Create
.
class
,
Update
.
class
},
message
=
"培训等级id不能超过3"
)
private
Integer
gradeId
;
@ApiModelProperty
(
value
=
"培训机型id"
,
example
=
"1"
,
required
=
false
)
//@NotNull(message = "培训机型id不能为空", groups = {Create.class, Update.class})
@Max
(
value
=
4
,
groups
=
{
Create
.
class
,
Update
.
class
},
message
=
"培训机型id不能超过4"
)
private
Integer
modelsId
;
@ApiModelProperty
(
value
=
"培训类型id"
,
example
=
"1"
,
required
=
false
)
//@NotNull(message = "培训类型id不能为空", groups = {Create.class, Update.class})
@Max
(
value
=
2
,
groups
=
{
Create
.
class
,
Update
.
class
},
message
=
"培训类型id不能超过2"
)
private
Integer
typeId
;
@ApiModelProperty
(
value
=
"培训价格"
,
example
=
"1000"
,
required
=
false
)
//@NotNull(message = "培训价格不能为空", groups = {Create.class, Update.class})
@Range
(
min
=
0
,
max
=
100000
,
message
=
"价格不能超过100000"
)
private
BigDecimal
price
;
//@ApiModelProperty(value = "培训地点不能为空", example = "广东省深圳市南山区XXX001", required = true)
//@NotBlank(message = "培训地点不能为空", groups = {Create.class, Update.class})
private
String
place
;
@ApiModelProperty
(
value
=
"培训主图不能为空"
,
example
=
"http://"
,
required
=
false
)
//@NotBlank(message = "培训主图不能为空", groups = {Create.class, Update.class})
private
String
mainImage
;
@ApiModelProperty
(
value
=
"机构id"
,
hidden
=
false
)
private
Integer
orgId
;
@Override
public
boolean
equals
(
Object
train
)
{
LicenseTrainingProgramsVO
programsVO
=
(
LicenseTrainingProgramsVO
)
train
;
if
(
this
.
gradeId
.
equals
(
programsVO
.
getGradeId
())
&&
this
.
modelsId
.
equals
(
programsVO
.
getModelsId
())
&&
this
.
typeId
.
equals
(
programsVO
.
getTypeId
()))
{
return
true
;
}
else
{
return
false
;
}
}
@Override
public
int
hashCode
()
{
return
Objects
.
hash
(
gradeId
,
modelsId
,
typeId
);
}
}
csf-common/csf-common-model/src/main/java/com/mmc/csf/release/forum/dto/DynamicInfoDTO.java
浏览文件 @
5c61feda
...
@@ -11,9 +11,9 @@ import lombok.Builder;
...
@@ -11,9 +11,9 @@ import lombok.Builder;
import
lombok.Data
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
import
lombok.NoArgsConstructor
;
import
java.util.Date
;
/**
/**
* @Author LW
* @Author LW
*
* @date 2023/6/19 14:25 概要:
* @date 2023/6/19 14:25 概要:
*/
*/
@Data
@Data
...
@@ -21,21 +21,27 @@ import lombok.NoArgsConstructor;
...
@@ -21,21 +21,27 @@ import lombok.NoArgsConstructor;
@NoArgsConstructor
@NoArgsConstructor
@Builder
@Builder
public
class
DynamicInfoDTO
{
public
class
DynamicInfoDTO
{
@ApiModelProperty
(
value
=
"动态id"
)
@ApiModelProperty
(
value
=
"动态id"
)
private
Integer
id
;
private
Integer
id
;
@ApiModelProperty
(
value
=
"动态描述"
)
@ApiModelProperty
(
value
=
"动态描述"
)
private
String
description
;
private
String
description
;
@ApiModelProperty
(
value
=
"图片/视频"
)
@ApiModelProperty
(
value
=
"图片/视频"
)
private
List
<
MediaVO
>
mediaVO
;
private
List
<
MediaVO
>
mediaVO
;
@ApiModelProperty
(
value
=
"show: 0显示 1隐藏"
)
@ApiModelProperty
(
value
=
"show: 0显示 1隐藏"
)
private
Integer
show
;
private
Integer
show
;
@ApiModelProperty
(
value
=
"发布动态用户信息"
)
@ApiModelProperty
(
value
=
"发布动态用户信息"
)
private
UserBaseInfoVO
userBaseInfo
;
private
UserBaseInfoVO
userBaseInfo
;
@ApiModelProperty
(
value
=
"用户id"
)
@ApiModelProperty
(
value
=
"用户id"
)
private
Integer
userAccountId
;
private
Integer
userAccountId
;
@ApiModelProperty
(
value
=
"动态发布时间"
)
private
Date
dynamicPublishTime
;
@ApiModelProperty
(
value
=
"审核状态:0审核中 1通过 2未通过"
)
private
Integer
checkStatus
;
}
}
csf-common/csf-common-model/src/main/java/com/mmc/csf/release/model/group/Create.java
浏览文件 @
5c61feda
package
com
.
mmc
.
csf
.
release
.
model
.
group
;
package
com
.
mmc
.
csf
.
release
.
model
.
group
;
import
javax.validation.groups.Default
;
/**
/**
* @author 作者 geDuo
* @author 作者 geDuo
* @version 创建时间:2021年8月28日 下午5:37:44
* @version 创建时间:2021年8月28日 下午5:37:44
* @explain 类说明
* @explain 类说明
*/
*/
public
@interface
Create
{
public
interface
Create
extends
Default
{
}
}
csf-common/csf-common-model/src/main/java/com/mmc/csf/release/model/group/Insert.java
浏览文件 @
5c61feda
package
com
.
mmc
.
csf
.
release
.
model
.
group
;
package
com
.
mmc
.
csf
.
release
.
model
.
group
;
import
javax.validation.groups.Default
;
/**
/**
* @author 作者 dahang
* @author 作者 dahang
* @version 创建时间:2022年7月20日
* @version 创建时间:2022年7月20日
* @explain 类说明
* @explain 类说明
*/
*/
public
interface
Insert
{
public
interface
Insert
extends
Default
{
}
}
csf-common/csf-common-model/src/main/java/com/mmc/csf/release/model/group/Update.java
浏览文件 @
5c61feda
package
com
.
mmc
.
csf
.
release
.
model
.
group
;
package
com
.
mmc
.
csf
.
release
.
model
.
group
;
import
javax.validation.groups.Default
;
/**
/**
* @author 作者 geDuo
* @author 作者 geDuo
* @version 创建时间:2021年8月28日 下午5:37:52
* @version 创建时间:2021年8月28日 下午5:37:52
* @explain 类说明
* @explain 类说明
*/
*/
public
@interface
Update
{
public
interface
Update
extends
Default
{
}
}
csf-common/csf-common-util/pom.xml
浏览文件 @
5c61feda
...
@@ -83,13 +83,6 @@
...
@@ -83,13 +83,6 @@
<version>
2.9.0
</version>
<version>
2.9.0
</version>
</dependency>
</dependency>
<!-- https://mvnrepository.com/artifact/com.github.wxpay/wxpay-sdk -->
<dependency>
<groupId>
com.github.wxpay
</groupId>
<artifactId>
wxpay-sdk
</artifactId>
<version>
0.0.3
</version>
</dependency>
<!-- https://mvnrepository.com/artifact/javax.servlet/javax.servlet-api -->
<!-- https://mvnrepository.com/artifact/javax.servlet/javax.servlet-api -->
<dependency>
<dependency>
<groupId>
javax.servlet
</groupId>
<groupId>
javax.servlet
</groupId>
...
...
csf-common/csf-common-util/src/main/java/com/mmc/csf/common/util/web/ResultEnum.java
浏览文件 @
5c61feda
...
@@ -297,7 +297,7 @@ public enum ResultEnum implements BaseErrorInfoInterface {
...
@@ -297,7 +297,7 @@ public enum ResultEnum implements BaseErrorInfoInterface {
VERIFY_COUNT_ERROR
(
"30416"
,
"认证次数上限,请联系管理员"
),
VERIFY_COUNT_ERROR
(
"30416"
,
"认证次数上限,请联系管理员"
),
NOT_ENT_VERIFY_ERROR
(
"30417"
,
"机构未认证或认证未通过,请先进行机构认证"
),
NOT_ENT_VERIFY_ERROR
(
"30417"
,
"机构未认证或认证未通过,请先进行机构认证"
),
NOT__VERIFY_ERROR
(
"30418"
,
"机构未认证或飞手认证未通过,请先进行认证"
),
NOT__VERIFY_ERROR
(
"30418"
,
"机构未认证或飞手认证未通过,请先进行认证"
),
COMPANY_NOT_VERIFY_ERROR
(
"30419"
,
"未进行企业认证"
),
COMPANY_NOT_VERIFY_ERROR
(
"30419"
,
"未进行企业认证"
),
//渠道认证
//渠道认证
NOT_ENT_USER
(
"30501"
,
"感谢您有意向成为我们的渠道商,请先完成企业认证。"
),
NOT_ENT_USER
(
"30501"
,
"感谢您有意向成为我们的渠道商,请先完成企业认证。"
),
...
@@ -382,14 +382,14 @@ public enum ResultEnum implements BaseErrorInfoInterface {
...
@@ -382,14 +382,14 @@ public enum ResultEnum implements BaseErrorInfoInterface {
SCORE_ERROR
(
"40177"
,
"您输入的积分数量有误,请重新输入!"
),
SCORE_ERROR
(
"40177"
,
"您输入的积分数量有误,请重新输入!"
),
PLEASE_FILL_IN_THE_CONTRACT_TEMPLATE_FIRST
(
"40178"
,
"请先填充合同模板!"
),
PLEASE_FILL_IN_THE_CONTRACT_TEMPLATE_FIRST
(
"40178"
,
"请先填充合同模板!"
),
SCORE_NOT_GIVE_MYSELF
(
"40179"
,
"积分不能转赠给本人,请重新操作"
),
SCORE_NOT_GIVE_MYSELF
(
"40179"
,
"积分不能转赠给本人,请重新操作"
),
ALREADY_FINISH_ENT_AUTH_ERROR
(
"2000"
,
"助力已完成!"
),
ALREADY_FINISH_ENT_AUTH_ERROR
(
"2000"
,
"助力已完成!"
),
SYSTEM_ERROR
(
"2001"
,
"系统错误,请稍后重试"
)
,
SYSTEM_ERROR
(
"2001"
,
"系统错误,请稍后重试"
)
,
RULE_ERROR
(
"2002"
,
"当前兑换比例已失效,请刷新后重试"
),
RULE_ERROR
(
"2002"
,
"当前兑换比例已失效,请刷新后重试"
),
COUNT_LIMIT_ERROR
(
"2003"
,
"参与次数已达上线"
),
COUNT_LIMIT_ERROR
(
"2003"
,
"参与次数已达上线"
),
ALREADY_ENT_AUTH_ERROR
(
"2004"
,
"助力失败,您已完成企业认证!"
),
ALREADY_ENT_AUTH_ERROR
(
"2004"
,
"助力失败,您已完成企业认证!"
),
ALREADY_REAL_NAME_AUTH_ERROR
(
"2005"
,
"助力失败,您已完成实名认证!"
),
ALREADY_REAL_NAME_AUTH_ERROR
(
"2005"
,
"助力失败,您已完成实名认证!"
),
PARTICIPATE_BUT_NOT_AUTH_ERROR
(
"2006"
,
"待完成授权或认证"
),
PARTICIPATE_BUT_NOT_AUTH_ERROR
(
"2006"
,
"待完成授权或认证"
),
ALREADY_HELP_ERROR
(
"2007"
,
"已助力"
),
ALREADY_HELP_ERROR
(
"2007"
,
"已助力"
),
ALREADY_STOP_ERROR
(
"2008"
,
"活动已下线"
),
ALREADY_STOP_ERROR
(
"2008"
,
"活动已下线"
),
...
@@ -399,7 +399,16 @@ public enum ResultEnum implements BaseErrorInfoInterface {
...
@@ -399,7 +399,16 @@ public enum ResultEnum implements BaseErrorInfoInterface {
DIVIDE_OBJ_NOT_EXIST
(
"2012"
,
"先点击确认添加分成对象"
),
DIVIDE_OBJ_NOT_EXIST
(
"2012"
,
"先点击确认添加分成对象"
),
// 新闻行业
// 新闻行业
INDUSTRY_NEWS_TITLE_EXISTS
(
"40200"
,
"文章标题存在"
);
INDUSTRY_NEWS_TITLE_EXISTS
(
"40200"
,
"文章标题存在"
),
// 论坛
DYNAMIC_SENSITIVE_INFO
(
"50100"
,
"发布信息涉及敏感信息!"
),
THE_ORGANIZATION_NAME_ALREADY_EXISTS
(
"60001"
,
"机构名称已存在"
),
YOU_CANNOT_MODIFY_REQUIREMENTS_PUBLISHED_BY_OTHERS
(
"60003"
,
"不能修改他(她)人发布的需求"
),
YOU_CANNOT_DELETE_REQUIREMENTS_POSTED_BY_OTHERS
(
"60004"
,
"不能删除他(她)人发布的需求"
),
THE_THIRD_PARTY_INTERFACE_IS_BEING_UPDATED
(
"60005"
,
"第三方接口在更新请联系开发人员"
),
THREE_FIELDS_CAN_BE_REPEATED
(
"60002"
,
"机型、等级、类型存在重复"
);
/**
/**
* 错误码
* 错误码
*
*
...
...
csf-common/csf-common-util/src/main/java/com/mmc/csf/common/util/wx/WXMsgPushUtils.java
0 → 100644
浏览文件 @
5c61feda
package
com
.
mmc
.
csf
.
common
.
util
.
wx
;
import
java.security.MessageDigest
;
import
java.util.Arrays
;
public
class
WXMsgPushUtils
{
/**
* 用SHA1算法生成安全签名
*/
public
static
String
getSHA1
(
String
...
values
)
throws
Exception
{
try
{
String
[]
array
=
new
String
[
values
.
length
];
for
(
int
i
=
0
;
i
<
values
.
length
;
i
++)
{
array
[
i
]
=
values
[
i
];
}
StringBuffer
sb
=
new
StringBuffer
();
// 字符串排序
Arrays
.
sort
(
array
);
for
(
int
i
=
0
;
i
<
values
.
length
;
i
++)
{
sb
.
append
(
array
[
i
]);
}
String
str
=
sb
.
toString
();
// SHA1签名生成
MessageDigest
md
=
MessageDigest
.
getInstance
(
"SHA-1"
);
md
.
update
(
str
.
getBytes
());
byte
[]
digest
=
md
.
digest
();
StringBuffer
hexstr
=
new
StringBuffer
();
String
shaHex
=
""
;
for
(
int
i
=
0
;
i
<
digest
.
length
;
i
++)
{
shaHex
=
Integer
.
toHexString
(
digest
[
i
]
&
0xFF
);
if
(
shaHex
.
length
()
<
2
)
{
hexstr
.
append
(
0
);
}
hexstr
.
append
(
shaHex
);
}
return
hexstr
.
toString
();
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
throw
new
Exception
(
"SHA1加密失败"
);
}
}
}
\ No newline at end of file
kustomization/base/deployment.yaml
浏览文件 @
5c61feda
...
@@ -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
...
@@ -53,6 +51,36 @@ spec:
...
@@ -53,6 +51,36 @@ spec:
configMapKeyRef
:
configMapKeyRef
:
name
:
ims-map
name
:
ims-map
key
:
SW_AGENT_NAME
key
:
SW_AGENT_NAME
-
name
:
MYSQL_PASSWORD
valueFrom
:
secretKeyRef
:
name
:
iuav-secret
key
:
MYSQL_PASSWORD
-
name
:
REDIS_PASSWORD
valueFrom
:
secretKeyRef
:
name
:
iuav-secret
key
:
REDIS_PASSWORD
-
name
:
OSS_ACCESS_KEY_SECRET
valueFrom
:
secretKeyRef
:
name
:
iuav-secret
key
:
OSS_ACCESS_KEY_SECRET
-
name
:
WECHAT_SUB_SECRET
valueFrom
:
secretKeyRef
:
name
:
iuav-secret
key
:
WECHAT_SUB_SECRET
-
name
:
WECHAT_APPLET_SECRET
valueFrom
:
secretKeyRef
:
name
:
iuav-secret
key
:
WECHAT_APPLET_SECRET
-
name
:
RABBITMQ_PASSWORD
valueFrom
:
secretKeyRef
:
name
:
iuav-secret
key
:
RABBITMQ_PASSWORD
volumes
:
volumes
:
-
name
:
log-of-app
-
name
:
log-of-app
hostPath
:
hostPath
:
...
...
kustomization/base/service.yaml
浏览文件 @
5c61feda
...
@@ -6,7 +6,6 @@ metadata:
...
@@ -6,7 +6,6 @@ metadata:
spec
:
spec
:
selector
:
selector
:
app
:
ims
app
:
ims
type
:
NodePort
ports
:
ports
:
-
protocol
:
TCP
-
protocol
:
TCP
port
:
10001
port
:
10001
\ No newline at end of file
kustomization/overlays/dev/kustomization.yaml
浏览文件 @
5c61feda
...
@@ -11,11 +11,11 @@ commonAnnotations:
...
@@ -11,11 +11,11 @@ commonAnnotations:
patches
:
patches
:
-
path
:
./increase_replicas.yaml
-
path
:
./increase_replicas.yaml
-
path
:
./configMap.yaml
-
path
:
./configMap.yaml
-
path
:
./service-patch.yaml
#
- path: ./service-patch.yaml
target
:
#
target:
kind
:
Service
#
kind: Service
name
:
ims-svc
#
name: ims-svc
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
:
afd137bc09338fd83c1f801db939452625f234d5
newTag
:
e618f2b92a108492786a00ca07758f1c6a22bd4d
kustomization/overlays/prod/kustomization.yaml
浏览文件 @
5c61feda
...
@@ -11,11 +11,11 @@ commonAnnotations:
...
@@ -11,11 +11,11 @@ commonAnnotations:
patches
:
patches
:
-
path
:
increase_replicas.yaml
-
path
:
increase_replicas.yaml
-
path
:
configMap.yaml
-
path
:
configMap.yaml
-
path
:
service-patch.yaml
#
- path: service-patch.yaml
target
:
#
target:
kind
:
Service
#
kind: Service
name
:
ims-svc
#
name: ims-svc
images
:
images
:
-
name
:
REGISTRY/NAMESPACE/IMAGE:TAG
-
name
:
REGISTRY/NAMESPACE/IMAGE:TAG
newName
:
mmc-registry.cn-shenzhen.cr.aliyuncs.com/sharefly/ims
newName
:
mmc-registry.cn-shenzhen.cr.aliyuncs.com/sharefly/ims
newTag
:
b6e6bb40dda411f59e068a9606c15945e90735b
3
newTag
:
e3868b8c83baa42c6633c935e8187cc0ce36071
3
release-service/src/main/java/com/mmc/csf/release/constant/UserSystemConstant.java
0 → 100644
浏览文件 @
5c61feda
package
com
.
mmc
.
csf
.
release
.
constant
;
import
lombok.Data
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.stereotype.Component
;
/**
* @author: zj
* @Date: 2023/5/16 13:34
*/
@Data
@Component
public
class
UserSystemConstant
{
@Value
(
"${wx.app.id}"
)
private
String
wxAppId
;
@Value
(
"${wx.app.secret}"
)
private
String
wxAppSecret
;
@Value
(
"${wx.app.miniprogram-state}"
)
private
String
miniProgramState
;
@Value
(
"${wx.app.env-version}"
)
private
String
envVersion
;
@Value
(
"${wx.sub.appid}"
)
private
String
wxSubAppId
;
@Value
(
"${wx.sub.secret}"
)
private
String
wxSubSecret
;
// @Value("${third-party.ali.app-code}")
// private String aliAppCode;
//
// @Value("${third-party.qcc.app-key}")
// private String qccAppKey;
//
// @Value("${third-party.qcc.secret-key}")
// private String qccSecretKey;
}
release-service/src/main/java/com/mmc/csf/release/constant/WxConstant.java
0 → 100644
浏览文件 @
5c61feda
package
com
.
mmc
.
csf
.
release
.
constant
;
/**
* @author: zj
* @Date: 2023/5/16 16:02
*/
public
class
WxConstant
{
public
static
final
Integer
APP
=
0
;
public
static
final
Integer
WEB
=
1
;
public
static
final
Integer
LABEL_DATA
=
100
;
public
static
final
String
CODE2_SESSION_URL
=
"https://api.weixin.qq.com/sns/jscode2session"
;
public
static
final
String
GRANT_TYPE
=
"authorization_code"
;
public
static
final
String
ACCESS_TOKEN_URL
=
"https://api.weixin.qq.com/sns/oauth2/access_token"
;
public
static
final
String
OPEN_ID
=
"openid"
;
public
static
final
String
UNION_ID
=
"unionid"
;
public
static
final
String
SESSION_KEY
=
"session_key"
;
public
final
static
String
subscribe
=
"subscribe"
;
public
final
static
String
unsubscribe
=
"unsubscribe"
;
public
static
final
String
IUAV_MINI_PROGRAM_ACCESS_TOKEN
=
"IUAV_MINI_PROGRAM_ACCESS_TOKEN"
;
public
static
final
String
SHARE_FLY_SUB_ACCESS_TOKEN
=
"SHARE_FLY_SUB_ACCESS_TOKEN"
;
public
static
final
String
IUAV_MINI_PROGRAM_STABLE_ACCESS_TOKEN
=
"IUAV_MINI_PROGRAM_STABLE_ACCESS_TOKEN"
;
public
static
final
String
RESULT
=
"result"
;
public
static
final
String
LABEL
=
"label"
;
}
release-service/src/main/java/com/mmc/csf/release/controller/BackstageForumController.java
浏览文件 @
5c61feda
...
@@ -18,7 +18,6 @@ import io.swagger.annotations.ApiResponses;
...
@@ -18,7 +18,6 @@ import io.swagger.annotations.ApiResponses;
/**
/**
* @Author LW
* @Author LW
*
* @date 2023/6/19 10:44 概要:
* @date 2023/6/19 10:44 概要:
*/
*/
@Api
(
tags
=
{
"后台-论坛管理-模块"
})
@Api
(
tags
=
{
"后台-论坛管理-模块"
})
...
@@ -26,34 +25,42 @@ import io.swagger.annotations.ApiResponses;
...
@@ -26,34 +25,42 @@ import io.swagger.annotations.ApiResponses;
@RequestMapping
(
"/backstage/forum"
)
@RequestMapping
(
"/backstage/forum"
)
public
class
BackstageForumController
{
public
class
BackstageForumController
{
@Autowired
BackstageForumService
backstageForumService
;
@Autowired
BackstageForumService
backstageForumService
;
@ApiOperation
(
value
=
"后台-动态列表"
)
@PostMapping
(
"/listDynamic"
)
@ApiOperation
(
value
=
"后台-动态列表"
)
@ApiResponses
({
@ApiResponse
(
code
=
200
,
message
=
"OK"
,
response
=
DynamicInfoDTO
.
class
)})
@PostMapping
(
"/listDynamic"
)
public
ResultBody
<
DynamicInfoDTO
>
listDynamic
(
@ApiResponses
({
@ApiResponse
(
code
=
200
,
message
=
"OK"
,
response
=
DynamicInfoDTO
.
class
)})
@RequestBody
DynamicQO
dynamic
,
HttpServletRequest
request
)
{
public
ResultBody
<
DynamicInfoDTO
>
listDynamic
(
return
ResultBody
.
success
(
backstageForumService
.
listDynamic
(
dynamic
,
request
));
@RequestBody
DynamicQO
dynamic
,
HttpServletRequest
request
)
{
}
return
ResultBody
.
success
(
backstageForumService
.
listDynamic
(
dynamic
,
request
));
}
@ApiOperation
(
value
=
"动态删除"
)
@GetMapping
(
"/deleteDynamic"
)
@ApiOperation
(
value
=
"动态删除"
)
@ApiResponses
({
@ApiResponse
(
code
=
200
,
message
=
"OK"
,
response
=
ResultBody
.
class
)})
@GetMapping
(
"/deleteDynamic"
)
public
ResultBody
deleteDynamic
(
@RequestParam
Integer
dynamicId
)
{
@ApiResponses
({
@ApiResponse
(
code
=
200
,
message
=
"OK"
,
response
=
ResultBody
.
class
)})
return
backstageForumService
.
deleteDynamic
(
dynamicId
);
public
ResultBody
deleteDynamic
(
@RequestParam
Integer
dynamicId
)
{
}
return
backstageForumService
.
deleteDynamic
(
dynamicId
);
}
@ApiOperation
(
value
=
"动态隐藏"
)
@GetMapping
(
"/hiddenDynamic"
)
@ApiOperation
(
value
=
"动态隐藏"
)
@ApiResponses
({
@ApiResponse
(
code
=
200
,
message
=
"OK"
,
response
=
ResultBody
.
class
)})
@GetMapping
(
"/hiddenDynamic"
)
public
ResultBody
hiddenDynamic
(
@RequestParam
Integer
dynamicId
)
{
@ApiResponses
({
@ApiResponse
(
code
=
200
,
message
=
"OK"
,
response
=
ResultBody
.
class
)})
return
backstageForumService
.
hiddenDynamic
(
dynamicId
);
public
ResultBody
hiddenDynamic
(
@RequestParam
Integer
dynamicId
)
{
}
return
backstageForumService
.
hiddenDynamic
(
dynamicId
);
}
@ApiOperation
(
value
=
"点赞用户信息"
)
@GetMapping
(
"/likeUserInfo"
)
@ApiOperation
(
value
=
"点赞用户信息"
)
@ApiResponses
({
@ApiResponse
(
code
=
200
,
message
=
"OK"
,
response
=
UserBaseInfoVO
.
class
)})
@GetMapping
(
"/likeUserInfo"
)
public
ResultBody
likeUserInfo
(
@RequestParam
Integer
dynamicId
,
HttpServletRequest
request
)
{
@ApiResponses
({
@ApiResponse
(
code
=
200
,
message
=
"OK"
,
response
=
UserBaseInfoVO
.
class
)})
return
backstageForumService
.
likeUserInfo
(
dynamicId
,
request
);
public
ResultBody
likeUserInfo
(
@RequestParam
Integer
dynamicId
,
HttpServletRequest
request
)
{
}
return
backstageForumService
.
likeUserInfo
(
dynamicId
,
request
);
}
@ApiOperation
(
value
=
"审核动态"
)
@GetMapping
(
"/checkDynamic"
)
@ApiResponses
({
@ApiResponse
(
code
=
200
,
message
=
"OK"
,
response
=
ResultBody
.
class
)})
public
ResultBody
checkDynamic
(
@RequestParam
Integer
dynamicId
,
@RequestParam
Boolean
status
)
{
return
backstageForumService
.
checkDynamic
(
dynamicId
,
status
);
}
}
}
release-service/src/main/java/com/mmc/csf/release/controller/DynamicController.java
浏览文件 @
5c61feda
...
@@ -14,7 +14,6 @@ import io.swagger.annotations.*;
...
@@ -14,7 +14,6 @@ import io.swagger.annotations.*;
/**
/**
* @Author LW
* @Author LW
*
* @date 2023/5/15 10:29 概要:动态信息控制层
* @date 2023/5/15 10:29 概要:动态信息控制层
*/
*/
@Api
(
tags
=
{
"web-小程序-论坛社区-模块"
})
@Api
(
tags
=
{
"web-小程序-论坛社区-模块"
})
...
@@ -22,55 +21,56 @@ import io.swagger.annotations.*;
...
@@ -22,55 +21,56 @@ import io.swagger.annotations.*;
@RequestMapping
(
"/dynamic"
)
@RequestMapping
(
"/dynamic"
)
public
class
DynamicController
extends
BaseController
{
public
class
DynamicController
extends
BaseController
{
@Resource
private
DynamicService
dynamicService
;
@Resource
private
DynamicService
dynamicService
;
@ApiOperation
(
value
=
"动态发布"
)
@ApiOperation
(
value
=
"动态发布"
)
@ApiResponses
({
@ApiResponse
(
code
=
200
,
message
=
"OK"
,
response
=
ResultBody
.
class
)})
@ApiResponses
({
@ApiResponse
(
code
=
200
,
message
=
"OK"
,
response
=
ResultBody
.
class
)})
@PostMapping
(
"/publish"
)
@PostMapping
(
"/publish"
)
public
ResultBody
publishDynamic
(
@RequestBody
DynamicVO
dynamicVO
,
HttpServletRequest
request
)
{
public
ResultBody
publishDynamic
(
@RequestBody
DynamicVO
dynamicVO
,
HttpServletRequest
request
)
{
return
dynamicService
.
insertDynamic
(
return
dynamicService
.
insertDynamic
(
dynamicVO
,
this
.
getUserLoginInfoFromRedis
(
request
).
getUserAccountId
()
);
dynamicVO
,
this
.
getUserLoginInfoFromRedis
(
request
).
getUserAccountId
(),
request
);
}
}
@ApiOperation
(
value
=
"点赞或取消点赞"
)
@ApiOperation
(
value
=
"点赞或取消点赞"
)
@ApiResponses
({
@ApiResponse
(
code
=
200
,
message
=
"OK"
,
response
=
ResultBody
.
class
)})
@ApiResponses
({
@ApiResponse
(
code
=
200
,
message
=
"OK"
,
response
=
ResultBody
.
class
)})
@GetMapping
(
"/likeOrCancel"
)
@GetMapping
(
"/likeOrCancel"
)
public
ResultBody
likeOrCancel
(
public
ResultBody
likeOrCancel
(
HttpServletRequest
request
,
@ApiParam
(
value
=
"动态id"
)
@RequestParam
Integer
dynamicId
)
{
HttpServletRequest
request
,
@ApiParam
(
value
=
"动态id"
)
@RequestParam
Integer
dynamicId
)
{
return
dynamicService
.
likeDynamic
(
return
dynamicService
.
likeDynamic
(
this
.
getUserLoginInfoFromRedis
(
request
).
getUserAccountId
(),
dynamicId
);
this
.
getUserLoginInfoFromRedis
(
request
).
getUserAccountId
(),
dynamicId
);
}
}
@ApiOperation
(
value
=
"评论动态或回复评论"
)
@ApiOperation
(
value
=
"评论动态或回复评论"
)
@ApiResponses
({
@ApiResponse
(
code
=
200
,
message
=
"OK"
,
response
=
ResultBody
.
class
)})
@ApiResponses
({
@ApiResponse
(
code
=
200
,
message
=
"OK"
,
response
=
ResultBody
.
class
)})
@PostMapping
(
"/comment"
)
@PostMapping
(
"/comment"
)
public
ResultBody
commentDynamic
(
@RequestBody
CommentVO
commentVO
,
HttpServletRequest
request
)
{
public
ResultBody
commentDynamic
(
@RequestBody
CommentVO
commentVO
,
HttpServletRequest
request
)
{
return
dynamicService
.
commentDynamic
(
return
dynamicService
.
commentDynamic
(
commentVO
,
this
.
getUserLoginInfoFromRedis
(
request
).
getUserAccountId
()
);
commentVO
,
this
.
getUserLoginInfoFromRedis
(
request
).
getUserAccountId
(),
request
);
}
}
@ApiOperation
(
value
=
"删除评论"
)
@ApiOperation
(
value
=
"删除评论"
)
@ApiResponses
({
@ApiResponse
(
code
=
200
,
message
=
"OK"
,
response
=
ResultBody
.
class
)})
@ApiResponses
({
@ApiResponse
(
code
=
200
,
message
=
"OK"
,
response
=
ResultBody
.
class
)})
@DeleteMapping
(
"/removeComment"
)
@DeleteMapping
(
"/removeComment"
)
public
ResultBody
removeComment
(
@RequestParam
Integer
id
)
{
public
ResultBody
removeComment
(
@RequestParam
Integer
id
)
{
return
dynamicService
.
deleteComment
(
id
);
return
dynamicService
.
deleteComment
(
id
);
}
}
@ApiOperation
(
value
=
"动态详情"
)
@ApiOperation
(
value
=
"动态详情"
)
@ApiResponses
({
@ApiResponse
(
code
=
200
,
message
=
"OK"
,
response
=
DynamicVO
.
class
)})
@ApiResponses
({
@ApiResponse
(
code
=
200
,
message
=
"OK"
,
response
=
DynamicVO
.
class
)})
@GetMapping
(
"/dynamicDetails"
)
@GetMapping
(
"/dynamicDetails"
)
public
ResultBody
dynamicDetails
(
@RequestParam
Integer
dynamicId
,
HttpServletRequest
request
)
{
public
ResultBody
dynamicDetails
(
@RequestParam
Integer
dynamicId
,
HttpServletRequest
request
)
{
return
dynamicService
.
dynamicDetails
(
return
dynamicService
.
dynamicDetails
(
dynamicId
,
this
.
getUserLoginInfoFromRedis
(
request
).
getUserAccountId
(),
request
);
dynamicId
,
this
.
getUserLoginInfoFromRedis
(
request
).
getUserAccountId
(),
request
);
}
}
@ApiOperation
(
value
=
"动态列表"
)
@ApiOperation
(
value
=
"动态列表"
)
@ApiResponses
({
@ApiResponse
(
code
=
200
,
message
=
"OK"
,
response
=
DynamicVO
.
class
)})
@ApiResponses
({
@ApiResponse
(
code
=
200
,
message
=
"OK"
,
response
=
DynamicVO
.
class
)})
@GetMapping
(
"/dynamicList"
)
@GetMapping
(
"/dynamicList"
)
public
ResultBody
dynamicList
(
public
ResultBody
dynamicList
(
@RequestParam
Integer
pageNo
,
@RequestParam
Integer
pageSize
,
HttpServletRequest
request
)
{
@RequestParam
Integer
pageNo
,
@RequestParam
Integer
pageSize
,
HttpServletRequest
request
)
{
return
ResultBody
.
success
(
return
ResultBody
.
success
(
dynamicService
.
dynamicList
(
dynamicService
.
dynamicList
(
pageNo
,
pageSize
,
this
.
getUserLoginInfoFromRedis
(
request
).
getUserAccountId
(),
request
));
pageNo
,
pageSize
,
this
.
getUserLoginInfoFromRedis
(
request
).
getUserAccountId
(),
request
));
}
}
}
}
release-service/src/main/java/com/mmc/csf/release/controller/RequirementsController.java
浏览文件 @
5c61feda
...
@@ -6,12 +6,9 @@ import com.mmc.csf.infomation.vo.RequirementsInfoVO;
...
@@ -6,12 +6,9 @@ import com.mmc.csf.infomation.vo.RequirementsInfoVO;
import
com.mmc.csf.infomation.vo.RequirementsTypeVO
;
import
com.mmc.csf.infomation.vo.RequirementsTypeVO
;
import
com.mmc.csf.release.model.group.Insert
;
import
com.mmc.csf.release.model.group.Insert
;
import
com.mmc.csf.release.model.group.Page
;
import
com.mmc.csf.release.model.group.Page
;
import
com.mmc.csf.release.model.group.
Query
;
import
com.mmc.csf.release.model.group.
Update
;
import
com.mmc.csf.release.service.RequirementsService
;
import
com.mmc.csf.release.service.RequirementsService
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.*
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiResponse
;
import
io.swagger.annotations.ApiResponses
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.validation.annotation.Validated
;
import
org.springframework.validation.annotation.Validated
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.bind.annotation.*
;
...
@@ -25,44 +22,82 @@ import javax.servlet.http.HttpServletRequest;
...
@@ -25,44 +22,82 @@ import javax.servlet.http.HttpServletRequest;
@Api
(
tags
=
{
"需求相关"
})
@Api
(
tags
=
{
"需求相关"
})
@RestController
@RestController
@RequestMapping
(
"/requirements/"
)
@RequestMapping
(
"/requirements/"
)
public
class
RequirementsController
extends
BaseController
{
public
class
RequirementsController
extends
BaseController
{
@Autowired
@Autowired
private
RequirementsService
requirementsService
;
private
RequirementsService
requirementsService
;
@ApiOperation
(
value
=
"需求类型"
)
@ApiOperation
(
value
=
"需求类型"
)
@ApiResponses
({
@ApiResponse
(
code
=
200
,
message
=
"OK"
,
response
=
RequirementsTypeVO
.
class
)
})
@ApiResponses
({
@ApiResponse
(
code
=
200
,
message
=
"OK"
,
response
=
RequirementsTypeVO
.
class
)
})
@GetMapping
(
"listType"
)
@GetMapping
(
"listType"
)
public
ResultBody
listType
(
)
{
public
ResultBody
listType
(
@RequestParam
(
value
=
"1"
,
required
=
false
)
Integer
id
)
{
return
requirementsService
.
listType
();
return
requirementsService
.
listType
(
id
);
}
}
@ApiOperation
(
value
=
"需求发布"
)
@ApiOperation
(
value
=
"
小程序——
需求发布"
)
@ApiResponses
({
@ApiResponse
(
code
=
200
,
message
=
"OK"
,
response
=
ResultBody
.
class
)
})
@ApiResponses
({
@ApiResponse
(
code
=
200
,
message
=
"OK"
,
response
=
ResultBody
.
class
)
})
@PostMapping
(
"publish"
)
@PostMapping
(
"publish"
)
public
ResultBody
publish
(
@
Validated
(
value
=
{
Insert
.
class
})
@RequestBody
RequirementsInfoVO
requirementsInfoVO
,
HttpServletRequest
request
)
{
public
ResultBody
publish
(
@
RequestBody
@Validated
(
value
=
{
Insert
.
class
})
RequirementsInfoVO
requirementsInfoVO
,
HttpServletRequest
request
)
{
requirementsInfoVO
.
setUserAccountId
(
this
.
getUserLoginInfoFromRedis
(
request
).
getUserAccountId
());
requirementsInfoVO
.
setUserAccountId
(
this
.
getUserLoginInfoFromRedis
(
request
).
getUserAccountId
());
return
requirementsService
.
publish
(
requirementsInfoVO
,
request
);
return
requirementsService
.
publish
(
requirementsInfoVO
,
request
);
}
}
@ApiOperation
(
value
=
"小程序-编辑——需求发布"
)
@ApiResponses
({
@ApiResponse
(
code
=
200
,
message
=
"OK"
,
response
=
ResultBody
.
class
)})
@PostMapping
(
"updatePublish"
)
public
ResultBody
updatePublish
(
@RequestBody
@Validated
(
value
=
{
Update
.
class
})
RequirementsInfoVO
requirementsInfoVO
,
HttpServletRequest
request
)
{
requirementsInfoVO
.
setUserAccountId
(
this
.
getUserLoginInfoFromRedis
(
request
).
getUserAccountId
());
return
requirementsService
.
updatePublish
(
requirementsInfoVO
,
request
);
}
@ApiOperation
(
value
=
"小程序-删除——需求发布"
)
@ApiResponses
({
@ApiResponse
(
code
=
200
,
message
=
"OK"
,
response
=
ResultBody
.
class
)})
@GetMapping
(
"deletePublish"
)
public
ResultBody
deletePublish
(
@ApiParam
(
value
=
"需求发布id"
,
required
=
true
)
@RequestParam
Integer
id
,
HttpServletRequest
request
)
{
return
requirementsService
.
deletePublish
(
id
,
this
.
getUserLoginInfoFromRedis
(
request
).
getUserAccountId
());
}
@ApiOperation
(
value
=
"小程序-列表——需求发布"
)
@ApiResponses
({
@ApiResponse
(
code
=
200
,
message
=
"OK"
,
response
=
ResultBody
.
class
)})
@GetMapping
(
"appPublishList"
)
public
ResultBody
<
RequirementsInfoVO
>
appPublishList
()
{
return
requirementsService
.
appPublishList
();
}
@ApiOperation
(
value
=
"小程序-详情——需求发布"
)
@ApiResponses
({
@ApiResponse
(
code
=
200
,
message
=
"OK"
,
response
=
ResultBody
.
class
)})
@GetMapping
(
"detailPublish"
)
public
ResultBody
<
RequirementsInfoVO
>
detailPublish
(
@ApiParam
(
value
=
"需求发布id"
,
required
=
true
)
@RequestParam
Integer
id
,
HttpServletRequest
request
)
{
return
requirementsService
.
detailPublish
(
id
,
request
,
this
.
getUserLoginInfoFromRedis
(
request
).
getUserAccountId
());
}
@ApiOperation
(
value
=
"后台管理-详情——需求发布"
)
@ApiResponses
({
@ApiResponse
(
code
=
200
,
message
=
"OK"
,
response
=
ResultBody
.
class
)})
@GetMapping
(
"backDetailPublish"
)
public
ResultBody
<
RequirementsInfoVO
>
backDetailPublish
(
@ApiParam
(
value
=
"需求发布id"
,
required
=
true
)
@RequestParam
Integer
id
,
HttpServletRequest
request
)
{
return
requirementsService
.
backDetailPublish
(
id
,
request
,
this
.
getUserLoginInfoFromRedis
(
request
).
getUserAccountId
());
}
@ApiOperation
(
value
=
"需求发布列表"
)
@ApiOperation
(
value
=
"需求发布列表"
)
@ApiResponses
({
@ApiResponse
(
code
=
200
,
message
=
"OK"
,
response
=
RequirementsInfoVO
.
class
)
})
@ApiResponses
({
@ApiResponse
(
code
=
200
,
message
=
"OK"
,
response
=
RequirementsInfoVO
.
class
)
})
@PostMapping
(
"listPublishPage"
)
@PostMapping
(
"listPublishPage"
)
public
ResultBody
listPublishPage
(
@Validated
(
value
=
{
Page
.
class
})
@RequestBody
IndustryCaseQO
industryCaseQO
,
HttpServletRequest
request
){
public
ResultBody
listPublishPage
(
@Validated
(
value
=
{
Page
.
class
})
@RequestBody
IndustryCaseQO
industryCaseQO
,
HttpServletRequest
request
)
{
return
requirementsService
.
listPublishPage
(
industryCaseQO
,
request
);
return
requirementsService
.
listPublishPage
(
industryCaseQO
,
request
);
}
}
@ApiOperation
(
value
=
"需求已解决"
)
@ApiOperation
(
value
=
"需求已解决"
)
@ApiResponses
({
@ApiResponse
(
code
=
200
,
message
=
"OK"
,
response
=
ResultBody
.
class
)
})
@ApiResponses
({
@ApiResponse
(
code
=
200
,
message
=
"OK"
,
response
=
ResultBody
.
class
)
})
@GetMapping
(
"solveRequire"
)
@GetMapping
(
"solveRequire"
)
public
ResultBody
solveRequire
(
@RequestParam
Integer
requirementsInfoId
,
HttpServletRequest
request
){
public
ResultBody
solveRequire
(
@RequestParam
Integer
requirementsInfoId
,
HttpServletRequest
request
)
{
return
requirementsService
.
solveRequire
(
requirementsInfoId
,
this
.
getUserLoginInfoFromRedis
(
request
).
getUserAccountId
());
return
requirementsService
.
solveRequire
(
requirementsInfoId
,
this
.
getUserLoginInfoFromRedis
(
request
).
getUserAccountId
());
}
}
@ApiOperation
(
value
=
"删除需求"
)
@ApiOperation
(
value
=
"删除需求"
)
@ApiResponses
({
@ApiResponse
(
code
=
200
,
message
=
"OK"
,
response
=
ResultBody
.
class
)
})
@ApiResponses
({
@ApiResponse
(
code
=
200
,
message
=
"OK"
,
response
=
ResultBody
.
class
)
})
@GetMapping
(
"deleteRequire"
)
@GetMapping
(
"deleteRequire"
)
public
ResultBody
deleteRequire
(
@RequestParam
Integer
requirementsInfoId
,
HttpServletRequest
request
){
public
ResultBody
deleteRequire
(
@RequestParam
Integer
requirementsInfoId
,
HttpServletRequest
request
)
{
return
requirementsService
.
deleteRequire
(
requirementsInfoId
,
this
.
getUserLoginInfoFromRedis
(
request
).
getUserAccountId
());
return
requirementsService
.
deleteRequire
(
requirementsInfoId
,
this
.
getUserLoginInfoFromRedis
(
request
).
getUserAccountId
());
}
}
...
...
release-service/src/main/java/com/mmc/csf/release/controller/licence/LicenceBackgroundController.java
0 → 100644
浏览文件 @
5c61feda
package
com
.
mmc
.
csf
.
release
.
controller
.
licence
;
import
com.mmc.csf.common.util.web.ResultBody
;
import
com.mmc.csf.licence.dto.LicenseOrganizationsDTO
;
import
com.mmc.csf.licence.qo.LicenseOrganizationsQO
;
import
com.mmc.csf.licence.vo.LicenseOrganizationsVO
;
import
com.mmc.csf.release.controller.BaseController
;
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.service.licence.LicenceBackgroundService
;
import
io.swagger.annotations.*
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.validation.annotation.Validated
;
import
org.springframework.web.bind.annotation.*
;
import
javax.servlet.http.HttpServletRequest
;
/**
* @Author small
* @Date 2023/7/13 16:00
* @Version 1.0
*/
@Api
(
tags
=
{
"执照——后台管理"
})
@RestController
@RequestMapping
(
"/licence/background"
)
public
class
LicenceBackgroundController
extends
BaseController
{
@Autowired
private
LicenceBackgroundService
licenceBackgroundService
;
@ApiOperation
(
value
=
"机构-上传"
)
@ApiResponses
({
@ApiResponse
(
code
=
200
,
message
=
"OK"
,
response
=
ResultBody
.
class
)})
@PostMapping
(
"/insertOrg"
)
public
ResultBody
insertOrganizations
(
HttpServletRequest
request
,
@RequestBody
@Validated
(
value
=
{
Create
.
class
})
LicenseOrganizationsVO
organizations
)
{
return
licenceBackgroundService
.
insertOrganizations
(
organizations
,
this
.
getUserLoginInfoFromRedis
(
request
));
}
@ApiOperation
(
value
=
"机构-修改"
)
@ApiResponses
({
@ApiResponse
(
code
=
200
,
message
=
"OK"
,
response
=
ResultBody
.
class
)})
@PostMapping
(
"/updateOrg"
)
public
ResultBody
updateOrganizations
(
HttpServletRequest
request
,
@RequestBody
@Validated
(
value
=
{
Update
.
class
})
LicenseOrganizationsVO
organizations
)
{
return
licenceBackgroundService
.
updateOrganizations
(
organizations
,
this
.
getUserLoginInfoFromRedis
(
request
));
}
@ApiOperation
(
value
=
"机构-删除"
)
@ApiResponses
({
@ApiResponse
(
code
=
200
,
message
=
"OK"
,
response
=
ResultBody
.
class
)})
@GetMapping
(
"/removeOrg"
)
public
ResultBody
removeOrganizations
(
@ApiParam
(
value
=
"机构id"
,
required
=
true
)
@RequestParam
Integer
id
)
{
return
licenceBackgroundService
.
removeOrganizations
(
id
);
}
@ApiOperation
(
value
=
"机构列表-分页"
)
@ApiResponses
({
@ApiResponse
(
code
=
200
,
message
=
"OK"
,
response
=
LicenseOrganizationsDTO
.
class
)})
@PostMapping
(
"/listOrgPage"
)
public
ResultBody
<
LicenseOrganizationsDTO
>
listOrgPage
(
HttpServletRequest
request
,
@Validated
(
value
=
{
Page
.
class
})
@ApiParam
(
value
=
"角色查询QO"
,
required
=
true
)
@RequestBody
LicenseOrganizationsQO
organizationsQO
)
{
return
ResultBody
.
success
(
licenceBackgroundService
.
listOrgPage
(
organizationsQO
,
this
.
getUserLoginInfoFromRedis
(
request
)));
}
@ApiOperation
(
value
=
"app机构列表-分页"
)
@ApiResponses
({
@ApiResponse
(
code
=
200
,
message
=
"OK"
,
response
=
LicenseOrganizationsDTO
.
class
)})
@PostMapping
(
"/appListOrgPage"
)
public
ResultBody
<
LicenseOrganizationsDTO
>
appListOrgPage
(
HttpServletRequest
request
,
@Validated
(
value
=
{
Page
.
class
})
@ApiParam
(
value
=
"角色查询QO"
,
required
=
true
)
@RequestBody
LicenseOrganizationsQO
organizationsQO
)
{
return
ResultBody
.
success
(
licenceBackgroundService
.
listOrgPage
(
organizationsQO
,
this
.
getUserLoginInfoFromRedis
(
request
)));
}
@ApiOperation
(
value
=
"web机构列表-分页"
)
@ApiResponses
({
@ApiResponse
(
code
=
200
,
message
=
"OK"
,
response
=
LicenseOrganizationsDTO
.
class
)})
@PostMapping
(
"/webListOrgPage"
)
public
ResultBody
<
LicenseOrganizationsDTO
>
webListOrgPage
(
HttpServletRequest
request
,
@Validated
(
value
=
{
Page
.
class
})
@ApiParam
(
value
=
"角色查询QO"
,
required
=
true
)
@RequestBody
LicenseOrganizationsQO
organizationsQO
)
{
return
ResultBody
.
success
(
licenceBackgroundService
.
listOrgPage
(
organizationsQO
,
this
.
getUserLoginInfoFromRedis
(
request
)));
}
}
release-service/src/main/java/com/mmc/csf/release/controller/licence/LicenceCommonController.java
0 → 100644
浏览文件 @
5c61feda
package
com
.
mmc
.
csf
.
release
.
controller
.
licence
;
import
com.mmc.csf.common.util.web.ResultBody
;
import
com.mmc.csf.licence.dto.LicenceGradeDTO
;
import
com.mmc.csf.licence.dto.LicenceModelsDTO
;
import
com.mmc.csf.licence.dto.LicenceScaleDTO
;
import
com.mmc.csf.licence.dto.LicenceTypeDTO
;
import
com.mmc.csf.release.service.licence.LicenceCommonService
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiResponse
;
import
io.swagger.annotations.ApiResponses
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
/**
* @Author small
* @Date 2023/7/13 14:32
* @Version 1.0
*/
@Api
(
tags
=
{
"执照——公共下拉列表"
})
@RestController
@RequestMapping
(
"/licence/pullDown"
)
public
class
LicenceCommonController
{
@Autowired
private
LicenceCommonService
licenceCommonService
;
@ApiOperation
(
value
=
"公共——执照等级"
)
@ApiResponses
({
@ApiResponse
(
code
=
200
,
message
=
"OK"
,
response
=
LicenceGradeDTO
.
class
)})
@GetMapping
(
"/licenceGradeList"
)
public
ResultBody
<
LicenceGradeDTO
>
licenceGradeList
()
{
return
licenceCommonService
.
licenceGradeList
();
}
@ApiOperation
(
value
=
"公共——执照机型"
)
@ApiResponses
({
@ApiResponse
(
code
=
200
,
message
=
"OK"
,
response
=
LicenceModelsDTO
.
class
)})
@GetMapping
(
"/licenceModelsList"
)
public
ResultBody
<
LicenceModelsDTO
>
licenceModelsList
()
{
return
licenceCommonService
.
licenceModelsList
();
}
@ApiOperation
(
value
=
"公共——执照类型"
)
@ApiResponses
({
@ApiResponse
(
code
=
200
,
message
=
"OK"
,
response
=
LicenceModelsDTO
.
class
)})
@GetMapping
(
"/licenceTypeList"
)
public
ResultBody
<
LicenceTypeDTO
>
licenceTypeList
()
{
return
licenceCommonService
.
licenceTypeList
();
}
@ApiOperation
(
value
=
"不是公共——新增执照机构规模id"
)
@ApiResponses
({
@ApiResponse
(
code
=
200
,
message
=
"OK"
,
response
=
LicenceScaleDTO
.
class
)})
@GetMapping
(
"/licenceScaleList"
)
public
ResultBody
<
LicenceScaleDTO
>
licenceScaleList
()
{
return
licenceCommonService
.
licenceScaleList
();
}
}
release-service/src/main/java/com/mmc/csf/release/dao/DynamicDAO.java
浏览文件 @
5c61feda
...
@@ -11,136 +11,140 @@ import com.mmc.csf.release.entity.forum.ForumVideoDO;
...
@@ -11,136 +11,140 @@ import com.mmc.csf.release.entity.forum.ForumVideoDO;
/**
/**
* @Author LW
* @Author LW
*
* @date 2023/5/15 10:29 概要:动态信息数据访问层
* @date 2023/5/15 10:29 概要:动态信息数据访问层
*/
*/
@Mapper
@Mapper
public
interface
DynamicDAO
{
public
interface
DynamicDAO
{
/**
/**
* 插入动态
* 插入动态
*
*
* @param forumDynamicDO 论坛动态信息
* @param forumDynamicDO 论坛动态信息
* @return {@link ForumDynamicDO}
* @return {@link ForumDynamicDO}
*/
*/
void
insertDynamic
(
ForumDynamicDO
forumDynamicDO
);
void
insertDynamic
(
ForumDynamicDO
forumDynamicDO
);
/**
/**
* 插入图片
* 插入图片
*
*
* @param dynamicId 动态id
* @param dynamicId 动态id
* @param url url
* @param url url
*/
*/
void
insertPicture
(
@Param
(
"dynamicId"
)
Integer
dynamicId
,
@Param
(
"url"
)
String
url
);
void
insertPicture
(
@Param
(
"dynamicId"
)
Integer
dynamicId
,
@Param
(
"url"
)
String
url
);
/**
/**
* 插入视频
* 插入视频
*
*
* @param dynamicId 动态id
* @param dynamicId 动态id
* @param videoUrl 视频网址
* @param videoUrl 视频网址
*/
*/
void
insertVideo
(
@Param
(
"dynamicId"
)
Integer
dynamicId
,
@Param
(
"videoUrl"
)
String
videoUrl
);
void
insertVideo
(
@Param
(
"dynamicId"
)
Integer
dynamicId
,
@Param
(
"videoUrl"
)
String
videoUrl
);
/**
/**
* 更新动态点赞数量
* 更新动态点赞数量
*
*
* @param dynamicId 动态id
* @param dynamicId 动态id
* @param version version
* @param version version
*/
*/
void
updateDynamicLikeCount
(
void
updateDynamicLikeCount
(
@Param
(
"dynamicId"
)
Integer
dynamicId
,
@Param
(
"version"
)
Integer
version
);
@Param
(
"dynamicId"
)
Integer
dynamicId
,
@Param
(
"version"
)
Integer
version
);
/**
/**
* 得到动态信息
* 得到动态信息
*
*
* @param dynamicId 动态id
* @param dynamicId 动态id
* @return {@link ForumDynamicDO}
* @return {@link ForumDynamicDO}
*/
*/
ForumDynamicDO
getDynamicInfo
(
Integer
dynamicId
);
ForumDynamicDO
getDynamicInfo
(
Integer
dynamicId
);
/**
/**
* 动态点赞数减
* 动态点赞数减
*
*
* @param dynamicId 动态id
* @param dynamicId 动态id
* @param version version
* @param version version
*/
*/
void
updateSubDynamicLikeCount
(
Integer
dynamicId
,
Integer
version
);
void
updateSubDynamicLikeCount
(
Integer
dynamicId
,
Integer
version
);
/**
/**
* 更新动态评论数
* 更新动态评论数
*
*
* @param dynamicId 动态id
* @param dynamicId 动态id
* @param version version
* @param version version
*/
*/
void
updateDynamicCommentCount
(
Integer
dynamicId
,
Integer
version
);
void
updateDynamicCommentCount
(
Integer
dynamicId
,
Integer
version
);
/**
/**
* 动态列表计数
* 动态列表计数
*
*
* @return int
* @return int
*/
*/
int
countDynamicList
();
int
countDynamicList
();
/**
/**
* 动态列表
* 动态列表
*
*
* @param itemIndex 项指数
* @param itemIndex 项指数
* @param pageSize 页面大小
* @param pageSize 页面大小
* @return {@link List}<{@link ForumDynamicDO}>
* @return {@link List}<{@link ForumDynamicDO}>
*/
*/
List
<
ForumDynamicDO
>
dynamicList
(
int
itemIndex
,
Integer
pageSize
);
List
<
ForumDynamicDO
>
dynamicList
(
int
itemIndex
,
Integer
pageSize
);
/**
/**
* 列表动态图片
* 列表动态图片
*
*
* @param ids id
* @param ids id
* @return {@link List}<{@link ForumResourceDO}>
* @return {@link List}<{@link ForumResourceDO}>
*/
*/
List
<
ForumResourceDO
>
listDynamicPicture
(
List
<
Integer
>
ids
);
List
<
ForumResourceDO
>
listDynamicPicture
(
List
<
Integer
>
ids
);
/**
/**
* 动态视频列表
* 动态视频列表
*
*
* @param ids id
* @param ids id
* @return {@link List}<{@link ForumVideoDO}>
* @return {@link List}<{@link ForumVideoDO}>
*/
*/
List
<
ForumVideoDO
>
listDynamicVideo
(
List
<
Integer
>
ids
);
List
<
ForumVideoDO
>
listDynamicVideo
(
List
<
Integer
>
ids
);
/**
/**
* 动态图片
* 动态图片
*
*
* @param dynamicId 动态id
* @param dynamicId 动态id
* @return {@link List}<{@link ForumResourceDO}>
* @return {@link List}<{@link ForumResourceDO}>
*/
*/
List
<
ForumResourceDO
>
dynamicPicture
(
Integer
dynamicId
);
List
<
ForumResourceDO
>
dynamicPicture
(
Integer
dynamicId
);
/**
/**
* 动态视频
* 动态视频
*
*
* @param dynamicId 动态id
* @param dynamicId 动态id
* @return {@link ForumVideoDO}
* @return {@link ForumVideoDO}
*/
*/
ForumVideoDO
dynamicVideo
(
Integer
dynamicId
);
ForumVideoDO
dynamicVideo
(
Integer
dynamicId
);
void
insertResource
(
void
insertResource
(
@Param
(
"dynamicId"
)
Integer
dynamicId
,
@Param
(
"type"
)
int
type
,
@Param
(
"url"
)
String
url
);
@Param
(
"dynamicId"
)
Integer
dynamicId
,
@Param
(
"type"
)
int
type
,
@Param
(
"url"
)
String
url
);
List
<
ForumResourceDO
>
listDynamicResources
(
Integer
dynamicId
);
List
<
ForumResourceDO
>
listDynamicResources
(
Integer
dynamicId
);
List
<
ForumDynamicDO
>
getDynamicComment
(
String
dynamicId
);
List
<
ForumDynamicDO
>
getDynamicComment
(
String
dynamicId
);
void
deleteDynamic
(
Integer
dynamicId
);
void
deleteDynamic
(
Integer
dynamicId
);
void
hiddenDynamic
(
Integer
dynamicId
);
void
hiddenDynamic
(
Integer
dynamicId
);
List
<
ForumDynamicDO
>
listDynamicByUserId
(
Integer
id
);
List
<
ForumDynamicDO
>
listDynamicByUserId
(
Integer
id
);
void
batchDeleteDynamic
(
List
<
Integer
>
dynamicIds
);
void
batchDeleteDynamic
(
List
<
Integer
>
dynamicIds
);
/**
/**
* 查询动态详情
* 查询动态详情
* @param dynamicId
*
* @return
* @param dynamicId
*/
* @return
ForumDynamicDO
getDynamicInfoById
(
Integer
dynamicId
);
*/
ForumDynamicDO
getDynamicInfoById
(
Integer
dynamicId
);
List
<
ForumDynamicDO
>
firstTwoItemsComment
(
List
<
Integer
>
ids
);
void
updateCheckDynamic
(
Integer
dynamicId
,
Integer
status
);
}
}
release-service/src/main/java/com/mmc/csf/release/dao/RequirementsDao.java
浏览文件 @
5c61feda
...
@@ -15,30 +15,35 @@ import java.util.List;
...
@@ -15,30 +15,35 @@ import java.util.List;
public
interface
RequirementsDao
{
public
interface
RequirementsDao
{
/**
/**
* 需求类型列表
* 需求类型列表
*
* @return
* @return
*/
*/
List
<
RequirementsTypeDO
>
listType
();
List
<
RequirementsTypeDO
>
listType
();
/**
/**
* 添加需求
* 添加需求
*
* @param requirementsInfoDO
* @param requirementsInfoDO
*/
*/
void
addRequirementsInfo
(
RequirementsInfoDO
requirementsInfoDO
);
void
addRequirementsInfo
(
RequirementsInfoDO
requirementsInfoDO
);
/**
/**
* 获取需求
* 获取需求
*
* @param requirementsInfoId
* @param requirementsInfoId
*/
*/
RequirementsInfoDO
getRequirementsInfoById
(
Integer
requirementsInfoId
);
RequirementsInfoDO
getRequirementsInfoById
(
Integer
requirementsInfoId
);
/**
/**
* 解决需求
* 解决需求
*
* @param requirementsInfoId
* @param requirementsInfoId
*/
*/
void
solveRequire
(
Integer
requirementsInfoId
);
void
solveRequire
(
Integer
requirementsInfoId
);
/**
/**
* 需求发布的数量
* 需求发布的数量
*
* @param industryCaseQO
* @param industryCaseQO
* @return
* @return
*/
*/
...
@@ -46,6 +51,7 @@ public interface RequirementsDao {
...
@@ -46,6 +51,7 @@ public interface RequirementsDao {
/**
/**
* 需求发布列表
* 需求发布列表
*
* @param industryCaseQO
* @param industryCaseQO
* @return
* @return
*/
*/
...
@@ -53,7 +59,22 @@ public interface RequirementsDao {
...
@@ -53,7 +59,22 @@ public interface RequirementsDao {
/**
/**
* 删除需求
* 删除需求
*
* @param requirementsInfoId
* @param requirementsInfoId
*/
*/
void
removeRequire
(
Integer
requirementsInfoId
);
void
removeRequire
(
Integer
requirementsInfoId
);
List
<
RequirementsTypeDO
>
listTypeReq
(
Integer
id
);
Integer
findPublish
(
RequirementsInfoDO
requirementsInfoDO
);
void
updatePublish
(
RequirementsInfoDO
requirementsInfoDO
);
Integer
findPublishCount
(
Integer
id
,
Integer
userAccountId
);
void
requirementsDao
(
Integer
id
);
List
<
RequirementsInfoDO
>
appPublishList
();
RequirementsInfoDO
detailPublish
(
Integer
id
);
}
}
release-service/src/main/java/com/mmc/csf/release/dao/licence/LicenceBackgroundDao.java
0 → 100644
浏览文件 @
5c61feda
package
com
.
mmc
.
csf
.
release
.
dao
.
licence
;
import
com.mmc.csf.licence.qo.LicenseOrganizationsQO
;
import
com.mmc.csf.release.entity.licence.LicenseOrganizationsDO
;
import
com.mmc.csf.release.entity.licence.LicenseProgramsDO
;
import
com.mmc.csf.release.entity.licence.LicenseTrainingProgramsDO
;
import
org.apache.ibatis.annotations.Mapper
;
import
java.util.List
;
/**
* @Author small
* @Date 2023/7/13 16:02
* @Version 1.0
*/
@Mapper
public
interface
LicenceBackgroundDao
{
int
countOrg
(
String
name
);
void
insertOrganizations
(
LicenseOrganizationsDO
organizationsDO
);
int
countId
(
LicenseOrganizationsDO
organizationsDO
);
void
removeOrgAndTraining
(
Integer
id
);
void
updateOrganizations
(
LicenseOrganizationsDO
organizationsDO
);
void
insertProject
(
LicenseTrainingProgramsDO
programsDO
);
void
updateProject
(
LicenseTrainingProgramsDO
programsDO
);
void
removeProject
(
Integer
id
);
int
countListOrgPage
(
LicenseOrganizationsQO
organizationsQO
);
List
<
LicenseOrganizationsDO
>
listOrgPage
(
LicenseOrganizationsQO
organizationsQO
);
List
<
LicenseProgramsDO
>
trainingProgram
(
LicenseOrganizationsQO
organizationsQO
);
int
removeOrg
(
Integer
id
);
List
<
String
>
getOrgName
(
List
<
Integer
>
orgCode
);
}
release-service/src/main/java/com/mmc/csf/release/dao/licence/LicenceCommonDao.java
0 → 100644
浏览文件 @
5c61feda
package
com
.
mmc
.
csf
.
release
.
dao
.
licence
;
import
com.mmc.csf.release.entity.licence.LicenceGradeDO
;
import
com.mmc.csf.release.entity.licence.LicenceModelsDO
;
import
com.mmc.csf.release.entity.licence.LicenceScaleDO
;
import
com.mmc.csf.release.entity.licence.LicenceTypeDO
;
import
org.apache.ibatis.annotations.Mapper
;
import
java.util.List
;
/**
* @Author small
* @Date 2023/7/13 14:35
* @Version 1.0
*/
@Mapper
public
interface
LicenceCommonDao
{
List
<
LicenceGradeDO
>
licenceGradeList
();
List
<
LicenceModelsDO
>
licenceModelsList
();
List
<
LicenceTypeDO
>
licenceTypeList
();
List
<
LicenceScaleDO
>
licenceScaleList
();
}
release-service/src/main/java/com/mmc/csf/release/entity/forum/ForumDynamicDO.java
浏览文件 @
5c61feda
...
@@ -23,59 +23,81 @@ import lombok.experimental.Accessors;
...
@@ -23,59 +23,81 @@ import lombok.experimental.Accessors;
@NoArgsConstructor
@NoArgsConstructor
@Accessors
(
chain
=
true
)
@Accessors
(
chain
=
true
)
public
class
ForumDynamicDO
extends
BaseDO
implements
Serializable
{
public
class
ForumDynamicDO
extends
BaseDO
implements
Serializable
{
private
static
final
long
serialVersionUID
=
570379773690905364L
;
private
static
final
long
serialVersionUID
=
570379773690905364L
;
/** 版本字段 */
/**
private
Integer
version
;
* 版本字段
/** 发布用户ID */
*/
private
Integer
userAccountId
;
private
Integer
version
;
/** 动态描述 */
/**
private
String
description
;
* 发布用户ID
/** 发布动态具体位置 */
*/
private
String
location
;
private
Integer
userAccountId
;
/** 发布动态纬度 */
/**
private
BigDecimal
lat
;
* 动态描述
/** 发布动态经度 */
*/
private
BigDecimal
lon
;
private
String
description
;
/** 点赞数 */
/**
private
Integer
likesCount
;
* 发布动态具体位置
/** 评论数 */
*/
private
Integer
commentsCount
;
private
String
location
;
/** 记录父节点id */
/**
private
String
rootPath
;
* 发布动态纬度
*/
private
BigDecimal
lat
;
/**
* 发布动态经度
*/
private
BigDecimal
lon
;
/**
* 点赞数
*/
private
Integer
likesCount
;
/**
* 评论数
*/
private
Integer
commentsCount
;
/**
* 记录父节点id
*/
private
String
rootPath
;
public
ForumDynamicDO
(
DynamicVO
dynamicVO
)
{
private
Integer
checkStatus
;
this
.
description
=
dynamicVO
.
getDescription
();
this
.
location
=
dynamicVO
.
getLocation
();
this
.
lat
=
dynamicVO
.
getLat
();
this
.
lon
=
dynamicVO
.
getLon
();
}
public
DynamicVO
buildDynamicVO
()
{
public
ForumDynamicDO
(
DynamicVO
dynamicVO
)
{
return
DynamicVO
.
builder
()
this
.
description
=
dynamicVO
.
getDescription
();
.
id
(
this
.
getId
())
this
.
location
=
dynamicVO
.
getLocation
();
.
userAccountId
(
userAccountId
)
this
.
lat
=
dynamicVO
.
getLat
();
.
description
(
description
)
this
.
lon
=
dynamicVO
.
getLon
();
.
commentCount
(
commentsCount
)
}
.
likesCount
(
likesCount
)
.
lat
(
lat
)
.
lon
(
lon
)
.
location
(
location
)
.
dynamicPublishTime
(
this
.
getCreateTime
())
.
build
();
}
public
DynamicInfoDTO
buildDynamicInfoDTO
()
{
public
DynamicVO
buildDynamicVO
()
{
return
DynamicInfoDTO
.
builder
()
return
DynamicVO
.
builder
()
.
id
(
this
.
getId
())
.
id
(
this
.
getId
())
.
userAccountId
(
userAccountId
)
.
userAccountId
(
userAccountId
)
.
description
(
description
)
.
description
(
description
)
.
show
(
this
.
getDeleted
())
.
commentCount
(
commentsCount
)
.
build
();
.
likesCount
(
likesCount
)
}
.
lat
(
lat
)
.
lon
(
lon
)
.
location
(
location
)
.
dynamicPublishTime
(
this
.
getCreateTime
())
.
build
();
}
public
void
defaultInfo
()
{
public
DynamicInfoDTO
buildDynamicInfoDTO
()
{
this
.
lon
=
null
;
return
DynamicInfoDTO
.
builder
()
this
.
lat
=
null
;
.
id
(
this
.
getId
())
this
.
location
=
null
;
.
userAccountId
(
userAccountId
)
}
.
description
(
description
)
.
dynamicPublishTime
(
this
.
getCreateTime
())
.
show
(
this
.
getDeleted
())
.
checkStatus
(
checkStatus
)
.
build
();
}
public
void
defaultInfo
()
{
this
.
lon
=
null
;
this
.
lat
=
null
;
this
.
location
=
null
;
}
}
}
release-service/src/main/java/com/mmc/csf/release/entity/licence/LicenceGradeDO.java
0 → 100644
浏览文件 @
5c61feda
package
com
.
mmc
.
csf
.
release
.
entity
.
licence
;
import
com.mmc.csf.licence.dto.LicenceGradeDTO
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.AllArgsConstructor
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
/**
* @Author small
* @Date 2023/7/13 14:48
* @Version 1.0
*/
@Data
@AllArgsConstructor
@NoArgsConstructor
public
class
LicenceGradeDO
{
private
static
final
long
serialVersionUID
=
-
4791023169682602298L
;
@ApiModelProperty
(
value
=
"执照等级id"
)
private
Integer
id
;
@ApiModelProperty
(
value
=
"执照等级名称"
)
private
String
name
;
public
LicenceGradeDTO
licenceGradeDTO
()
{
return
LicenceGradeDTO
.
builder
().
id
(
this
.
id
)
.
name
(
this
.
name
).
build
();
}
}
release-service/src/main/java/com/mmc/csf/release/entity/licence/LicenceModelsDO.java
0 → 100644
浏览文件 @
5c61feda
package
com
.
mmc
.
csf
.
release
.
entity
.
licence
;
import
com.mmc.csf.licence.dto.LicenceModelsDTO
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.AllArgsConstructor
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
/**
* @Author small
* @Date 2023/7/13 14:48
* @Version 1.0
*/
@Data
@AllArgsConstructor
@NoArgsConstructor
public
class
LicenceModelsDO
{
private
static
final
long
serialVersionUID
=
-
4791023169682602298L
;
@ApiModelProperty
(
value
=
"执照机型id"
)
private
Integer
id
;
@ApiModelProperty
(
value
=
"执照机型名称"
)
private
String
name
;
public
LicenceModelsDTO
licenceModelsDTO
()
{
return
LicenceModelsDTO
.
builder
().
id
(
this
.
id
)
.
name
(
this
.
name
).
build
();
}
}
release-service/src/main/java/com/mmc/csf/release/entity/licence/LicenceScaleDO.java
0 → 100644
浏览文件 @
5c61feda
package
com
.
mmc
.
csf
.
release
.
entity
.
licence
;
import
com.mmc.csf.licence.dto.LicenceScaleDTO
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.AllArgsConstructor
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
/**
* @Author small
* @Date 2023/7/13 14:49
* @Version 1.0
*/
@Data
@AllArgsConstructor
@NoArgsConstructor
public
class
LicenceScaleDO
{
private
static
final
long
serialVersionUID
=
-
4791023169682602298L
;
@ApiModelProperty
(
value
=
"执照机构规模id"
)
private
Integer
id
;
@ApiModelProperty
(
value
=
"执照机构规模名称"
)
private
String
name
;
public
LicenceScaleDTO
licenceScaleDTO
()
{
return
LicenceScaleDTO
.
builder
().
id
(
this
.
id
)
.
name
(
this
.
name
).
build
();
}
}
release-service/src/main/java/com/mmc/csf/release/entity/licence/LicenceTypeDO.java
0 → 100644
浏览文件 @
5c61feda
package
com
.
mmc
.
csf
.
release
.
entity
.
licence
;
import
com.mmc.csf.licence.dto.LicenceTypeDTO
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.AllArgsConstructor
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
/**
* @Author small
* @Date 2023/7/13 14:49
* @Version 1.0
*/
@Data
@AllArgsConstructor
@NoArgsConstructor
public
class
LicenceTypeDO
{
private
static
final
long
serialVersionUID
=
-
4791023169682602298L
;
@ApiModelProperty
(
value
=
"执照类型id"
)
private
Integer
id
;
@ApiModelProperty
(
value
=
"执照类型名称"
)
private
String
name
;
public
LicenceTypeDTO
licenceTypeDTO
()
{
return
LicenceTypeDTO
.
builder
().
id
(
this
.
id
)
.
name
(
this
.
name
).
build
();
}
}
release-service/src/main/java/com/mmc/csf/release/entity/licence/LicenseOrganizationsDO.java
0 → 100644
浏览文件 @
5c61feda
package
com
.
mmc
.
csf
.
release
.
entity
.
licence
;
import
com.mmc.csf.licence.dto.LicenseOrganizationsDTO
;
import
com.mmc.csf.licence.dto.LicenseTrainingProgramsDTO
;
import
com.mmc.csf.licence.vo.LicenseOrganizationsVO
;
import
com.mmc.csf.release.model.group.Create
;
import
com.mmc.csf.release.model.group.Update
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.AllArgsConstructor
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
import
org.springframework.format.annotation.DateTimeFormat
;
import
javax.validation.constraints.NotBlank
;
import
javax.validation.constraints.NotNull
;
import
java.util.Date
;
import
java.util.List
;
/**
* @Author small
* @Date 2023/7/13 16:42
* @Version 1.0
*/
@Data
@AllArgsConstructor
@NoArgsConstructor
public
class
LicenseOrganizationsDO
{
@ApiModelProperty
(
value
=
"机构id"
,
example
=
"1"
)
@NotNull
(
message
=
"机构id"
,
groups
=
Update
.
class
)
private
Integer
id
;
@ApiModelProperty
(
value
=
"机构主图不能为空"
,
example
=
"http://"
,
required
=
true
)
//@Size(max = 10, message = "机构主图")
@NotBlank
(
message
=
"机构主图不能为空"
,
groups
=
{
Create
.
class
,
Update
.
class
})
private
String
mainImage
;
@ApiModelProperty
(
value
=
"机构副图不能为空"
,
example
=
"http://"
,
required
=
true
)
@NotBlank
(
message
=
"机构副图不能为空"
,
groups
=
{
Create
.
class
,
Update
.
class
})
private
String
auxiliaryPicture
;
@ApiModelProperty
(
value
=
"机构视频"
,
example
=
"http://"
)
private
String
video
;
@ApiModelProperty
(
value
=
"机构名称不能为空"
,
example
=
"科比特智能教育"
,
required
=
true
)
@NotBlank
(
message
=
"机构名称不能为空"
,
groups
=
{
Create
.
class
,
Update
.
class
})
private
String
name
;
@ApiModelProperty
(
name
=
"机构地区"
,
example
=
"110000,110100"
)
@NotBlank
(
message
=
"机构地区不能为空"
,
groups
=
{
Create
.
class
,
Update
.
class
})
private
String
region
;
@ApiModelProperty
(
name
=
"机构地区名称"
,
example
=
"河北省,石家庄市"
,
required
=
true
)
@NotBlank
(
message
=
"机构地区名称"
,
groups
=
{
Create
.
class
,
Update
.
class
})
private
String
regionName
;
@ApiModelProperty
(
name
=
"机构详细地址"
,
example
=
"南山区"
)
@NotBlank
(
message
=
"机构详细地址不能为空"
,
groups
=
{
Create
.
class
,
Update
.
class
})
private
String
detailedAddress
;
@ApiModelProperty
(
name
=
"是否是考点机构"
,
example
=
"0"
,
required
=
true
)
@NotNull
(
message
=
"考点机构不能为空"
,
groups
=
{
Create
.
class
,
Update
.
class
})
private
Integer
testCenter
;
@ApiModelProperty
(
name
=
"机构规模id不能为空"
,
example
=
"1"
)
private
Integer
scaleId
;
@ApiModelProperty
(
name
=
"机构规模名称"
,
example
=
"1"
)
private
String
scaleName
;
@ApiModelProperty
(
name
=
"机构描述"
,
example
=
"机构描述0001"
)
private
String
description
;
@ApiModelProperty
(
name
=
"机构详情"
,
example
=
"机构详情0001"
)
private
String
detail
;
@ApiModelProperty
(
name
=
"机构培训项目id"
,
example
=
"1,2"
)
private
List
<
Integer
>
orgTrainingIds
;
@ApiModelProperty
(
name
=
"培训项目"
,
required
=
false
)
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类转换
*/
public
LicenseOrganizationsDO
(
LicenseOrganizationsVO
organizationsVO
)
{
this
.
id
=
organizationsVO
.
getId
();
this
.
mainImage
=
organizationsVO
.
getMainImage
();
this
.
auxiliaryPicture
=
organizationsVO
.
getAuxiliaryPicture
();
this
.
video
=
organizationsVO
.
getVideo
();
this
.
name
=
organizationsVO
.
getName
();
this
.
region
=
organizationsVO
.
getRegion
();
this
.
testCenter
=
organizationsVO
.
getTestCenter
();
this
.
scaleId
=
organizationsVO
.
getScaleId
();
this
.
description
=
organizationsVO
.
getDescription
();
this
.
detail
=
organizationsVO
.
getDetail
();
this
.
detailedAddress
=
organizationsVO
.
getDetailedAddress
();
this
.
regionName
=
organizationsVO
.
getRegionName
();
this
.
longitude
=
organizationsVO
.
getLongitude
();
this
.
latitude
=
organizationsVO
.
getLatitude
();
}
/**
* DTO转换
*
* @return
*/
public
LicenseOrganizationsDTO
organizationsDTO
()
{
return
LicenseOrganizationsDTO
.
builder
()
.
id
(
this
.
id
)
.
mainImage
(
this
.
mainImage
)
.
auxiliaryPicture
(
this
.
auxiliaryPicture
)
.
video
(
this
.
video
)
.
name
(
this
.
name
)
.
region
(
this
.
region
)
.
detailedAddress
(
this
.
detailedAddress
)
.
scaleId
(
this
.
scaleId
)
.
testCenter
(
this
.
testCenter
)
.
scaleName
(
this
.
scaleName
)
.
description
(
this
.
description
)
.
detail
(
this
.
detail
)
.
programsDOList
(
this
.
programsDOList
)
.
regionName
(
this
.
regionName
)
.
longitude
(
this
.
longitude
)
.
latitude
(
this
.
latitude
)
.
createTime
(
this
.
createTime
)
.
updateTime
(
this
.
updateTime
)
.
build
();
}
}
release-service/src/main/java/com/mmc/csf/release/entity/licence/LicenseProgramsDO.java
0 → 100644
浏览文件 @
5c61feda
package
com
.
mmc
.
csf
.
release
.
entity
.
licence
;
import
com.mmc.csf.licence.dto.LicenseTrainingProgramsDTO
;
import
com.mmc.csf.release.model.group.Create
;
import
com.mmc.csf.release.model.group.Update
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.AllArgsConstructor
;
import
lombok.Builder
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
import
javax.validation.constraints.NotBlank
;
import
javax.validation.constraints.NotNull
;
import
javax.validation.constraints.Size
;
import
java.math.BigDecimal
;
/**
* @Author small
* @Date 2023/7/14 13:37
* @Version 1.0
*/
@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
public
class
LicenseProgramsDO
{
private
static
final
long
serialVersionUID
=
-
5814724843819090363L
;
@ApiModelProperty
(
value
=
"培训id"
,
example
=
"1"
)
@NotNull
(
message
=
"培训id不能为空"
,
groups
=
Update
.
class
)
private
Integer
id
;
@ApiModelProperty
(
value
=
"培训等级id"
,
example
=
"1"
,
required
=
true
)
@NotNull
(
message
=
"培训等级id不能为空"
,
groups
=
{
Create
.
class
,
Update
.
class
})
private
Integer
gradeId
;
@ApiModelProperty
(
value
=
"培训等级名称"
,
example
=
"1"
,
required
=
true
)
@NotNull
(
message
=
"培训等级名称不能为空"
,
groups
=
{
Create
.
class
,
Update
.
class
})
private
String
gradeName
;
@ApiModelProperty
(
value
=
"培训机型id"
,
example
=
"1"
,
required
=
true
)
@NotNull
(
message
=
"培训机型id不能为空"
,
groups
=
{
Create
.
class
,
Update
.
class
})
private
Integer
modelsId
;
@ApiModelProperty
(
value
=
"培训机型名称"
,
example
=
"1"
,
required
=
true
)
@NotNull
(
message
=
"培训机型名称不能为空"
,
groups
=
{
Create
.
class
,
Update
.
class
})
private
String
modelsName
;
@ApiModelProperty
(
value
=
"培训类型id"
,
example
=
"1"
,
required
=
true
)
@NotNull
(
message
=
"培训类型id不能为空"
,
groups
=
{
Create
.
class
,
Update
.
class
})
private
Integer
typeId
;
@ApiModelProperty
(
value
=
"培训类型名称"
,
example
=
"1"
,
required
=
true
)
@NotNull
(
message
=
"培训类型名称"
,
groups
=
{
Create
.
class
,
Update
.
class
})
private
String
typeName
;
@ApiModelProperty
(
value
=
"培训价格"
,
example
=
"1000"
,
required
=
true
)
@NotNull
(
message
=
"培训价格不能为空"
,
groups
=
{
Create
.
class
,
Update
.
class
})
@Size
(
min
=
0
,
max
=
100000
,
message
=
"价格不能超过100000"
)
private
BigDecimal
price
;
@ApiModelProperty
(
value
=
"培训地点不能为空"
,
example
=
"广东省深圳市南山区XXX001"
,
required
=
true
)
@NotBlank
(
message
=
"培训地点不能为空"
,
groups
=
{
Create
.
class
,
Update
.
class
})
private
String
place
;
@ApiModelProperty
(
value
=
"培训主图不能为空"
,
example
=
"http://"
,
required
=
true
)
@NotBlank
(
message
=
"培训主图不能为空"
,
groups
=
{
Create
.
class
,
Update
.
class
})
private
String
mainImage
;
@ApiModelProperty
(
value
=
"机构id"
,
example
=
"http://"
,
required
=
true
)
@NotBlank
(
message
=
"机构id"
,
groups
=
{
Create
.
class
,
Update
.
class
})
private
Integer
orgId
;
/**
* DTO转换
*
* @return
*/
public
LicenseTrainingProgramsDTO
buildTrainingProgramsDTO
()
{
return
LicenseTrainingProgramsDTO
.
builder
().
id
(
this
.
id
)
.
gradeId
(
this
.
gradeId
)
.
gradeName
(
this
.
gradeName
)
.
modelsId
(
this
.
modelsId
)
.
modelsName
(
this
.
modelsName
)
.
typeId
(
this
.
typeId
)
.
typeName
(
this
.
typeName
)
.
price
(
this
.
price
)
.
place
(
this
.
place
)
.
mainImage
(
this
.
mainImage
)
.
orgId
(
this
.
orgId
)
.
build
();
}
}
release-service/src/main/java/com/mmc/csf/release/entity/licence/LicenseTrainingProgramsDO.java
0 → 100644
浏览文件 @
5c61feda
package
com
.
mmc
.
csf
.
release
.
entity
.
licence
;
import
com.mmc.csf.licence.vo.LicenseTrainingProgramsVO
;
import
com.mmc.csf.release.model.group.Create
;
import
com.mmc.csf.release.model.group.Update
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.AllArgsConstructor
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
import
javax.validation.constraints.NotBlank
;
import
javax.validation.constraints.NotNull
;
import
java.math.BigDecimal
;
/**
* @Author small
* @Date 2023/7/14 11:20
* @Version 1.0
*/
@Data
@AllArgsConstructor
@NoArgsConstructor
public
class
LicenseTrainingProgramsDO
{
@ApiModelProperty
(
value
=
"培训id"
,
example
=
"1"
)
@NotNull
(
message
=
"培训id不能为空"
,
groups
=
Update
.
class
)
private
Integer
id
;
@ApiModelProperty
(
value
=
"培训等级id"
,
example
=
"1"
,
required
=
true
)
@NotNull
(
message
=
"培训等级id不能为空"
,
groups
=
{
Create
.
class
,
Update
.
class
})
private
Integer
gradeId
;
@ApiModelProperty
(
value
=
"培训机型id"
,
example
=
"1"
,
required
=
true
)
@NotNull
(
message
=
"培训机型id不能为空"
,
groups
=
{
Create
.
class
,
Update
.
class
})
private
Integer
modelsId
;
@ApiModelProperty
(
value
=
"培训类型id"
,
example
=
"1"
,
required
=
true
)
@NotNull
(
message
=
"培训类型id不能为空"
,
groups
=
{
Create
.
class
,
Update
.
class
})
private
Integer
typeId
;
@ApiModelProperty
(
value
=
"培训价格"
,
example
=
"1000"
,
required
=
true
)
@NotNull
(
message
=
"培训价格不能为空"
,
groups
=
{
Create
.
class
,
Update
.
class
})
private
BigDecimal
price
;
// @ApiModelProperty(value = "培训地点不能为空", example = "1", required = true)
//@NotBlank(message = "培训地点不能为空", groups = {Create.class, Update.class})
private
String
place
;
@ApiModelProperty
(
value
=
"培训主图不能为空"
,
example
=
"1"
,
required
=
true
)
@NotBlank
(
message
=
"培训主图不能为空"
,
groups
=
{
Create
.
class
,
Update
.
class
})
private
String
mainImage
;
@ApiModelProperty
(
value
=
"机构id"
,
example
=
"1"
,
required
=
true
)
private
Integer
orgId
;
/**
* VO类转换
*/
public
LicenseTrainingProgramsDO
(
LicenseTrainingProgramsVO
programsVO
)
{
this
.
id
=
programsVO
.
getId
();
this
.
mainImage
=
programsVO
.
getMainImage
();
this
.
gradeId
=
programsVO
.
getGradeId
();
this
.
modelsId
=
programsVO
.
getModelsId
();
this
.
typeId
=
programsVO
.
getTypeId
();
this
.
price
=
programsVO
.
getPrice
();
this
.
place
=
programsVO
.
getPlace
();
}
}
release-service/src/main/java/com/mmc/csf/release/entity/requirements/RequirementsInfoDO.java
浏览文件 @
5c61feda
package
com
.
mmc
.
csf
.
release
.
entity
.
requirements
;
package
com
.
mmc
.
csf
.
release
.
entity
.
requirements
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
com.mmc.csf.infomation.vo.RequirementsInfoVO
;
import
com.mmc.csf.infomation.vo.RequirementsInfoVO
;
import
com.mmc.csf.release.model.group.Insert
;
import
com.mmc.csf.release.model.group.Update
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.AllArgsConstructor
;
import
lombok.AllArgsConstructor
;
import
lombok.Data
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
import
lombok.NoArgsConstructor
;
import
javax.validation.constraints.NotBlank
;
import
javax.validation.constraints.NotNull
;
import
javax.validation.constraints.Size
;
import
java.io.Serializable
;
import
java.io.Serializable
;
import
java.util.Date
;
import
java.util.Date
;
...
@@ -31,13 +38,59 @@ public class RequirementsInfoDO implements Serializable {
...
@@ -31,13 +38,59 @@ public class RequirementsInfoDO implements Serializable {
private
Boolean
solved
;
private
Boolean
solved
;
private
Date
createTime
;
private
Date
createTime
;
private
Date
updateTime
;
private
Date
updateTime
;
@ApiModelProperty
(
value
=
"任务标题"
,
example
=
"任务标题001"
,
required
=
true
)
@NotBlank
(
message
=
"任务标题不能为空"
,
groups
=
{
Insert
.
class
,
Update
.
class
})
@Size
(
max
=
15
,
message
=
"任务标题限制15个字"
)
private
String
taskTitle
;
public
RequirementsInfoVO
buildRequirementsInfoVO
(){
@ApiModelProperty
(
value
=
"任务开始时间"
,
example
=
"2023-07-25"
,
required
=
true
)
@NotNull
(
message
=
"任务开始时间不能为空"
,
groups
=
{
Insert
.
class
,
Update
.
class
})
@JsonFormat
(
pattern
=
"yyyy-MM-dd"
,
timezone
=
"GMT+8"
)
private
Date
taskStartTime
;
@ApiModelProperty
(
value
=
"任务结束时间"
,
example
=
"2023-07-26"
,
required
=
true
)
@NotNull
(
message
=
"任务开始时间不能为空"
,
groups
=
{
Insert
.
class
,
Update
.
class
})
@JsonFormat
(
pattern
=
"yyyy-MM-dd"
,
timezone
=
"GMT+8"
)
private
Date
taskEndTime
;
@ApiModelProperty
(
value
=
"任务地址"
,
example
=
"广东省深圳市"
,
required
=
true
)
@NotBlank
(
message
=
"任务地址不能为空"
,
groups
=
{
Insert
.
class
,
Update
.
class
})
private
String
taskAddress
;
@ApiModelProperty
(
value
=
"任务经度"
,
example
=
"23.344324"
,
required
=
true
)
@NotNull
(
message
=
"任务经度不能为空"
,
groups
=
{
Insert
.
class
,
Update
.
class
})
private
Double
longitude
;
@ApiModelProperty
(
value
=
"任务纬度"
,
example
=
"44.344324"
,
required
=
true
)
@NotNull
(
message
=
"任务纬度不能为空"
,
groups
=
{
Insert
.
class
,
Update
.
class
})
private
Double
latitude
;
@ApiModelProperty
(
value
=
"描述图片"
,
example
=
"http://,http://"
,
required
=
false
)
private
String
requireUrl
;
@ApiModelProperty
(
value
=
"类型名称"
)
private
String
requirementTypeName
;
@ApiModelProperty
(
value
=
"发布者订单编号"
)
private
String
publisherNumber
;
public
RequirementsInfoVO
buildRequirementsInfoVO
()
{
return
RequirementsInfoVO
.
builder
().
id
(
this
.
id
).
requirementTypeId
(
this
.
requirementTypeId
).
userAccountId
(
this
.
userAccountId
).
publishName
(
this
.
publishName
)
return
RequirementsInfoVO
.
builder
().
id
(
this
.
id
).
requirementTypeId
(
this
.
requirementTypeId
).
userAccountId
(
this
.
userAccountId
).
publishName
(
this
.
publishName
)
.
publishPhone
(
this
.
publishPhone
).
requireDescription
(
this
.
requireDescription
).
solved
(
this
.
solved
).
createTime
(
this
.
createTime
).
updateTime
(
this
.
updateTime
).
build
();
.
publishPhone
(
this
.
publishPhone
).
requireDescription
(
this
.
requireDescription
).
solved
(
this
.
solved
).
taskStartTime
(
this
.
taskStartTime
).
taskEndTime
(
this
.
taskEndTime
)
.
taskTitle
(
this
.
taskTitle
)
.
taskAddress
(
this
.
taskAddress
)
.
longitude
(
this
.
longitude
)
.
latitude
(
this
.
latitude
)
.
requirementTypeName
(
this
.
requirementTypeName
)
.
publisherNumber
(
this
.
publisherNumber
)
.
requireUrl
(
this
.
requireUrl
).
build
();
}
}
public
RequirementsInfoDO
(
RequirementsInfoVO
requirementsInfoVO
){
public
RequirementsInfoDO
(
RequirementsInfoVO
requirementsInfoVO
)
{
this
.
id
=
requirementsInfoVO
.
getId
();
this
.
id
=
requirementsInfoVO
.
getId
();
this
.
requirementTypeId
=
requirementsInfoVO
.
getRequirementTypeId
();
this
.
requirementTypeId
=
requirementsInfoVO
.
getRequirementTypeId
();
this
.
userAccountId
=
requirementsInfoVO
.
getUserAccountId
();
this
.
userAccountId
=
requirementsInfoVO
.
getUserAccountId
();
...
@@ -47,6 +100,13 @@ public class RequirementsInfoDO implements Serializable {
...
@@ -47,6 +100,13 @@ public class RequirementsInfoDO implements Serializable {
this
.
provinceCode
=
requirementsInfoVO
.
getProvinceCode
();
this
.
provinceCode
=
requirementsInfoVO
.
getProvinceCode
();
this
.
cityCode
=
requirementsInfoVO
.
getCityCode
();
this
.
cityCode
=
requirementsInfoVO
.
getCityCode
();
this
.
districtCode
=
requirementsInfoVO
.
getDistrictCode
();
this
.
districtCode
=
requirementsInfoVO
.
getDistrictCode
();
this
.
taskStartTime
=
requirementsInfoVO
.
getTaskStartTime
();
this
.
taskEndTime
=
requirementsInfoVO
.
getTaskEndTime
();
this
.
taskTitle
=
requirementsInfoVO
.
getTaskTitle
();
this
.
taskAddress
=
requirementsInfoVO
.
getTaskAddress
();
this
.
longitude
=
requirementsInfoVO
.
getLongitude
();
this
.
latitude
=
requirementsInfoVO
.
getLatitude
();
this
.
requireUrl
=
requirementsInfoVO
.
getRequireUrl
();
}
}
}
}
release-service/src/main/java/com/mmc/csf/release/entity/requirements/RequirementsTypeDO.java
浏览文件 @
5c61feda
package
com
.
mmc
.
csf
.
release
.
entity
.
requirements
;
package
com
.
mmc
.
csf
.
release
.
entity
.
requirements
;
import
com.mmc.csf.infomation.vo.RequirementsTypeSubclassVO
;
import
com.mmc.csf.infomation.vo.RequirementsTypeVO
;
import
com.mmc.csf.infomation.vo.RequirementsTypeVO
;
import
lombok.AllArgsConstructor
;
import
lombok.AllArgsConstructor
;
import
lombok.Data
;
import
lombok.Data
;
...
@@ -7,6 +8,7 @@ import lombok.NoArgsConstructor;
...
@@ -7,6 +8,7 @@ import lombok.NoArgsConstructor;
import
java.io.Serializable
;
import
java.io.Serializable
;
import
java.util.Date
;
import
java.util.Date
;
import
java.util.List
;
/**
/**
* @description 需求类型 用枚举
* @description 需求类型 用枚举
...
@@ -21,9 +23,14 @@ public class RequirementsTypeDO implements Serializable {
...
@@ -21,9 +23,14 @@ public class RequirementsTypeDO implements Serializable {
private
Integer
id
;
private
Integer
id
;
private
String
typeName
;
private
String
typeName
;
private
Date
createTime
;
private
Date
createTime
;
/**
* 二级分类
*/
private
List
<
RequirementsTypeSubclassVO
>
typeSubclassList
;
public
RequirementsTypeVO
buildRequirementsTypeVO
(){
public
RequirementsTypeVO
buildRequirementsTypeVO
()
{
return
RequirementsTypeVO
.
builder
().
id
(
this
.
id
).
typeName
(
this
.
typeName
).
build
();
return
RequirementsTypeVO
.
builder
().
id
(
this
.
id
).
typeName
(
this
.
typeName
).
typeSubclassList
(
this
.
typeSubclassList
).
build
();
}
}
}
}
release-service/src/main/java/com/mmc/csf/release/entity/requirements/RequirementsTypeSubclassDO.java
0 → 100644
浏览文件 @
5c61feda
package
com
.
mmc
.
csf
.
release
.
entity
.
requirements
;
import
lombok.AllArgsConstructor
;
import
lombok.Builder
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
/**
* @Author small
* @Date 2023/7/25 9:52
* @Version 1.0
*/
@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
public
class
RequirementsTypeSubclassDO
{
/**
* 二级分类的id
*/
private
Integer
id
;
/**
* 一级分类的id
*/
private
Integer
requirementsTypeId
;
/**
* 二级分类的名称
*/
private
String
name
;
}
release-service/src/main/java/com/mmc/csf/release/error/GlobalExceptionHandler.java
0 → 100644
浏览文件 @
5c61feda
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/BackstageForumService.java
浏览文件 @
5c61feda
...
@@ -8,15 +8,17 @@ import com.mmc.csf.release.forum.qo.DynamicQO;
...
@@ -8,15 +8,17 @@ import com.mmc.csf.release.forum.qo.DynamicQO;
/**
/**
* @Author LW
* @Author LW
*
* @date 2023/6/19 10:47 概要:
* @date 2023/6/19 10:47 概要:
*/
*/
public
interface
BackstageForumService
{
public
interface
BackstageForumService
{
PageResult
listDynamic
(
DynamicQO
dynamic
,
HttpServletRequest
request
);
PageResult
listDynamic
(
DynamicQO
dynamic
,
HttpServletRequest
request
);
ResultBody
deleteDynamic
(
Integer
dynamicId
);
ResultBody
deleteDynamic
(
Integer
dynamicId
);
ResultBody
hiddenDynamic
(
Integer
dynamicId
);
ResultBody
hiddenDynamic
(
Integer
dynamicId
);
ResultBody
likeUserInfo
(
Integer
dynamicId
,
HttpServletRequest
request
);
ResultBody
checkDynamic
(
Integer
dynamicId
,
Boolean
status
);
ResultBody
likeUserInfo
(
Integer
dynamicId
,
HttpServletRequest
request
);
}
}
release-service/src/main/java/com/mmc/csf/release/service/DynamicService.java
浏览文件 @
5c61feda
...
@@ -9,52 +9,51 @@ import com.mmc.csf.release.forum.vo.DynamicVO;
...
@@ -9,52 +9,51 @@ import com.mmc.csf.release.forum.vo.DynamicVO;
/**
/**
* @Author LW 测试合并
* @Author LW 测试合并
*
* @date 2023/5/15 10:29 概要:动态信息service层
* @date 2023/5/15 10:29 概要:动态信息service层
*/
*/
public
interface
DynamicService
{
public
interface
DynamicService
{
/**
/**
* 插入动态
* 插入动态
*
*
* @param dynamicVO 动态
* @param dynamicVO 动态
* @return {@link ResultBody}
* @return {@link ResultBody}
*/
*/
ResultBody
insertDynamic
(
DynamicVO
dynamicVO
,
Integer
userAccountId
);
ResultBody
insertDynamic
(
DynamicVO
dynamicVO
,
Integer
userAccountId
,
HttpServletRequest
request
);
/**
/**
* 点赞动态
* 点赞动态
*
*
* @param userId
用户id
* @param userId
用户id
* @param dynamicId 动态id
* @param dynamicId 动态id
* @return {@link ResultBody}
* @return {@link ResultBody}
*/
*/
ResultBody
likeDynamic
(
Integer
userId
,
Integer
dynamicId
);
ResultBody
likeDynamic
(
Integer
userId
,
Integer
dynamicId
);
/**
/**
* 评论动态
* 评论动态
*
*
* @param commentVO 评论信息
* @param commentVO 评论信息
* @return {@link ResultBody}
* @return {@link ResultBody}
*/
*/
ResultBody
commentDynamic
(
CommentVO
commentVO
,
Integer
userAccountId
);
ResultBody
commentDynamic
(
CommentVO
commentVO
,
Integer
userAccountId
,
HttpServletRequest
request
);
/**
/**
* 删除评论
* 删除评论
*
*
* @param id id
* @param id id
* @return {@link ResultBody}
* @return {@link ResultBody}
*/
*/
ResultBody
deleteComment
(
Integer
id
);
ResultBody
deleteComment
(
Integer
id
);
/**
/**
* 动态细节
* 动态细节
*
*
* @param dynamicId 动态id
* @param dynamicId 动态id
* @param userId
用户id
* @param userId
用户id
* @return {@link ResultBody}
* @return {@link ResultBody}
*/
*/
ResultBody
dynamicDetails
(
Integer
dynamicId
,
Integer
userId
,
HttpServletRequest
request
);
ResultBody
dynamicDetails
(
Integer
dynamicId
,
Integer
userId
,
HttpServletRequest
request
);
PageResult
dynamicList
(
PageResult
dynamicList
(
Integer
pageNo
,
Integer
pageSize
,
Integer
userAccountId
,
HttpServletRequest
request
);
Integer
pageNo
,
Integer
pageSize
,
Integer
userAccountId
,
HttpServletRequest
request
);
}
}
release-service/src/main/java/com/mmc/csf/release/service/RequirementsService.java
浏览文件 @
5c61feda
...
@@ -13,12 +13,14 @@ import javax.servlet.http.HttpServletRequest;
...
@@ -13,12 +13,14 @@ import javax.servlet.http.HttpServletRequest;
public
interface
RequirementsService
{
public
interface
RequirementsService
{
/**
/**
* 需求类型列表
* 需求类型列表
*
* @return
* @return
*/
*/
ResultBody
listType
();
ResultBody
listType
(
Integer
id
);
/**
/**
* 需求发布
* 需求发布
*
* @param requirementsInfoVO
* @param requirementsInfoVO
* @param request
* @param request
* @return
* @return
...
@@ -27,6 +29,7 @@ public interface RequirementsService {
...
@@ -27,6 +29,7 @@ public interface RequirementsService {
/**
/**
* 解决需求
* 解决需求
*
* @param requirementsInfoId
* @param requirementsInfoId
* @param userAccountId
* @param userAccountId
* @return
* @return
...
@@ -35,6 +38,7 @@ public interface RequirementsService {
...
@@ -35,6 +38,7 @@ public interface RequirementsService {
/**
/**
* 需求发布列表
* 需求发布列表
*
* @param industryCaseQO
* @param industryCaseQO
* @param request
* @param request
* @return
* @return
...
@@ -43,9 +47,20 @@ public interface RequirementsService {
...
@@ -43,9 +47,20 @@ public interface RequirementsService {
/**
/**
* 删除需求
* 删除需求
*
* @param requirementsInfoId
* @param requirementsInfoId
* @param userAccountId
* @param userAccountId
* @return
* @return
*/
*/
ResultBody
deleteRequire
(
Integer
requirementsInfoId
,
Integer
userAccountId
);
ResultBody
deleteRequire
(
Integer
requirementsInfoId
,
Integer
userAccountId
);
ResultBody
updatePublish
(
RequirementsInfoVO
requirementsInfoVO
,
HttpServletRequest
request
);
ResultBody
deletePublish
(
Integer
id
,
Integer
userAccountId
);
ResultBody
appPublishList
();
ResultBody
detailPublish
(
Integer
id
,
HttpServletRequest
request
,
Integer
userAccountId
);
ResultBody
backDetailPublish
(
Integer
id
,
HttpServletRequest
request
,
Integer
userAccountId
);
}
}
release-service/src/main/java/com/mmc/csf/release/service/WxApiService.java
0 → 100644
浏览文件 @
5c61feda
package
com
.
mmc
.
csf
.
release
.
service
;
import
com.mmc.csf.common.util.web.ResultBody
;
/**
* @Author LW
* @date 2023/7/12 13:44
* 概要:
*/
public
interface
WxApiService
{
ResultBody
msgSecCheck
(
String
openid
,
String
content
);
/**
* 获取稳定AccessToken
*
* @return
*/
String
getStableAccessToken
()
throws
Exception
;
}
release-service/src/main/java/com/mmc/csf/release/service/impl/BackstageForumServiceImpl.java
浏览文件 @
5c61feda
差异被折叠。
点击展开。
release-service/src/main/java/com/mmc/csf/release/service/impl/DynamicServiceImpl.java
浏览文件 @
5c61feda
差异被折叠。
点击展开。
release-service/src/main/java/com/mmc/csf/release/service/impl/RequirementsServiceImpl.java
浏览文件 @
5c61feda
差异被折叠。
点击展开。
release-service/src/main/java/com/mmc/csf/release/service/impl/WxApiServiceImpl.java
0 → 100644
浏览文件 @
5c61feda
package
com
.
mmc
.
csf
.
release
.
service
.
impl
;
import
com.alibaba.fastjson.JSONObject
;
import
com.mmc.csf.common.util.web.HttpHelper
;
import
com.mmc.csf.common.util.web.HttpsRequestUtil
;
import
com.mmc.csf.common.util.web.ResultBody
;
import
com.mmc.csf.common.util.web.ResultEnum
;
import
com.mmc.csf.release.constant.UserSystemConstant
;
import
com.mmc.csf.release.constant.WxConstant
;
import
com.mmc.csf.release.service.WxApiService
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.lang.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.data.redis.core.StringRedisTemplate
;
import
org.springframework.stereotype.Service
;
import
java.util.HashMap
;
import
java.util.Map
;
import
java.util.concurrent.TimeUnit
;
/**
* @Author LW
* @date 2023/7/12 14:05
* 概要:
*/
@Service
@Slf4j
public
class
WxApiServiceImpl
implements
WxApiService
{
@Autowired
private
UserSystemConstant
userSystemConstant
;
@Autowired
private
StringRedisTemplate
stringRedisTemplate
;
/**
* 文本识别
*
* @param openid
* @param content
* @return
*/
@Override
public
ResultBody
msgSecCheck
(
String
openid
,
String
content
)
{
try
{
String
accessToken
=
this
.
getStableAccessToken
();
JSONObject
param
=
new
JSONObject
();
param
.
put
(
"content"
,
content
);
param
.
put
(
"version"
,
2
);
param
.
put
(
"scene"
,
3
);
param
.
put
(
"openid"
,
openid
);
String
url
=
"https://api.weixin.qq.com/wxa/msg_sec_check?access_token="
+
accessToken
;
String
res
=
HttpHelper
.
httpPost
(
url
,
param
.
toString
());
JSONObject
result
=
JSONObject
.
parseObject
(
res
);
JSONObject
resultData
=
result
.
getJSONObject
(
WxConstant
.
RESULT
);
if
(!
resultData
.
get
(
WxConstant
.
LABEL
).
equals
(
100
))
{
return
ResultBody
.
error
(
ResultEnum
.
DYNAMIC_SENSITIVE_INFO
);
}
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
return
ResultBody
.
success
();
}
@Override
public
String
getStableAccessToken
()
{
//token有效期为7200s,需要保存起来,先从redis中获取accessToken,没有则请求获取
String
accessToken
=
stringRedisTemplate
.
opsForValue
().
get
(
WxConstant
.
IUAV_MINI_PROGRAM_STABLE_ACCESS_TOKEN
);
if
(
StringUtils
.
isBlank
(
accessToken
))
{
Map
<
String
,
String
>
params
=
new
HashMap
<
String
,
String
>();
params
.
put
(
"grant_type"
,
"client_credential"
);
params
.
put
(
"appid"
,
userSystemConstant
.
getWxAppId
());
params
.
put
(
"secret"
,
userSystemConstant
.
getWxAppSecret
());
String
stableAccessTokenUrl
=
"https://api.weixin.qq.com/cgi-bin/stable_token"
;
String
res
=
null
;
try
{
res
=
HttpsRequestUtil
.
httpsRequest
(
stableAccessTokenUrl
,
"POST"
,
null
,
JSONObject
.
toJSONString
(
params
));
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
JSONObject
tokenResult
=
JSONObject
.
parseObject
(
res
);
if
(
res
.
indexOf
(
"access_token"
)
==
-
1
)
{
return
null
;
}
accessToken
=
tokenResult
.
getString
(
"access_token"
);
long
expiresIn
=
tokenResult
.
getLong
(
"expires_in"
);
//保存进redis
stringRedisTemplate
.
opsForValue
().
set
(
WxConstant
.
IUAV_MINI_PROGRAM_STABLE_ACCESS_TOKEN
,
accessToken
,
expiresIn
,
TimeUnit
.
SECONDS
);
return
accessToken
;
}
return
accessToken
;
}
}
release-service/src/main/java/com/mmc/csf/release/service/licence/LicenceBackgroundService.java
0 → 100644
浏览文件 @
5c61feda
package
com
.
mmc
.
csf
.
release
.
service
.
licence
;
import
com.mmc.csf.common.util.page.PageResult
;
import
com.mmc.csf.common.util.web.ResultBody
;
import
com.mmc.csf.licence.qo.LicenseOrganizationsQO
;
import
com.mmc.csf.licence.vo.LicenseOrganizationsVO
;
import
com.mmc.csf.release.auth.dto.LoginSuccessDTO
;
/**
* @Author small
* @Date 2023/7/13 16:01
* @Version 1.0
*/
public
interface
LicenceBackgroundService
{
ResultBody
insertOrganizations
(
LicenseOrganizationsVO
organizations
,
LoginSuccessDTO
userLoginInfoFromRedis
);
ResultBody
updateOrganizations
(
LicenseOrganizationsVO
organizations
,
LoginSuccessDTO
userLoginInfoFromRedis
);
ResultBody
removeOrganizations
(
Integer
id
);
PageResult
listOrgPage
(
LicenseOrganizationsQO
organizationsQO
,
LoginSuccessDTO
userLoginInfoFromRedis
);
}
release-service/src/main/java/com/mmc/csf/release/service/licence/LicenceCommonService.java
0 → 100644
浏览文件 @
5c61feda
package
com
.
mmc
.
csf
.
release
.
service
.
licence
;
import
com.mmc.csf.common.util.web.ResultBody
;
/**
* @Author small
* @Date 2023/7/13 14:34
* @Version 1.0
*/
public
interface
LicenceCommonService
{
ResultBody
licenceGradeList
();
ResultBody
licenceModelsList
();
ResultBody
licenceTypeList
();
ResultBody
licenceScaleList
();
}
release-service/src/main/java/com/mmc/csf/release/service/licence/impl/LicenceBackgroundServiceImpl.java
0 → 100644
浏览文件 @
5c61feda
package
com
.
mmc
.
csf
.
release
.
service
.
licence
.
impl
;
import
com.mmc.csf.common.util.page.PageResult
;
import
com.mmc.csf.common.util.web.ResultBody
;
import
com.mmc.csf.common.util.web.ResultEnum
;
import
com.mmc.csf.licence.dto.LicenseOrganizationsDTO
;
import
com.mmc.csf.licence.dto.LicenseTrainingProgramsDTO
;
import
com.mmc.csf.licence.qo.LicenseOrganizationsQO
;
import
com.mmc.csf.licence.vo.LicenseOrganizationsVO
;
import
com.mmc.csf.licence.vo.LicenseTrainingProgramsVO
;
import
com.mmc.csf.release.auth.dto.LoginSuccessDTO
;
import
com.mmc.csf.release.dao.licence.LicenceBackgroundDao
;
import
com.mmc.csf.release.entity.licence.LicenseOrganizationsDO
;
import
com.mmc.csf.release.entity.licence.LicenseProgramsDO
;
import
com.mmc.csf.release.entity.licence.LicenseTrainingProgramsDO
;
import
com.mmc.csf.release.service.licence.LicenceBackgroundService
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.lang.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
java.util.ArrayList
;
import
java.util.Arrays
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.stream.Collectors
;
/**
* @Author small
* @Date 2023/7/13 16:01
* @Version 1.0
*/
@Service
@Slf4j
public
class
LicenceBackgroundServiceImpl
implements
LicenceBackgroundService
{
@Autowired
private
LicenceBackgroundDao
licenceBackgroundDao
;
@Override
public
ResultBody
insertOrganizations
(
LicenseOrganizationsVO
organizations
,
LoginSuccessDTO
userLoginInfoFromRedis
)
{
int
count
=
licenceBackgroundDao
.
countOrg
(
organizations
.
getName
());
if
(
count
>
0
)
{
return
ResultBody
.
error
(
ResultEnum
.
THE_ORGANIZATION_NAME_ALREADY_EXISTS
);
}
getOrgName
(
organizations
);
LicenseOrganizationsDO
organizationsDO
=
new
LicenseOrganizationsDO
(
organizations
);
List
<
Integer
>
list
=
new
ArrayList
<>();
LicenseTrainingProgramsDO
programsDO
=
null
;
if
(
organizations
.
getTrainingProgramsVOS
()
!=
null
&&
organizations
.
getTrainingProgramsVOS
().
size
()
!=
0
)
{
HashMap
<
LicenseTrainingProgramsVO
,
Integer
>
hashMap
=
new
HashMap
<>();
licenceBackgroundDao
.
insertOrganizations
(
organizationsDO
);
for
(
LicenseTrainingProgramsVO
trainingProgramsVO
:
organizations
.
getTrainingProgramsVOS
())
{
Integer
pro
=
hashMap
.
get
(
trainingProgramsVO
);
if
(
pro
==
null
)
{
hashMap
.
put
(
trainingProgramsVO
,
1
);
programsDO
=
new
LicenseTrainingProgramsDO
(
trainingProgramsVO
);
Integer
id
=
organizationsDO
.
getId
();
programsDO
.
setOrgId
(
id
);
licenceBackgroundDao
.
insertProject
(
programsDO
);
list
.
add
(
programsDO
.
getId
());
organizationsDO
.
setOrgTrainingIds
(
list
);
}
else
{
licenceBackgroundDao
.
removeProject
(
programsDO
.
getId
());
licenceBackgroundDao
.
removeOrg
(
organizationsDO
.
getId
());
hashMap
.
put
(
trainingProgramsVO
,
pro
++);
return
ResultBody
.
error
(
ResultEnum
.
THREE_FIELDS_CAN_BE_REPEATED
);
}
}
// licenceBackgroundDao.insertLicenseOrgTraining(organizationsDO.getOrgTrainingIds(), organizationsDO.getId());
}
if
(
organizations
.
getTrainingProgramsVOS
()
==
null
||
organizations
.
getTrainingProgramsVOS
().
size
()
==
0
)
{
licenceBackgroundDao
.
insertOrganizations
(
organizationsDO
);
}
return
ResultBody
.
success
();
}
@Override
public
ResultBody
updateOrganizations
(
LicenseOrganizationsVO
organizations
,
LoginSuccessDTO
userLoginInfoFromRedis
)
{
LicenseOrganizationsDO
organizationsDO
=
new
LicenseOrganizationsDO
(
organizations
);
int
count
=
licenceBackgroundDao
.
countId
(
organizationsDO
);
if
(
count
>
0
)
{
return
ResultBody
.
error
(
ResultEnum
.
THE_ORGANIZATION_NAME_ALREADY_EXISTS
);
}
getOrgName
(
organizations
);
licenceBackgroundDao
.
removeOrgAndTraining
(
organizations
.
getId
());
LicenseTrainingProgramsDO
programsDO
=
null
;
List
<
Integer
>
list
=
new
ArrayList
<>();
if
(
organizations
.
getTrainingProgramsVOS
()
!=
null
&&
organizations
.
getTrainingProgramsVOS
().
size
()
!=
0
)
{
HashMap
<
LicenseTrainingProgramsVO
,
Integer
>
hashMap
=
new
HashMap
<>();
for
(
LicenseTrainingProgramsVO
trainingProgramsVO
:
organizations
.
getTrainingProgramsVOS
())
{
Integer
pro
=
hashMap
.
get
(
trainingProgramsVO
);
if
(
pro
==
null
)
{
hashMap
.
put
(
trainingProgramsVO
,
1
);
}
else
{
hashMap
.
put
(
trainingProgramsVO
,
pro
++);
return
ResultBody
.
error
(
ResultEnum
.
THREE_FIELDS_CAN_BE_REPEATED
);
}
// licenceBackgroundDao.removeOrganizations(organizations.getId());
programsDO
=
new
LicenseTrainingProgramsDO
(
trainingProgramsVO
);
Integer
id
=
organizations
.
getId
();
programsDO
.
setOrgId
(
id
);
licenceBackgroundDao
.
insertProject
(
programsDO
);
list
.
add
(
programsDO
.
getId
());
organizationsDO
.
setOrgTrainingIds
(
list
);
}
licenceBackgroundDao
.
updateOrganizations
(
organizationsDO
);
// licenceBackgroundDao.insertLicenseOrgTraining(organizationsDO.getOrgTrainingIds(), organizationsDO.getId());
}
if
(
organizations
.
getTrainingProgramsVOS
()
==
null
||
organizations
.
getTrainingProgramsVOS
().
size
()
==
0
)
{
licenceBackgroundDao
.
updateOrganizations
(
organizationsDO
);
}
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
public
ResultBody
removeOrganizations
(
Integer
id
)
{
licenceBackgroundDao
.
removeOrg
(
id
);
licenceBackgroundDao
.
removeOrgAndTraining
(
id
);
return
ResultBody
.
success
();
}
@Override
public
PageResult
listOrgPage
(
LicenseOrganizationsQO
organizationsQO
,
LoginSuccessDTO
userLoginInfoFromRedis
)
{
int
count
=
licenceBackgroundDao
.
countListOrgPage
(
organizationsQO
);
if
(
count
==
0
)
{
return
PageResult
.
buildPage
(
organizationsQO
.
getPageNo
(),
organizationsQO
.
getPageSize
(),
count
);
}
Integer
pageNo
=
organizationsQO
.
getPageNo
();
organizationsQO
.
buildCurrentPage
();
List
<
LicenseOrganizationsDO
>
licenseOrganizationsDOS
=
licenceBackgroundDao
.
listOrgPage
(
organizationsQO
);
List
<
LicenseOrganizationsDTO
>
orgList
=
licenseOrganizationsDOS
.
stream
().
map
(
t
->
t
.
organizationsDTO
()).
collect
(
Collectors
.
toList
());
//培训项目数据
List
<
LicenseProgramsDO
>
licenseProgramsDOS
=
licenceBackgroundDao
.
trainingProgram
(
organizationsQO
);
List
<
LicenseTrainingProgramsDTO
>
programsList
=
licenseProgramsDOS
.
stream
().
map
(
t
->
t
.
buildTrainingProgramsDTO
()).
collect
(
Collectors
.
toList
());
for
(
LicenseOrganizationsDTO
org
:
orgList
)
{
ArrayList
<
LicenseTrainingProgramsDTO
>
list
=
new
ArrayList
<>();
for
(
LicenseTrainingProgramsDTO
pro
:
programsList
)
{
if
(
org
.
getId
().
equals
(
pro
.
getOrgId
()))
{
list
.
add
(
pro
);
org
.
setProgramsDOList
(
list
);
}
}
}
/* List<LicenseOrganizationsDTO> collect = orgList.stream().filter(o -> {
if (o.getProgramsDOList() == null) {
return false;
}
return true;
}).collect(Collectors.toList());*/
if
(
organizationsQO
.
getModelsId
()
!=
null
||
organizationsQO
.
getGradeId
()
!=
null
||
organizationsQO
.
getTypeId
()
!=
null
)
{
orgList
=
orgList
.
stream
().
filter
(
t
->
t
.
getProgramsDOList
()
!=
null
).
collect
(
Collectors
.
toList
());
}
List
<
LicenseOrganizationsDTO
>
subList
=
orgList
.
stream
().
skip
((
pageNo
-
1
)
*
organizationsQO
.
getPageSize
()).
limit
(
organizationsQO
.
getPageSize
()).
collect
(
Collectors
.
toList
());
return
PageResult
.
buildPage
(
pageNo
,
organizationsQO
.
getPageSize
(),
orgList
.
size
(),
subList
);
}
}
release-service/src/main/java/com/mmc/csf/release/service/licence/impl/LicenceCommonServiceImpl.java
0 → 100644
浏览文件 @
5c61feda
package
com
.
mmc
.
csf
.
release
.
service
.
licence
.
impl
;
import
com.mmc.csf.common.util.web.ResultBody
;
import
com.mmc.csf.licence.dto.LicenceGradeDTO
;
import
com.mmc.csf.licence.dto.LicenceModelsDTO
;
import
com.mmc.csf.licence.dto.LicenceScaleDTO
;
import
com.mmc.csf.licence.dto.LicenceTypeDTO
;
import
com.mmc.csf.release.dao.licence.LicenceCommonDao
;
import
com.mmc.csf.release.entity.licence.LicenceGradeDO
;
import
com.mmc.csf.release.entity.licence.LicenceModelsDO
;
import
com.mmc.csf.release.entity.licence.LicenceScaleDO
;
import
com.mmc.csf.release.entity.licence.LicenceTypeDO
;
import
com.mmc.csf.release.service.licence.LicenceCommonService
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
java.util.List
;
import
java.util.stream.Collectors
;
/**
* @Author small
* @Date 2023/7/13 14:34
* @Version 1.0
*/
@Service
public
class
LicenceCommonServiceImpl
implements
LicenceCommonService
{
@Autowired
private
LicenceCommonDao
licenceCommonDao
;
@Override
public
ResultBody
licenceGradeList
()
{
List
<
LicenceGradeDO
>
licenceGradeList
=
licenceCommonDao
.
licenceGradeList
();
List
<
LicenceGradeDTO
>
collect
=
licenceGradeList
.
stream
().
map
(
l
->
{
return
l
.
licenceGradeDTO
();
}).
collect
(
Collectors
.
toList
());
return
ResultBody
.
success
(
collect
);
}
@Override
public
ResultBody
licenceModelsList
()
{
List
<
LicenceModelsDO
>
licenceGradeList
=
licenceCommonDao
.
licenceModelsList
();
List
<
LicenceModelsDTO
>
collect
=
licenceGradeList
.
stream
().
map
(
l
->
{
return
l
.
licenceModelsDTO
();
}).
collect
(
Collectors
.
toList
());
return
ResultBody
.
success
(
collect
);
}
@Override
public
ResultBody
licenceTypeList
()
{
List
<
LicenceTypeDO
>
licenceGradeList
=
licenceCommonDao
.
licenceTypeList
();
List
<
LicenceTypeDTO
>
collect
=
licenceGradeList
.
stream
().
map
(
l
->
{
return
l
.
licenceTypeDTO
();
}).
collect
(
Collectors
.
toList
());
return
ResultBody
.
success
(
collect
);
}
@Override
public
ResultBody
licenceScaleList
()
{
List
<
LicenceScaleDO
>
licenceGradeList
=
licenceCommonDao
.
licenceScaleList
();
List
<
LicenceScaleDTO
>
collect
=
licenceGradeList
.
stream
().
map
(
l
->
{
return
l
.
licenceScaleDTO
();
}).
collect
(
Collectors
.
toList
());
return
ResultBody
.
success
(
collect
);
}
}
release-service/src/main/resources/application-dev.yml
浏览文件 @
5c61feda
...
@@ -11,8 +11,8 @@ spring:
...
@@ -11,8 +11,8 @@ spring:
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_dev?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
:
iuav_dev
password
:
MMC@2022&MYSQL
password
:
${MYSQL_PASSWORD}
# Druid数据源配置
# Druid数据源配置
type
:
com.alibaba.druid.pool.DruidDataSource
type
:
com.alibaba.druid.pool.DruidDataSource
# druid:
# druid:
...
@@ -53,7 +53,7 @@ spring:
...
@@ -53,7 +53,7 @@ spring:
redis
:
redis
:
database
:
1
database
:
1
host
:
redis.default
host
:
redis.default
password
:
MMC@2022&REDIS
password
:
${REDIS_PASSWORD}
port
:
6379
port
:
6379
#连接池
#连接池
lettuce
:
lettuce
:
...
@@ -73,9 +73,20 @@ spring:
...
@@ -73,9 +73,20 @@ spring:
host
:
amqp-cn-zvp2ozhnj001.cn-shenzhen.amqp-0.net.mq.amqp.aliyuncs.com
host
:
amqp-cn-zvp2ozhnj001.cn-shenzhen.amqp-0.net.mq.amqp.aliyuncs.com
port
:
5672
port
:
5672
username
:
MjphbXFwLWNuLXp2cDJvemhuajAwMTpMVEFJNEZ6Q3B5ckEzM1BlZ254V1M2WFY=
username
:
MjphbXFwLWNuLXp2cDJvemhuajAwMTpMVEFJNEZ6Q3B5ckEzM1BlZ254V1M2WFY=
password
:
RTg3OUMxQzk4NzU0NDQ4RkQ1RDg4MkEzQjY4M0M3MkQxOTM2QkEyNDoxNjUyNDA4NDk0NDg4
password
:
${RABBITMQ_PASSWORD}
virtual-host
:
dev
virtual-host
:
dev
wx
:
sub
:
appid
:
wx5c6a105a0ddca4c5
secret
:
96c75255dd26f82f8d55e15b59e101c7
app
:
id
:
wx18b7883acd204278
secret
:
28afe74ba373830237a8133a7431ee82
miniprogram-state
:
trial
env-version
:
trial
port
:
user
#eureka eureka.client.register-with-eureka=true
#eureka eureka.client.register-with-eureka=true
eureka
:
eureka
:
instance
:
instance
:
...
@@ -136,6 +147,9 @@ iuav:
...
@@ -136,6 +147,9 @@ iuav:
url
:
http://cms-svc:35150
url
:
http://cms-svc:35150
pmsapp
:
pmsapp
:
url
:
http://pms-svc:8099
url
:
http://pms-svc:8099
omsapp
:
url
:
https://test.iuav.shop/oms/
#mmc:
#mmc:
# appid: 80001
# appid: 80001
...
@@ -163,4 +177,4 @@ iuav:
...
@@ -163,4 +177,4 @@ iuav:
# endpoints:
# endpoints:
# web:
# web:
# exposure:
# exposure:
# include: "*"
# include: "*"
\ No newline at end of file
release-service/src/main/resources/application-local.yml
浏览文件 @
5c61feda
...
@@ -11,39 +11,38 @@ spring:
...
@@ -11,39 +11,38 @@ spring:
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_dev?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
:
iuav_dev
password
:
MMC@2022
&MYSQL
password
:
IUAV_DEV@2023
&MYSQL
# Druid数据源配置
# Druid数据源配置
type
:
com.alibaba.druid.pool.DruidDataSource
type
:
com.alibaba.druid.pool.DruidDataSource
druid
:
# druid:
initial-size
:
1
#初始化连接池大小
# initial-size: 1 #初始化连接池大小
min-idle
:
1
#最小大小
# min-idle: 1 #最小大小
max-active
:
1
#最大大小
# max-active: 1 #最大大小
max-wait
:
60000
#获取连接时最大等待时间,单位毫秒
# max-wait: 60000 #获取连接时最大等待时间,单位毫秒
time-between-eviction-runs-millis
:
60000
#配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒
# time-between-eviction-runs-millis: 60000 #配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒
min-evictable-idle-time-millis
:
300000
#配置一个连接在池中最小生存的时间,单位是毫秒
# min-evictable-idle-time-millis: 300000 #配置一个连接在池中最小生存的时间,单位是毫秒
validation-query
:
SELECT 1 FROM DUAL
#用来检测连接是否有效的sql
# validation-query: SELECT 1 FROM DUAL #用来检测连接是否有效的sql
test-while-idle
:
true
#申请连接的时候检测,建议配置为true,不影响性能,并且保证安全性
# test-while-idle: true #申请连接的时候检测,建议配置为true,不影响性能,并且保证安全性
testOnBorrow
:
false
#获取连接时执行检测,建议关闭,影响性能
# testOnBorrow: false #获取连接时执行检测,建议关闭,影响性能
testOnReturn
:
false
#归还连接时执行检测,建议关闭,影响性能
# testOnReturn: false #归还连接时执行检测,建议关闭,影响性能
pool-prepared-statements
:
false
#是否开启PSCache,PSCache对支持游标的数据库性能提升巨大,oracle建议开启,mysql下建议关闭
# pool-prepared-statements: false #是否开启PSCache,PSCache对支持游标的数据库性能提升巨大,oracle建议开启,mysql下建议关闭
filters
:
stat,wall
#配置扩展插件,常用的插件有=>stat:监控统计 log4j:日志 wall:防御sql注入
# filters: stat,wall #配置扩展插件,常用的插件有=>stat:监控统计 log4j:日志 wall:防御sql注入
filter
:
# filter:
wall
:
# wall:
config
:
# config:
multi-statement-allow
:
true
# multi-statement-allow: true
db-type
:
mysql
# db-type: mysql
enabled
:
true
# enabled: true
connection-properties
:
druid.stat.mergeSql\=true;druid.stat.slowSqlMillis\=5000
#打开慢sql记录和延迟时间
# connection-properties: druid.stat.mergeSql\=true;druid.stat.slowSqlMillis\=5000 #打开慢sql记录和延迟时间
web-stat-filter
:
# web-stat-filter:
url-pattern
:
/*
# url-pattern: /*
exclusions
:
"
*.js,*.gif,*.jpg,*.png,*.css,*.ico,/druid/*"
# exclusions: "*.js,*.gif,*.jpg,*.png,*.css,*.ico,/druid/*"
enabled
:
true
# enabled: true
stat-view-servlet
:
# stat-view-servlet:
enabled
:
true
# enabled: true
login-username
:
druid
# login-username: druid
login-password
:
druid
# login-password: druid
#cloud
cloud
:
cloud
:
loadbalancer
:
loadbalancer
:
retry
:
retry
:
...
@@ -53,8 +52,7 @@ spring:
...
@@ -53,8 +52,7 @@ spring:
#Redis
#Redis
redis
:
redis
:
database
:
1
database
:
1
host
:
r-wz9ke310fs684hacn1pd.redis.rds.aliyuncs.com
host
:
127.0.0.1
password
:
MMC@2022&REDIS
port
:
6379
port
:
6379
#连接池
#连接池
lettuce
:
lettuce
:
...
@@ -69,6 +67,7 @@ spring:
...
@@ -69,6 +67,7 @@ spring:
#初始化最小
#初始化最小
min-idle
:
1
min-idle
:
1
#rabbitMQ
#rabbitMQ
#rabbitMQ
rabbitmq
:
rabbitmq
:
host
:
amqp-cn-zvp2ozhnj001.cn-shenzhen.amqp-0.net.mq.amqp.aliyuncs.com
host
:
amqp-cn-zvp2ozhnj001.cn-shenzhen.amqp-0.net.mq.amqp.aliyuncs.com
port
:
5672
port
:
5672
...
@@ -76,6 +75,17 @@ spring:
...
@@ -76,6 +75,17 @@ spring:
password
:
RTg3OUMxQzk4NzU0NDQ4RkQ1RDg4MkEzQjY4M0M3MkQxOTM2QkEyNDoxNjUyNDA4NDk0NDg4
password
:
RTg3OUMxQzk4NzU0NDQ4RkQ1RDg4MkEzQjY4M0M3MkQxOTM2QkEyNDoxNjUyNDA4NDk0NDg4
virtual-host
:
/
virtual-host
:
/
wx
:
sub
:
appid
:
wx5c6a105a0ddca4c5
secret
:
96c75255dd26f82f8d55e15b59e101c7
app
:
id
:
wx18b7883acd204278
secret
:
28afe74ba373830237a8133a7431ee82
miniprogram-state
:
trial
env-version
:
trial
port
:
user
#eureka eureka.client.register-with-eureka=true
#eureka eureka.client.register-with-eureka=true
eureka
:
eureka
:
instance
:
instance
:
...
@@ -104,38 +114,40 @@ mybatis:
...
@@ -104,38 +114,40 @@ mybatis:
configuration
:
configuration
:
map-underscore-to-camel-case
:
true
map-underscore-to-camel-case
:
true
#feign
feign
:
client
:
config
:
default
:
connect-timeout
:
3000
read-timeout
:
6000
#Okhttp参数配置
httpclient
:
enabled
:
false
okhttp
:
enabled
:
true
hystrix
:
enabled
:
true
hystrix
:
command
:
default
:
execution
:
isolation
:
thread
:
# hystrix 超时时间
timeoutInMilliseconds
:
9000
#ribbon-ribbo和hystrix时间取最小的生效,feign和ribbon的超时时间只能选其一生效feign优先级高于ribbon
ribbon
:
okhttp
:
enabled
:
true
iuav
:
iuav
:
userapp
:
userapp
:
url
:
http://
127.0.0.1
:35150
url
:
http://
cms-svc
:35150
pmsapp
:
pmsapp
:
url
:
http://127.0.0.1:8099
url
:
http://pms-svc:8099
omsapp
:
##feign
url
:
http://localhost:8077/oms/
#feign:
# client:
# config:
# default:
# connect-timeout: 3000
# read-timeout: 6000
# #Okhttp参数配置
# httpclient:
# enabled: false
# okhttp:
# enabled: true
# hystrix:
# enabled: true
#hystrix:
# command:
# default:
# execution:
# isolation:
# thread:
# # hystrix 超时时间
# timeoutInMilliseconds: 9000
##ribbon-ribbo和hystrix时间取最小的生效,feign和ribbon的超时时间只能选其一生效feign优先级高于ribbon
#ribbon:
# okhttp:
# enabled: true
#mmc:
#mmc:
# appid: 80001
# appid: 80001
...
...
release-service/src/main/resources/application-prod.yml
浏览文件 @
5c61feda
...
@@ -11,8 +11,8 @@ spring:
...
@@ -11,8 +11,8 @@ spring:
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?allowMultiQueries=true&useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=GMT%2B8
username
:
tmj
username
:
iuav
password
:
MMC@2022&MYSQL
password
:
${MYSQL_PASSWORD}
# Druid数据源配置
# Druid数据源配置
type
:
com.alibaba.druid.pool.DruidDataSource
type
:
com.alibaba.druid.pool.DruidDataSource
# druid:
# druid:
...
@@ -53,7 +53,7 @@ spring:
...
@@ -53,7 +53,7 @@ spring:
redis
:
redis
:
database
:
5
database
:
5
host
:
redis.default
host
:
redis.default
password
:
MMC@2022&REDIS
password
:
${REDIS_PASSWORD}
port
:
6379
port
:
6379
#连接池
#连接池
lettuce
:
lettuce
:
...
@@ -72,7 +72,7 @@ spring:
...
@@ -72,7 +72,7 @@ spring:
host
:
amqp-cn-zvp2ozhnj001.cn-shenzhen.amqp-0.net.mq.amqp.aliyuncs.com
host
:
amqp-cn-zvp2ozhnj001.cn-shenzhen.amqp-0.net.mq.amqp.aliyuncs.com
port
:
5672
port
:
5672
username
:
MjphbXFwLWNuLXp2cDJvemhuajAwMTpMVEFJNEZ6Q3B5ckEzM1BlZ254V1M2WFY=
username
:
MjphbXFwLWNuLXp2cDJvemhuajAwMTpMVEFJNEZ6Q3B5ckEzM1BlZ254V1M2WFY=
password
:
RTg3OUMxQzk4NzU0NDQ4RkQ1RDg4MkEzQjY4M0M3MkQxOTM2QkEyNDoxNjUyNDA4NDk0NDg4
password
:
${RABBITMQ_PASSWORD}
virtual-host
:
prod
virtual-host
:
prod
#eureka eureka.client.register-with-eureka=true
#eureka eureka.client.register-with-eureka=true
...
@@ -130,11 +130,23 @@ ribbon:
...
@@ -130,11 +130,23 @@ ribbon:
okhttp
:
okhttp
:
enabled
:
true
enabled
:
true
wx
:
sub
:
appid
:
wx5c6a105a0ddca4c5
secret
:
${WECHAT_SUB_SECRET}
app
:
id
:
wx18b7883acd204278
secret
:
${WECHAT_APPLET_SECRET}
miniprogram-state
:
formal
env-version
:
release
iuav
:
iuav
:
userapp
:
userapp
:
url
:
http://cms-svc:35150
url
:
http://cms-svc:35150
pmsapp
:
pmsapp
:
url
:
http://pms-svc:8099
url
:
http://pms-svc:8099
omsapp
:
url
:
https://www.iuav.shop/oms/
#mmc:
#mmc:
# appid: 80001
# appid: 80001
...
@@ -162,4 +174,4 @@ iuav:
...
@@ -162,4 +174,4 @@ iuav:
# endpoints:
# endpoints:
# web:
# web:
# exposure:
# exposure:
# include: "*"
# include: "*"
\ No newline at end of file
release-service/src/main/resources/mapper/forum/BackstageForumDao.xml
浏览文件 @
5c61feda
...
@@ -17,7 +17,7 @@
...
@@ -17,7 +17,7 @@
</where>
</where>
</select>
</select>
<select
id=
"listDynamicInfo"
resultType=
"com.mmc.csf.release.entity.forum.ForumDynamicDO"
>
<select
id=
"listDynamicInfo"
resultType=
"com.mmc.csf.release.entity.forum.ForumDynamicDO"
>
select id,user_account_id,description,is_deleted as deleted from forum_dynamic
select id,user_account_id,description,is_deleted as deleted
,create_time,check_status
from forum_dynamic
<where>
<where>
root_path is null
root_path is null
<if
test=
"ids != null"
>
<if
test=
"ids != null"
>
...
...
release-service/src/main/resources/mapper/forum/DynamicMapper.xml
浏览文件 @
5c61feda
...
@@ -14,8 +14,8 @@
...
@@ -14,8 +14,8 @@
</insert>
</insert>
<insert
id=
"insertDynamic"
keyProperty=
"id"
useGeneratedKeys=
"true"
<insert
id=
"insertDynamic"
keyProperty=
"id"
useGeneratedKeys=
"true"
parameterType=
"com.mmc.csf.release.entity.forum.ForumDynamicDO"
>
parameterType=
"com.mmc.csf.release.entity.forum.ForumDynamicDO"
>
INSERT INTO forum_dynamic(user_account_id, description, location, lat, lon, root_path)
INSERT INTO forum_dynamic(user_account_id, description, location, lat, lon, root_path
, check_status
)
VALUES (#{userAccountId}, #{description}, #{location}, #{lat}, #{lon}, #{rootPath})
VALUES (#{userAccountId}, #{description}, #{location}, #{lat}, #{lon}, #{rootPath}
, #{checkStatus}
)
</insert>
</insert>
<insert
id=
"insertResource"
>
<insert
id=
"insertResource"
>
insert into forum_resource(dynamic_id, resource_url, `type`)
insert into forum_resource(dynamic_id, resource_url, `type`)
...
@@ -45,10 +45,15 @@
...
@@ -45,10 +45,15 @@
<update
id=
"hiddenDynamic"
>
<update
id=
"hiddenDynamic"
>
update forum_dynamic
update forum_dynamic
set is_deleted =
set is_deleted =
case is_deleted
case is_deleted
when 0 then 1
when 0 then 1
when 1 then 0
when 1 then 0
end
end
where id = #{dynamicId}
</update>
<update
id=
"updateCheckDynamic"
>
update forum_dynamic
set check_status = #{status}
where id = #{dynamicId}
where id = #{dynamicId}
</update>
</update>
<delete
id=
"deleteDynamic"
>
<delete
id=
"deleteDynamic"
>
...
@@ -99,6 +104,7 @@
...
@@ -99,6 +104,7 @@
from forum_dynamic
from forum_dynamic
where is_deleted = 0
where is_deleted = 0
and root_path is null
and root_path is null
and check_status = 1
order by create_time desc
order by create_time desc
LIMIT #{itemIndex}, #{pageSize}
LIMIT #{itemIndex}, #{pageSize}
</select>
</select>
...
@@ -161,6 +167,7 @@
...
@@ -161,6 +167,7 @@
from forum_dynamic
from forum_dynamic
where root_path = #{dynamicId}
where root_path = #{dynamicId}
and is_deleted = 0
and is_deleted = 0
order by create_time desc
</select>
</select>
<select
id=
"listDynamicByUserId"
resultType=
"com.mmc.csf.release.entity.forum.ForumDynamicDO"
>
<select
id=
"listDynamicByUserId"
resultType=
"com.mmc.csf.release.entity.forum.ForumDynamicDO"
>
select id,
select id,
...
@@ -193,4 +200,21 @@
...
@@ -193,4 +200,21 @@
from forum_dynamic
from forum_dynamic
where id = #{dynamicId}
where id = #{dynamicId}
</select>
</select>
<select
id=
"firstTwoItemsComment"
resultType=
"com.mmc.csf.release.entity.forum.ForumDynamicDO"
>
SELECT
id,
user_account_id,
description,
create_time,
root_path
FROM
forum_dynamic
<where>
<foreach
collection=
"list"
item=
"item"
separator=
","
open=
"root_path IN ("
close=
")"
>
#{item}
</foreach>
</where>
ORDER BY
create_time DESC
</select>
</mapper>
</mapper>
\ No newline at end of file
release-service/src/main/resources/mapper/licence/LicenceBackgroundDao.xml
0 → 100644
浏览文件 @
5c61feda
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.mmc.csf.release.dao.licence.LicenceBackgroundDao"
>
<select
id=
"countOrg"
resultType=
"java.lang.Integer"
>
select count(*)
from license_organizations
where 1=1
<if
test=
" name != null and name != '' "
>
and `name` = #{name}
</if>
</select>
<insert
id=
"insertOrganizations"
useGeneratedKeys=
"true"
keyProperty=
"id"
parameterType=
"com.mmc.csf.release.entity.licence.LicenseOrganizationsDO"
>
insert into license_organizations(main_image, auxiliary_picture, video, `name`, region, region_name,
detailed_address,
test_center, scale_id,
description, detail, create_time, update_time, longitude, latitude)
values (#{mainImage}, #{auxiliaryPicture}, #{video}, #{name}, #{region}, #{regionName}, #{detailedAddress},
#{testCenter},
#{scaleId},
#{description}, #{detail}, NOW(), NOW(), #{longitude}, #{latitude})
</insert>
<select
id=
"countId"
resultType=
"java.lang.Integer"
>
select count(*)
from license_organizations
where 1=1
<if
test=
" name != null and name != '' "
>
and `name` = #{name}
</if>
<if
test=
" id != null and id != '' "
>
and id != #{id}
</if>
</select>
<delete
id=
"removeOrgAndTraining"
parameterType=
"java.lang.Integer"
>
delete
from license_training_programs
where org_id = #{id}
</delete>
<update
id=
"updateOrganizations"
parameterType=
"com.mmc.csf.release.entity.licence.LicenseOrganizationsDO"
>
UPDATE license_organizations
<set>
<if
test=
" mainImage != null and mainImage != '' "
>
main_image = #{mainImage},
</if>
<if
test=
" auxiliaryPicture != null and auxiliaryPicture != '' "
>
auxiliary_picture = #{auxiliaryPicture},
</if>
<if
test=
" video != null and video != '' "
>
video = #{video},
</if>
<if
test=
" name != null and name != '' "
>
`name` = #{name},
</if>
<if
test=
" region != null and region != '' "
>
region = #{region},
</if>
<if
test=
" regionName != null and regionName != '' "
>
region_name = #{regionName},
</if>
<if
test=
" detailedAddress != null and detailedAddress != '' "
>
detailed_address = #{detailedAddress},
</if>
<if
test=
" testCenter != null and testCenter != '' "
>
test_center = #{testCenter},
</if>
<if
test=
" scaleId != null and scaleId != '' "
>
scale_id = #{scaleId},
</if>
<if
test=
" description != null and description != '' "
>
description = #{description},
</if>
<if
test=
" detail != null and detail != '' "
>
detail = #{detail},
</if>
<if
test=
" longitude != null and longitude != '' "
>
longitude = #{longitude},
</if>
<if
test=
" latitude != null and latitude != '' "
>
latitude = #{latitude},
</if>
update_time=NOW()
</set>
where id = #{id}
</update>
<insert
id=
"insertProject"
useGeneratedKeys=
"true"
keyProperty=
"id"
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,
update_time,org_id)
values (#{gradeId}, #{modelsId}, #{typeId}, #{price}, #{place}, #{mainImage}, NOW(), NOW(),#{orgId})
</insert>
<update
id=
"updateProject"
parameterType=
"com.mmc.csf.release.entity.licence.LicenseTrainingProgramsDO"
>
UPDATE license_training_programs
<set>
<if
test=
" gradeId != null and gradeId != '' "
>
grade_id = #{gradeId},
</if>
<if
test=
" modelsId != null and modelsId != '' "
>
models_id = #{modelsId},
</if>
<if
test=
" typeId != null and typeId != '' "
>
type_id = #{typeId},
</if>
<if
test=
" price != null and price != '' "
>
price = #{price},
</if>
<if
test=
" place != null and place != '' "
>
place = #{place},
</if>
<if
test=
" mainImage != null and mainImage != '' "
>
main_image = #{mainImage},
</if>
update_time=NOW()
</set>
where id = #{id}
</update>
<delete
id=
"removeProject"
parameterType=
"java.lang.Integer"
>
delete
from license_training_programs
where id = #{id}
</delete>
<delete
id=
"removeOrg"
parameterType=
"java.lang.Integer"
>
delete
from license_organizations
where id = #{id}
</delete>
<select
id=
"getOrgName"
resultType=
"java.lang.String"
>
select `name` from sys_district where id in
<foreach
collection=
"list"
open=
"("
close=
")"
item=
"id"
separator=
","
>
#{id}
</foreach>
</select>
<select
id=
"countListOrgPage"
resultType=
"int"
>
select count(*)
FROM license_organizations lo
LEFT JOIN licence_scale ls ON lo.scale_id = ls.id
where 1=1
<if
test=
" name != null and name != '' "
>
and lo.`name` =#{name}
</if>
<if
test=
" startTime != null and startTime != '' and endTime != null and endTime != '' "
>
and DATE_FORMAT(create_time,'%Y-%m-%d') BETWEEN #{startTime} and #{endTime}
</if>
<if
test=
" region != null and region != '' "
>
and lo.region like CONCAT('%',#{region},'%')
</if>
<if
test=
" id != null and id != '' "
>
and lo.id =#{id}
</if>
</select>
<select
id=
"listOrgPage"
resultType=
"com.mmc.csf.release.entity.licence.LicenseOrganizationsDO"
>
SELECT lo.id,
lo.main_image AS mainImage,
lo.auxiliary_picture AS auxiliaryPicture,
lo.video,
lo.`name`,
lo.region,
lo.test_center AS testCenter,
lo.scale_id AS scaleId,
ls.`name` AS scaleName,
lo.description,
lo.detail,
lo.create_time AS createTime,
lo.update_time AS updateTime,
lo.detailed_address AS detailedAddress,
lo.region_name AS regionName,
lo.longitude,
lo.latitude,
lo.create_time AS createTime,
lo.update_time AS updateTime
FROM license_organizations lo
LEFT JOIN licence_scale ls ON lo.scale_id = ls.id
where 1=1
<if
test=
" name != null and name != '' "
>
and lo.`name` =#{name}
</if>
<if
test=
" startTime != null and startTime != '' and endTime != null and endTime != '' "
>
and DATE_FORMAT(create_time,'%Y-%m-%d') BETWEEN #{startTime} and #{endTime}
</if>
<if
test=
" region != null and region != '' "
>
and lo.region like CONCAT('%',#{region},'%')
</if>
<if
test=
" id != null and id != '' "
>
and lo.id =#{id}
</if>
order by lo.update_time desc, lo.create_time desc
</select>
<select
id=
"trainingProgram"
resultType=
"com.mmc.csf.release.entity.licence.LicenseProgramsDO"
>
SELECT DISTINCT
ltp.id,
ltp.grade_id AS gradeId,
lg.`name` AS gradeName,
ltp.models_id AS modelsId,
lm.`name` AS modelsName,
ltp.type_id AS typeId,
lt.`name` AS typeName,
ltp.price,
ltp.place,
ltp.main_image AS mainImage,
ltp.org_id AS orgId
FROM
license_training_programs ltp
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_type lt ON ltp.type_id = lt.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>
</select>
</mapper>
release-service/src/main/resources/mapper/licence/LicenceCommonDao.xml
0 → 100644
浏览文件 @
5c61feda
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.mmc.csf.release.dao.licence.LicenceCommonDao"
>
<select
id=
"licenceGradeList"
resultType=
"com.mmc.csf.release.entity.licence.LicenceGradeDO"
>
select id, `name`
from licence_grade
</select>
<select
id=
"licenceModelsList"
resultType=
"com.mmc.csf.release.entity.licence.LicenceModelsDO"
>
select id, `name`
from licence_models
</select>
<select
id=
"licenceTypeList"
resultType=
"com.mmc.csf.release.entity.licence.LicenceTypeDO"
>
select id, `name`
from licence_type
</select>
<select
id=
"licenceScaleList"
resultType=
"com.mmc.csf.release.entity.licence.LicenceScaleDO"
>
select id, `name`
from licence_scale
</select>
</mapper>
release-service/src/main/resources/mapper/requirements/RequirementsDao.xml
浏览文件 @
5c61feda
...
@@ -4,29 +4,75 @@
...
@@ -4,29 +4,75 @@
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.mmc.csf.release.dao.RequirementsDao"
>
<mapper
namespace=
"com.mmc.csf.release.dao.RequirementsDao"
>
<resultMap
id=
"listTypeMap"
type=
"com.mmc.csf.release.entity.requirements.RequirementsTypeDO"
>
<result
property=
"id"
column=
"id"
/>
<result
property=
"typeName"
column=
"type_name"
/>
<collection
property=
"typeSubclassList"
ofType=
"com.mmc.csf.infomation.vo.RequirementsTypeSubclassVO"
select=
"selectSubListType"
column=
"{requirementsTypeId=id}"
>
</collection>
</resultMap>
<select
id=
"selectSubListType"
resultType=
"com.mmc.csf.infomation.vo.RequirementsTypeSubclassVO"
>
select id, requirements_type_id AS requirementsTypeId, `name`
from requirements_type_subclass
where requirements_type_id = #{requirementsTypeId}
</select>
<insert
id=
"addRequirementsInfo"
parameterType=
"com.mmc.csf.release.entity.requirements.RequirementsInfoDO"
<insert
id=
"addRequirementsInfo"
parameterType=
"com.mmc.csf.release.entity.requirements.RequirementsInfoDO"
keyProperty=
"id"
useGeneratedKeys=
"true"
>
keyProperty=
"id"
useGeneratedKeys=
"true"
>
INSERT INTO `requirements_info`(`requirement_type_id`, `user_account_id`, `publish_name`, `publish_phone`, `require_description`, `province_code`, `city_code`, `district_code`, `create_time`)
INSERT INTO requirements_info(requirement_type_id, user_account_id, publish_name, publish_phone,
VALUES (#{requirementTypeId}, #{userAccountId}, #{publishName}, #{publishPhone}, #{requireDescription}, #{provinceCode}, #{cityCode}, #{districtCode}, NOW());
require_description, province_code, city_code, district_code, create_time,
update_time, task_title, task_start_time, task_end_time, task_address, longitude,
latitude, require_url, publisher_number)
VALUES (#{requirementTypeId}, #{userAccountId}, #{publishName}, #{publishPhone},
#{requireDescription}, #{provinceCode}, #{cityCode}, #{districtCode}, NOW(),
NOW(), #{taskTitle}, #{taskStartTime}, #{taskEndTime}, #{taskAddress}, #{longitude},
#{latitude}, #{requireUrl}, #{publisherNumber});
</insert>
</insert>
<update
id=
"solveRequire"
>
<update
id=
"solveRequire"
>
update requirements_info set is_solved = 1 where id = #{requirementsInfoId}
update requirements_info
set is_solved = 1
where id = #{requirementsInfoId}
</update>
</update>
<update
id=
"removeRequire"
>
<delete
id=
"removeRequire"
>
update requirements_info set is_deleted = 1 where id = #{requirementsInfoId}
delete
</update>
from requirements_info
where id = #{requirementsInfoId}
</delete>
<select
id=
"listType"
resultType=
"com.mmc.csf.release.entity.requirements.RequirementsTypeDO"
>
<select
id=
"listType"
resultType=
"com.mmc.csf.release.entity.requirements.RequirementsTypeDO"
>
select id, type_name from requirements_type where is_deleted = 0
select id, type_name
from requirements_type
where is_deleted = 0
</select>
<select
id=
"listTypeReq"
resultMap=
"listTypeMap"
>
select id, type_name
from requirements_type
where is_deleted = 0
<if
test=
"id!= null "
>
and id = #{id}
</if>
</select>
</select>
<select
id=
"getRequirementsInfoById"
resultType=
"com.mmc.csf.release.entity.requirements.RequirementsInfoDO"
>
<select
id=
"getRequirementsInfoById"
resultType=
"com.mmc.csf.release.entity.requirements.RequirementsInfoDO"
>
select id, requirement_type_id, user_account_id, publish_name, publish_phone, require_description, is_solved as solved, create_time from requirements_info where id = #{id}
select id,
requirement_type_id,
user_account_id,
publish_name,
publish_phone,
require_description,
is_solved as solved,
create_time
from requirements_info
where id = #{id}
</select>
</select>
<select
id=
"countListPublishPage"
resultType=
"java.lang.Integer"
parameterType=
"com.mmc.csf.infomation.qo.IndustryCaseQO"
>
<select
id=
"countListPublishPage"
resultType=
"java.lang.Integer"
parameterType=
"com.mmc.csf.infomation.qo.IndustryCaseQO"
>
select count(*) from requirements_info
select count(*) from requirements_info
where is_deleted = 0
where is_deleted = 0
<if
test=
"keyword != null"
>
<if
test=
"keyword != null"
>
...
@@ -52,20 +98,31 @@
...
@@ -52,20 +98,31 @@
</if>
</if>
</select>
</select>
<select
id=
"listPublishPage"
resultType=
"com.mmc.csf.release.entity.requirements.RequirementsInfoDO"
parameterType=
"com.mmc.csf.infomation.qo.IndustryCaseQO"
>
<select
id=
"listPublishPage"
resultType=
"com.mmc.csf.release.entity.requirements.RequirementsInfoDO"
select id,
parameterType=
"com.mmc.csf.infomation.qo.IndustryCaseQO"
>
SELECT
id,
requirement_type_id,
requirement_type_id,
user_account_id,
user_account_id,
publish_name,
publish_name,
publish_phone,
publish_phone,
require_description,
require_description,
is_solved
as
solved,
is_solved
AS
solved,
is_deleted
as
deleted,
is_deleted
AS
deleted,
create_time,
create_time,
update_time
update_time,
from requirements_info
task_title,
where is_deleted = 0
task_start_time,
<if
test=
"keyword != null"
>
task_end_time,
task_address,
longitude,
latitude,
require_url
FROM
requirements_info
WHERE
is_deleted = 0
<if
test=
"keyword != null and keyword != '' "
>
and (
and (
publish_name like CONCAT("%",#{keyword},"%") or
publish_name like CONCAT("%",#{keyword},"%") or
publish_phone like CONCAT("%",#{keyword},"%")
publish_phone like CONCAT("%",#{keyword},"%")
...
@@ -89,4 +146,115 @@
...
@@ -89,4 +146,115 @@
order by create_time desc
order by create_time desc
limit #{pageNo}, #{pageSize}
limit #{pageNo}, #{pageSize}
</select>
</select>
</mapper>
\ No newline at end of file
<select
id=
"findPublish"
parameterType=
"com.mmc.csf.release.entity.requirements.RequirementsInfoDO"
resultType=
"java.lang.Integer"
>
SELECT count(*)
FROM requirements_info
WHERE id = #{id}
AND user_account_id = #{userAccountId}
</select>
<update
id=
"updatePublish"
parameterType=
"com.mmc.csf.release.entity.requirements.RequirementsInfoDO"
>
UPDATE requirements_info
<set>
<if
test=
" requirementTypeId != null and requirementTypeId != '' "
>
requirement_type_id = #{requirementTypeId},
</if>
<if
test=
" userAccountId != null and userAccountId != '' "
>
user_account_id = #{userAccountId},
</if>
<if
test=
" publishName != null and publishName != '' "
>
publish_name = #{publishName},
</if>
<if
test=
" publishPhone != null and publishPhone != '' "
>
publish_phone = #{publishPhone},
</if>
<if
test=
" requireDescription != null and requireDescription != '' "
>
require_description = #{requireDescription},
</if>
<if
test=
" provinceCode != null and provinceCode != '' "
>
province_code = #{provinceCode},
</if>
<if
test=
" cityCode != null and cityCode != '' "
>
city_code = #{cityCode},
</if>
<if
test=
" districtCode != null and districtCode != '' "
>
district_code = #{districtCode},
</if>
<if
test=
" taskTitle != null and taskTitle != '' "
>
task_title = #{taskTitle},
</if>
<if
test=
" taskStartTime != null "
>
task_start_time = #{taskStartTime},
</if>
<if
test=
" taskEndTime != null "
>
task_end_time = #{taskEndTime},
</if>
<if
test=
" taskAddress != null and taskAddress != '' "
>
task_address = #{taskAddress},
</if>
<if
test=
" longitude != null and longitude != '' "
>
longitude = #{longitude},
</if>
<if
test=
" latitude != null and latitude != '' "
>
latitude = #{latitude},
</if>
<if
test=
" requireUrl != null and requireUrl != '' "
>
require_url = #{requireUrl},
</if>
update_time=NOW()
</set>
where id = #{id}
</update>
<select
id=
"findPublishCount"
resultType=
"java.lang.Integer"
>
SELECT count(*)
FROM requirements_info
WHERE id = #{id}
AND user_account_id = #{userAccountId}
</select>
<delete
id=
"requirementsDao"
>
delete
from requirements_info
where id = #{id}
</delete>
<select
id=
"appPublishList"
resultType=
"com.mmc.csf.release.entity.requirements.RequirementsInfoDO"
>
SELECT id,
task_title,
task_start_time,
task_end_time,
task_address,
longitude,
latitude,
require_url,
require_description,
requirement_type_id,
user_account_id
FROM requirements_info
order by create_time desc
</select>
<select
id=
"detailPublish"
resultType=
"com.mmc.csf.release.entity.requirements.RequirementsInfoDO"
>
SELECT ri.id,
ri.task_title,
ri.task_start_time,
ri.task_end_time,
ri.task_address,
ri.longitude,
ri.latitude,
ri.require_url,
ri.require_description,
ri.requirement_type_id,
ri.user_account_id,
rt.type_name AS requirementTypeName,
ri.publish_phone,
ri.publisher_number
FROM requirements_info ri
LEFT JOIN requirements_type rt
ON rt.id = ri.requirement_type_id
WHERE ri.id = #{id}
</select>
</mapper>
release-service/src/main/resources/not-check.yml
浏览文件 @
5c61feda
...
@@ -33,3 +33,8 @@ data-filter:
...
@@ -33,3 +33,8 @@ data-filter:
-
/release/tender/info
-
/release/tender/info
-
/release/actuator/health/readiness
-
/release/actuator/health/readiness
-
/release/tender/infoById
-
/release/tender/infoById
-
/release/wechat/checkSignature
-
/release/wechat/mediaCheckAsync
-
/release/licence/background/appListOrgPage
-
/release/licence/background/webListOrgPage
-
/release/requirements/appPublishList
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论