Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
server
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
vanke
server
Commits
1cad1abd
Commit
1cad1abd
authored
Jun 17, 2020
by
XiaHou
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
first
parent
fa69d450
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
37 changed files
with
968 additions
and
915 deletions
+968
-915
UmsAdminController.java
...in/java/com/macro/mall/controller/UmsAdminController.java
+6
-0
VankeDepartmentController.java
...acro/mall/controller/vanke/VankeDepartmentController.java
+58
-0
PmsProductAttributeTypeService.java
...om/macro/mall/service/PmsProductAttributeTypeService.java
+0
-8
ProductAttributeGroupService.java
.../com/macro/mall/service/ProductAttributeGroupService.java
+0
-4
PmsProductAttributeTypeServiceImpl.java
...mall/service/impl/PmsProductAttributeTypeServiceImpl.java
+0
-34
ProductAttributeGroupServiceImpl.java
...o/mall/service/impl/ProductAttributeGroupServiceImpl.java
+0
-59
VankeBackLogMapper.java
...c/main/java/com/macro/mall/mapper/VankeBackLogMapper.java
+31
-0
VankeDepartmentMapper.java
...ain/java/com/macro/mall/mapper/VankeDepartmentMapper.java
+31
-0
VankeBackLog.java
...-mbg/src/main/java/com/macro/mall/model/VankeBackLog.java
+87
-0
VankeBackLogExample.java
...c/main/java/com/macro/mall/model/VankeBackLogExample.java
+0
-0
VankeDepartment.java
...g/src/main/java/com/macro/mall/model/VankeDepartment.java
+124
-0
VankeDepartmentExample.java
...ain/java/com/macro/mall/model/VankeDepartmentExample.java
+0
-0
VankeBackLogMapper.xml
...in/resources/com/macro/mall/mapper/VankeBackLogMapper.xml
+212
-0
VankeDepartmentMapper.xml
...resources/com/macro/mall/mapper/VankeDepartmentMapper.xml
+259
-0
OmsChoseProductDao.java
.../java/com/macro/mall/dao/quanxing/OmsChoseProductDao.java
+0
-10
PmsProductAttributeCategoryDao.java
...cro/mall/dao/quanxing/PmsProductAttributeCategoryDao.java
+0
-13
PmsProductSkuValueDao.java
...va/com/macro/mall/dao/quanxing/PmsProductSkuValueDao.java
+0
-31
PmsSupplierAuditDao.java
...java/com/macro/mall/dao/quanxing/PmsSupplierAuditDao.java
+0
-17
PmsSupplierAuditProductDao.java
...m/macro/mall/dao/quanxing/PmsSupplierAuditProductDao.java
+0
-10
PmsProductAttributeGroupDao.java
...all/dao/quanxing/product/PmsProductAttributeGroupDao.java
+0
-58
PmsProductAttributeTypeDao.java
...mall/dao/quanxing/product/PmsProductAttributeTypeDao.java
+0
-14
UmsMemberService.java
.../java/com/macro/mall/service/member/UmsMemberService.java
+0
-15
UmsMemberServiceImpl.java
.../macro/mall/service/member/impl/UmsMemberServiceImpl.java
+0
-119
PmsProductService.java
...ava/com/macro/mall/service/product/PmsProductService.java
+0
-21
PmsProductServiceImpl.java
...acro/mall/service/product/impl/PmsProductServiceImpl.java
+0
-146
IOmsChoseProductService.java
.../macro/mall/service/quanxing/IOmsChoseProductService.java
+0
-33
IPmsSupplierAuditService.java
...macro/mall/service/quanxing/IPmsSupplierAuditService.java
+0
-47
PmsProductAttributeCategoryService.java
.../service/quanxing/PmsProductAttributeCategoryService.java
+0
-38
OmsChoseProductServiceImpl.java
...all/service/quanxing/impl/OmsChoseProductServiceImpl.java
+0
-77
PmsProductAttributeCategoryServiceImpl.java
...quanxing/impl/PmsProductAttributeCategoryServiceImpl.java
+0
-161
PmsSupplierAuditServiceImpl.java
...ll/service/quanxing/impl/PmsSupplierAuditServiceImpl.java
+0
-0
UmsAdminService.java
...n/java/com/macro/mall/service/system/UmsAdminService.java
+2
-0
UmsAdminServiceImpl.java
...m/macro/mall/service/system/impl/UmsAdminServiceImpl.java
+16
-0
IVankeBackLogService.java
...va/com/macro/mall/service/vanke/IVankeBackLogService.java
+16
-0
IVankeDepartmentSerive.java
.../com/macro/mall/service/vanke/IVankeDepartmentSerive.java
+32
-0
VankeBackLogServiceImpl.java
...acro/mall/service/vanke/impl/VankeBackLogServiceImpl.java
+25
-0
VankeDepartmentSeriveImpl.java
...ro/mall/service/vanke/impl/VankeDepartmentSeriveImpl.java
+69
-0
No files found.
mall-admin/src/main/java/com/macro/mall/controller/UmsAdminController.java
View file @
1cad1abd
...
...
@@ -3,6 +3,7 @@ package com.macro.mall.controller;
import
com.macro.mall.common.api.CommonPage
;
import
com.macro.mall.common.api.CommonResult
;
import
com.macro.mall.core.annotion.BussinessLog
;
import
com.macro.mall.domain.MemberDetails
;
import
com.macro.mall.dto.AdminUpdateParam
;
import
com.macro.mall.dto.UmsAdminLoginParam
;
import
com.macro.mall.domain.dto.UmsAdminParam
;
...
...
@@ -13,8 +14,12 @@ import com.macro.mall.service.UmsRoleService;
import
com.macro.mall.service.system.UmsAdminService
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
org.junit.Test
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.security.core.Authentication
;
import
org.springframework.security.core.context.SecurityContext
;
import
org.springframework.security.core.context.SecurityContextHolder
;
import
org.springframework.stereotype.Controller
;
import
org.springframework.validation.BindingResult
;
import
org.springframework.web.bind.annotation.*
;
...
...
@@ -210,4 +215,5 @@ public class UmsAdminController {
List
<
UmsPermission
>
permissionList
=
adminService
.
getPermissionList
(
adminId
);
return
CommonResult
.
success
(
permissionList
);
}
}
mall-admin/src/main/java/com/macro/mall/controller/vanke/VankeDepartmentController.java
0 → 100644
View file @
1cad1abd
package
com
.
macro
.
mall
.
controller
.
vanke
;
import
com.macro.mall.common.api.CommonPage
;
import
com.macro.mall.common.api.CommonResult
;
import
com.macro.mall.model.UmsAdmin
;
import
com.macro.mall.model.VankeDepartment
;
import
com.macro.mall.model.common.ResultMsg
;
import
com.macro.mall.service.vanke.IVankeDepartmentSerive
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiParam
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Controller
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMethod
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.bind.annotation.ResponseBody
;
import
java.util.List
;
@Controller
@Api
(
tags
=
"万科后台_部门相关接口"
,
description
=
"部门控制器"
)
@RequestMapping
(
"/admin"
)
public
class
VankeDepartmentController
{
@Autowired
private
IVankeDepartmentSerive
vankeDepartmentSerive
;
@ApiOperation
(
"万科后台_部门分页操作"
)
@RequestMapping
(
value
=
"/list"
,
method
=
RequestMethod
.
GET
)
@ResponseBody
public
CommonResult
<
CommonPage
<
VankeDepartment
>>
list
(
@ApiParam
(
value
=
"分页页数"
)
@RequestParam
(
value
=
"pageSize"
,
defaultValue
=
"5"
)
Integer
pageSize
,
@ApiParam
(
value
=
"分页大小"
)
@RequestParam
(
value
=
"pageNum"
,
defaultValue
=
"1"
)
Integer
pageNum
)
{
return
CommonResult
.
success
(
CommonPage
.
restPage
(
this
.
vankeDepartmentSerive
.
getPageList
(
pageNum
,
pageSize
)));
}
@ApiOperation
(
"万科后台_部门插入操作"
)
@RequestMapping
(
value
=
"/insertDepartment"
,
method
=
RequestMethod
.
POST
)
@ResponseBody
public
CommonResult
insertDepartment
(
VankeDepartment
vankeDepartment
){
ResultMsg
res
=
this
.
vankeDepartmentSerive
.
insertDepartment
(
vankeDepartment
);
if
(
res
.
isFlag
()){
return
CommonResult
.
success
(
null
,
res
.
getMsg
());
}
return
CommonResult
.
failed
(
res
.
getMsg
());
}
@ApiOperation
(
"万科后台_根据部门id修改一条数据"
)
@RequestMapping
(
value
=
"/insertDepartment"
,
method
=
RequestMethod
.
POST
)
@ResponseBody
public
CommonResult
updateDepartment
(
VankeDepartment
vankeDepartment
){
ResultMsg
res
=
this
.
vankeDepartmentSerive
.
updateDepartment
(
vankeDepartment
);
if
(
res
.
isFlag
()){
return
CommonResult
.
success
(
null
,
res
.
getMsg
());
}
return
CommonResult
.
failed
(
res
.
getMsg
());
}
}
mall-admin/src/main/java/com/macro/mall/service/PmsProductAttributeTypeService.java
View file @
1cad1abd
...
...
@@ -9,18 +9,10 @@ import java.util.List;
public
interface
PmsProductAttributeTypeService
{
int
create
(
String
name
,
Long
attributeCategoryId
);
List
<
PmsAttributeTypeReulst
>
getList
(
Integer
pageSize
,
Integer
pageNum
,
Long
attributeCategoryId
);
int
delete
(
List
<
Long
>
ids
);
int
update
(
PmsProductAttributeType
pmsProductAttributeType
);
PmsProductAttributeType
getUpdateInfo
(
Long
id
);
/**
* 根据分类Id查询
* @param AttributeCategoryId
* @return
*/
List
<
PmsProductAttributeTypeDto
>
getAttributeType
(
Long
AttributeCategoryId
);
}
mall-admin/src/main/java/com/macro/mall/service/ProductAttributeGroupService.java
View file @
1cad1abd
...
...
@@ -10,15 +10,11 @@ import java.util.List;
public
interface
ProductAttributeGroupService
{
int
create
(
PmsProductAttributeGroupParam
pmsProductAttributeGroupParam
);
List
<
PmsAttributeGroupResult
>
getList
(
Long
cid
,
Integer
pageSize
,
Integer
pageNum
,
Long
attributeCategoryId
);
int
update
(
Long
id
,
PmsProductAttributeGroupParam
productAttributeParam
);
PmsProductAttributeGroup
getParamGroup
(
Long
id
);
int
delete
(
List
<
Long
>
ids
);
List
<
AttributeGroupVo
>
paramsList
(
Long
cid
,
Integer
type
,
Long
mchtId
);
int
updateMoveGroup
(
Long
id
,
Long
tagAttributeCategoryId
,
Long
tagAttributeTypeId
);
}
mall-admin/src/main/java/com/macro/mall/service/impl/PmsProductAttributeTypeServiceImpl.java
View file @
1cad1abd
package
com
.
macro
.
mall
.
service
.
impl
;
import
com.github.pagehelper.PageHelper
;
import
com.macro.mall.dao.quanxing.product.PmsProductAttributeGroupDao
;
import
com.macro.mall.dao.quanxing.product.PmsProductAttributeTypeDao
;
import
com.macro.mall.mapper.PmsProductAttributeCategoryMapper
;
import
com.macro.mall.mapper.PmsProductAttributeTypeMapper
;
import
com.macro.mall.model.*
;
import
com.macro.mall.model.dto.quanxing.PmsProductAttributeTypeDto
;
import
com.macro.mall.service.PmsProductAttributeTypeService
;
import
com.macro.mall.service.quanxing.PmsProductAttributeCategoryService
;
import
org.apache.commons.lang.StringUtils
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
...
...
@@ -23,12 +20,6 @@ public class PmsProductAttributeTypeServiceImpl implements PmsProductAttributeTy
private
PmsProductAttributeCategoryMapper
pmsProductAttributeCategoryMapper
;
@Resource
private
PmsProductAttributeTypeMapper
pmsProductAttributeTypeMapper
;
@Resource
private
PmsProductAttributeTypeDao
pmsProductAttributeTypeDao
;
@Resource
private
PmsProductAttributeCategoryService
pmsProductAttributeCategoryService
;
@Resource
private
PmsProductAttributeGroupDao
pmsProductAttributeGroupDao
;
@Override
...
...
@@ -53,17 +44,6 @@ public class PmsProductAttributeTypeServiceImpl implements PmsProductAttributeTy
}
@Override
public
List
<
PmsAttributeTypeReulst
>
getList
(
Integer
pageSize
,
Integer
pageNum
,
Long
attributeCategoryId
)
{
PageHelper
.
startPage
(
pageNum
,
pageSize
);
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
if
(
attributeCategoryId
!=
null
){
List
<
Long
>
attributeCategoryIdList
=
pmsProductAttributeCategoryService
.
getAtributeCategoryIdList
(
attributeCategoryId
);
map
.
put
(
"attributeCategoryIdList"
,
attributeCategoryIdList
);
}
return
pmsProductAttributeTypeDao
.
getList
(
map
);
}
@Override
public
int
delete
(
List
<
Long
>
ids
)
{
PmsProductAttributeTypeExample
example
=
new
PmsProductAttributeTypeExample
();
example
.
createCriteria
().
andIdIn
(
ids
).
andDeleteStatusEqualTo
(
0
);
...
...
@@ -91,18 +71,4 @@ public class PmsProductAttributeTypeServiceImpl implements PmsProductAttributeTy
public
PmsProductAttributeType
getUpdateInfo
(
Long
id
)
{
return
pmsProductAttributeTypeMapper
.
selectByPrimaryKey
(
id
);
}
/**
* 根据分类Id查询
* @param AttributeCategoryId
* @return
*/
public
List
<
PmsProductAttributeTypeDto
>
getAttributeType
(
Long
AttributeCategoryId
){
List
<
PmsProductAttributeTypeDto
>
pmsProductAttributeTypeDtoList
=
this
.
pmsProductAttributeTypeDao
.
selectByAttributeCategoryId
(
AttributeCategoryId
);
pmsProductAttributeTypeDtoList
.
forEach
(
pmsProductAttributeTypeDto
->{
pmsProductAttributeTypeDto
.
setPmsProductAttributeGroupList
(
this
.
pmsProductAttributeGroupDao
.
selectByProductAttributeTypeId
(
pmsProductAttributeTypeDto
.
getId
()));
});
return
pmsProductAttributeTypeDtoList
;
}
}
mall-admin/src/main/java/com/macro/mall/service/impl/ProductAttributeGroupServiceImpl.java
View file @
1cad1abd
package
com
.
macro
.
mall
.
service
.
impl
;
import
com.github.pagehelper.PageHelper
;
import
com.macro.mall.dao.quanxing.product.PmsProductAttributeGroupDao
;
import
com.macro.mall.dto.PmsProductAttributeGroupParam
;
import
com.macro.mall.mapper.*
;
import
com.macro.mall.model.*
;
import
com.macro.mall.service.ProductAttributeGroupService
;
import
com.macro.mall.service.quanxing.PmsProductAttributeCategoryService
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
...
...
@@ -20,22 +18,10 @@ public class ProductAttributeGroupServiceImpl implements ProductAttributeGroupSe
@Resource
private
PmsProductAttributeGroupMapper
pmsProductAttributeGroupMapper
;
@Resource
private
PmsProductAttributeGroupDao
pmsProductAttributeGroupDao
;
@Resource
private
PmsProductAttributeTypeMapper
pmsProductAttributeTypeMapper
;
@Resource
private
PmsProductAttributeMapper
pmsProductAttributeMapper
;
@Resource
private
PmsProductAttributeCategoryService
pmsProductAttributeCategoryService
;
@Override
public
List
<
PmsAttributeGroupResult
>
getList
(
Long
cid
,
Integer
pageSize
,
Integer
pageNum
,
Long
attributeCategoryId
)
{
PageHelper
.
startPage
(
pageNum
,
pageSize
);
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
map
.
put
(
"cid"
,
cid
);
map
.
put
(
"attributeCategoryId"
,
pmsProductAttributeCategoryService
.
getAtributeCategoryIdList
(
attributeCategoryId
));
return
pmsProductAttributeGroupDao
.
getList
(
map
);
}
@Override
public
int
create
(
PmsProductAttributeGroupParam
pmsProductAttributeGroupParam
)
{
...
...
@@ -88,51 +74,6 @@ public class ProductAttributeGroupServiceImpl implements ProductAttributeGroupSe
}
@Override
public
List
<
AttributeGroupVo
>
paramsList
(
Long
cid
,
Integer
type
,
Long
mchtId
)
{
List
<
AttributeGroupVo
>
list
=
new
ArrayList
<>();
List
<
PmsProductAttributeGroup
>
groups
=
pmsProductAttributeGroupDao
.
getGroupList
(
cid
);
if
(!
groups
.
isEmpty
()){
for
(
PmsProductAttributeGroup
group
:
groups
)
{
AttributeGroupVo
attributeGroupVo
=
new
AttributeGroupVo
();
Long
groupId
=
group
.
getId
();
attributeGroupVo
.
setAttributeGroupId
(
groupId
);
attributeGroupVo
.
setAttributeGroupName
(
group
.
getName
());
PmsProductAttributeExample
example
=
new
PmsProductAttributeExample
();
PmsProductAttributeExample
.
Criteria
criteria
=
example
.
createCriteria
();
criteria
.
andDeleteStatusEqualTo
(
0
).
andTypeEqualTo
(
type
).
andProductAttributeGroupIdEqualTo
(
groupId
);
if
(
type
==
0
&&
groupId
==
0
){
//手动添加的规格需要加上商家id(商家自己创建的)
if
(
mchtId
==
null
){
continue
;
}
criteria
.
andMchtIdEqualTo
(
mchtId
);
}
List
<
PmsProductAttribute
>
attributelist
=
pmsProductAttributeMapper
.
selectByExample
(
example
);
if
(
attributelist
.
size
()
<=
0
){
continue
;
}
attributeGroupVo
.
setAttributes
(
attributelist
);
list
.
add
(
attributeGroupVo
);
}
//规格
if
(
type
==
0
&&
list
.
size
()
>
0
){
List
<
PmsProductAttribute
>
allAttribute
=
new
ArrayList
<>();
for
(
int
i
=
list
.
size
()-
1
;
i
>=
0
;
i
--){
AttributeGroupVo
groupVo
=
list
.
get
(
i
);
allAttribute
.
addAll
(
groupVo
.
getAttributes
());
if
(
i
!=
0
)
{
list
.
remove
(
i
);
}
}
//按正序排序
allAttribute
=
allAttribute
.
stream
().
sorted
(
Comparator
.
comparing
(
PmsProductAttribute:
:
getSort
)).
collect
(
Collectors
.
toList
());
list
.
get
(
0
).
setAttributes
(
allAttribute
);
}
}
return
list
;
}
@Override
public
int
updateMoveGroup
(
Long
id
,
Long
tagAttributeCategoryId
,
Long
tagAttributeTypeId
)
{
//更新属性(类型)
PmsProductAttributeGroup
group
=
pmsProductAttributeGroupMapper
.
selectByPrimaryKey
(
id
);
...
...
mall-mbg/src/main/java/com/macro/mall/mapper/VankeBackLogMapper.java
0 → 100644
View file @
1cad1abd
package
com
.
macro
.
mall
.
mapper
;
import
com.macro.mall.model.VankeBackLog
;
import
com.macro.mall.model.VankeBackLogExample
;
import
java.util.List
;
import
org.apache.ibatis.annotations.Param
;
public
interface
VankeBackLogMapper
{
long
countByExample
(
VankeBackLogExample
example
);
int
deleteByExample
(
VankeBackLogExample
example
);
int
deleteByPrimaryKey
(
Long
id
);
int
insert
(
VankeBackLog
record
);
int
insertSelective
(
VankeBackLog
record
);
List
<
VankeBackLog
>
selectByExample
(
VankeBackLogExample
example
);
VankeBackLog
selectByPrimaryKey
(
Long
id
);
int
updateByExampleSelective
(
@Param
(
"record"
)
VankeBackLog
record
,
@Param
(
"example"
)
VankeBackLogExample
example
);
int
updateByExample
(
@Param
(
"record"
)
VankeBackLog
record
,
@Param
(
"example"
)
VankeBackLogExample
example
);
int
updateByPrimaryKeySelective
(
VankeBackLog
record
);
int
updateByPrimaryKey
(
VankeBackLog
record
);
}
\ No newline at end of file
mall-mbg/src/main/java/com/macro/mall/mapper/VankeDepartmentMapper.java
0 → 100644
View file @
1cad1abd
package
com
.
macro
.
mall
.
mapper
;
import
com.macro.mall.model.VankeDepartment
;
import
com.macro.mall.model.VankeDepartmentExample
;
import
java.util.List
;
import
org.apache.ibatis.annotations.Param
;
public
interface
VankeDepartmentMapper
{
long
countByExample
(
VankeDepartmentExample
example
);
int
deleteByExample
(
VankeDepartmentExample
example
);
int
deleteByPrimaryKey
(
Long
id
);
int
insert
(
VankeDepartment
record
);
int
insertSelective
(
VankeDepartment
record
);
List
<
VankeDepartment
>
selectByExample
(
VankeDepartmentExample
example
);
VankeDepartment
selectByPrimaryKey
(
Long
id
);
int
updateByExampleSelective
(
@Param
(
"record"
)
VankeDepartment
record
,
@Param
(
"example"
)
VankeDepartmentExample
example
);
int
updateByExample
(
@Param
(
"record"
)
VankeDepartment
record
,
@Param
(
"example"
)
VankeDepartmentExample
example
);
int
updateByPrimaryKeySelective
(
VankeDepartment
record
);
int
updateByPrimaryKey
(
VankeDepartment
record
);
}
\ No newline at end of file
mall-mbg/src/main/java/com/macro/mall/model/VankeBackLog.java
0 → 100644
View file @
1cad1abd
package
com
.
macro
.
mall
.
model
;
import
io.swagger.annotations.ApiModelProperty
;
import
java.io.Serializable
;
import
java.util.Date
;
import
javax.persistence.*
;
import
org.springframework.format.annotation.DateTimeFormat
;
@Entity
public
class
VankeBackLog
implements
Serializable
{
@ApiModelProperty
(
value
=
"id"
)
@Id
@GeneratedValue
(
strategy
=
GenerationType
.
IDENTITY
)
private
Long
id
;
@ApiModelProperty
(
value
=
"操作信息"
)
private
String
msg
;
@ApiModelProperty
(
value
=
"操作人"
)
private
Long
createBy
;
@ApiModelProperty
(
value
=
"1未删除 0已删除"
)
private
Integer
deleteStatus
;
@ApiModelProperty
(
value
=
"创建时间"
)
@DateTimeFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
private
Date
createtime
;
private
static
final
long
serialVersionUID
=
1L
;
public
Long
getId
()
{
return
id
;
}
public
void
setId
(
Long
id
)
{
this
.
id
=
id
;
}
public
String
getMsg
()
{
return
msg
;
}
public
void
setMsg
(
String
msg
)
{
this
.
msg
=
msg
;
}
public
Long
getCreateBy
()
{
return
createBy
;
}
public
void
setCreateBy
(
Long
createBy
)
{
this
.
createBy
=
createBy
;
}
public
Integer
getDeleteStatus
()
{
return
deleteStatus
;
}
public
void
setDeleteStatus
(
Integer
deleteStatus
)
{
this
.
deleteStatus
=
deleteStatus
;
}
public
Date
getCreatetime
()
{
return
createtime
;
}
public
void
setCreatetime
(
Date
createtime
)
{
this
.
createtime
=
createtime
;
}
@Override
public
String
toString
()
{
StringBuilder
sb
=
new
StringBuilder
();
sb
.
append
(
getClass
().
getSimpleName
());
sb
.
append
(
" ["
);
sb
.
append
(
"Hash = "
).
append
(
hashCode
());
sb
.
append
(
", id="
).
append
(
id
);
sb
.
append
(
", msg="
).
append
(
msg
);
sb
.
append
(
", createBy="
).
append
(
createBy
);
sb
.
append
(
", deleteStatus="
).
append
(
deleteStatus
);
sb
.
append
(
", createtime="
).
append
(
createtime
);
sb
.
append
(
", serialVersionUID="
).
append
(
serialVersionUID
);
sb
.
append
(
"]"
);
return
sb
.
toString
();
}
}
\ No newline at end of file
mall-mbg/src/main/java/com/macro/mall/model/VankeBackLogExample.java
0 → 100644
View file @
1cad1abd
This diff is collapsed.
Click to expand it.
mall-mbg/src/main/java/com/macro/mall/model/VankeDepartment.java
0 → 100644
View file @
1cad1abd
package
com
.
macro
.
mall
.
model
;
import
io.swagger.annotations.ApiModelProperty
;
import
java.io.Serializable
;
import
java.util.Date
;
import
javax.persistence.*
;
import
org.springframework.format.annotation.DateTimeFormat
;
@Entity
public
class
VankeDepartment
implements
Serializable
{
@ApiModelProperty
(
value
=
"id"
)
@Id
@GeneratedValue
(
strategy
=
GenerationType
.
IDENTITY
)
private
Long
id
;
@ApiModelProperty
(
value
=
"部门名称"
)
private
String
name
;
@ApiModelProperty
(
value
=
"1未删除 0已删除"
)
private
Integer
deleteStatus
;
@ApiModelProperty
(
value
=
"1启用 0禁用"
)
private
Integer
status
;
@ApiModelProperty
(
value
=
"创建人"
)
private
Long
createBy
;
@ApiModelProperty
(
value
=
"修改人"
)
private
Long
updateBy
;
@ApiModelProperty
(
value
=
"创建时间"
)
@DateTimeFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
private
Date
createtime
;
@ApiModelProperty
(
value
=
"更新时间"
)
@DateTimeFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
private
Date
updatetime
;
private
static
final
long
serialVersionUID
=
1L
;
public
Long
getId
()
{
return
id
;
}
public
void
setId
(
Long
id
)
{
this
.
id
=
id
;
}
public
String
getName
()
{
return
name
;
}
public
void
setName
(
String
name
)
{
this
.
name
=
name
;
}
public
Integer
getDeleteStatus
()
{
return
deleteStatus
;
}
public
void
setDeleteStatus
(
Integer
deleteStatus
)
{
this
.
deleteStatus
=
deleteStatus
;
}
public
Integer
getStatus
()
{
return
status
;
}
public
void
setStatus
(
Integer
status
)
{
this
.
status
=
status
;
}
public
Long
getCreateBy
()
{
return
createBy
;
}
public
void
setCreateBy
(
Long
createBy
)
{
this
.
createBy
=
createBy
;
}
public
Long
getUpdateBy
()
{
return
updateBy
;
}
public
void
setUpdateBy
(
Long
updateBy
)
{
this
.
updateBy
=
updateBy
;
}
public
Date
getCreatetime
()
{
return
createtime
;
}
public
void
setCreatetime
(
Date
createtime
)
{
this
.
createtime
=
createtime
;
}
public
Date
getUpdatetime
()
{
return
updatetime
;
}
public
void
setUpdatetime
(
Date
updatetime
)
{
this
.
updatetime
=
updatetime
;
}
@Override
public
String
toString
()
{
StringBuilder
sb
=
new
StringBuilder
();
sb
.
append
(
getClass
().
getSimpleName
());
sb
.
append
(
" ["
);
sb
.
append
(
"Hash = "
).
append
(
hashCode
());
sb
.
append
(
", id="
).
append
(
id
);
sb
.
append
(
", name="
).
append
(
name
);
sb
.
append
(
", deleteStatus="
).
append
(
deleteStatus
);
sb
.
append
(
", status="
).
append
(
status
);
sb
.
append
(
", createBy="
).
append
(
createBy
);
sb
.
append
(
", updateBy="
).
append
(
updateBy
);
sb
.
append
(
", createtime="
).
append
(
createtime
);
sb
.
append
(
", updatetime="
).
append
(
updatetime
);
sb
.
append
(
", serialVersionUID="
).
append
(
serialVersionUID
);
sb
.
append
(
"]"
);
return
sb
.
toString
();
}
}
\ No newline at end of file
mall-mbg/src/main/java/com/macro/mall/model/VankeDepartmentExample.java
0 → 100644
View file @
1cad1abd
This diff is collapsed.
Click to expand it.
mall-mbg/src/main/resources/com/macro/mall/mapper/VankeBackLogMapper.xml
0 → 100644
View file @
1cad1abd
<?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.macro.mall.mapper.VankeBackLogMapper"
>
<resultMap
id=
"BaseResultMap"
type=
"com.macro.mall.model.VankeBackLog"
>
<id
column=
"id"
jdbcType=
"BIGINT"
property=
"id"
/>
<result
column=
"msg"
jdbcType=
"VARCHAR"
property=
"msg"
/>
<result
column=
"create_by"
jdbcType=
"BIGINT"
property=
"createBy"
/>
<result
column=
"delete_status"
jdbcType=
"INTEGER"
property=
"deleteStatus"
/>
<result
column=
"createtime"
jdbcType=
"TIMESTAMP"
property=
"createtime"
/>
</resultMap>
<sql
id=
"Example_Where_Clause"
>
<where>
<foreach
collection=
"oredCriteria"
item=
"criteria"
separator=
"or"
>
<if
test=
"criteria.valid"
>
<trim
prefix=
"("
prefixOverrides=
"and"
suffix=
")"
>
<foreach
collection=
"criteria.criteria"
item=
"criterion"
>
<choose>
<when
test=
"criterion.noValue"
>
and ${criterion.condition}
</when>
<when
test=
"criterion.singleValue"
>
and ${criterion.condition} #{criterion.value}
</when>
<when
test=
"criterion.betweenValue"
>
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when
test=
"criterion.listValue"
>
and ${criterion.condition}
<foreach
close=
")"
collection=
"criterion.value"
item=
"listItem"
open=
"("
separator=
","
>
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql
id=
"Update_By_Example_Where_Clause"
>
<where>
<foreach
collection=
"example.oredCriteria"
item=
"criteria"
separator=
"or"
>
<if
test=
"criteria.valid"
>
<trim
prefix=
"("
prefixOverrides=
"and"
suffix=
")"
>
<foreach
collection=
"criteria.criteria"
item=
"criterion"
>
<choose>
<when
test=
"criterion.noValue"
>
and ${criterion.condition}
</when>
<when
test=
"criterion.singleValue"
>
and ${criterion.condition} #{criterion.value}
</when>
<when
test=
"criterion.betweenValue"
>
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when
test=
"criterion.listValue"
>
and ${criterion.condition}
<foreach
close=
")"
collection=
"criterion.value"
item=
"listItem"
open=
"("
separator=
","
>
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql
id=
"Base_Column_List"
>
id, msg, create_by, delete_status, createtime
</sql>
<select
id=
"selectByExample"
parameterType=
"com.macro.mall.model.VankeBackLogExample"
resultMap=
"BaseResultMap"
>
select
<if
test=
"distinct"
>
distinct
</if>
<include
refid=
"Base_Column_List"
/>
from vanke_back_log
<if
test=
"_parameter != null"
>
<include
refid=
"Example_Where_Clause"
/>
</if>
<if
test=
"orderByClause != null"
>
order by ${orderByClause}
</if>
</select>
<select
id=
"selectByPrimaryKey"
parameterType=
"java.lang.Long"
resultMap=
"BaseResultMap"
>
select
<include
refid=
"Base_Column_List"
/>
from vanke_back_log
where id = #{id,jdbcType=BIGINT}
</select>
<delete
id=
"deleteByPrimaryKey"
parameterType=
"java.lang.Long"
>
delete from vanke_back_log
where id = #{id,jdbcType=BIGINT}
</delete>
<delete
id=
"deleteByExample"
parameterType=
"com.macro.mall.model.VankeBackLogExample"
>
delete from vanke_back_log
<if
test=
"_parameter != null"
>
<include
refid=
"Example_Where_Clause"
/>
</if>
</delete>
<insert
id=
"insert"
parameterType=
"com.macro.mall.model.VankeBackLog"
>
<selectKey
keyProperty=
"id"
order=
"AFTER"
resultType=
"java.lang.Long"
>
SELECT LAST_INSERT_ID()
</selectKey>
insert into vanke_back_log (msg, create_by, delete_status,
createtime)
values (#{msg,jdbcType=VARCHAR}, #{createBy,jdbcType=BIGINT}, #{deleteStatus,jdbcType=INTEGER},
#{createtime,jdbcType=TIMESTAMP})
</insert>
<insert
id=
"insertSelective"
parameterType=
"com.macro.mall.model.VankeBackLog"
>
<selectKey
keyProperty=
"id"
order=
"AFTER"
resultType=
"java.lang.Long"
>
SELECT LAST_INSERT_ID()
</selectKey>
insert into vanke_back_log
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"msg != null"
>
msg,
</if>
<if
test=
"createBy != null"
>
create_by,
</if>
<if
test=
"deleteStatus != null"
>
delete_status,
</if>
<if
test=
"createtime != null"
>
createtime,
</if>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"msg != null"
>
#{msg,jdbcType=VARCHAR},
</if>
<if
test=
"createBy != null"
>
#{createBy,jdbcType=BIGINT},
</if>
<if
test=
"deleteStatus != null"
>
#{deleteStatus,jdbcType=INTEGER},
</if>
<if
test=
"createtime != null"
>
#{createtime,jdbcType=TIMESTAMP},
</if>
</trim>
</insert>
<select
id=
"countByExample"
parameterType=
"com.macro.mall.model.VankeBackLogExample"
resultType=
"java.lang.Long"
>
select count(*) from vanke_back_log
<if
test=
"_parameter != null"
>
<include
refid=
"Example_Where_Clause"
/>
</if>
</select>
<update
id=
"updateByExampleSelective"
parameterType=
"map"
>
update vanke_back_log
<set>
<if
test=
"record.id != null"
>
id = #{record.id,jdbcType=BIGINT},
</if>
<if
test=
"record.msg != null"
>
msg = #{record.msg,jdbcType=VARCHAR},
</if>
<if
test=
"record.createBy != null"
>
create_by = #{record.createBy,jdbcType=BIGINT},
</if>
<if
test=
"record.deleteStatus != null"
>
delete_status = #{record.deleteStatus,jdbcType=INTEGER},
</if>
<if
test=
"record.createtime != null"
>
createtime = #{record.createtime,jdbcType=TIMESTAMP},
</if>
</set>
<if
test=
"_parameter != null"
>
<include
refid=
"Update_By_Example_Where_Clause"
/>
</if>
</update>
<update
id=
"updateByExample"
parameterType=
"map"
>
update vanke_back_log
set id = #{record.id,jdbcType=BIGINT},
msg = #{record.msg,jdbcType=VARCHAR},
create_by = #{record.createBy,jdbcType=BIGINT},
delete_status = #{record.deleteStatus,jdbcType=INTEGER},
createtime = #{record.createtime,jdbcType=TIMESTAMP}
<if
test=
"_parameter != null"
>
<include
refid=
"Update_By_Example_Where_Clause"
/>
</if>
</update>
<update
id=
"updateByPrimaryKeySelective"
parameterType=
"com.macro.mall.model.VankeBackLog"
>
update vanke_back_log
<set>
<if
test=
"msg != null"
>
msg = #{msg,jdbcType=VARCHAR},
</if>
<if
test=
"createBy != null"
>
create_by = #{createBy,jdbcType=BIGINT},
</if>
<if
test=
"deleteStatus != null"
>
delete_status = #{deleteStatus,jdbcType=INTEGER},
</if>
<if
test=
"createtime != null"
>
createtime = #{createtime,jdbcType=TIMESTAMP},
</if>
</set>
where id = #{id,jdbcType=BIGINT}
</update>
<update
id=
"updateByPrimaryKey"
parameterType=
"com.macro.mall.model.VankeBackLog"
>
update vanke_back_log
set msg = #{msg,jdbcType=VARCHAR},
create_by = #{createBy,jdbcType=BIGINT},
delete_status = #{deleteStatus,jdbcType=INTEGER},
createtime = #{createtime,jdbcType=TIMESTAMP}
where id = #{id,jdbcType=BIGINT}
</update>
</mapper>
\ No newline at end of file
mall-mbg/src/main/resources/com/macro/mall/mapper/VankeDepartmentMapper.xml
0 → 100644
View file @
1cad1abd
<?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.macro.mall.mapper.VankeDepartmentMapper"
>
<resultMap
id=
"BaseResultMap"
type=
"com.macro.mall.model.VankeDepartment"
>
<id
column=
"id"
jdbcType=
"BIGINT"
property=
"id"
/>
<result
column=
"name"
jdbcType=
"VARCHAR"
property=
"name"
/>
<result
column=
"delete_status"
jdbcType=
"INTEGER"
property=
"deleteStatus"
/>
<result
column=
"status"
jdbcType=
"INTEGER"
property=
"status"
/>
<result
column=
"create_by"
jdbcType=
"BIGINT"
property=
"createBy"
/>
<result
column=
"update_by"
jdbcType=
"BIGINT"
property=
"updateBy"
/>
<result
column=
"createtime"
jdbcType=
"TIMESTAMP"
property=
"createtime"
/>
<result
column=
"updatetime"
jdbcType=
"TIMESTAMP"
property=
"updatetime"
/>
</resultMap>
<sql
id=
"Example_Where_Clause"
>
<where>
<foreach
collection=
"oredCriteria"
item=
"criteria"
separator=
"or"
>
<if
test=
"criteria.valid"
>
<trim
prefix=
"("
prefixOverrides=
"and"
suffix=
")"
>
<foreach
collection=
"criteria.criteria"
item=
"criterion"
>
<choose>
<when
test=
"criterion.noValue"
>
and ${criterion.condition}
</when>
<when
test=
"criterion.singleValue"
>
and ${criterion.condition} #{criterion.value}
</when>
<when
test=
"criterion.betweenValue"
>
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when
test=
"criterion.listValue"
>
and ${criterion.condition}
<foreach
close=
")"
collection=
"criterion.value"
item=
"listItem"
open=
"("
separator=
","
>
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql
id=
"Update_By_Example_Where_Clause"
>
<where>
<foreach
collection=
"example.oredCriteria"
item=
"criteria"
separator=
"or"
>
<if
test=
"criteria.valid"
>
<trim
prefix=
"("
prefixOverrides=
"and"
suffix=
")"
>
<foreach
collection=
"criteria.criteria"
item=
"criterion"
>
<choose>
<when
test=
"criterion.noValue"
>
and ${criterion.condition}
</when>
<when
test=
"criterion.singleValue"
>
and ${criterion.condition} #{criterion.value}
</when>
<when
test=
"criterion.betweenValue"
>
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when
test=
"criterion.listValue"
>
and ${criterion.condition}
<foreach
close=
")"
collection=
"criterion.value"
item=
"listItem"
open=
"("
separator=
","
>
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql
id=
"Base_Column_List"
>
id, name, delete_status, status, create_by, update_by, createtime, updatetime
</sql>
<select
id=
"selectByExample"
parameterType=
"com.macro.mall.model.VankeDepartmentExample"
resultMap=
"BaseResultMap"
>
select
<if
test=
"distinct"
>
distinct
</if>
<include
refid=
"Base_Column_List"
/>
from vanke_department
<if
test=
"_parameter != null"
>
<include
refid=
"Example_Where_Clause"
/>
</if>
<if
test=
"orderByClause != null"
>
order by ${orderByClause}
</if>
</select>
<select
id=
"selectByPrimaryKey"
parameterType=
"java.lang.Long"
resultMap=
"BaseResultMap"
>
select
<include
refid=
"Base_Column_List"
/>
from vanke_department
where id = #{id,jdbcType=BIGINT}
</select>
<delete
id=
"deleteByPrimaryKey"
parameterType=
"java.lang.Long"
>
delete from vanke_department
where id = #{id,jdbcType=BIGINT}
</delete>
<delete
id=
"deleteByExample"
parameterType=
"com.macro.mall.model.VankeDepartmentExample"
>
delete from vanke_department
<if
test=
"_parameter != null"
>
<include
refid=
"Example_Where_Clause"
/>
</if>
</delete>
<insert
id=
"insert"
parameterType=
"com.macro.mall.model.VankeDepartment"
>
<selectKey
keyProperty=
"id"
order=
"AFTER"
resultType=
"java.lang.Long"
>
SELECT LAST_INSERT_ID()
</selectKey>
insert into vanke_department (name, delete_status, status,
create_by, update_by, createtime,
updatetime)
values (#{name,jdbcType=VARCHAR}, #{deleteStatus,jdbcType=INTEGER}, #{status,jdbcType=INTEGER},
#{createBy,jdbcType=BIGINT}, #{updateBy,jdbcType=BIGINT}, #{createtime,jdbcType=TIMESTAMP},
#{updatetime,jdbcType=TIMESTAMP})
</insert>
<insert
id=
"insertSelective"
parameterType=
"com.macro.mall.model.VankeDepartment"
>
<selectKey
keyProperty=
"id"
order=
"AFTER"
resultType=
"java.lang.Long"
>
SELECT LAST_INSERT_ID()
</selectKey>
insert into vanke_department
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"name != null"
>
name,
</if>
<if
test=
"deleteStatus != null"
>
delete_status,
</if>
<if
test=
"status != null"
>
status,
</if>
<if
test=
"createBy != null"
>
create_by,
</if>
<if
test=
"updateBy != null"
>
update_by,
</if>
<if
test=
"createtime != null"
>
createtime,
</if>
<if
test=
"updatetime != null"
>
updatetime,
</if>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"name != null"
>
#{name,jdbcType=VARCHAR},
</if>
<if
test=
"deleteStatus != null"
>
#{deleteStatus,jdbcType=INTEGER},
</if>
<if
test=
"status != null"
>
#{status,jdbcType=INTEGER},
</if>
<if
test=
"createBy != null"
>
#{createBy,jdbcType=BIGINT},
</if>
<if
test=
"updateBy != null"
>
#{updateBy,jdbcType=BIGINT},
</if>
<if
test=
"createtime != null"
>
#{createtime,jdbcType=TIMESTAMP},
</if>
<if
test=
"updatetime != null"
>
#{updatetime,jdbcType=TIMESTAMP},
</if>
</trim>
</insert>
<select
id=
"countByExample"
parameterType=
"com.macro.mall.model.VankeDepartmentExample"
resultType=
"java.lang.Long"
>
select count(*) from vanke_department
<if
test=
"_parameter != null"
>
<include
refid=
"Example_Where_Clause"
/>
</if>
</select>
<update
id=
"updateByExampleSelective"
parameterType=
"map"
>
update vanke_department
<set>
<if
test=
"record.id != null"
>
id = #{record.id,jdbcType=BIGINT},
</if>
<if
test=
"record.name != null"
>
name = #{record.name,jdbcType=VARCHAR},
</if>
<if
test=
"record.deleteStatus != null"
>
delete_status = #{record.deleteStatus,jdbcType=INTEGER},
</if>
<if
test=
"record.status != null"
>
status = #{record.status,jdbcType=INTEGER},
</if>
<if
test=
"record.createBy != null"
>
create_by = #{record.createBy,jdbcType=BIGINT},
</if>
<if
test=
"record.updateBy != null"
>
update_by = #{record.updateBy,jdbcType=BIGINT},
</if>
<if
test=
"record.createtime != null"
>
createtime = #{record.createtime,jdbcType=TIMESTAMP},
</if>
<if
test=
"record.updatetime != null"
>
updatetime = #{record.updatetime,jdbcType=TIMESTAMP},
</if>
</set>
<if
test=
"_parameter != null"
>
<include
refid=
"Update_By_Example_Where_Clause"
/>
</if>
</update>
<update
id=
"updateByExample"
parameterType=
"map"
>
update vanke_department
set id = #{record.id,jdbcType=BIGINT},
name = #{record.name,jdbcType=VARCHAR},
delete_status = #{record.deleteStatus,jdbcType=INTEGER},
status = #{record.status,jdbcType=INTEGER},
create_by = #{record.createBy,jdbcType=BIGINT},
update_by = #{record.updateBy,jdbcType=BIGINT},
createtime = #{record.createtime,jdbcType=TIMESTAMP},
updatetime = #{record.updatetime,jdbcType=TIMESTAMP}
<if
test=
"_parameter != null"
>
<include
refid=
"Update_By_Example_Where_Clause"
/>
</if>
</update>
<update
id=
"updateByPrimaryKeySelective"
parameterType=
"com.macro.mall.model.VankeDepartment"
>
update vanke_department
<set>
<if
test=
"name != null"
>
name = #{name,jdbcType=VARCHAR},
</if>
<if
test=
"deleteStatus != null"
>
delete_status = #{deleteStatus,jdbcType=INTEGER},
</if>
<if
test=
"status != null"
>
status = #{status,jdbcType=INTEGER},
</if>
<if
test=
"createBy != null"
>
create_by = #{createBy,jdbcType=BIGINT},
</if>
<if
test=
"updateBy != null"
>
update_by = #{updateBy,jdbcType=BIGINT},
</if>
<if
test=
"createtime != null"
>
createtime = #{createtime,jdbcType=TIMESTAMP},
</if>
<if
test=
"updatetime != null"
>
updatetime = #{updatetime,jdbcType=TIMESTAMP},
</if>
</set>
where id = #{id,jdbcType=BIGINT}
</update>
<update
id=
"updateByPrimaryKey"
parameterType=
"com.macro.mall.model.VankeDepartment"
>
update vanke_department
set name = #{name,jdbcType=VARCHAR},
delete_status = #{deleteStatus,jdbcType=INTEGER},
status = #{status,jdbcType=INTEGER},
create_by = #{createBy,jdbcType=BIGINT},
update_by = #{updateBy,jdbcType=BIGINT},
createtime = #{createtime,jdbcType=TIMESTAMP},
updatetime = #{updatetime,jdbcType=TIMESTAMP}
where id = #{id,jdbcType=BIGINT}
</update>
</mapper>
\ No newline at end of file
mall-service/src/main/java/com/macro/mall/dao/quanxing/OmsChoseProductDao.java
deleted
100644 → 0
View file @
fa69d450
package
com
.
macro
.
mall
.
dao
.
quanxing
;
import
com.macro.mall.model.dto.quanxing.OmsChoseProductDto
;
import
java.util.List
;
public
interface
OmsChoseProductDao
{
List
<
OmsChoseProductDto
>
selectListByMemberId
(
Long
memberId
);
}
mall-service/src/main/java/com/macro/mall/dao/quanxing/PmsProductAttributeCategoryDao.java
deleted
100644 → 0
View file @
fa69d450
package
com
.
macro
.
mall
.
dao
.
quanxing
;
import
com.macro.mall.model.dto.PmsProductAttributeCategoryItem
;
import
java.util.List
;
/**
* 自定义商品属性分类Dao
* Created by macro on 2018/5/24.
*/
public
interface
PmsProductAttributeCategoryDao
{
List
<
PmsProductAttributeCategoryItem
>
getListWithAttr
();
}
mall-service/src/main/java/com/macro/mall/dao/quanxing/PmsProductSkuValueDao.java
deleted
100644 → 0
View file @
fa69d450
package
com
.
macro
.
mall
.
dao
.
quanxing
;
import
com.macro.mall.model.PmsProductSkuValue
;
import
com.macro.mall.model.dto.quanxing.PmsProductSkuValueDto
;
import
org.apache.ibatis.annotations.Param
;
import
javax.transaction.Transactional
;
import
java.util.List
;
/**
* 商品参数,商品自定义规格属性Dao
* Created by macro on 2018/4/26.
*/
public
interface
PmsProductSkuValueDao
{
@Transactional
int
insertList
(
@Param
(
"list"
)
List
<
PmsProductSkuValue
>
productSkuValueList
);
/**
* 根据商品id 返回商品规格值List
* @param productId
* @return
*/
List
<
PmsProductSkuValueDto
>
selectListByProductId
(
Long
productId
);
/**
* 根据商品id 修改删除状态
* @param pmsProductSkuValue
* @return
*/
int
updateDeleteStatusByProductId
(
PmsProductSkuValue
pmsProductSkuValue
);
}
mall-service/src/main/java/com/macro/mall/dao/quanxing/PmsSupplierAuditDao.java
deleted
100644 → 0
View file @
fa69d450
package
com
.
macro
.
mall
.
dao
.
quanxing
;
import
com.macro.mall.model.PmsSupplierAudit
;
import
java.util.List
;
public
interface
PmsSupplierAuditDao
{
PmsSupplierAudit
selectOneByMemberId
(
Long
memberId
);
/**
* 返回数量
* @param pmsSupplierAudit
* @return
*/
Integer
selectCount
(
PmsSupplierAudit
pmsSupplierAudit
);
}
mall-service/src/main/java/com/macro/mall/dao/quanxing/PmsSupplierAuditProductDao.java
deleted
100644 → 0
View file @
fa69d450
package
com
.
macro
.
mall
.
dao
.
quanxing
;
import
com.macro.mall.model.PmsSupplierAuditProduct
;
import
java.util.List
;
public
interface
PmsSupplierAuditProductDao
{
List
<
PmsSupplierAuditProduct
>
selectListByAuditId
(
Long
auditId
);
}
mall-service/src/main/java/com/macro/mall/dao/quanxing/product/PmsProductAttributeGroupDao.java
deleted
100644 → 0
View file @
fa69d450
package
com
.
macro
.
mall
.
dao
.
quanxing
.
product
;
import
com.macro.mall.model.AttributeGroupVo
;
import
com.macro.mall.model.PmsAttributeGroupResult
;
import
com.macro.mall.model.PmsProductAttributeGroup
;
import
org.apache.ibatis.annotations.Param
;
import
org.apache.ibatis.annotations.Select
;
import
java.util.List
;
import
java.util.Map
;
public
interface
PmsProductAttributeGroupDao
{
@Select
(
"SELECT "
+
"a.id AS attributeGroupId, "
+
"a.`name` AS attributeGroupName, "
+
"b.id AS attributeId, "
+
"b.`name` AS attributeName "
+
"FROM "
+
"pms_product_attribute_category pac "
+
"join pms_product_attribute_type pat on pac.id = pat.attribute_category_id "
+
"join pms_product_attribute_group a on a.product_attribute_type_id = pat.id "
+
"JOIN pms_product_attribute b ON a.id = b.product_attribute_category_id "
+
"AND b.type = 1 "
+
"WHERE "
+
"a.delete_status = 0 "
+
"AND a.`status` = 0 "
+
"and pac.delete_status = 0 "
+
"and pat.delete_status = 0 "
+
"AND b.delete_status = 0 "
+
"AND pac.id = #{cid} "
+
"ORDER BY b.sort"
)
List
<
AttributeGroupVo
>
getParamsList
(
@Param
(
"cid"
)
Long
cid
);
List
<
PmsAttributeGroupResult
>
getList
(
Map
<
String
,
Object
>
map
);
@Select
(
"SELECT "
+
"a.* "
+
"FROM "
+
"pms_product_category c "
+
"join pms_product_attribute_category pac on pac.id = c.attribute_category_id "
+
"join pms_product_attribute_type pat on pac.id = pat.attribute_category_id "
+
"join pms_product_attribute_group a on a.product_attribute_type_id = pat.id "
+
"WHERE "
+
"a.delete_status = 0 "
+
"AND a.`status` = 0 "
+
"and pac.delete_status = 0 "
+
"and pat.delete_status = 0 "
+
"and c.delete_status = 0 "
+
"AND (c.id = #{cid} or c.id = 9999) "
)
List
<
PmsProductAttributeGroup
>
getGroupList
(
@Param
(
"cid"
)
Long
cid
);
/**
* 根据属性分类id查询 规格
* @param productAttributeTypeId
* @return
*/
List
<
PmsProductAttributeGroup
>
selectByProductAttributeTypeId
(
Long
productAttributeTypeId
);
}
mall-service/src/main/java/com/macro/mall/dao/quanxing/product/PmsProductAttributeTypeDao.java
deleted
100644 → 0
View file @
fa69d450
package
com
.
macro
.
mall
.
dao
.
quanxing
.
product
;
import
com.macro.mall.model.PmsAttributeTypeReulst
;
import
com.macro.mall.model.dto.quanxing.PmsProductAttributeTypeDto
;
import
java.util.List
;
import
java.util.Map
;
public
interface
PmsProductAttributeTypeDao
{
List
<
PmsProductAttributeTypeDto
>
selectByAttributeCategoryId
(
Long
attributeCategoryId
);
List
<
PmsAttributeTypeReulst
>
getList
(
Map
<
String
,
Object
>
map
);
}
mall-service/src/main/java/com/macro/mall/service/member/UmsMemberService.java
View file @
1cad1abd
...
...
@@ -171,12 +171,6 @@ public interface UmsMemberService {
Integer
setAccount
(
Long
memberId
,
Integer
flag
);
/**
* 后台新增一个会员
* @return
*/
ResultMsg
insertMember
(
UmsMember
umsMember
);
/**
* 根据账户类型 查找多个会员信息
* @param accouuntType
* @return
...
...
@@ -184,15 +178,6 @@ public interface UmsMemberService {
List
<
UmsMember
>
getMemberListByAccountType
(
Integer
accouuntType
);
/**
* 分页查询会员信息
* @param pageNum
* @param pageSize
* @param accouuntType
* @return
*/
CommonPage
<
UmsMemberDto
>
getPageList
(
Integer
pageNum
,
Integer
pageSize
,
Integer
accouuntType
,
String
name
,
String
phone
,
Integer
status
);
/**
* 根据id查询一条会员信息
* @return
*/
...
...
mall-service/src/main/java/com/macro/mall/service/member/impl/UmsMemberServiceImpl.java
View file @
1cad1abd
...
...
@@ -6,7 +6,6 @@ import com.macro.mall.common.api.CommonPage;
import
com.macro.mall.common.api.CommonResult
;
import
com.macro.mall.common.api.DateUtils
;
import
com.macro.mall.dao.UmsMemberDao
;
import
com.macro.mall.dao.quanxing.PmsSupplierAuditDao
;
import
com.macro.mall.domain.MemberDetails
;
import
com.macro.mall.domain.dto.UmsMemberParam
;
import
com.macro.mall.domain.dto.UmsMemberReview
;
...
...
@@ -18,14 +17,12 @@ import com.macro.mall.mapper.UmsMemberMapper;
import
com.macro.mall.model.*
;
import
com.macro.mall.domain.UmsMemberVerified
;
import
com.macro.mall.model.common.ResultMsg
;
import
com.macro.mall.model.dto.PmsSupplierAuditDto
;
import
com.macro.mall.model.dto.quanxing.UmsMemberDto
;
import
com.macro.mall.model.dto.quanxing.UmsMemberRequestParam
;
import
com.macro.mall.service.member.UmsMemberAccountService
;
import
com.macro.mall.service.member.UmsMemberService
;
import
com.macro.mall.security.util.CodingUtil
;
import
com.macro.mall.security.util.JwtTokenUtil
;
import
com.macro.mall.service.quanxing.IPmsSupplierAuditService
;
import
com.macro.mall.service.system.RedisService
;
import
com.macro.mall.service.system.UmsAdminService
;
import
org.slf4j.Logger
;
...
...
@@ -79,10 +76,6 @@ public class UmsMemberServiceImpl implements UmsMemberService {
private
UmsMemberMapper
umsMemberMapper
;
@Resource
private
OmsOrderSonMapper
orderSonMapper
;
@Autowired
private
IPmsSupplierAuditService
pmsSupplierAuditService
;
@Resource
private
PmsSupplierAuditDao
pmsSupplierAuditDao
;
@Value
(
"${redis.key.prefix.authCode}"
)
private
String
REDIS_KEY_PREFIX_AUTH_CODE
;
...
...
@@ -710,70 +703,6 @@ public class UmsMemberServiceImpl implements UmsMemberService {
}
/**
* 插入会员
* @param umsMember
* @return
*/
@Override
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
ResultMsg
insertMember
(
UmsMember
umsMember
){
ResultMsg
res
=
this
.
checkInsertMember
(
umsMember
);
if
(!
res
.
isFlag
()){
return
new
ResultMsg
(
false
,
res
.
getMsg
());
}
//加密密码
umsMember
.
setPassword
(
passwordEncoder
.
encode
(
umsMember
.
getPassword
()));
//插入到会员表
this
.
umsMemberMapper
.
insertSelective
(
umsMember
);
return
new
ResultMsg
(
true
,
"操作成功"
);
}
/**
* 校验插入会员
* @return
*/
private
ResultMsg
checkInsertMember
(
UmsMember
umsMember
){
if
(
umsMember
==
null
){
return
new
ResultMsg
(
false
,
"传入会员为空"
);
}
if
(
umsMember
.
getUsername
()
==
null
||
""
.
equals
(
umsMember
.
getUsername
())){
//如果没传入会员账号 默认设置
umsMember
.
setUsername
(
this
.
pmsSupplierAuditService
.
getUsername
());
}
if
(
umsMember
.
getPhone
()
==
null
||
""
.
equals
(
umsMember
.
getPhone
())){
return
new
ResultMsg
(
false
,
"手机号为空"
);
}
else
{
//手机号不为空 校验是否已存在此号码
UmsMember
um
=
this
.
getByPhone
(
umsMember
.
getPhone
());
if
(
um
!=
null
){
return
new
ResultMsg
(
false
,
"已存在此手机号!"
);
}
}
if
(
umsMember
.
getPassword
()
==
null
||
""
.
equals
(
umsMember
.
getPassword
())){
return
new
ResultMsg
(
false
,
"密码为空"
);
}
if
(
umsMember
.
getDeleteStatus
()
==
null
){
umsMember
.
setDeleteStatus
(
0
);
//默认未删除
}
if
(
umsMember
.
getBirthday
()
==
null
){
umsMember
.
setBirthday
(
new
Date
());
}
if
(
umsMember
.
getCreateDate
()
==
null
){
umsMember
.
setCreateDate
(
new
Date
());
}
if
(
umsMember
.
getUpdateDate
()
==
null
){
umsMember
.
setUpdateDate
(
new
Date
());
}
if
(
umsMember
.
getCreateTime
()
==
null
){
umsMember
.
setCreateTime
(
new
Date
());
}
if
(
umsMember
.
getStatus
()
==
null
){
umsMember
.
setStatus
(
1
);
//帐号启用状态:0->禁用;1->启用
}
return
new
ResultMsg
(
true
,
"校验通过"
);
}
/**
* 根据账户类型 查找多个会员信息
* @param accouuntType
* @return
...
...
@@ -793,54 +722,6 @@ public class UmsMemberServiceImpl implements UmsMemberService {
/**
* 分页查询会员信息
* @param pageNum
* @param pageSize
* @param accouuntType
* @return
*/
@Override
public
CommonPage
<
UmsMemberDto
>
getPageList
(
Integer
pageNum
,
Integer
pageSize
,
Integer
accouuntType
,
String
name
,
String
phone
,
Integer
status
){
PageHelper
.
startPage
(
pageNum
,
pageSize
);
UmsMemberExample
example
=
new
UmsMemberExample
();
UmsMemberExample
.
Criteria
criteria
=
example
.
createCriteria
();
if
(
accouuntType
!=
null
){
//如果账号类型不为空
criteria
.
andAccouuntTypeEqualTo
(
accouuntType
);
}
if
(
name
!=
null
&&
!
""
.
equals
(
name
)){
criteria
.
andNameLike
(
"name"
+
"%"
);
}
if
(
phone
!=
null
&&
!
""
.
equals
(
phone
)){
criteria
.
andPhoneLike
(
"phone"
+
"%"
);
}
if
(
status
!=
null
){
//如果账号类型不为空
criteria
.
andStatusEqualTo
(
status
);
}
//过滤已删除的数据
criteria
.
andDeleteStatusEqualTo
(
0
);
//删除标识0 未删除 1已删除
List
<
UmsMember
>
dataList
=
this
.
umsMemberMapper
.
selectByExample
(
example
);
//记录下 pagehelper第一次分页查询的 返回得总条数 等信息
PageInfo
<
UmsMember
>
pageInfo
=
new
PageInfo
<>(
dataList
);
//创建List对象
List
<
UmsMemberDto
>
umdList
=
new
ArrayList
<>();
dataList
.
forEach
(
umsMember
->
{
UmsMemberDto
umsMemberDto
=
new
UmsMemberDto
();
//将属性赋值到另一个对象中去
BeanUtils
.
copyProperties
(
umsMember
,
umsMemberDto
);
umsMemberDto
.
setPmsSupplierAudit
(
this
.
pmsSupplierAuditDao
.
selectOneByMemberId
(
umsMember
.
getId
()));
umdList
.
add
(
umsMemberDto
);
});
//因为进行了第二次查询 所以pageHelp得分页总数得到了变化 导致不准确 因此我们需要手动校准一下
CommonPage
<
UmsMemberDto
>
result
=
new
CommonPage
<
UmsMemberDto
>();
result
.
setTotalPage
(
pageInfo
.
getPages
());
result
.
setPageNum
(
pageInfo
.
getPageNum
());
result
.
setPageSize
(
pageInfo
.
getPageSize
());
result
.
setTotal
(
pageInfo
.
getTotal
());
result
.
setList
(
umdList
);
return
result
;
}
/**
* 根据id查询一条会员信息
* @return
*/
...
...
mall-service/src/main/java/com/macro/mall/service/product/PmsProductService.java
View file @
1cad1abd
...
...
@@ -84,16 +84,6 @@ public interface PmsProductService {
List
<
Long
>
getLikeId
(
String
url
);
/**
* 根据商品编号获取商品相关信息
*/
PmsProductRequestParam
getProductById
(
Long
id
);
/**
* 更新商品
*/
ResultMsg
updateProduct
(
PmsProductRequestParam
pmsProductRequestParam
);
/**
* 分页查询商品
*/
List
<
PmsProductListResult
>
list
(
PmsProductQueryParam
productQueryParam
,
Integer
pageSize
,
Integer
pageNum
);
...
...
@@ -204,15 +194,4 @@ public interface PmsProductService {
List
<
PmsProduct
>
getAppPageList
(
Integer
pageNum
,
Integer
pageSize
,
String
name
,
Integer
newStatus
,
Long
mchtId
,
Integer
verifyStatus
,
Integer
publishStatus
,
Long
productCategoryIdI
,
Long
productCategoryId
,
Long
productCategoryIdIII
,
String
orderBy
);
/**
* 获取供应商个人中心商品状态
* @return
*/
ResultMsg
getSupplierProductStatus
();
/**
* 获取管理员个人中心商品状态
* @return
*/
ResultMsg
getAdminProductStatus
();
}
mall-service/src/main/java/com/macro/mall/service/product/impl/PmsProductServiceImpl.java
View file @
1cad1abd
...
...
@@ -5,8 +5,6 @@ import com.macro.mall.common.api.CommonResult;
import
com.macro.mall.common.api.StringUtils
;
import
com.macro.mall.dao.platform.PmsSearchWordDao
;
import
com.macro.mall.dao.product.*
;
import
com.macro.mall.dao.quanxing.PmsProductSkuValueDao
;
import
com.macro.mall.dao.quanxing.PmsSupplierAuditDao
;
import
com.macro.mall.domain.dto.MchtProductQueryParam
;
import
com.macro.mall.domain.dto.PmsProductPicSearchParam
;
import
com.macro.mall.domain.dto.PmsProductRequestParam
;
...
...
@@ -100,15 +98,11 @@ public class PmsProductServiceImpl implements PmsProductService {
private
PmsCommentMapper
pmsCommentMapper
;
@Resource
private
PmsSkuStockDao
pmsSkuStockDao
;
@Resource
private
PmsProductSkuValueDao
pmsProductSkuValueDao
;
@Autowired
private
UmsMemberService
umsMemberService
;
@Resource
private
PmsSearchWordMapper
pmsSearchWordMapper
;
@Resource
private
PmsSupplierAuditDao
pmsSupplierAuditDao
;
@Resource
private
UmsMemberMapper
umsMemberMapper
;
@Resource
private
PmsSearchWordDao
pmsSearchWordDao
;
...
...
@@ -172,55 +166,6 @@ public class PmsProductServiceImpl implements PmsProductService {
return
new
ResultMsg
(
true
,
"校验通过"
);
}
@Override
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
ResultMsg
updateProduct
(
PmsProductRequestParam
pmsProductRequestParam
)
{
if
(
pmsProductRequestParam
.
getPmsProduct
().
getId
()
==
null
){
return
new
ResultMsg
(
false
,
"请传入商品id"
);
}
//更新商品
this
.
pmsProductMapper
.
updateByPrimaryKeySelective
(
pmsProductRequestParam
.
getPmsProduct
());
//商品规格值不为空 则执行插入操作
if
(
pmsProductRequestParam
.
getPmsProductSkuValueList
()
!=
null
&&
pmsProductRequestParam
.
getPmsProductSkuValueList
().
size
()
>
0
){
//将之前的sku_value value改为删除状态
PmsProductSkuValue
ppsv
=
new
PmsProductSkuValue
();
ppsv
.
setProductId
(
pmsProductRequestParam
.
getPmsProduct
().
getId
());
ppsv
.
setDeleteStatus
(
1
);
//删除标识0 未删除 1已删除
this
.
pmsProductSkuValueDao
.
updateDeleteStatusByProductId
(
ppsv
);
pmsProductRequestParam
.
getPmsProductSkuValueList
().
forEach
(
pmsProductSkuValue
->{
pmsProductSkuValue
.
setId
(
null
);
//防止前端 传入之前id 插入主键重复数据
pmsProductSkuValue
.
setProductId
(
pmsProductRequestParam
.
getPmsProduct
().
getId
());
pmsProductSkuValue
.
setCreateDate
(
new
Date
());
pmsProductSkuValue
.
setUpdateDate
(
new
Date
());
this
.
pmsProductSkuValueMapper
.
insertSelective
(
pmsProductSkuValue
);
});
}
//sku值不为空 则执行插入
if
(
pmsProductRequestParam
.
getPmsSkuStockList
()
!=
null
&&
pmsProductRequestParam
.
getPmsSkuStockList
().
size
()
>
0
){
//将之前sku 改为删除状态
PmsSkuStock
pss
=
new
PmsSkuStock
();
pss
.
setProductId
(
pmsProductRequestParam
.
getPmsProduct
().
getId
());
pss
.
setDeleteStatus
(
1
);
//删除标识0 未删除 1已删除
this
.
pmsSkuStockDao
.
updateDeleteStatusByProductId
(
pss
);
pmsProductRequestParam
.
getPmsSkuStockList
().
forEach
(
pmsSkuStock
->{
//skuCode 生成规格 productId + 规格值id
String
skuCode
=
pmsProductRequestParam
.
getPmsProduct
().
getId
()
+
""
;
String
[]
categoryIds
=
pmsSkuStock
.
getItemIds
().
split
(
","
);
for
(
int
i
=
0
;
i
<
categoryIds
.
length
;
i
++)
{
skuCode
=
skuCode
+
"_"
+
categoryIds
[
i
];
}
pmsSkuStock
.
setId
(
null
);
//防止前端传入之前id 插入报主键重复
pmsSkuStock
.
setSkuCode
(
skuCode
);
pmsSkuStock
.
setProductId
(
pmsProductRequestParam
.
getPmsProduct
().
getId
());
pmsSkuStock
.
setCreateDate
(
new
Date
());
pmsSkuStock
.
setUpdateDate
(
new
Date
());
this
.
pmsSkuStockMapper
.
insertSelective
(
pmsSkuStock
);
});
}
return
new
ResultMsg
(
true
,
"操作成功"
);
}
/**
* 商家商品列表
*
...
...
@@ -473,25 +418,6 @@ public class PmsProductServiceImpl implements PmsProductService {
}
@Override
public
PmsProductRequestParam
getProductById
(
Long
id
)
{
//创建返回参数对象
PmsProductRequestParam
pmsProductRequestParam
=
new
PmsProductRequestParam
();
//根据商品id 首先查询商品表相关数据
pmsProductRequestParam
.
setPmsProduct
(
this
.
pmsProductMapper
.
selectByPrimaryKey
(
id
));
//根据商品id查询相关规格值
pmsProductRequestParam
.
setPmsProductSkuValueList
(
this
.
pmsProductSkuValueDao
.
selectListByProductId
(
id
));
//根据商品id查询相关sku
pmsProductRequestParam
.
setPmsSkuStockList
(
this
.
pmsSkuStockDao
.
selectListByProductId
(
id
));
//查询商品相关商家
if
(
pmsProductRequestParam
.
getPmsProduct
()
!=
null
&&
pmsProductRequestParam
.
getPmsProduct
().
getMchtId
()
!=
null
){
pmsProductRequestParam
.
setMember
(
this
.
umsMemberMapper
.
selectByPrimaryKey
(
pmsProductRequestParam
.
getPmsProduct
().
getMchtId
()));
}
return
pmsProductRequestParam
;
}
@Override
public
List
<
PmsProductListResult
>
list
(
PmsProductQueryParam
productQueryParam
,
Integer
pageSize
,
Integer
pageNum
)
{
PageHelper
.
startPage
(
pageNum
,
pageSize
);
if
(
productQueryParam
.
getDeleteStatus
()
==
null
){
...
...
@@ -911,76 +837,4 @@ public class PmsProductServiceImpl implements PmsProductService {
return
this
.
pmsProductMapper
.
selectByExample
(
example
);
}
/**
* 获取供应商个人中心商品状态
* @return
*/
@Override
public
ResultMsg
getSupplierProductStatus
(){
//获取当前操作会员的id
Long
memberId
=
umsMemberService
.
getCurrentMemberId
();
//数据Map
Map
<
String
,
Object
>
dataMap
=
new
HashMap
<>();
//获取待审核
PmsProduct
pmsProduct
=
new
PmsProduct
();
pmsProduct
.
setVerifyStatus
(
0
);
//审核状态:0->未审核;1->审核通过 2->驳回 3->审核失败
pmsProduct
.
setMchtId
(
memberId
);
dataMap
.
put
(
"待审核"
,
this
.
productDao
.
getProductCount
(
pmsProduct
));
//获取已审核的
pmsProduct
=
new
PmsProduct
();
pmsProduct
.
setMchtId
(
memberId
);
pmsProduct
.
setPublishStatus
(
1
);
//上架状态:0->下架;1->上架
pmsProduct
.
setVerifyStatus
(
1
);
//审核状态:0->未审核;1->审核通过 2->驳回 3->审核失败
dataMap
.
put
(
"已审核"
,
this
.
productDao
.
getProductCount
(
pmsProduct
));
//获取未通过
pmsProduct
=
new
PmsProduct
();
pmsProduct
.
setMchtId
(
memberId
);
pmsProduct
.
setVerifyStatus
(
2
);
//审核状态:0->未审核;1->审核通过 2->驳回 3->审核失败
dataMap
.
put
(
"未通过"
,
this
.
productDao
.
getProductCount
(
pmsProduct
));
//获取已下架
pmsProduct
=
new
PmsProduct
();
pmsProduct
.
setMchtId
(
memberId
);
pmsProduct
.
setVerifyStatus
(
1
);
//审核状态:0->未审核;1->审核通过 2->驳回 3->审核失败
pmsProduct
.
setPublishStatus
(
0
);
//上架状态:0->下架;1->上架
dataMap
.
put
(
"已下架"
,
this
.
productDao
.
getProductCount
(
pmsProduct
));
return
new
ResultMsg
(
true
,
"获取数据成功"
,
dataMap
);
}
/**
* 获取管理员个人中心商品状态
* @return
*/
@Override
public
ResultMsg
getAdminProductStatus
(){
//数据Map
Map
<
String
,
Object
>
dataMap
=
new
HashMap
<>();
//获取待审核
PmsProduct
pmsProduct
=
new
PmsProduct
();
pmsProduct
.
setVerifyStatus
(
0
);
//审核状态:0->未审核;1->审核通过 2->驳回 3->审核失败
dataMap
.
put
(
"待审核商品"
,
this
.
productDao
.
getProductCount
(
pmsProduct
));
//获取已审核的
pmsProduct
=
new
PmsProduct
();
pmsProduct
.
setVerifyStatus
(
1
);
//审核状态:0->未审核;1->审核通过 2->驳回 3->审核失败
dataMap
.
put
(
"已审核商品"
,
this
.
productDao
.
getProductCount
(
pmsProduct
));
//获取未通过
pmsProduct
=
new
PmsProduct
();
pmsProduct
.
setVerifyStatus
(
2
);
//审核状态:0->未审核;1->审核通过 2->驳回 3->审核失败
dataMap
.
put
(
"未通过商品"
,
this
.
productDao
.
getProductCount
(
pmsProduct
));
//获取待审核供应商
PmsSupplierAudit
pmsSupplierAudit
=
new
PmsSupplierAudit
();
pmsSupplierAudit
.
setStatus
(
0
);
//审核状态 0待审核 1审核通过 2审核不通过
dataMap
.
put
(
"待审核供应商"
,
this
.
pmsSupplierAuditDao
.
selectCount
(
pmsSupplierAudit
));
//获取待审核供应商
pmsSupplierAudit
=
new
PmsSupplierAudit
();
pmsSupplierAudit
.
setStatus
(
1
);
//审核状态 0待审核 1审核通过 2审核不通过
dataMap
.
put
(
"已审核供应商"
,
this
.
pmsSupplierAuditDao
.
selectCount
(
pmsSupplierAudit
));
//获取待审核供应商
pmsSupplierAudit
=
new
PmsSupplierAudit
();
pmsSupplierAudit
.
setStatus
(
2
);
//审核状态 0待审核 1审核通过 2审核不通过
dataMap
.
put
(
"未通过供应商"
,
this
.
pmsSupplierAuditDao
.
selectCount
(
pmsSupplierAudit
));
return
new
ResultMsg
(
true
,
"查询成功"
,
dataMap
);
}
}
mall-service/src/main/java/com/macro/mall/service/quanxing/IOmsChoseProductService.java
deleted
100644 → 0
View file @
fa69d450
package
com
.
macro
.
mall
.
service
.
quanxing
;
import
com.macro.mall.model.OmsChoseProduct
;
import
com.macro.mall.model.common.ResultMsg
;
import
com.macro.mall.model.dto.quanxing.OmsChoseProductDto
;
import
java.util.List
;
public
interface
IOmsChoseProductService
{
/**
* 获取选择商品分页数据
* @param pageNum
* @param pageSize
* @param memberId
* @return
*/
List
<
OmsChoseProductDto
>
getListPage
(
Integer
pageNum
,
Integer
pageSize
,
Long
memberId
);
/**
* 插入一条选择商品
* @param omsChoseProduct
* @return
*/
ResultMsg
insertChoseProduct
(
OmsChoseProduct
omsChoseProduct
);
/**
* 删除选择商品
* @param omsChoseProductDto
* @return
*/
ResultMsg
deleteChoseProduct
(
OmsChoseProductDto
omsChoseProductDto
);
}
mall-service/src/main/java/com/macro/mall/service/quanxing/IPmsSupplierAuditService.java
deleted
100644 → 0
View file @
fa69d450
package
com
.
macro
.
mall
.
service
.
quanxing
;
import
com.macro.mall.common.api.CommonPage
;
import
com.macro.mall.model.common.ResultMsg
;
import
com.macro.mall.model.dto.PmsSupplierAuditDto
;
import
com.macro.mall.model.dto.quanxing.PmsSupplierAuditRequest
;
import
java.util.List
;
public
interface
IPmsSupplierAuditService
{
/**
* 插入一条供应商审核
* @param pmsSupplierAuditDto
* @return
*/
ResultMsg
insertSupplierAudit
(
PmsSupplierAuditDto
pmsSupplierAuditDto
);
/**
* 审核供应商
* @return
*/
ResultMsg
auditSupplier
(
PmsSupplierAuditRequest
pmsSupplierAuditRequest
);
/**
* 得到UUID 随机八位数
* @return
*/
String
getUsername
();
/**
* 分页查询
* @param page
* @param size
* @param name
* @param phone
* @return
*/
CommonPage
<
PmsSupplierAuditDto
>
getPageList
(
Integer
page
,
Integer
size
,
String
name
,
String
phone
,
Integer
status
);
/**
* 根据id获取一条审核记录
* @param id
* @return
*/
PmsSupplierAuditDto
getSupplierAuditById
(
Long
id
);
}
mall-service/src/main/java/com/macro/mall/service/quanxing/PmsProductAttributeCategoryService.java
deleted
100644 → 0
View file @
fa69d450
package
com
.
macro
.
mall
.
service
.
quanxing
;
import
com.macro.mall.model.PmsProductAttributeCategory
;
import
com.macro.mall.model.dto.PmsProductAttributeCategoryItem
;
import
java.util.List
;
/**
* 商品属性分类Service
* Created by macro on 2018/4/26.
*/
public
interface
PmsProductAttributeCategoryService
{
int
create
(
String
name
,
Long
id
,
Integer
soft
);
int
update
(
Long
id
,
PmsProductAttributeCategory
name
);
int
delete
(
Long
id
);
PmsProductAttributeCategory
getItem
(
Long
id
);
List
<
PmsProductAttributeCategory
>
getList
(
Integer
pageSize
,
Integer
pageNum
,
Long
parentId
);
List
<
PmsProductAttributeCategoryItem
>
getListWithAttr
();
/**
* 获取所有子集类目id
* @param attributeCategoryId
* @return
*/
List
<
Long
>
getAtributeCategoryIdList
(
Long
attributeCategoryId
);
/**
* 查询所有分类 如果传入参数则根据对应参数查询
* @return
*/
List
<
PmsProductAttributeCategory
>
getAttributeCategoryList
(
Integer
pageSize
,
Integer
pageNum
,
Long
parentId
);
}
mall-service/src/main/java/com/macro/mall/service/quanxing/impl/OmsChoseProductServiceImpl.java
deleted
100644 → 0
View file @
fa69d450
package
com
.
macro
.
mall
.
service
.
quanxing
.
impl
;
import
com.github.pagehelper.PageHelper
;
import
com.macro.mall.dao.quanxing.OmsChoseProductDao
;
import
com.macro.mall.mapper.OmsChoseProductMapper
;
import
com.macro.mall.model.OmsChoseProduct
;
import
com.macro.mall.model.common.ResultMsg
;
import
com.macro.mall.model.dto.quanxing.OmsChoseProductDto
;
import
com.macro.mall.service.member.UmsMemberService
;
import
com.macro.mall.service.quanxing.IOmsChoseProductService
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
javax.annotation.Resource
;
import
java.util.Arrays
;
import
java.util.List
;
@Service
public
class
OmsChoseProductServiceImpl
implements
IOmsChoseProductService
{
@Resource
private
OmsChoseProductMapper
omsChoseProductMapper
;
@Resource
private
OmsChoseProductDao
omsChoseProductDao
;
@Autowired
private
UmsMemberService
umsMemberService
;
/**
* 获取选择商品分页数据
* @param pageNum
* @param pageSize
* @param memberId
* @return
*/
@Override
public
List
<
OmsChoseProductDto
>
getListPage
(
Integer
pageNum
,
Integer
pageSize
,
Long
memberId
){
PageHelper
.
startPage
(
pageNum
,
pageSize
);
OmsChoseProductDto
omsChoseProductDto
=
new
OmsChoseProductDto
();
omsChoseProductDto
.
setMemberId
(
memberId
);
return
this
.
omsChoseProductDao
.
selectListByMemberId
(
memberId
);
}
/**
* 插入一条选择商品
* @param omsChoseProduct
* @return
*/
@Override
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
ResultMsg
insertChoseProduct
(
OmsChoseProduct
omsChoseProduct
){
if
(
omsChoseProduct
.
getProductId
()
==
null
){
return
new
ResultMsg
(
false
,
"传入商品为空"
);
}
omsChoseProduct
.
setMemberId
(
this
.
umsMemberService
.
getCurrentMemberId
());
this
.
omsChoseProductMapper
.
insertSelective
(
omsChoseProduct
);
return
new
ResultMsg
(
true
,
"操作成功"
);
}
/**
* 删除选择商品
* @param omsChoseProductDto
* @return
*/
@Override
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
ResultMsg
deleteChoseProduct
(
OmsChoseProductDto
omsChoseProductDto
){
if
(
omsChoseProductDto
.
getIds
()
==
null
||
""
.
equals
(
omsChoseProductDto
.
getIds
())){
return
new
ResultMsg
(
false
,
"传入id为空"
);
}
List
idList
=
Arrays
.
asList
(
omsChoseProductDto
.
getIds
().
split
(
","
));
//根据逗号分隔转化为list
idList
.
forEach
(
id
->{
this
.
omsChoseProductMapper
.
deleteByPrimaryKey
(
Long
.
valueOf
((
String
)
id
));
});
return
new
ResultMsg
(
true
,
"操作成功"
);
}
}
mall-service/src/main/java/com/macro/mall/service/quanxing/impl/PmsProductAttributeCategoryServiceImpl.java
deleted
100644 → 0
View file @
fa69d450
package
com
.
macro
.
mall
.
service
.
quanxing
.
impl
;
import
com.github.pagehelper.PageHelper
;
import
com.macro.mall.dao.quanxing.PmsProductAttributeCategoryDao
;
import
com.macro.mall.mapper.PmsProductAttributeCategoryMapper
;
import
com.macro.mall.model.PmsProductAttributeCategory
;
import
com.macro.mall.model.PmsProductAttributeCategoryExample
;
import
com.macro.mall.model.dto.PmsProductAttributeCategoryItem
;
import
com.macro.mall.service.quanxing.PmsProductAttributeCategoryService
;
import
org.springframework.stereotype.Service
;
import
javax.annotation.Resource
;
import
java.util.ArrayList
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.stream.Collectors
;
/**
* PmsProductAttributeCategoryService实现类
* Created by macro on 2018/4/26.
*/
@Service
public
class
PmsProductAttributeCategoryServiceImpl
implements
PmsProductAttributeCategoryService
{
@Resource
private
PmsProductAttributeCategoryMapper
productAttributeCategoryMapper
;
@Resource
private
PmsProductAttributeCategoryDao
productAttributeCategoryDao
;
@Override
public
int
create
(
String
name
,
Long
parentId
,
Integer
soft
)
{
PmsProductAttributeCategory
productAttributeCategory
=
new
PmsProductAttributeCategory
();
productAttributeCategory
.
setName
(
name
);
productAttributeCategory
.
setCreateDate
(
new
Date
());
productAttributeCategory
.
setSort
(
soft
);
if
(
parentId
==
null
||
parentId
==
0
){
productAttributeCategory
.
setParentId
(
0L
);
productAttributeCategory
.
setLevel
(
1
);
}
else
{
PmsProductAttributeCategory
model
=
productAttributeCategoryMapper
.
selectByPrimaryKey
(
parentId
);
productAttributeCategory
.
setLevel
(
model
.
getLevel
()+
1
);
productAttributeCategory
.
setParentId
(
parentId
);
}
return
productAttributeCategoryMapper
.
insertSelective
(
productAttributeCategory
);
}
@Override
public
int
update
(
Long
id
,
PmsProductAttributeCategory
model
)
{
model
.
setId
(
id
);
model
.
setUpdateDate
(
new
Date
());
return
productAttributeCategoryMapper
.
updateByPrimaryKeySelective
(
model
);
}
@Override
public
int
delete
(
Long
id
)
{
PmsProductAttributeCategoryExample
example
=
new
PmsProductAttributeCategoryExample
();
example
.
createCriteria
().
andIdEqualTo
(
id
);
PmsProductAttributeCategory
productAttributeCategory
=
new
PmsProductAttributeCategory
();
productAttributeCategory
.
setDeleteStatus
(
1
);
return
productAttributeCategoryMapper
.
updateByExampleSelective
(
productAttributeCategory
,
example
);
}
@Override
public
PmsProductAttributeCategory
getItem
(
Long
id
)
{
return
productAttributeCategoryMapper
.
selectByPrimaryKey
(
id
);
}
@Override
public
List
<
PmsProductAttributeCategory
>
getList
(
Integer
pageSize
,
Integer
pageNum
,
Long
parentId
)
{
PageHelper
.
startPage
(
pageNum
,
pageSize
);
PmsProductAttributeCategoryExample
example
=
new
PmsProductAttributeCategoryExample
();
example
.
createCriteria
().
andParentIdEqualTo
(
parentId
).
andDeleteStatusEqualTo
(
0
);
example
.
setOrderByClause
(
"sort"
);
return
productAttributeCategoryMapper
.
selectByExample
(
example
);
}
/**
* 查询所有分类 如果传入参数则根据对应参数查询
* @return
*/
public
List
<
PmsProductAttributeCategory
>
getAttributeCategoryList
(
Integer
page
,
Integer
size
,
Long
parentId
){
PmsProductAttributeCategoryExample
example
=
new
PmsProductAttributeCategoryExample
();
PmsProductAttributeCategoryExample
.
Criteria
criteria
=
example
.
createCriteria
();
if
(
page
!=
null
&&
size
!=
null
){
//如果传入分页参数 则调用pageHelper
PageHelper
.
startPage
(
page
,
size
);
}
if
(
parentId
!=
null
){
criteria
.
andParentIdEqualTo
(
parentId
);
}
criteria
.
andDeleteStatusEqualTo
(
0
);
//查询未删除的
//根据sort asc升序
example
.
setOrderByClause
(
"sort asc"
);
return
productAttributeCategoryMapper
.
selectByExample
(
example
);
}
@Override
public
List
<
PmsProductAttributeCategoryItem
>
getListWithAttr
()
{
return
productAttributeCategoryDao
.
getListWithAttr
();
}
/**
* 获取所有子集类目id
*
* @param attributeCategoryId
* @return
*/
@Override
public
List
<
Long
>
getAtributeCategoryIdList
(
Long
attributeCategoryId
)
{
if
(
attributeCategoryId
==
null
||
attributeCategoryId
==
0
){
return
null
;
}
List
<
PmsProductAttributeCategory
>
categories
=
this
.
getAtributeCategoryList
(
attributeCategoryId
,
null
,
null
);
if
(
categories
.
isEmpty
()){
return
null
;
}
List
<
Long
>
idList
=
new
ArrayList
<>();
idList
.
add
(
attributeCategoryId
);
PmsProductAttributeCategory
category
=
categories
.
get
(
0
);
if
(
category
.
getLevel
()
==
3
){
return
idList
;
}
if
(
category
.
getLevel
()
==
2
){
categories
=
this
.
getAtributeCategoryList
(
null
,
category
.
getId
(),
null
);
//找出子集属性类目
if
(!
categories
.
isEmpty
()){
List
<
Long
>
ids
=
categories
.
stream
().
map
(
PmsProductAttributeCategory:
:
getId
).
collect
(
Collectors
.
toList
());
idList
.
addAll
(
ids
);
}
return
idList
;
}
if
(
category
.
getLevel
()
==
1
){
categories
=
this
.
getAtributeCategoryList
(
null
,
category
.
getId
(),
null
);
//找出子集属性类目(2极)
if
(!
categories
.
isEmpty
()){
List
<
Long
>
ids
=
categories
.
stream
().
map
(
PmsProductAttributeCategory:
:
getId
).
collect
(
Collectors
.
toList
());
idList
.
addAll
(
ids
);
categories
=
this
.
getAtributeCategoryList
(
null
,
null
,
ids
);
//找出子集属性类目(3极)
if
(!
categories
.
isEmpty
()){
ids
=
categories
.
stream
().
map
(
PmsProductAttributeCategory:
:
getId
).
collect
(
Collectors
.
toList
());
idList
.
addAll
(
ids
);
}
return
idList
;
}
}
return
idList
;
}
private
List
<
PmsProductAttributeCategory
>
getAtributeCategoryList
(
Long
id
,
Long
parentId
,
List
<
Long
>
parentIds
)
{
PmsProductAttributeCategoryExample
pmsProductAttributeCategoryExample
=
new
PmsProductAttributeCategoryExample
();
PmsProductAttributeCategoryExample
.
Criteria
criteria
=
pmsProductAttributeCategoryExample
.
createCriteria
();
criteria
.
andDeleteStatusEqualTo
(
0
);
if
(
id
!=
null
){
criteria
.
andIdEqualTo
(
id
);
}
if
(
parentId
!=
null
){
criteria
.
andParentIdEqualTo
(
parentId
);
}
if
(
parentIds
!=
null
&&
parentIds
.
size
()
>
0
){
criteria
.
andParentIdIn
(
parentIds
);
}
return
productAttributeCategoryMapper
.
selectByExample
(
pmsProductAttributeCategoryExample
);
}
}
mall-service/src/main/java/com/macro/mall/service/quanxing/impl/PmsSupplierAuditServiceImpl.java
deleted
100644 → 0
View file @
fa69d450
This diff is collapsed.
Click to expand it.
mall-service/src/main/java/com/macro/mall/service/system/UmsAdminService.java
View file @
1cad1abd
...
...
@@ -176,4 +176,6 @@ public interface UmsAdminService {
* @return
*/
int
updateAdmin
(
Long
id
,
AdminUpdateParam
admin
);
UmsAdmin
getCurrentUmsAdmin
();
}
mall-service/src/main/java/com/macro/mall/service/system/impl/UmsAdminServiceImpl.java
View file @
1cad1abd
...
...
@@ -6,6 +6,7 @@ import com.macro.mall.dao.UmsAdminDao;
import
com.macro.mall.dao.UmsAdminPermissionRelationDao
;
import
com.macro.mall.dao.UmsAdminRoleRelationDao
;
import
com.macro.mall.domain.AdminUpdateParam
;
import
com.macro.mall.domain.MemberDetails
;
import
com.macro.mall.domain.dto.AdminManageParam
;
import
com.macro.mall.domain.dto.UmsAdminParam
;
import
com.macro.mall.domain.dto.UmsAdminQueryParam
;
...
...
@@ -21,7 +22,9 @@ import lombok.extern.slf4j.Slf4j;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.security.authentication.UsernamePasswordAuthenticationToken
;
import
org.springframework.security.core.Authentication
;
import
org.springframework.security.core.AuthenticationException
;
import
org.springframework.security.core.context.SecurityContext
;
import
org.springframework.security.core.context.SecurityContextHolder
;
import
org.springframework.security.core.userdetails.UserDetails
;
import
org.springframework.security.core.userdetails.UsernameNotFoundException
;
...
...
@@ -638,6 +641,17 @@ public class UmsAdminServiceImpl implements UmsAdminService {
return
adminMapper
.
updateByPrimaryKeySelective
(
umsAdmin
);
}
@Override
public
UmsAdmin
getCurrentUmsAdmin
()
{
SecurityContext
ctx
=
SecurityContextHolder
.
getContext
();
Authentication
auth
=
ctx
.
getAuthentication
();
if
(
auth
!=
null
&&
auth
.
getPrincipal
()
instanceof
MemberDetails
)
{
AdminUserDetails
adminUserDetails
=
(
AdminUserDetails
)
auth
.
getPrincipal
();
return
adminUserDetails
.
getUmsAdmin
();
}
return
null
;
}
public
Long
getAdminRoleId
(
Long
id
){
UmsAdminRoleRelationExample
example
=
new
UmsAdminRoleRelationExample
();
//查询用户角色id
...
...
@@ -645,4 +659,6 @@ public class UmsAdminServiceImpl implements UmsAdminService {
List
<
UmsAdminRoleRelation
>
umsAdminRoleRelations
=
adminRoleRelationMapper
.
selectByExample
(
example
);
return
umsAdminRoleRelations
.
get
(
0
).
getRoleId
();
}
}
mall-service/src/main/java/com/macro/mall/service/vanke/IVankeBackLogService.java
0 → 100644
View file @
1cad1abd
package
com
.
macro
.
mall
.
service
.
vanke
;
import
com.macro.mall.model.VankeBackLog
;
import
java.util.List
;
public
interface
IVankeBackLogService
{
/**
* 分页查询日志
* @param pageNum
* @param pageSize
* @return
*/
List
<
VankeBackLog
>
getPageList
(
Integer
pageNum
,
Integer
pageSize
);
}
mall-service/src/main/java/com/macro/mall/service/vanke/IVankeDepartmentSerive.java
0 → 100644
View file @
1cad1abd
package
com
.
macro
.
mall
.
service
.
vanke
;
import
com.macro.mall.model.VankeDepartment
;
import
com.macro.mall.model.common.ResultMsg
;
import
java.util.List
;
public
interface
IVankeDepartmentSerive
{
/**.
* 分页查询
* @param pageNum
* @param pageSize
* @return
*/
List
<
VankeDepartment
>
getPageList
(
Integer
pageNum
,
Integer
pageSize
);
/**
* 插入部门
* @param vankeDepartment
* @return
*/
ResultMsg
insertDepartment
(
VankeDepartment
vankeDepartment
);
/**
* 根据id 修改对应的参数
* @param vankeDepartment
* @return
*/
ResultMsg
updateDepartment
(
VankeDepartment
vankeDepartment
);
}
mall-service/src/main/java/com/macro/mall/service/vanke/impl/VankeBackLogServiceImpl.java
0 → 100644
View file @
1cad1abd
package
com
.
macro
.
mall
.
service
.
vanke
.
impl
;
import
com.macro.mall.mapper.VankeDepartmentMapper
;
import
com.macro.mall.model.VankeBackLog
;
import
com.macro.mall.service.vanke.IVankeBackLogService
;
import
org.springframework.stereotype.Service
;
import
javax.annotation.Resource
;
import
java.util.List
;
/**
* 后台日志表
*/
@Service
public
class
VankeBackLogServiceImpl
implements
IVankeBackLogService
{
@Resource
private
VankeDepartmentMapper
vankeDepartmentMapper
;
@Override
public
List
<
VankeBackLog
>
getPageList
(
Integer
pageNum
,
Integer
pageSize
)
{
return
null
;
}
}
mall-service/src/main/java/com/macro/mall/service/vanke/impl/VankeDepartmentSeriveImpl.java
0 → 100644
View file @
1cad1abd
package
com
.
macro
.
mall
.
service
.
vanke
.
impl
;
import
com.github.pagehelper.PageHelper
;
import
com.macro.mall.common.api.CommonPage
;
import
com.macro.mall.mapper.VankeDepartmentMapper
;
import
com.macro.mall.model.UmsAdmin
;
import
com.macro.mall.model.VankeDepartment
;
import
com.macro.mall.model.VankeDepartmentExample
;
import
com.macro.mall.model.common.ResultMsg
;
import
com.macro.mall.service.system.UmsAdminService
;
import
com.macro.mall.service.vanke.IVankeDepartmentSerive
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
javax.annotation.Resource
;
import
java.util.List
;
/**
* vanke 部门表业务层
*/
@Service
public
class
VankeDepartmentSeriveImpl
implements
IVankeDepartmentSerive
{
@Resource
private
VankeDepartmentMapper
vankeDepartmentMapper
;
@Autowired
private
UmsAdminService
umsAdminService
;
@Override
public
List
<
VankeDepartment
>
getPageList
(
Integer
pageNum
,
Integer
pageSize
){
PageHelper
.
startPage
(
pageNum
,
pageSize
);
VankeDepartmentExample
example
=
new
VankeDepartmentExample
();
VankeDepartmentExample
.
Criteria
criteria
=
example
.
createCriteria
();
criteria
.
andDeleteStatusEqualTo
(
1
);
//'1未删除 0已删除'
return
this
.
vankeDepartmentMapper
.
selectByExample
(
example
);
}
@Override
public
ResultMsg
insertDepartment
(
VankeDepartment
vankeDepartment
)
{
VankeDepartment
vd
=
new
VankeDepartment
();
//插入部门
if
(
vankeDepartment
.
getName
()
==
null
&&
""
.
equals
(
vankeDepartment
.
getName
())){
return
new
ResultMsg
(
false
,
"请输入部门名称"
);
}
UmsAdmin
admin
=
umsAdminService
.
getCurrentUmsAdmin
();
vd
.
setName
(
vankeDepartment
.
getName
());
vd
.
setStatus
(
vankeDepartment
.
getStatus
());
vd
.
setCreateBy
(
admin
.
getId
());
vd
.
setUpdateBy
(
admin
.
getId
());
this
.
vankeDepartmentMapper
.
insertSelective
(
vd
);
return
new
ResultMsg
(
true
,
"操作成功"
);
}
/**
* 根据id 修改对应的参数
* @param vankeDepartment
* @return
*/
@Override
public
ResultMsg
updateDepartment
(
VankeDepartment
vankeDepartment
){
if
(
vankeDepartment
.
getId
()
==
null
){
return
new
ResultMsg
(
false
,
"传入id为空"
);
}
this
.
vankeDepartmentMapper
.
updateByPrimaryKeySelective
(
vankeDepartment
);
return
new
ResultMsg
(
true
,
"操作成功"
);
}
}
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