Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gs1-office-web-sit
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
吴迪
gs1-office-web-sit
Commits
5aea37e4
Commit
5aea37e4
authored
Nov 21, 2021
by
吴迪
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/master'
parents
ae2bfe88
9302282c
Hide whitespace changes
Inline
Side-by-side
Showing
21 changed files
with
1237 additions
and
6 deletions
+1237
-6
GlossaryController.java
.../office/modules/manage/controller/GlossaryController.java
+100
-0
PartnersController.java
.../office/modules/manage/controller/PartnersController.java
+119
-0
PcategoryController.java
...office/modules/manage/controller/PcategoryController.java
+9
-6
ProductController.java
...o/office/modules/manage/controller/ProductController.java
+117
-0
GlossaryDao.java
src/main/java/io/office/modules/manage/dao/GlossaryDao.java
+23
-0
PartnersDao.java
src/main/java/io/office/modules/manage/dao/PartnersDao.java
+23
-0
ProductDao.java
src/main/java/io/office/modules/manage/dao/ProductDao.java
+23
-0
GlossaryEntity.java
.../java/io/office/modules/manage/entity/GlossaryEntity.java
+72
-0
PartnersEntity.java
.../java/io/office/modules/manage/entity/PartnersEntity.java
+96
-0
ProductEntity.java
...n/java/io/office/modules/manage/entity/ProductEntity.java
+185
-0
GlossaryService.java
...ava/io/office/modules/manage/service/GlossaryService.java
+24
-0
PartnersService.java
...ava/io/office/modules/manage/service/PartnersService.java
+30
-0
PcategoryService.java
...va/io/office/modules/manage/service/PcategoryService.java
+3
-0
ProductService.java
...java/io/office/modules/manage/service/ProductService.java
+33
-0
GlossaryServiceImpl.java
...fice/modules/manage/service/impl/GlossaryServiceImpl.java
+43
-0
PartnersServiceImpl.java
...fice/modules/manage/service/impl/PartnersServiceImpl.java
+78
-0
PcategoryServiceImpl.java
...ice/modules/manage/service/impl/PcategoryServiceImpl.java
+9
-0
ProductServiceImpl.java
...ffice/modules/manage/service/impl/ProductServiceImpl.java
+86
-0
GlossaryDao.xml
src/main/resources/mapper/manage/GlossaryDao.xml
+38
-0
PartnersDao.xml
src/main/resources/mapper/manage/PartnersDao.xml
+65
-0
ProductDao.xml
src/main/resources/mapper/manage/ProductDao.xml
+61
-0
No files found.
src/main/java/io/office/modules/manage/controller/GlossaryController.java
0 → 100644
View file @
5aea37e4
package
io
.
office
.
modules
.
manage
.
controller
;
import
java.util.Arrays
;
import
java.util.Date
;
import
java.util.Map
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
io.office.modules.manage.entity.ProductEntity
;
import
io.office.modules.sys.controller.AbstractController
;
import
org.apache.shiro.authz.annotation.RequiresPermissions
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.PathVariable
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.bind.annotation.RestController
;
import
io.office.modules.manage.entity.GlossaryEntity
;
import
io.office.modules.manage.service.GlossaryService
;
import
io.office.common.utils.PageUtils
;
import
io.office.common.utils.R
;
/**
*
* 术语管理
* @author rkl
* @email
* @date 2021-11-15 18:29:59
*/
@RestController
@RequestMapping
(
"/glossary"
)
public
class
GlossaryController
extends
AbstractController
{
@Autowired
private
GlossaryService
glossaryService
;
/**
* 列表
*/
@RequestMapping
(
"/list"
)
// @RequiresPermissions("manage:glossary:list")
public
R
list
(
@RequestParam
Map
<
String
,
Object
>
params
){
Page
<
GlossaryEntity
>
page
=
this
.
glossaryService
.
selectGlossaryList
(
params
,
new
Page
(
Integer
.
valueOf
(
params
.
get
(
"page"
).
toString
()),
Integer
.
valueOf
(
params
.
get
(
"limit"
).
toString
())));
return
R
.
ok
().
put
(
"page"
,
page
);
}
/**
* 信息
*/
@RequestMapping
(
"/info/{id}"
)
// @RequiresPermissions("manage:glossary:info")
public
R
info
(
@PathVariable
(
"id"
)
Integer
id
){
GlossaryEntity
glossary
=
glossaryService
.
getById
(
id
);
return
R
.
ok
().
put
(
"glossary"
,
glossary
);
}
/**
* 保存
*/
@RequestMapping
(
"/save"
)
// @RequiresPermissions("manage:glossary:save")
public
R
save
(
@RequestBody
GlossaryEntity
glossary
){
glossary
.
setEditor
(
getUser
().
getUsername
());
glossary
.
setLasteditor
(
getUser
().
getUsername
());
glossaryService
.
save
(
glossary
);
return
R
.
ok
(
"术语新增成功!"
);
}
/**
* 修改
*/
@RequestMapping
(
"/update"
)
// @RequiresPermissions("manage:glossary:update")
public
R
update
(
@RequestBody
GlossaryEntity
glossary
){
glossary
.
setEditor
(
getUser
().
getUsername
());
glossary
.
setLasteditor
(
getUser
().
getUsername
());
glossary
.
setUpdatedate
(
new
Date
());
glossaryService
.
updateById
(
glossary
);
return
R
.
ok
(
"术语修改成功!"
);
}
/**
* 删除
*/
@RequestMapping
(
"/delete"
)
// @RequiresPermissions("manage:glossary:delete")
public
R
delete
(
@RequestBody
Integer
[]
ids
){
GlossaryEntity
glossary
=
new
GlossaryEntity
();
glossary
.
setEditor
(
getUser
().
getUsername
());
glossary
.
setLasteditor
(
getUser
().
getUsername
());
glossaryService
.
updateById
(
glossary
);
return
R
.
ok
(
"术语删除成功!"
);
}
}
src/main/java/io/office/modules/manage/controller/PartnersController.java
0 → 100644
View file @
5aea37e4
package
io
.
office
.
modules
.
manage
.
controller
;
import
java.util.Arrays
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.Map
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
io.office.modules.manage.entity.ProductEntity
;
import
io.office.modules.sys.controller.AbstractController
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.shiro.authz.annotation.RequiresPermissions
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.*
;
import
io.office.modules.manage.entity.PartnersEntity
;
import
io.office.modules.manage.service.PartnersService
;
import
io.office.common.utils.PageUtils
;
import
io.office.common.utils.R
;
/**
* 标准服务 提供商管理
*
* @author rkl
* @email
* @date 2021-11-16 08:59:11
*/
@RestController
@RequestMapping
(
"/partners"
)
@Slf4j
public
class
PartnersController
extends
AbstractController
{
@Autowired
private
PartnersService
partnersService
;
/**
* 列表
*/
@RequestMapping
(
"/list"
)
// @RequiresPermissions("manage:partners:list")
public
R
list
(
@RequestParam
Map
<
String
,
Object
>
params
){
Page
<
PartnersEntity
>
page
=
this
.
partnersService
.
selectPartnersList
(
params
,
new
Page
(
Integer
.
valueOf
(
params
.
get
(
"page"
).
toString
()),
Integer
.
valueOf
(
params
.
get
(
"limit"
).
toString
())));
PageUtils
pageUtils
=
new
PageUtils
(
page
);
return
R
.
ok
().
put
(
"page"
,
pageUtils
);
}
/**
* 信息
*/
@RequestMapping
(
"/info/{id}"
)
// @RequiresPermissions("manage:partners:info")
public
R
info
(
@PathVariable
(
"id"
)
Integer
id
){
PartnersEntity
partners
=
partnersService
.
getById
(
id
);
return
R
.
ok
().
put
(
"partners"
,
partners
);
}
/**
* 保存
*/
@PostMapping
(
"/save"
)
// @RequiresPermissions("manage:partners:save")
public
R
save
(
@RequestBody
PartnersEntity
partners
){
partners
.
setEditor
(
getUser
().
getUsername
());
partners
.
setLasteditor
(
getUser
().
getUsername
());
partners
.
setRegisterdate
(
new
Date
());
partners
.
setUpdatedate
(
new
Date
());
partnersService
.
save
(
partners
);
return
R
.
ok
(
"新增成功!"
);
}
/**
* 修改
*/
@PostMapping
(
"/update"
)
// @RequiresPermissions("manage:partners:update")
public
R
update
(
@RequestBody
PartnersEntity
partners
){
partners
.
setEditor
(
getUser
().
getUsername
());
partners
.
setLasteditor
(
getUser
().
getUsername
());
partners
.
setUpdatedate
(
new
Date
());
partnersService
.
updateById
(
partners
);
return
R
.
ok
(
"修改成功!"
);
}
/**
* 删除
*/
@PostMapping
(
"/delete"
)
// @RequiresPermissions("manage:partners:delete")
public
R
delete
(
@RequestBody
List
<
Long
>
ids
){
try
{
R
r
=
this
.
partnersService
.
deletePartners
(
ids
,
getUser
());
return
r
;
}
catch
(
Exception
e
)
{
log
.
error
(
"delete error:"
,
e
);
return
R
.
error
(
e
.
getMessage
());
}
}
/**
* 审核
*/
@PostMapping
(
"/verifyPartners"
)
// @RequiresPermissions("manage:partners:delete")
public
R
verifyPartners
(
@RequestBody
PartnersEntity
partnersEntity
){
try
{
R
r
=
this
.
partnersService
.
verifyPartners
(
partnersEntity
,
getUser
());
return
r
;
}
catch
(
Exception
e
)
{
log
.
error
(
"verifyPartners error:"
,
e
);
return
R
.
error
(
e
.
getMessage
());
}
}
}
src/main/java/io/office/modules/manage/controller/PcategoryController.java
View file @
5aea37e4
package
io
.
office
.
modules
.
manage
.
controller
;
package
io
.
office
.
modules
.
manage
.
controller
;
import
java.util.Arrays
;
import
java.util.Arrays
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Map
;
import
io.office.modules.sys.controller.AbstractController
;
import
io.office.modules.sys.controller.AbstractController
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.shiro.authz.annotation.RequiresPermissions
;
import
org.apache.shiro.authz.annotation.RequiresPermissions
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.PathVariable
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.bind.annotation.RestController
;
import
io.office.modules.manage.entity.PcategoryEntity
;
import
io.office.modules.manage.entity.PcategoryEntity
;
import
io.office.modules.manage.service.PcategoryService
;
import
io.office.modules.manage.service.PcategoryService
;
...
@@ -41,7 +38,6 @@ public class PcategoryController extends AbstractController {
...
@@ -41,7 +38,6 @@ public class PcategoryController extends AbstractController {
// @RequiresPermissions("manage:pcategory:list")
// @RequiresPermissions("manage:pcategory:list")
public
R
list
(
@RequestParam
Map
<
String
,
Object
>
params
){
public
R
list
(
@RequestParam
Map
<
String
,
Object
>
params
){
PageUtils
page
=
pcategoryService
.
queryPage
(
params
);
PageUtils
page
=
pcategoryService
.
queryPage
(
params
);
return
R
.
ok
().
put
(
"page"
,
page
);
return
R
.
ok
().
put
(
"page"
,
page
);
}
}
...
@@ -97,4 +93,11 @@ public class PcategoryController extends AbstractController {
...
@@ -97,4 +93,11 @@ public class PcategoryController extends AbstractController {
return
R
.
ok
();
return
R
.
ok
();
}
}
@GetMapping
(
"/getCategoryList"
)
public
R
getCategoryList
(
@RequestParam
Map
<
String
,
Object
>
params
){
List
<
PcategoryEntity
>
list
=
this
.
pcategoryService
.
getCategoryList
(
params
);
return
R
.
ok
().
put
(
"list"
,
list
);
}
}
}
src/main/java/io/office/modules/manage/controller/ProductController.java
0 → 100644
View file @
5aea37e4
package
io
.
office
.
modules
.
manage
.
controller
;
import
java.util.Arrays
;
import
java.util.List
;
import
java.util.Map
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
io.office.modules.manage.entity.NewsEntity
;
import
io.office.modules.sys.controller.AbstractController
;
import
io.swagger.models.auth.In
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.shiro.authz.annotation.RequiresPermissions
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.*
;
import
io.office.modules.manage.entity.ProductEntity
;
import
io.office.modules.manage.service.ProductService
;
import
io.office.common.utils.PageUtils
;
import
io.office.common.utils.R
;
/**
* 商品管理
*
* @author rkl
* @email
* @date 2021-11-14 22:56:51
*/
@RestController
@RequestMapping
(
"/product"
)
@Slf4j
public
class
ProductController
extends
AbstractController
{
@Autowired
private
ProductService
productService
;
/**
* 列表
*/
@RequestMapping
(
"/list"
)
// @RequiresPermissions("manage:product:list")
public
R
list
(
@RequestParam
Map
<
String
,
Object
>
params
){
Page
<
ProductEntity
>
page
=
this
.
productService
.
selectProductList
(
params
,
new
Page
(
Integer
.
valueOf
(
params
.
get
(
"page"
).
toString
()),
Integer
.
valueOf
(
params
.
get
(
"limit"
).
toString
())));
PageUtils
pageUtils
=
new
PageUtils
(
page
);
return
R
.
ok
().
put
(
"page"
,
pageUtils
);
}
/**
* 信息
*/
@RequestMapping
(
"/info/{id}"
)
// @RequiresPermissions("manage:product:info")
public
R
info
(
@PathVariable
(
"id"
)
Integer
id
){
ProductEntity
product
=
productService
.
getById
(
id
);
return
R
.
ok
().
put
(
"product"
,
product
);
}
/**
* 保存
*/
@RequestMapping
(
"/save"
)
// @RequiresPermissions("manage:product:save")
public
R
save
(
@RequestBody
ProductEntity
product
){
try
{
R
r
=
this
.
productService
.
insertProduct
(
product
,
getUser
());
return
r
;
}
catch
(
Exception
e
)
{
log
.
error
(
"save error:"
,
e
);
return
R
.
error
(
e
.
getMessage
());
}
}
/**
* 修改
*/
@RequestMapping
(
"/update"
)
// @RequiresPermissions("manage:product:update")
public
R
update
(
@RequestBody
ProductEntity
product
){
productService
.
updateById
(
product
);
return
R
.
ok
(
"修改成功!"
);
}
/**
* 删除
*/
@RequestMapping
(
"/delete"
)
// @RequiresPermissions("manage:product:delete")
public
R
delete
(
@RequestBody
List
<
Long
>
ids
){
try
{
R
r
=
this
.
productService
.
deleteProduct
(
ids
,
getUser
());
return
r
;
}
catch
(
Exception
e
)
{
log
.
error
(
"delete error:"
,
e
);
return
R
.
error
(
e
.
getMessage
());
}
}
/**
* 审核
*/
@PostMapping
(
"/verifyProduct"
)
// @RequiresPermissions("manage:news:verify")
public
R
verify
(
@RequestBody
ProductEntity
product
)
{
try
{
R
r
=
this
.
productService
.
verifyProduct
(
product
,
getUser
());
return
r
;
}
catch
(
Exception
e
)
{
log
.
error
(
"verifyProduct error:"
,
e
);
return
R
.
error
(
e
.
getMessage
());
}
}
}
src/main/java/io/office/modules/manage/dao/GlossaryDao.java
0 → 100644
View file @
5aea37e4
package
io
.
office
.
modules
.
manage
.
dao
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
io.office.modules.manage.entity.GlossaryEntity
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Param
;
import
java.util.List
;
import
java.util.Map
;
/**
* ${comments}
*
* @author wudi
* @email
* @date 2021-11-15 18:29:59
*/
@Mapper
public
interface
GlossaryDao
extends
BaseMapper
<
GlossaryEntity
>
{
List
<
GlossaryEntity
>
selectGlossaryList
(
@Param
(
"params"
)
Map
<
String
,
Object
>
params
,
Page
page
);
}
src/main/java/io/office/modules/manage/dao/PartnersDao.java
0 → 100644
View file @
5aea37e4
package
io
.
office
.
modules
.
manage
.
dao
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
io.office.modules.manage.entity.PartnersEntity
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Param
;
import
java.util.List
;
import
java.util.Map
;
/**
* 提供商管理
*
* @author rkl
* @email
* @date 2021-11-16 08:59:11
*/
@Mapper
public
interface
PartnersDao
extends
BaseMapper
<
PartnersEntity
>
{
List
<
PartnersEntity
>
selectPartnersList
(
@Param
(
"params"
)
Map
<
String
,
Object
>
params
,
Page
page
);
}
src/main/java/io/office/modules/manage/dao/ProductDao.java
0 → 100644
View file @
5aea37e4
package
io
.
office
.
modules
.
manage
.
dao
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
io.office.modules.manage.entity.ProductEntity
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Param
;
import
java.util.List
;
import
java.util.Map
;
/**
* ${comments}
*
* @author rkl
* @email
* @date 2021-11-14 22:56:51
*/
@Mapper
public
interface
ProductDao
extends
BaseMapper
<
ProductEntity
>
{
List
<
ProductEntity
>
selectProductList
(
@Param
(
"params"
)
Map
<
String
,
Object
>
params
,
Page
page
);
}
src/main/java/io/office/modules/manage/entity/GlossaryEntity.java
0 → 100644
View file @
5aea37e4
package
io
.
office
.
modules
.
manage
.
entity
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
java.io.Serializable
;
import
java.util.Date
;
import
lombok.Data
;
/**
* ${comments}
*
* @author rkl
* @email
* @date 2021-11-15 18:29:59
*/
@Data
@TableName
(
"glossary"
)
public
class
GlossaryEntity
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
/**
* $column.comments
*/
@TableId
private
Integer
id
;
/**
* $column.comments
*/
private
String
titleEn
;
/**
* $column.comments
*/
private
String
titleCn
;
/**
* $column.comments
*/
private
String
keyword
;
/**
* $column.comments
*/
private
String
brief
;
/**
* $column.comments
*/
private
Date
releasedate
;
/**
* $column.comments
*/
private
Date
updatedate
;
/**
* $column.comments
*/
private
String
author
;
/**
* $column.comments
*/
private
String
content
;
/**
* $column.comments
*/
private
Integer
hits
;
/**
* $column.comments
*/
private
String
editor
;
/**
* $column.comments
*/
private
String
lasteditor
;
}
src/main/java/io/office/modules/manage/entity/PartnersEntity.java
0 → 100644
View file @
5aea37e4
package
io
.
office
.
modules
.
manage
.
entity
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
java.io.Serializable
;
import
java.util.Date
;
import
lombok.Data
;
/**
* 提供商服务
*
* @author rkl
* @email
* @date 2021-11-16 08:59:11
*/
@Data
@TableName
(
"Partners"
)
public
class
PartnersEntity
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
/**
* $column.comments
*/
@TableId
private
Integer
id
;
/**
* $column.comments
*/
private
String
firmname
;
/**
* $column.comments
*/
private
String
brief
;
/**
* $column.comments
*/
private
String
pic
;
/**
* $column.comments
*/
private
String
technology
;
/**
* $column.comments
*/
private
String
service
;
/**
* $column.comments
*/
private
String
site
;
/**
* $column.comments
*/
private
String
name
;
/**
* $column.comments
*/
private
String
phone
;
/**
* $column.comments
*/
private
String
email
;
/**
* $column.comments
*/
private
Date
registerdate
;
/**
* $column.comments
*/
private
Date
updatedate
;
/**
* $column.comments
*/
private
String
editor
;
/**
* $column.comments
*/
private
String
lasteditor
;
/**
* $column.comments
*/
private
Integer
levels
;
/**
* $column.comments
*/
private
Integer
status
;
/**
* $column.comments
*/
private
String
auditor
;
/**
* $column.comments
*/
private
Date
checkdate
;
}
src/main/java/io/office/modules/manage/entity/ProductEntity.java
0 → 100644
View file @
5aea37e4
package
io
.
office
.
modules
.
manage
.
entity
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
java.math.BigDecimal
;
import
java.io.Serializable
;
import
java.util.Date
;
import
lombok.Data
;
/**
* 商品管理
*
* @author rkl
* @email
* @date 2021-11-14 22:56:51
*/
@Data
@TableName
(
"product"
)
public
class
ProductEntity
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
/**
* $column.comments
*/
@TableId
private
Integer
id
;
/**
* $column.comments
*/
private
String
prename
;
/**
* $column.comments
*/
private
String
company
;
/**
* $column.comments
*/
private
String
intro
;
/**
* $column.comments
*/
private
String
predate
;
/**
* $column.comments
*/
private
BigDecimal
price
;
/**
* $column.comments
*/
private
String
pretype
;
/**
* $column.comments
*/
private
String
other
;
/**
* $column.comments
*/
private
String
graph2
;
/**
* $column.comments
*/
private
String
addlink
;
/**
* $column.comments
*/
private
String
prestock
;
/**
* $column.comments
*/
private
String
graph
;
/**
* $column.comments
*/
private
String
description
;
/**
* $column.comments
*/
private
String
remarks
;
/**
* $column.comments
*/
private
String
name
;
/**
* $column.comments
*/
private
String
introduce
;
/**
* $column.comments
*/
private
String
productdate
;
/**
* $column.comments
*/
private
Integer
score
;
/**
* $column.comments
*/
private
String
grade
;
/**
* $column.comments
*/
private
String
photo
;
/**
* $column.comments
*/
private
Integer
recommend
;
/**
* $column.comments
*/
private
Integer
solded
;
/**
* $column.comments
*/
private
Integer
viewnum
;
/**
* $column.comments
*/
private
float
discount
;
/**
* $column.comments
*/
private
Integer
sortsid
;
/**
* $column.comments
*/
private
Integer
categoryid
;
/**
* $column.comments
*/
private
String
pic
;
/**
* $column.comments
*/
private
String
makein
;
/**
* $column.comments
*/
private
Date
adddate
;
/**
* $column.comments
*/
private
Integer
ranknum
;
/**
* $column.comments
*/
private
Float
vipprice
;
/**
* $column.comments
*/
private
String
amount
;
/**
* $column.comments
*/
private
String
stock
;
/**
* $column.comments
*/
private
String
link
;
/**
* $column.comments
*/
private
String
mark
;
/**
* $column.comments
*/
private
String
type
;
/**
* $column.comments
*/
private
Integer
levels
;
/**
* $column.comments
*/
private
String
author
;
/**
* $column.comments
*/
private
Integer
status
;
/**
* $column.comments
*/
private
String
auditor
;
}
src/main/java/io/office/modules/manage/service/GlossaryService.java
0 → 100644
View file @
5aea37e4
package
io
.
office
.
modules
.
manage
.
service
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
io.office.common.utils.PageUtils
;
import
io.office.modules.manage.entity.GlossaryEntity
;
import
io.office.modules.manage.entity.ProductEntity
;
import
java.util.Map
;
/**
* ${comments}
*
* @author wudi
* @email
* @date 2021-11-15 18:29:59
*/
public
interface
GlossaryService
extends
IService
<
GlossaryEntity
>
{
PageUtils
queryPage
(
Map
<
String
,
Object
>
params
);
Page
<
GlossaryEntity
>
selectGlossaryList
(
Map
<
String
,
Object
>
params
,
Page
page
);
}
src/main/java/io/office/modules/manage/service/PartnersService.java
0 → 100644
View file @
5aea37e4
package
io
.
office
.
modules
.
manage
.
service
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
io.office.common.utils.PageUtils
;
import
io.office.common.utils.R
;
import
io.office.modules.manage.entity.PartnersEntity
;
import
io.office.modules.sys.entity.SysUserEntity
;
import
java.util.List
;
import
java.util.Map
;
/**
* 提供商管理
*
* @author rkl
* @email
* @date 2021-11-16 08:59:11
*/
public
interface
PartnersService
extends
IService
<
PartnersEntity
>
{
PageUtils
queryPage
(
Map
<
String
,
Object
>
params
);
R
deletePartners
(
List
<
Long
>
ids
,
SysUserEntity
user
);
Page
<
PartnersEntity
>
selectPartnersList
(
Map
<
String
,
Object
>
params
,
Page
page
);
R
verifyPartners
(
PartnersEntity
partnersEntity
,
SysUserEntity
user
);
}
src/main/java/io/office/modules/manage/service/PcategoryService.java
View file @
5aea37e4
...
@@ -6,6 +6,7 @@ import io.office.common.utils.R;
...
@@ -6,6 +6,7 @@ import io.office.common.utils.R;
import
io.office.modules.manage.entity.PcategoryEntity
;
import
io.office.modules.manage.entity.PcategoryEntity
;
import
io.office.modules.sys.entity.SysUserEntity
;
import
io.office.modules.sys.entity.SysUserEntity
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Map
;
/**
/**
...
@@ -21,5 +22,7 @@ public interface PcategoryService extends IService<PcategoryEntity> {
...
@@ -21,5 +22,7 @@ public interface PcategoryService extends IService<PcategoryEntity> {
R
insertPcategory
(
PcategoryEntity
pcategory
,
SysUserEntity
user
);
R
insertPcategory
(
PcategoryEntity
pcategory
,
SysUserEntity
user
);
R
updatePcategory
(
PcategoryEntity
pcategory
,
SysUserEntity
user
);
R
updatePcategory
(
PcategoryEntity
pcategory
,
SysUserEntity
user
);
List
<
PcategoryEntity
>
getCategoryList
(
Map
<
String
,
Object
>
params
);
}
}
src/main/java/io/office/modules/manage/service/ProductService.java
0 → 100644
View file @
5aea37e4
package
io
.
office
.
modules
.
manage
.
service
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
io.office.common.utils.PageUtils
;
import
io.office.common.utils.R
;
import
io.office.modules.manage.entity.NewsEntity
;
import
io.office.modules.manage.entity.ProductEntity
;
import
io.office.modules.sys.entity.SysUserEntity
;
import
java.util.List
;
import
java.util.Map
;
/**
* ${comments}
*
* @author rkl
* @email
* @date 2021-11-14 22:56:51
*/
public
interface
ProductService
extends
IService
<
ProductEntity
>
{
PageUtils
queryPage
(
Map
<
String
,
Object
>
params
);
R
insertProduct
(
ProductEntity
product
,
SysUserEntity
user
);
R
deleteProduct
(
List
<
Long
>
ids
,
SysUserEntity
user
);
R
verifyProduct
(
ProductEntity
product
,
SysUserEntity
user
);
Page
<
ProductEntity
>
selectProductList
(
Map
<
String
,
Object
>
params
,
Page
page
);
}
src/main/java/io/office/modules/manage/service/impl/GlossaryServiceImpl.java
0 → 100644
View file @
5aea37e4
package
io
.
office
.
modules
.
manage
.
service
.
impl
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
io.office.modules.manage.entity.ProductEntity
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
java.util.List
;
import
java.util.Map
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
io.office.common.utils.PageUtils
;
import
io.office.common.utils.Query
;
import
io.office.modules.manage.dao.GlossaryDao
;
import
io.office.modules.manage.entity.GlossaryEntity
;
import
io.office.modules.manage.service.GlossaryService
;
@Service
(
"glossaryService"
)
public
class
GlossaryServiceImpl
extends
ServiceImpl
<
GlossaryDao
,
GlossaryEntity
>
implements
GlossaryService
{
@Autowired
GlossaryDao
glossaryDao
;
@Override
public
PageUtils
queryPage
(
Map
<
String
,
Object
>
params
)
{
IPage
<
GlossaryEntity
>
page
=
this
.
page
(
new
Query
<
GlossaryEntity
>().
getPage
(
params
),
new
QueryWrapper
<
GlossaryEntity
>()
);
return
new
PageUtils
(
page
);
}
@Override
public
Page
<
GlossaryEntity
>
selectGlossaryList
(
Map
<
String
,
Object
>
params
,
Page
page
)
{
List
<
GlossaryEntity
>
list
=
this
.
glossaryDao
.
selectGlossaryList
(
params
,
page
);
page
.
setRecords
(
list
);
return
page
;
}
}
\ No newline at end of file
src/main/java/io/office/modules/manage/service/impl/PartnersServiceImpl.java
0 → 100644
View file @
5aea37e4
package
io
.
office
.
modules
.
manage
.
service
.
impl
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
io.office.common.utils.R
;
import
io.office.modules.sys.entity.SysUserEntity
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.Map
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
io.office.common.utils.PageUtils
;
import
io.office.common.utils.Query
;
import
io.office.modules.manage.dao.PartnersDao
;
import
io.office.modules.manage.entity.PartnersEntity
;
import
io.office.modules.manage.service.PartnersService
;
@Service
(
"partnersService"
)
public
class
PartnersServiceImpl
extends
ServiceImpl
<
PartnersDao
,
PartnersEntity
>
implements
PartnersService
{
@Autowired
PartnersDao
partnersDao
;
@Override
public
PageUtils
queryPage
(
Map
<
String
,
Object
>
params
)
{
IPage
<
PartnersEntity
>
page
=
this
.
page
(
new
Query
<
PartnersEntity
>().
getPage
(
params
),
new
QueryWrapper
<
PartnersEntity
>()
);
return
new
PageUtils
(
page
);
}
@Override
public
R
deletePartners
(
List
<
Long
>
ids
,
SysUserEntity
user
)
{
PartnersEntity
partnersEntity
=
new
PartnersEntity
();
partnersEntity
.
setUpdatedate
(
new
Date
());
partnersEntity
.
setEditor
(
user
.
getUsername
());
partnersEntity
.
setLasteditor
(
user
.
getUsername
());
partnersEntity
.
setLevels
(
0
);
QueryWrapper
<
PartnersEntity
>
partnersEntityQueryWrapper
=
new
QueryWrapper
<>();
partnersEntityQueryWrapper
.
in
(
"id"
,
ids
);
int
update
=
this
.
baseMapper
.
update
(
partnersEntity
,
partnersEntityQueryWrapper
);
if
(
update
>
0
){
return
R
.
ok
(
"删除成功!"
);
}
else
{
return
R
.
error
(
"删除失败!"
);
}
}
@Override
public
Page
<
PartnersEntity
>
selectPartnersList
(
Map
<
String
,
Object
>
params
,
Page
page
)
{
List
<
PartnersEntity
>
list
=
this
.
partnersDao
.
selectPartnersList
(
params
,
page
);
page
.
setRecords
(
list
);
return
page
;
}
@Override
public
R
verifyPartners
(
PartnersEntity
partnersEntity
,
SysUserEntity
user
)
{
QueryWrapper
<
PartnersEntity
>
partnersEntityQueryWrapper
=
new
QueryWrapper
<>();
partnersEntityQueryWrapper
.
in
(
"id"
,
partnersEntity
.
getId
());
partnersEntity
.
setAuditor
(
user
.
getUsername
());
partnersEntity
.
setCheckdate
(
new
Date
());
int
update
=
this
.
baseMapper
.
update
(
partnersEntity
,
partnersEntityQueryWrapper
);
if
(
update
>
0
){
return
R
.
ok
(
"审核成功!"
);
}
else
{
return
R
.
error
(
"审核失败!"
);
}
}
}
\ No newline at end of file
src/main/java/io/office/modules/manage/service/impl/PcategoryServiceImpl.java
View file @
5aea37e4
...
@@ -6,6 +6,7 @@ import io.office.modules.sys.entity.SysUserEntity;
...
@@ -6,6 +6,7 @@ import io.office.modules.sys.entity.SysUserEntity;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
java.util.Date
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Map
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
...
@@ -53,4 +54,11 @@ public class PcategoryServiceImpl extends ServiceImpl<PcategoryDao, PcategoryEnt
...
@@ -53,4 +54,11 @@ public class PcategoryServiceImpl extends ServiceImpl<PcategoryDao, PcategoryEnt
}
}
}
}
@Override
public
List
<
PcategoryEntity
>
getCategoryList
(
Map
<
String
,
Object
>
params
)
{
QueryWrapper
<
PcategoryEntity
>
newsEntityQueryWrapper
=
new
QueryWrapper
<>();
List
<
PcategoryEntity
>
list
=
this
.
baseMapper
.
selectList
(
newsEntityQueryWrapper
);
return
list
;
}
}
}
\ No newline at end of file
src/main/java/io/office/modules/manage/service/impl/ProductServiceImpl.java
0 → 100644
View file @
5aea37e4
package
io
.
office
.
modules
.
manage
.
service
.
impl
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
io.office.common.utils.R
;
import
io.office.modules.manage.controller.ProductController
;
import
io.office.modules.manage.entity.NewsEntity
;
import
io.office.modules.sys.entity.SysUserEntity
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.Map
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
io.office.common.utils.PageUtils
;
import
io.office.common.utils.Query
;
import
io.office.modules.manage.dao.ProductDao
;
import
io.office.modules.manage.entity.ProductEntity
;
import
io.office.modules.manage.service.ProductService
;
@Service
(
"productService"
)
public
class
ProductServiceImpl
extends
ServiceImpl
<
ProductDao
,
ProductEntity
>
implements
ProductService
{
@Autowired
ProductDao
productDao
;
@Override
public
PageUtils
queryPage
(
Map
<
String
,
Object
>
params
)
{
IPage
<
ProductEntity
>
page
=
this
.
page
(
new
Query
<
ProductEntity
>().
getPage
(
params
),
new
QueryWrapper
<
ProductEntity
>()
);
return
new
PageUtils
(
page
);
}
@Override
public
R
insertProduct
(
ProductEntity
product
,
SysUserEntity
user
)
{
product
.
setAdddate
(
new
Date
());
int
insert
=
baseMapper
.
insert
(
product
);
if
(
insert
>
0
){
return
R
.
ok
(
"新增成功!"
);
}
else
{
return
R
.
error
(
"新增失败!"
);
}
}
@Override
public
R
deleteProduct
(
List
<
Long
>
ids
,
SysUserEntity
user
)
{
ProductEntity
product
=
new
ProductEntity
();
product
.
setLevels
(
0
);
QueryWrapper
<
ProductEntity
>
newsEntityQueryWrapper
=
new
QueryWrapper
<>();
newsEntityQueryWrapper
.
in
(
"id"
,
ids
);
int
delete
=
baseMapper
.
update
(
product
,
newsEntityQueryWrapper
);
if
(
delete
>
0
){
return
R
.
ok
(
"删除成功!"
);
}
else
{
return
R
.
error
(
"删除失败!"
);
}
}
@Override
public
R
verifyProduct
(
ProductEntity
product
,
SysUserEntity
user
)
{
product
.
setAuditor
(
user
.
getUsername
());
QueryWrapper
<
ProductEntity
>
newsEntityQueryWrapper
=
new
QueryWrapper
<>();
newsEntityQueryWrapper
.
in
(
"id"
,
product
.
getId
());
int
delete
=
baseMapper
.
update
(
product
,
newsEntityQueryWrapper
);
if
(
delete
>
0
){
return
R
.
ok
(
"审核成功!"
);
}
else
{
return
R
.
error
(
"审核失败!"
);
}
}
@Override
public
Page
<
ProductEntity
>
selectProductList
(
Map
<
String
,
Object
>
params
,
Page
page
)
{
List
<
ProductEntity
>
list
=
this
.
productDao
.
selectProductList
(
params
,
page
);
page
.
setRecords
(
list
);
return
page
;
}
}
\ No newline at end of file
src/main/resources/mapper/manage/GlossaryDao.xml
0 → 100644
View file @
5aea37e4
<?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=
"io.office.modules.manage.dao.GlossaryDao"
>
<!-- 可根据自己的需求,是否要使用 -->
<resultMap
type=
"io.office.modules.manage.entity.GlossaryEntity"
id=
"glossaryMap"
>
<result
property=
"id"
column=
"ID"
/>
<result
property=
"titleEn"
column=
"title_EN"
/>
<result
property=
"titleCn"
column=
"title_CN"
/>
<result
property=
"keyword"
column=
"keyword"
/>
<result
property=
"brief"
column=
"brief"
/>
<result
property=
"releasedate"
column=
"releasedate"
/>
<result
property=
"updatedate"
column=
"updatedate"
/>
<result
property=
"author"
column=
"author"
/>
<result
property=
"content"
column=
"content"
/>
<result
property=
"hits"
column=
"hits"
/>
<result
property=
"editor"
column=
"editor"
/>
<result
property=
"lasteditor"
column=
"lasteditor"
/>
</resultMap>
<select
id=
"selectGlossaryList"
resultMap=
"glossaryMap"
parameterType=
"java.util.Map"
>
select * from glossary t
where 1=1
<if
test=
"params.titleCn !='' and params.titleCn !=null"
>
<choose>
<when
test=
"params.titleCn == '中文标题'"
>
and t.title_CN like concat('%',#{params.keyword},'%')
</when>
<otherwise>
and t.title_EN like concat('%',#{params.keyword},'%')
</otherwise>
</choose>
</if>
order by id desc
</select>
</mapper>
\ No newline at end of file
src/main/resources/mapper/manage/PartnersDao.xml
0 → 100644
View file @
5aea37e4
<?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=
"io.office.modules.manage.dao.PartnersDao"
>
<!-- 可根据自己的需求,是否要使用 -->
<resultMap
type=
"io.office.modules.manage.entity.PartnersEntity"
id=
"partnersMap"
>
<result
property=
"id"
column=
"id"
/>
<result
property=
"firmname"
column=
"firmname"
/>
<result
property=
"brief"
column=
"brief"
/>
<result
property=
"pic"
column=
"pic"
/>
<result
property=
"technology"
column=
"technology"
/>
<result
property=
"service"
column=
"service"
/>
<result
property=
"site"
column=
"site"
/>
<result
property=
"name"
column=
"name"
/>
<result
property=
"phone"
column=
"phone"
/>
<result
property=
"email"
column=
"email"
/>
<result
property=
"registerdate"
column=
"registerdate"
/>
<result
property=
"updatedate"
column=
"updatedate"
/>
<result
property=
"editor"
column=
"editor"
/>
<result
property=
"lasteditor"
column=
"lasteditor"
/>
<result
property=
"levels"
column=
"levels"
/>
<result
property=
"status"
column=
"status"
/>
<result
property=
"auditor"
column=
"auditor"
/>
<result
property=
"checkdate"
column=
"checkdate"
/>
</resultMap>
<select
id=
"selectPartnersList"
resultMap=
"partnersMap"
parameterType=
"java.util.Map"
>
select * from Partners where 1=1
<choose>
<when
test=
"params.levels == 0"
>
AND levels = #{params.levels}
</when>
<otherwise>
AND levels > 0
</otherwise>
</choose>
<if
test=
"params.firmname !=null and params.firmname !=''"
>
and firmname like concat('%',#{params.firmname},'%')
</if>
<if
test=
"params.editor !=null and params.editor !=''"
>
and editor = #{params.editor}
</if>
<if
test=
"params.status !=null and params.status !=''"
>
and status = #{params.status}
</if>
<if
test=
"params.technology !=null and params.technology !=''"
>
and technology = #{params.technology}
</if>
<if
test=
"params.service !=null and params.service !=''"
>
and service = #{params.service}
</if>
<if
test=
"params.levels != null"
>
and levels = #{params.levels}
</if>
<if
test=
"params.releaseTimeStart !=null and params.releaseTimeEnd !=null"
>
and registerdate BETWEEN #{params.releaseTimeStart} AND #{params.releaseTimeEnd}
</if>
<if
test=
"params.updateTimeStart !=null and params.updateTimeEnd !=null"
>
and updatedate BETWEEN #{params.updateTimeStart} AND #{params.updateTimeEnd}
</if>
order by id desc
</select>
</mapper>
\ No newline at end of file
src/main/resources/mapper/manage/ProductDao.xml
0 → 100644
View file @
5aea37e4
<?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=
"io.office.modules.manage.dao.ProductDao"
>
<!-- 可根据自己的需求,是否要使用 -->
<resultMap
type=
"io.office.modules.manage.entity.ProductEntity"
id=
"productMap"
>
<result
property=
"id"
column=
"id"
/>
<result
property=
"prename"
column=
"prename"
/>
<result
property=
"company"
column=
"company"
/>
<result
property=
"intro"
column=
"intro"
/>
<result
property=
"predate"
column=
"predate"
/>
<result
property=
"price"
column=
"price"
/>
<result
property=
"pretype"
column=
"pretype"
/>
<result
property=
"other"
column=
"other"
/>
<result
property=
"graph2"
column=
"graph2"
/>
<result
property=
"addlink"
column=
"addlink"
/>
<result
property=
"prestock"
column=
"prestock"
/>
<result
property=
"graph"
column=
"graph"
/>
<result
property=
"description"
column=
"description"
/>
<result
property=
"remarks"
column=
"remarks"
/>
<result
property=
"name"
column=
"name"
/>
<result
property=
"introduce"
column=
"introduce"
/>
<result
property=
"productdate"
column=
"productdate"
/>
<result
property=
"score"
column=
"score"
/>
<result
property=
"grade"
column=
"grade"
/>
<result
property=
"photo"
column=
"photo"
/>
<result
property=
"recommend"
column=
"recommend"
/>
<result
property=
"solded"
column=
"solded"
/>
<result
property=
"viewnum"
column=
"viewnum"
/>
<result
property=
"discount"
column=
"discount"
/>
<result
property=
"sortsid"
column=
"sortsid"
/>
<result
property=
"categoryid"
column=
"categoryid"
/>
<result
property=
"pic"
column=
"pic"
/>
<result
property=
"makein"
column=
"makein"
/>
<result
property=
"adddate"
column=
"adddate"
/>
<result
property=
"ranknum"
column=
"ranknum"
/>
<result
property=
"vipprice"
column=
"vipprice"
/>
<result
property=
"amount"
column=
"amount"
/>
<result
property=
"stock"
column=
"stock"
/>
<result
property=
"link"
column=
"link"
/>
<result
property=
"mark"
column=
"mark"
/>
<result
property=
"type"
column=
"type"
/>
<result
property=
"levels"
column=
"levels"
/>
<result
property=
"author"
column=
"author"
/>
<result
property=
"status"
column=
"status"
/>
<result
property=
"auditor"
column=
"auditor"
/>
</resultMap>
<select
id=
"selectProductList"
resultMap=
"productMap"
parameterType=
"java.util.Map"
>
select a.* from product a left join Pcategory b on a.categoryid=b.categoryid where levels>0
<if
test=
"params.keyword !='' and params.keyword !=null"
>
and a.prename like concat('%',#{params.keyword},'%')
</if>
<if
test=
"params.categoryid !='' and params.categoryid !=null"
>
and a.categoryid =#{params.categoryid}
</if>
order by a.id desc
</select>
</mapper>
\ No newline at end of file
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