Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
I
ims
概览
概览
详情
活动
周期分析
版本库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
问题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
iuav
ims
Commits
37533904
提交
37533904
authored
11月 22, 2023
作者:
刘明祎-运维用途
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'develop'
上级
e630ff4f
bd1c8afc
流水线
#7122
已通过 于阶段
in 2 分 58 秒
变更
9
流水线
1
隐藏空白字符变更
内嵌
并排
正在显示
9 个修改的文件
包含
97 行增加
和
14 行删除
+97
-14
LicenseOrganizationsQO.java
...n/java/com/mmc/csf/licence/qo/LicenseOrganizationsQO.java
+3
-0
LicenseOrganizationsVO.java
...n/java/com/mmc/csf/licence/vo/LicenseOrganizationsVO.java
+7
-5
kustomization.yaml
kustomization/overlays/dev/kustomization.yaml
+1
-1
LicenceBackgroundController.java
...lease/controller/licence/LicenceBackgroundController.java
+7
-0
LicenceBackgroundDao.java
...com/mmc/csf/release/dao/licence/LicenceBackgroundDao.java
+3
-0
LicenseOrganizationsDO.java
...mc/csf/release/entity/licence/LicenseOrganizationsDO.java
+4
-0
LicenceBackgroundService.java
...csf/release/service/licence/LicenceBackgroundService.java
+1
-1
LicenceBackgroundServiceImpl.java
...se/service/licence/impl/LicenceBackgroundServiceImpl.java
+20
-5
LicenceBackgroundDao.xml
...rc/main/resources/mapper/licence/LicenceBackgroundDao.xml
+51
-2
没有找到文件。
csf-common/csf-common-model/src/main/java/com/mmc/csf/licence/qo/LicenseOrganizationsQO.java
浏览文件 @
37533904
...
@@ -46,6 +46,9 @@ public class LicenseOrganizationsQO {
...
@@ -46,6 +46,9 @@ public class LicenseOrganizationsQO {
@ApiModelProperty
(
value
=
"地域region"
,
example
=
"110000"
,
required
=
false
)
@ApiModelProperty
(
value
=
"地域region"
,
example
=
"110000"
,
required
=
false
)
private
String
region
;
private
String
region
;
@ApiModelProperty
(
value
=
"后台id"
)
private
Integer
backUserId
;
@ApiModelProperty
(
value
=
"当前页"
,
required
=
true
,
example
=
"1"
)
@ApiModelProperty
(
value
=
"当前页"
,
required
=
true
,
example
=
"1"
)
@NotNull
(
message
=
"当前页不能为空"
,
groups
=
{
Page
.
class
,
Freeze
.
class
})
@NotNull
(
message
=
"当前页不能为空"
,
groups
=
{
Page
.
class
,
Freeze
.
class
})
@Min
(
value
=
1
,
groups
=
Page
.
class
)
@Min
(
value
=
1
,
groups
=
Page
.
class
)
...
...
csf-common/csf-common-model/src/main/java/com/mmc/csf/licence/vo/LicenseOrganizationsVO.java
浏览文件 @
37533904
package
com
.
mmc
.
csf
.
licence
.
vo
;
package
com
.
mmc
.
csf
.
licence
.
vo
;
import
com.mmc.csf.release.model.group.Create
;
import
com.mmc.csf.release.model.group.Create
;
import
com.mmc.csf.release.model.group.Page
;
import
com.mmc.csf.release.model.group.Update
;
import
com.mmc.csf.release.model.group.Update
;
import
io.swagger.annotations.ApiModelProperty
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
lombok.Data
;
import
lombok.Value
;
import
org.springframework.validation.annotation.Validated
;
import
javax.validation.Valid
;
import
javax.validation.Valid
;
import
javax.validation.constraints.*
;
import
javax.validation.constraints.Max
;
import
javax.validation.constraints.NotBlank
;
import
javax.validation.constraints.NotNull
;
import
javax.validation.constraints.Size
;
import
java.util.List
;
import
java.util.List
;
/**
/**
...
@@ -41,7 +41,7 @@ public class LicenseOrganizationsVO {
...
@@ -41,7 +41,7 @@ public class LicenseOrganizationsVO {
private
String
name
;
private
String
name
;
@ApiModelProperty
(
value
=
"机构地区编号"
,
example
=
"110000,130100"
,
required
=
true
)
@ApiModelProperty
(
value
=
"机构地区编号"
,
example
=
"110000,130100"
,
required
=
true
)
@NotBlank
(
message
=
"机构地区不能为空"
,
groups
=
{
Create
.
class
,
Update
.
class
})
//
@NotBlank(message = "机构地区不能为空", groups = {Create.class, Update.class})
private
String
region
;
private
String
region
;
@ApiModelProperty
(
value
=
"机构地区名称"
,
example
=
"河北省,石家庄市"
,
required
=
false
)
@ApiModelProperty
(
value
=
"机构地区名称"
,
example
=
"河北省,石家庄市"
,
required
=
false
)
...
@@ -82,5 +82,7 @@ public class LicenseOrganizationsVO {
...
@@ -82,5 +82,7 @@ public class LicenseOrganizationsVO {
@Valid
@Valid
private
List
<
LicenseTrainingProgramsVO
>
trainingProgramsVOS
;
private
List
<
LicenseTrainingProgramsVO
>
trainingProgramsVOS
;
@ApiModelProperty
(
value
=
"后台id"
)
private
Integer
backUserId
;
}
}
kustomization/overlays/dev/kustomization.yaml
浏览文件 @
37533904
...
@@ -18,4 +18,4 @@ patches:
...
@@ -18,4 +18,4 @@ patches:
images
:
images
:
-
name
:
REGISTRY/NAMESPACE/IMAGE:TAG
-
name
:
REGISTRY/NAMESPACE/IMAGE:TAG
newName
:
mmc-registry.cn-shenzhen.cr.aliyuncs.com/sharefly-dev/ims
newName
:
mmc-registry.cn-shenzhen.cr.aliyuncs.com/sharefly-dev/ims
newTag
:
e3eef4e3db93af56ce838d17bace47d371ff8afe
newTag
:
9802b49dcf66c804248a8b17e962db12b3af47ac
release-service/src/main/java/com/mmc/csf/release/controller/licence/LicenceBackgroundController.java
浏览文件 @
37533904
...
@@ -36,6 +36,13 @@ public class LicenceBackgroundController extends BaseController {
...
@@ -36,6 +36,13 @@ public class LicenceBackgroundController extends BaseController {
return
licenceBackgroundService
.
insertOrganizations
(
organizations
,
this
.
getUserLoginInfoFromRedis
(
request
));
return
licenceBackgroundService
.
insertOrganizations
(
organizations
,
this
.
getUserLoginInfoFromRedis
(
request
));
}
}
@ApiOperation
(
value
=
"机构-根据后台id查询"
)
@ApiResponses
({
@ApiResponse
(
code
=
200
,
message
=
"OK"
,
response
=
ResultBody
.
class
)})
@GetMapping
(
"/selectOrg"
)
public
ResultBody
<
LicenseOrganizationsDTO
>
selectOrganizations
(
@ApiParam
(
value
=
"机构id"
,
required
=
true
)
@RequestParam
Integer
backUserId
)
{
return
licenceBackgroundService
.
selectOrganizations
(
backUserId
);
}
@ApiOperation
(
value
=
"机构-修改"
)
@ApiOperation
(
value
=
"机构-修改"
)
@ApiResponses
({
@ApiResponse
(
code
=
200
,
message
=
"OK"
,
response
=
ResultBody
.
class
)})
@ApiResponses
({
@ApiResponse
(
code
=
200
,
message
=
"OK"
,
response
=
ResultBody
.
class
)})
@PostMapping
(
"/updateOrg"
)
@PostMapping
(
"/updateOrg"
)
...
...
release-service/src/main/java/com/mmc/csf/release/dao/licence/LicenceBackgroundDao.java
浏览文件 @
37533904
...
@@ -36,6 +36,9 @@ public interface LicenceBackgroundDao {
...
@@ -36,6 +36,9 @@ public interface LicenceBackgroundDao {
List
<
LicenseOrganizationsDO
>
listOrgPage
(
LicenseOrganizationsQO
organizationsQO
);
List
<
LicenseOrganizationsDO
>
listOrgPage
(
LicenseOrganizationsQO
organizationsQO
);
LicenseOrganizationsDO
selectOrganizations
(
Integer
backUserId
);
List
<
LicenseProgramsDO
>
selectPrograms
(
Integer
orgId
);
List
<
LicenseProgramsDO
>
trainingProgram
(
LicenseOrganizationsQO
organizationsQO
);
List
<
LicenseProgramsDO
>
trainingProgram
(
LicenseOrganizationsQO
organizationsQO
);
...
...
release-service/src/main/java/com/mmc/csf/release/entity/licence/LicenseOrganizationsDO.java
浏览文件 @
37533904
...
@@ -93,6 +93,9 @@ public class LicenseOrganizationsDO {
...
@@ -93,6 +93,9 @@ public class LicenseOrganizationsDO {
@ApiModelProperty
(
value
=
"更新时间"
,
example
=
"2023-07-14"
,
required
=
true
)
@ApiModelProperty
(
value
=
"更新时间"
,
example
=
"2023-07-14"
,
required
=
true
)
private
Date
updateTime
;
private
Date
updateTime
;
@ApiModelProperty
(
value
=
"后台账号id"
)
private
Integer
backUserId
;
/**
/**
* VO类转换
* VO类转换
*/
*/
...
@@ -111,6 +114,7 @@ public class LicenseOrganizationsDO {
...
@@ -111,6 +114,7 @@ public class LicenseOrganizationsDO {
this
.
regionName
=
organizationsVO
.
getRegionName
();
this
.
regionName
=
organizationsVO
.
getRegionName
();
this
.
longitude
=
organizationsVO
.
getLongitude
();
this
.
longitude
=
organizationsVO
.
getLongitude
();
this
.
latitude
=
organizationsVO
.
getLatitude
();
this
.
latitude
=
organizationsVO
.
getLatitude
();
this
.
backUserId
=
organizationsVO
.
getBackUserId
();
}
}
...
...
release-service/src/main/java/com/mmc/csf/release/service/licence/LicenceBackgroundService.java
浏览文件 @
37533904
...
@@ -18,6 +18,6 @@ public interface LicenceBackgroundService {
...
@@ -18,6 +18,6 @@ public interface LicenceBackgroundService {
ResultBody
removeOrganizations
(
Integer
id
);
ResultBody
removeOrganizations
(
Integer
id
);
ResultBody
selectOrganizations
(
Integer
backUserId
);
PageResult
listOrgPage
(
LicenseOrganizationsQO
organizationsQO
,
LoginSuccessDTO
userLoginInfoFromRedis
);
PageResult
listOrgPage
(
LicenseOrganizationsQO
organizationsQO
,
LoginSuccessDTO
userLoginInfoFromRedis
);
}
}
release-service/src/main/java/com/mmc/csf/release/service/licence/impl/LicenceBackgroundServiceImpl.java
浏览文件 @
37533904
...
@@ -117,11 +117,13 @@ public class LicenceBackgroundServiceImpl implements LicenceBackgroundService {
...
@@ -117,11 +117,13 @@ public class LicenceBackgroundServiceImpl implements LicenceBackgroundService {
private
void
getOrgName
(
LicenseOrganizationsVO
organizations
)
{
private
void
getOrgName
(
LicenseOrganizationsVO
organizations
)
{
String
region
=
organizations
.
getRegion
();
String
region
=
organizations
.
getRegion
();
List
<
String
>
strings
=
Arrays
.
asList
(
region
.
split
(
","
));
if
(
region
!=
null
)
{
List
<
Integer
>
collect
=
strings
.
stream
().
map
(
Integer:
:
valueOf
).
collect
(
Collectors
.
toList
());
List
<
String
>
strings
=
Arrays
.
asList
(
region
.
split
(
","
));
List
<
String
>
orgName
=
licenceBackgroundDao
.
getOrgName
(
collect
);
List
<
Integer
>
collect
=
strings
.
stream
().
map
(
Integer:
:
valueOf
).
collect
(
Collectors
.
toList
());
String
join
=
StringUtils
.
join
(
orgName
,
","
);
List
<
String
>
orgName
=
licenceBackgroundDao
.
getOrgName
(
collect
);
organizations
.
setRegionName
(
join
);
String
join
=
StringUtils
.
join
(
orgName
,
","
);
organizations
.
setRegionName
(
join
);
}
}
}
@Override
@Override
...
@@ -132,11 +134,24 @@ public class LicenceBackgroundServiceImpl implements LicenceBackgroundService {
...
@@ -132,11 +134,24 @@ public class LicenceBackgroundServiceImpl implements LicenceBackgroundService {
}
}
@Override
@Override
public
ResultBody
selectOrganizations
(
Integer
backUserId
)
{
LicenseOrganizationsDO
licenseOrganizationsDO
=
licenceBackgroundDao
.
selectOrganizations
(
backUserId
);
LicenseOrganizationsDTO
licenseOrganizationsDTO
=
licenseOrganizationsDO
.
organizationsDTO
();
Integer
orgId
=
licenseOrganizationsDTO
.
getId
();
List
<
LicenseProgramsDO
>
licenseProgramsDOS
=
licenceBackgroundDao
.
selectPrograms
(
orgId
);
List
<
LicenseTrainingProgramsDTO
>
orgList
=
licenseProgramsDOS
.
stream
().
map
(
LicenseProgramsDO
::
buildTrainingProgramsDTO
).
collect
(
Collectors
.
toList
());
licenseOrganizationsDTO
.
setProgramsDOList
(
orgList
);
return
ResultBody
.
success
(
licenseOrganizationsDTO
);
}
@Override
public
PageResult
listOrgPage
(
LicenseOrganizationsQO
organizationsQO
,
LoginSuccessDTO
userLoginInfoFromRedis
)
{
public
PageResult
listOrgPage
(
LicenseOrganizationsQO
organizationsQO
,
LoginSuccessDTO
userLoginInfoFromRedis
)
{
int
count
=
licenceBackgroundDao
.
countListOrgPage
(
organizationsQO
);
int
count
=
licenceBackgroundDao
.
countListOrgPage
(
organizationsQO
);
if
(
count
==
0
)
{
if
(
count
==
0
)
{
return
PageResult
.
buildPage
(
organizationsQO
.
getPageNo
(),
organizationsQO
.
getPageSize
(),
count
);
return
PageResult
.
buildPage
(
organizationsQO
.
getPageNo
(),
organizationsQO
.
getPageSize
(),
count
);
}
}
Integer
backUserId
=
userLoginInfoFromRedis
.
getUserAccountId
();
organizationsQO
.
setBackUserId
(
backUserId
);
Integer
pageNo
=
organizationsQO
.
getPageNo
();
Integer
pageNo
=
organizationsQO
.
getPageNo
();
organizationsQO
.
buildCurrentPage
();
organizationsQO
.
buildCurrentPage
();
List
<
LicenseOrganizationsDO
>
licenseOrganizationsDOS
=
licenceBackgroundDao
.
listOrgPage
(
organizationsQO
);
List
<
LicenseOrganizationsDO
>
licenseOrganizationsDOS
=
licenceBackgroundDao
.
listOrgPage
(
organizationsQO
);
...
...
release-service/src/main/resources/mapper/licence/LicenceBackgroundDao.xml
浏览文件 @
37533904
...
@@ -19,11 +19,11 @@
...
@@ -19,11 +19,11 @@
insert into license_organizations(main_image, auxiliary_picture, video, `name`, region, region_name,
insert into license_organizations(main_image, auxiliary_picture, video, `name`, region, region_name,
detailed_address,
detailed_address,
test_center, scale_id,
test_center, scale_id,
description, detail, create_time, update_time, longitude, latitude)
description, detail, create_time, update_time, longitude, latitude
,back_user_id
)
values (#{mainImage}, #{auxiliaryPicture}, #{video}, #{name}, #{region}, #{regionName}, #{detailedAddress},
values (#{mainImage}, #{auxiliaryPicture}, #{video}, #{name}, #{region}, #{regionName}, #{detailedAddress},
#{testCenter},
#{testCenter},
#{scaleId},
#{scaleId},
#{description}, #{detail}, NOW(), NOW(), #{longitude}, #{latitude})
#{description}, #{detail}, NOW(), NOW(), #{longitude}, #{latitude}
,#{backUserId}
)
</insert>
</insert>
...
@@ -189,6 +189,9 @@
...
@@ -189,6 +189,9 @@
FROM license_organizations lo
FROM license_organizations lo
LEFT JOIN licence_scale ls ON lo.scale_id = ls.id
LEFT JOIN licence_scale ls ON lo.scale_id = ls.id
where 1=1
where 1=1
<if
test=
"backUserId != 1"
>
and lo.back_user_id = #{backUserId}
</if>
<if
test=
" name != null and name != '' "
>
<if
test=
" name != null and name != '' "
>
and lo.`name` like CONCAT('%',#{name},'%')
and lo.`name` like CONCAT('%',#{name},'%')
</if>
</if>
...
@@ -234,6 +237,52 @@
...
@@ -234,6 +237,52 @@
and ltp.type_id =#{typeId}
and ltp.type_id =#{typeId}
</if>
</if>
</select>
</select>
<select
id=
"selectOrganizations"
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
and lo.back_user_id = #{backUserId}
</select>
<select
id=
"selectPrograms"
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 and ltp.org_id = #{orgId}
</select>
</mapper>
</mapper>
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论