Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
E
enterprise-platform
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
赵啸非
enterprise-platform
Commits
b801cf94
Commit
b801cf94
authored
Oct 09, 2023
by
赵啸非
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/master'
parents
6bd9577d
6e36db9c
Changes
14
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
545 additions
and
52 deletions
+545
-52
enterprise-manager-ui/admin/src/components/Table.vue
enterprise-manager-ui/admin/src/components/Table.vue
+1
-0
enterprise-manager-ui/admin/src/views/category/list.vue
enterprise-manager-ui/admin/src/views/category/list.vue
+6
-0
enterprise-manager-ui/admin/src/views/feedback/list.vue
enterprise-manager-ui/admin/src/views/feedback/list.vue
+72
-12
enterprise-manager-ui/admin/src/views/news/category/list.vue
enterprise-manager-ui/admin/src/views/news/category/list.vue
+6
-0
enterprise-manager-ui/admin/src/views/news/list.vue
enterprise-manager-ui/admin/src/views/news/list.vue
+15
-3
enterprise-manager-ui/admin/src/views/product/drawershow.vue
enterprise-manager-ui/admin/src/views/product/drawershow.vue
+10
-9
enterprise-manager-ui/admin/src/views/product/list.vue
enterprise-manager-ui/admin/src/views/product/list.vue
+75
-27
enterprise-manager-ui/admin/src/views/staff/record/list.vue
enterprise-manager-ui/admin/src/views/staff/record/list.vue
+12
-0
enterprise-manager-ui/admin/src/views/system/role/list.vue
enterprise-manager-ui/admin/src/views/system/role/list.vue
+1
-1
enterprise-manager/src/main/java/com/mortals/xhx/busiz/applets/req/ProductReq.java
...in/java/com/mortals/xhx/busiz/applets/req/ProductReq.java
+22
-0
enterprise-manager/src/main/java/com/mortals/xhx/busiz/applets/req/StaffReq.java
...main/java/com/mortals/xhx/busiz/applets/req/StaffReq.java
+22
-0
enterprise-manager/src/main/java/com/mortals/xhx/busiz/applets/web/CompanyApiController.java
...m/mortals/xhx/busiz/applets/web/CompanyApiController.java
+66
-0
enterprise-manager/src/main/java/com/mortals/xhx/busiz/applets/web/ProductApiController.java
...m/mortals/xhx/busiz/applets/web/ProductApiController.java
+117
-0
enterprise-manager/src/main/java/com/mortals/xhx/busiz/applets/web/StaffApiController.java
...com/mortals/xhx/busiz/applets/web/StaffApiController.java
+120
-0
No files found.
enterprise-manager-ui/admin/src/components/Table.vue
View file @
b801cf94
...
@@ -118,6 +118,7 @@
...
@@ -118,6 +118,7 @@
<div
class=
"table-form"
>
<div
class=
"table-form"
>
<slot
name=
"table-search-left"
></slot>
<slot
name=
"table-search-left"
></slot>
<SearchForm
<SearchForm
ref=
"searchform"
:search=
"config.search"
:search=
"config.search"
v-if=
"isShowButton('notSearch')"
v-if=
"isShowButton('notSearch')"
:table=
"data"
:table=
"data"
...
...
enterprise-manager-ui/admin/src/views/category/list.vue
View file @
b801cf94
...
@@ -39,6 +39,12 @@
...
@@ -39,6 +39,12 @@
return
{
return
{
config
:
{
config
:
{
search
:
[
search
:
[
{
name
:
"
name
"
,
type
:
"
text
"
,
label
:
"
分类名称
"
,
fuzzy
:
true
,
},
],
],
columns
:
[
columns
:
[
{
type
:
"
selection
"
,
width
:
60
},
{
type
:
"
selection
"
,
width
:
60
},
...
...
enterprise-manager-ui/admin/src/views/feedback/list.vue
View file @
b801cf94
<
template
>
<
template
>
<div
class=
"page"
>
<div
class=
"page"
>
<LayoutTable
:data=
"tableData"
:config=
"tableConfig"
>
<LayoutTable
ref=
"layouttable"
:data=
"tableData"
:config=
"tableConfig"
notDel
notAdd
>
</LayoutTable>
<!-- 热门0为非热门1为热门 -->
<div
slot=
"table-search-left"
class=
"onlyhot"
>
<el-checkbox
:key=
"0"
v-model=
"isreply"
:checked=
"isreply"
@
change=
"changeIsReply"
>
</el-checkbox>
只看未回复
</div>
</LayoutTable>
<drawer-show
ref=
"drawerform"
@
ok=
"getData"
/>
<drawer-show
ref=
"drawerform"
@
ok=
"getData"
/>
...
@@ -16,10 +27,16 @@
...
@@ -16,10 +27,16 @@
name
:
"
FeedbackList
"
,
name
:
"
FeedbackList
"
,
components
:
{
components
:
{
drawerShow
drawerShow
},
},
mixins
:
[
table
],
mixins
:
[
table
],
created
()
{
created
()
{
},
},
mounted
()
{
// 重写查询
this
.
$refs
.
layouttable
.
$refs
.
searchform
.
onSubmit
=
this
.
onSearch
// 重写搜索清除
this
.
$refs
.
layouttable
.
$refs
.
searchform
.
cleanForm
=
this
.
cleanForm
},
methods
:
{
methods
:
{
/** 重写新增方法 */
/** 重写新增方法 */
toAdd
(
row
)
{
toAdd
(
row
)
{
...
@@ -33,15 +50,58 @@
...
@@ -33,15 +50,58 @@
toView
(
row
)
{
toView
(
row
)
{
this
.
$refs
.
drawerform
.
view
(
row
);
this
.
$refs
.
drawerform
.
view
(
row
);
},
},
// 重写查询
onSearch
(){
if
(
this
.
isreply
){
this
.
$refs
.
layouttable
.
$refs
.
searchform
.
form
=
Object
.
assign
({},
this
.
$refs
.
layouttable
.
$refs
.
searchform
.
form
,
{
reply
:
1
})
}
let
{
path
,
query
}
=
this
.
$refs
.
layouttable
.
$refs
.
searchform
.
$route
;
let
data
=
this
.
$refs
.
layouttable
.
$refs
.
searchform
.
decode
(
this
.
$refs
.
layouttable
.
$refs
.
searchform
.
form
);
this
.
$refs
.
layouttable
.
$refs
.
searchform
.
$router
.
push
({
path
:
path
,
query
:
Object
.
assign
({},
query
,
data
),
});
},
// 重写搜索清除
cleanForm
(){
this
.
isreply
=
false
this
.
$refs
.
layouttable
.
$refs
.
searchform
.
form
.
reply
=
undefined
this
.
$forceUpdate
()
this
.
$refs
.
layouttable
.
$refs
.
searchform
.
clean
();
this
.
$refs
.
layouttable
.
$refs
.
searchform
.
onSubmit
();
},
changeIsReply
(
val
){
this
.
isreply
=
val
},
},
},
data
()
{
data
()
{
return
{
return
{
isreply
:
false
,
config
:
{
config
:
{
search
:
[
search
:
[
// {
// name: "createTime",
// type: "date",
// label: "提交时间",
// fuzzy: true,
// valueFormat:"yyyy-MM-dd"
// },
{
name
:
"
content
"
,
type
:
"
text
"
,
label
:
"
内容
"
,
fuzzy
:
true
,
},
{
name
:
"
feedbackName
"
,
type
:
"
text
"
,
label
:
"
真实姓名
"
,
fuzzy
:
true
,
},
],
],
columns
:
[
columns
:
[
{
type
:
"
selection
"
,
width
:
60
},
//
{type: "selection", width: 60},
{
type
:
"
index
"
,
label
:
"
序号
"
,
width
:
50
},
{
type
:
"
index
"
,
label
:
"
序号
"
,
width
:
50
},
...
@@ -62,21 +122,21 @@
...
@@ -62,21 +122,21 @@
{
label
:
"
回复人
"
,
prop
:
"
replyPerson
"
},
{
label
:
"
回复人
"
,
prop
:
"
replyPerson
"
},
{
label
:
"
反馈类型
"
,
prop
:
"
feedbackType
"
,
formatter
:
this
.
formatter
},
//
{label: "反馈类型 ", prop: "feedbackType",formatter: this.formatter},
{
label
:
"
附件名称,多个逗号分割
"
,
prop
:
"
fileName
"
},
//
{label: "附件名称,多个逗号分割", prop: "fileName"},
{
label
:
"
附件地址,多个逗号分割
"
,
prop
:
"
filePath
"
},
//
{label: "附件地址,多个逗号分割", prop: "filePath"},
{
label
:
"
处理人名称
"
,
prop
:
"
processName
"
},
//
{label: "处理人名称", prop: "processName"},
{
label
:
"
处理状态
"
,
prop
:
"
processStatus
"
,
formatter
:
this
.
formatter
},
//
{label: "处理状态", prop: "processStatus",formatter: this.formatter},
{
label
:
"
处理意见
"
,
prop
:
"
processComments
"
},
//
{label: "处理意见", prop: "processComments"},
{
label
:
"
处理
时间
"
,
prop
:
"
processTime
"
,
formatter
:
this
.
formatterDate
},
{
label
:
"
回复
时间
"
,
prop
:
"
processTime
"
,
formatter
:
this
.
formatterDate
},
{
label
:
"
创建用户
"
,
prop
:
"
createUserId
"
,
formatter
:
this
.
formatter
},
//
{label: "创建用户", prop: "createUserId", formatter: this.formatter},
{
{
label
:
"
操作
"
,
label
:
"
操作
"
,
width
:
240
,
width
:
240
,
...
...
enterprise-manager-ui/admin/src/views/news/category/list.vue
View file @
b801cf94
...
@@ -39,6 +39,12 @@
...
@@ -39,6 +39,12 @@
return
{
return
{
config
:
{
config
:
{
search
:
[
search
:
[
{
name
:
"
name
"
,
type
:
"
text
"
,
label
:
"
频道名称
"
,
fuzzy
:
true
,
},
],
],
columns
:
[
columns
:
[
{
type
:
"
selection
"
,
width
:
60
},
{
type
:
"
selection
"
,
width
:
60
},
...
...
enterprise-manager-ui/admin/src/views/news/list.vue
View file @
b801cf94
<
template
>
<
template
>
<div
class=
"page"
>
<div
class=
"page"
>
<LayoutTable
:data=
"tableData"
:config=
"tableConfig"
>
<LayoutTable
:data=
"tableData"
:config=
"tableConfig"
notDel
>
</LayoutTable>
</LayoutTable>
...
@@ -78,12 +78,24 @@
...
@@ -78,12 +78,24 @@
return
{
return
{
config
:
{
config
:
{
search
:
[
search
:
[
{
name
:
"
categoryId
"
,
type
:
"
select
"
,
placeholder
:
"
请选择新闻类型
"
,
label
:
"
新闻类型
"
},
{
name
:
"
title
"
,
type
:
"
text
"
,
label
:
"
新闻标题
"
,
fuzzy
:
true
,
},
],
],
columns
:
[
columns
:
[
{
type
:
"
selection
"
,
width
:
60
},
//
{type: "selection", width: 60},
{
type
:
"
index
"
,
label
:
"
序号
"
,
width
:
50
},
{
type
:
"
index
"
,
label
:
"
序号
"
,
width
:
50
},
{
label
:
"
标题
"
,
prop
:
"
title
"
},
{
label
:
"
新闻
标题
"
,
prop
:
"
title
"
},
{
label
:
"
新闻类型
"
,
prop
:
"
categoryId
"
,
formatter
:
this
.
formatter
},
{
label
:
"
新闻类型
"
,
prop
:
"
categoryId
"
,
formatter
:
this
.
formatter
},
...
...
enterprise-manager-ui/admin/src/views/product/drawershow.vue
View file @
b801cf94
...
@@ -9,21 +9,22 @@
...
@@ -9,21 +9,22 @@
<el-form
ref=
"form"
:model=
"form"
:rules=
"rules"
label-width=
"120px"
>
<el-form
ref=
"form"
:model=
"form"
:rules=
"rules"
label-width=
"120px"
>
<el-row>
<el-row>
<Field
label=
"产品名称"
prop=
"productName"
v-model=
"form.productName"
placeholder=
"请输入产品名称,名称唯一"
/>
<Field
label=
"产品名称"
prop=
"productName"
v-model=
"form.productName"
placeholder=
"请输入产品名称,名称唯一"
/>
<Field
label=
"产品slogan"
prop=
"productSlogan"
v-model=
"form.productSlogan"
placeholder=
"请输入产品slogan"
/>
<Field
label=
"产品slogan"
prop=
"productSlogan"
v-model=
"form.productSlogan"
placeholder=
"请输入产品slogan"
/>
<Field
label=
"产品分类"
prop=
"categoryId"
v-model=
"form.categoryId"
:multiple=
"true"
type=
"select"
:enumData=
"dict.categoryId"
placeholder=
"请选择产品分类"
/>
<Field
label=
"产品分类"
prop=
"categoryId"
v-model=
"form.categoryId"
:multiple=
"true"
type=
"select"
:enumData=
"dict.categoryId"
placeholder=
"请选择产品分类"
/>
<
Field
label=
"所属企业"
prop=
"companyId"
v-model=
"form.companyId"
:multiple=
"true"
type=
"select"
:enumData=
"dict.companyId"
placeholder=
"请选择所属企业"
/
>
<
!--
<Field
label=
"所属企业"
prop=
"companyId"
v-model=
"form.companyId"
:multiple=
"true"
type=
"select"
:enumData=
"dict.companyId"
placeholder=
"请选择所属企业"
/>
--
>
<
Field
label=
"产品图标"
><imageUpload
v-model=
"form.productLogoPath"
prePath=
"/file/preview"
/></Field
>
<
!--
<Field
label=
"产品图标"
><imageUpload
v-model=
"form.productLogoPath"
prePath=
"/file/preview"
/></Field>
--
>
<Field
label=
"产品封面图片"
prop=
"productFacePath"
><imageUpload
v-model=
"form.productFacePath"
prePath=
"/file/preview"
/>
</Field>
<Field
label=
"产品封面图片"
prop=
"productFacePath"
><imageUpload
v-model=
"form.productFacePath"
prePath=
"/file/preview"
/>
</Field>
<Field
label=
"产品宣传图片"
><imageUpload
v-model=
"form.productPicPath"
prePath=
"/file/preview"
/></Field>
<Field
label=
"宣传形式"
type=
"radio"
:enumData=
"['轮播图','短视频']"
></Field>
<Field
label=
"产品视频"
><fileUpload
v-model=
"form.productVideoPath"
prePath=
"/file/fileupload"
/></Field>
<Field
label=
"轮播图"
><imageUpload
v-model=
"form.productPicPath"
prePath=
"/file/preview"
/></Field>
<Field
label=
"产品介绍"
prop=
"productIntroduction"
v-model=
"form.productIntroduction"
type=
"textarea"
placeholder=
"请输入产品介绍"
/>
<Field
label=
"短视频"
><fileUpload
v-model=
"form.productVideoPath"
prePath=
"/file/fileupload"
/></Field>
<Field
label=
"产品简介"
prop=
"productIntroduction"
v-model=
"form.productIntroduction"
type=
"textarea"
placeholder=
"请输入产品简介"
/>
<Field
label=
"产品详情"
prop=
"productDetail"
placeholder=
"请输入产品详情"
><editor
v-model=
"form.productDetail"
:min-height=
"256"
/></Field>
<Field
label=
"产品详情"
prop=
"productDetail"
placeholder=
"请输入产品详情"
><editor
v-model=
"form.productDetail"
:min-height=
"256"
/></Field>
<Field
label=
"发布时间"
prop=
"publishTime"
v-model=
"form.publishTime"
type=
"date"
/
>
<!--
<Field
label=
"发布时间"
prop=
"publishTime"
v-model=
"form.publishTime"
type=
"date"
/>
--
>
<Field
label=
"
热门"
prop=
"hot"
v-model=
"form.hot"
type=
"radio"
:enumData=
"dict.hot"
placeholder=
"请选择是否热门"
/>
<Field
label=
"是否
热门"
prop=
"hot"
v-model=
"form.hot"
type=
"radio"
:enumData=
"dict.hot"
placeholder=
"请选择是否热门"
/>
<Field
label=
"备注"
prop=
"productRemark"
v-model=
"form.productRemark"
type=
"textarea"
placeholder=
"请输入备注"
/
>
<!--
<Field
label=
"备注"
prop=
"productRemark"
v-model=
"form.productRemark"
type=
"textarea"
placeholder=
"请输入备注"
/>
--
>
</el-row>
</el-row>
<el-divider
content-position=
"center"
>
产品常见问题信息
</el-divider>
<el-divider
content-position=
"center"
>
产品常见问题信息
</el-divider>
...
...
enterprise-manager-ui/admin/src/views/product/list.vue
View file @
b801cf94
<
template
>
<
template
>
<div
class=
"page"
>
<div
class=
"page"
>
<LayoutTable
:data=
"tableData"
:config=
"tableConfig"
>
<LayoutTable
ref=
"layouttable"
:data=
"tableData"
:config=
"tableConfig"
notDel
>
</LayoutTable>
<!-- 热门0为非热门1为热门 -->
<div
slot=
"table-search-left"
class=
"onlyhot"
>
<el-checkbox
:key=
"0"
v-model=
"ishot"
:checked=
"ishot"
@
change=
"changeIshot"
>
</el-checkbox>
只看热门
</div>
</LayoutTable>
<drawer-show
ref=
"drawerform"
@
ok=
"getData"
/>
<drawer-show
ref=
"drawerform"
@
ok=
"getData"
/>
...
@@ -16,9 +29,13 @@
...
@@ -16,9 +29,13 @@
name
:
"
ProductList
"
,
name
:
"
ProductList
"
,
components
:
{
components
:
{
drawerShow
drawerShow
},
},
mixins
:
[
table
],
mixins
:
[
table
],
created
()
{
mounted
()
{
// 重写查询
this
.
$refs
.
layouttable
.
$refs
.
searchform
.
onSubmit
=
this
.
onSearch
// 重写搜索清除
this
.
$refs
.
layouttable
.
$refs
.
searchform
.
cleanForm
=
this
.
cleanForm
},
},
methods
:
{
methods
:
{
renderTable
(
tableData
)
{
renderTable
(
tableData
)
{
...
@@ -51,34 +68,54 @@
...
@@ -51,34 +68,54 @@
toView
(
row
)
{
toView
(
row
)
{
this
.
$refs
.
drawerform
.
view
(
row
);
this
.
$refs
.
drawerform
.
view
(
row
);
},
},
// 重写查询
onSearch
(){
if
(
this
.
ishot
){
this
.
$refs
.
layouttable
.
$refs
.
searchform
.
form
=
Object
.
assign
({},
this
.
$refs
.
layouttable
.
$refs
.
searchform
.
form
,
{
hot
:
1
})
}
let
{
path
,
query
}
=
this
.
$refs
.
layouttable
.
$refs
.
searchform
.
$route
;
let
data
=
this
.
$refs
.
layouttable
.
$refs
.
searchform
.
decode
(
this
.
$refs
.
layouttable
.
$refs
.
searchform
.
form
);
this
.
$refs
.
layouttable
.
$refs
.
searchform
.
$router
.
push
({
path
:
path
,
query
:
Object
.
assign
({},
query
,
data
),
});
},
// 重写搜索清除
cleanForm
(){
this
.
ishot
=
false
this
.
$refs
.
layouttable
.
$refs
.
searchform
.
form
.
hot
=
undefined
this
.
$forceUpdate
()
this
.
$refs
.
layouttable
.
$refs
.
searchform
.
clean
();
this
.
$refs
.
layouttable
.
$refs
.
searchform
.
onSubmit
();
},
changeIshot
(
val
){
this
.
ishot
=
val
}
},
},
data
()
{
data
()
{
return
{
return
{
ishot
:
false
,
config
:
{
config
:
{
search
:
[
search
:
[
{
{
name
:
"
categoryId
"
,
name
:
"
categoryId
"
,
type
:
"
select
"
,
type
:
"
select
"
,
placeholder
:
"
请选择产品分类
"
,
placeholder
:
"
请选择产品分类
"
,
label
:
"
产品分类
"
label
:
"
产品分类
"
},
},
{
name
:
"
companyId
"
,
{
type
:
"
select
"
,
name
:
"
companyId
"
,
placeholder
:
"
请选择所属企业
"
,
type
:
"
select
"
,
label
:
"
所属企业
"
placeholder
:
"
请选择所属企业
"
,
},
label
:
"
所属企业
"
{
},
name
:
"
productName
"
,
type
:
"
text
"
,
{
label
:
"
产品名称
"
,
name
:
"
productName
"
,
fuzzy
:
true
,
type
:
"
text
"
,
},
placeholder
:
"
请输入产品名称
"
,
label
:
"
产品名称
"
},
],
],
columns
:
[
columns
:
[
{
type
:
"
index
"
,
label
:
"
序号
"
,
width
:
50
},
{
type
:
"
index
"
,
label
:
"
序号
"
,
width
:
50
},
...
@@ -112,3 +149,14 @@
...
@@ -112,3 +149,14 @@
}
}
};
};
</
script
>
</
script
>
<
style
lang=
"less"
>
.table-form{
display: flex ;
}
.onlyhot{
margin-right: 20px;
line-height: 30px;
font-size: 14px;
color: #333333;
}
</
style
>
\ No newline at end of file
enterprise-manager-ui/admin/src/views/staff/record/list.vue
View file @
b801cf94
...
@@ -39,6 +39,18 @@
...
@@ -39,6 +39,18 @@
return
{
return
{
config
:
{
config
:
{
search
:
[
search
:
[
{
name
:
"
staffName
"
,
type
:
"
text
"
,
label
:
"
被查看员工姓名
"
,
fuzzy
:
true
,
},
{
name
:
"
viewName
"
,
type
:
"
text
"
,
label
:
"
查看人名称
"
,
fuzzy
:
true
,
},
],
],
columns
:
[
columns
:
[
{
type
:
"
selection
"
,
width
:
60
},
{
type
:
"
selection
"
,
width
:
60
},
...
...
enterprise-manager-ui/admin/src/views/system/role/list.vue
View file @
b801cf94
<
template
>
<
template
>
<div
class=
"page"
>
<div
class=
"page"
>
<LayoutTable
:data=
"tableData"
:config=
"tableConfig"
/>
<LayoutTable
:data=
"tableData"
:config=
"tableConfig"
notDel
/>
<dialog-show
ref=
"dialogform"
@
ok=
"getData"
/>
<dialog-show
ref=
"dialogform"
@
ok=
"getData"
/>
<el-dialog
title=
"分配权限"
:visible.sync=
"auth.visible"
>
<el-dialog
title=
"分配权限"
:visible.sync=
"auth.visible"
>
<el-form
:model=
"auth.form"
>
<el-form
:model=
"auth.form"
>
...
...
enterprise-manager/src/main/java/com/mortals/xhx/busiz/applets/req/ProductReq.java
0 → 100644
View file @
b801cf94
package
com.mortals.xhx.busiz.applets.req
;
import
com.mortals.xhx.busiz.BaseReq
;
import
lombok.Data
;
/**
* 产品请求
*
* @author: zxfei
* @date: 2023/10/7 16:53
*/
@Data
public
class
ProductReq
extends
BaseReq
{
/**
* 分类id
*/
private
Long
categoryId
;
}
enterprise-manager/src/main/java/com/mortals/xhx/busiz/applets/req/StaffReq.java
0 → 100644
View file @
b801cf94
package
com.mortals.xhx.busiz.applets.req
;
import
com.mortals.xhx.busiz.BaseReq
;
import
lombok.Data
;
/**
* 产品请求
*
* @author: zxfei
* @date: 2023/10/7 16:53
*/
@Data
public
class
StaffReq
extends
BaseReq
{
/**
* 员工id
*/
private
Long
id
;
}
enterprise-manager/src/main/java/com/mortals/xhx/busiz/applets/web/CompanyApiController.java
0 → 100644
View file @
b801cf94
package
com.mortals.xhx.busiz.applets.web
;
import
com.mortals.framework.common.Rest
;
import
com.mortals.xhx.busiz.applets.req.NewsReq
;
import
com.mortals.xhx.module.company.model.CompanyLabelsQuery
;
import
com.mortals.xhx.module.company.model.CompanyQuery
;
import
com.mortals.xhx.module.company.service.CompanyLabelsService
;
import
com.mortals.xhx.module.company.service.CompanyService
;
import
com.mortals.xhx.module.labels.model.LabelsQuery
;
import
com.mortals.xhx.module.labels.service.LabelsService
;
import
com.mortals.xhx.module.news.model.NewsCategoryQuery
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
/**
* @author ZYW
* @date 2023-10-09 9:39
*/
@RestController
@Slf4j
@RequestMapping
(
"/api/v1/company"
)
public
class
CompanyApiController
extends
AbstractBaseController
<
NewsReq
>{
@Autowired
private
CompanyService
companyService
;
@Autowired
private
LabelsService
labelsService
;
/**
* 公司标注列表
*/
@PostMapping
(
value
=
"labelsList"
)
public
Rest
<
Object
>
categoryList
(){
String
busiDesc
=
"公司标注"
;
Rest
<
Object
>
rest
=
Rest
.
ok
();
try
{
rest
.
setData
(
labelsService
.
find
(
new
LabelsQuery
()));
}
catch
(
Exception
e
)
{
log
.
error
(
busiDesc
,
e
);
rest
=
Rest
.
fail
(
super
.
convertException
(
e
));
}
return
rest
;
}
/**
* 公司列表
*/
@PostMapping
(
value
=
"companyList"
)
public
Rest
<
Object
>
companyList
(){
String
busiDesc
=
"公司列表"
;
Rest
<
Object
>
rest
=
Rest
.
ok
();
try
{
rest
.
setData
(
companyService
.
find
(
new
CompanyQuery
()));
}
catch
(
Exception
e
)
{
log
.
error
(
busiDesc
,
e
);
rest
=
Rest
.
fail
(
super
.
convertException
(
e
));
}
return
rest
;
}
}
enterprise-manager/src/main/java/com/mortals/xhx/busiz/applets/web/ProductApiController.java
0 → 100644
View file @
b801cf94
package
com.mortals.xhx.busiz.applets.web
;
import
com.alibaba.fastjson.JSONObject
;
import
com.mortals.framework.common.Rest
;
import
com.mortals.framework.exception.AppException
;
import
com.mortals.framework.model.Context
;
import
com.mortals.framework.model.OrderCol
;
import
com.mortals.framework.model.PageInfo
;
import
com.mortals.framework.model.Result
;
import
com.mortals.xhx.busiz.applets.req.NewsReq
;
import
com.mortals.xhx.busiz.applets.req.ProductReq
;
import
com.mortals.xhx.busiz.applets.rsp.NewsListInfo
;
import
com.mortals.xhx.common.utils.BeanUtil
;
import
com.mortals.xhx.module.category.model.CategoryQuery
;
import
com.mortals.xhx.module.category.service.CategoryService
;
import
com.mortals.xhx.module.company.model.CompanyQuery
;
import
com.mortals.xhx.module.company.service.CompanyService
;
import
com.mortals.xhx.module.labels.model.LabelsQuery
;
import
com.mortals.xhx.module.labels.service.LabelsService
;
import
com.mortals.xhx.module.news.model.NewsEntity
;
import
com.mortals.xhx.module.news.model.NewsQuery
;
import
com.mortals.xhx.module.product.model.ProductCategoryQuery
;
import
com.mortals.xhx.module.product.model.ProductEntity
;
import
com.mortals.xhx.module.product.model.ProductQuery
;
import
com.mortals.xhx.module.product.service.ProductCategoryService
;
import
com.mortals.xhx.module.product.service.ProductService
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.util.ObjectUtils
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
java.util.Arrays
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.stream.Collectors
;
import
static
com
.
mortals
.
framework
.
ap
.
SysConstains
.
PAGEINFO_KEY
;
import
static
com
.
mortals
.
xhx
.
common
.
key
.
ErrorCode
.
ERROR_TOKEN_EXPIRED
;
import
static
com
.
mortals
.
xhx
.
common
.
key
.
ErrorCode
.
ERROR_TOKEN_EXPIRED_CONTENT
;
/**
* @author ZYW
* @date 2023-10-09 9:39
*/
@RestController
@Slf4j
@RequestMapping
(
"/api/v1/product"
)
public
class
ProductApiController
extends
AbstractBaseController
<
ProductReq
>{
@Autowired
private
ProductService
productService
;
@Autowired
private
CategoryService
categoryService
;
/**
* 产品类型
*/
@PostMapping
(
value
=
"categoryList"
)
public
Rest
<
Object
>
categoryList
(){
String
busiDesc
=
"产品类型"
;
Rest
<
Object
>
rest
=
Rest
.
ok
();
try
{
rest
.
setData
(
categoryService
.
find
(
new
CategoryQuery
()));
}
catch
(
Exception
e
)
{
log
.
error
(
busiDesc
,
e
);
rest
=
Rest
.
fail
(
super
.
convertException
(
e
));
}
return
rest
;
}
/**
* 产品列表
*/
@PostMapping
(
value
=
"productList"
)
public
Rest
<
Object
>
productList
(
@RequestBody
ProductReq
productReq
){
String
busiDesc
=
"产品列表列表"
;
log
.
info
(
"【{}】【请求体】--> {}"
,
busiDesc
,
JSONObject
.
toJSONString
(
productReq
));
Rest
<
Object
>
rest
=
Rest
.
ok
();
Map
<
String
,
Object
>
model
=
new
HashMap
<>();
Context
context
=
this
.
getContext
();
if
(
ObjectUtils
.
isEmpty
(
context
)
||
ObjectUtils
.
isEmpty
(
context
.
getUser
()))
{
throw
new
AppException
(
ERROR_TOKEN_EXPIRED
,
ERROR_TOKEN_EXPIRED_CONTENT
);
}
try
{
PageInfo
pageInfo
=
buildPageInfo
(
productReq
);
ProductQuery
query
=
new
ProductQuery
();
if
(!
ObjectUtils
.
isEmpty
(
productReq
.
getCategoryId
())){
query
.
setCategoryId
(
String
.
valueOf
(
productReq
.
getCategoryId
()));
}
query
.
setOrderColList
(
Arrays
.
asList
(
new
OrderCol
(
"createTime"
,
OrderCol
.
DESCENDING
)));
Result
<
ProductEntity
>
result
=
productService
.
find
(
query
,
pageInfo
,
context
);
List
<
ProductEntity
>
collect
=
result
.
getList
().
stream
().
map
(
item
->
{
ProductEntity
productEntity
=
new
ProductEntity
();
BeanUtils
.
copyProperties
(
item
,
productEntity
,
BeanUtil
.
getNullPropertyNames
(
item
));
return
productEntity
;
}).
collect
(
Collectors
.
toList
());
model
.
put
(
KEY_RESULT_DATA
,
collect
);
model
.
put
(
PAGEINFO_KEY
,
result
.
getPageInfo
());
super
.
parsePageInfo
(
model
,
result
.
getPageInfo
());
rest
.
setData
(
model
);
recordSysLog
(
request
,
busiDesc
+
" 【成功】"
);
}
catch
(
Exception
e
)
{
log
.
error
(
busiDesc
,
e
);
rest
=
Rest
.
fail
(
super
.
convertException
(
e
));
}
return
rest
;
}
}
enterprise-manager/src/main/java/com/mortals/xhx/busiz/applets/web/StaffApiController.java
0 → 100644
View file @
b801cf94
package
com.mortals.xhx.busiz.applets.web
;
import
com.alibaba.fastjson.JSONObject
;
import
com.mortals.framework.common.Rest
;
import
com.mortals.framework.exception.AppException
;
import
com.mortals.framework.model.Context
;
import
com.mortals.framework.model.OrderCol
;
import
com.mortals.framework.model.PageInfo
;
import
com.mortals.framework.model.Result
;
import
com.mortals.xhx.busiz.applets.req.ProductReq
;
import
com.mortals.xhx.busiz.applets.req.StaffReq
;
import
com.mortals.xhx.common.utils.BeanUtil
;
import
com.mortals.xhx.module.category.model.CategoryQuery
;
import
com.mortals.xhx.module.category.service.CategoryService
;
import
com.mortals.xhx.module.product.model.ProductEntity
;
import
com.mortals.xhx.module.product.model.ProductQuery
;
import
com.mortals.xhx.module.product.service.ProductService
;
import
com.mortals.xhx.module.staff.model.StaffEntity
;
import
com.mortals.xhx.module.staff.model.StaffQuery
;
import
com.mortals.xhx.module.staff.model.StaffRecordEntity
;
import
com.mortals.xhx.module.staff.service.StaffRecordService
;
import
com.mortals.xhx.module.staff.service.StaffService
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.util.ObjectUtils
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
java.util.Arrays
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.stream.Collectors
;
import
static
com
.
mortals
.
framework
.
ap
.
SysConstains
.
PAGEINFO_KEY
;
import
static
com
.
mortals
.
xhx
.
common
.
key
.
ErrorCode
.
ERROR_TOKEN_EXPIRED
;
import
static
com
.
mortals
.
xhx
.
common
.
key
.
ErrorCode
.
ERROR_TOKEN_EXPIRED_CONTENT
;
/**
* @author ZYW
* @date 2023-10-09 9:39
*/
@RestController
@Slf4j
@RequestMapping
(
"/api/v1/staff"
)
public
class
StaffApiController
extends
AbstractBaseController
<
StaffReq
>{
@Autowired
private
StaffService
staffService
;
@Autowired
private
StaffRecordService
staffRecordService
;
/**
* 员工详情
*/
@PostMapping
(
value
=
"staffInfo"
)
public
Rest
<
Object
>
staffInfo
(
@RequestBody
StaffReq
staffReq
){
String
busiDesc
=
"员工详情"
;
log
.
info
(
"【{}】【请求体】--> {}"
,
busiDesc
,
JSONObject
.
toJSONString
(
staffReq
));
Rest
<
Object
>
rest
=
Rest
.
ok
();
Context
context
=
this
.
getContext
();
if
(
ObjectUtils
.
isEmpty
(
context
)
||
ObjectUtils
.
isEmpty
(
context
.
getUser
()))
{
throw
new
AppException
(
ERROR_TOKEN_EXPIRED
,
ERROR_TOKEN_EXPIRED_CONTENT
);
}
try
{
if
(!
ObjectUtils
.
isEmpty
(
staffReq
.
getId
())){
StaffEntity
staffEntity
=
staffService
.
get
(
staffReq
.
getId
());
if
(
staffEntity
!=
null
){
rest
.
setData
(
staffEntity
);
}
else
{
rest
=
Rest
.
fail
(
"未查到该员工"
);
}
}
else
{
rest
=
Rest
.
fail
(
"缺少id"
);
}
recordSysLog
(
request
,
busiDesc
+
" 【成功】"
);
}
catch
(
Exception
e
)
{
log
.
error
(
busiDesc
,
e
);
rest
=
Rest
.
fail
(
super
.
convertException
(
e
));
}
return
rest
;
}
/**
* 名片被查看记录
*/
@PostMapping
(
value
=
"staffRecord"
)
public
Rest
<
Object
>
staffRecord
(
@RequestBody
StaffReq
staffReq
){
String
busiDesc
=
"名片被查看记录"
;
log
.
info
(
"【{}】【请求体】--> {}"
,
busiDesc
,
JSONObject
.
toJSONString
(
staffReq
));
Rest
<
Object
>
rest
=
Rest
.
ok
();
Context
context
=
this
.
getContext
();
if
(
ObjectUtils
.
isEmpty
(
context
)
||
ObjectUtils
.
isEmpty
(
context
.
getUser
()))
{
throw
new
AppException
(
ERROR_TOKEN_EXPIRED
,
ERROR_TOKEN_EXPIRED_CONTENT
);
}
try
{
if
(!
ObjectUtils
.
isEmpty
(
staffReq
.
getId
())){
StaffRecordEntity
staffRecordEntity
=
staffRecordService
.
get
(
staffReq
.
getId
());
if
(
staffRecordEntity
!=
null
){
rest
.
setData
(
staffRecordEntity
);
}
else
{
rest
=
Rest
.
fail
(
"未查到记录"
);
}
}
else
{
rest
=
Rest
.
fail
(
"缺少id"
);
}
recordSysLog
(
request
,
busiDesc
+
" 【成功】"
);
}
catch
(
Exception
e
)
{
log
.
error
(
busiDesc
,
e
);
rest
=
Rest
.
fail
(
super
.
convertException
(
e
));
}
return
rest
;
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment