Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
9
91isoft_spbt_project
Project
Project
Details
Activity
Releases
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
王淑君
91isoft_spbt_project
Commits
fec74ef2
Commit
fec74ef2
authored
Dec 17, 2018
by
王淑君
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'wsj' into 'dev'
Wsj See merge request
!7
parents
ed60f0b6
c9f71248
Changes
12
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
312 additions
and
521 deletions
+312
-521
pom.xml
pom.xml
+1
-1
readMe.md
readMe.md
+1
-1
system_dept_alone.sql
sql/system_dept_alone.sql
+81
-82
BSpaceController.java
.../rcisoft/business/bspace/controller/BSpaceController.java
+71
-126
BSpaceRepository.java
...ava/org/rcisoft/business/bspace/dao/BSpaceRepository.java
+8
-83
BSpace.java
src/main/java/org/rcisoft/business/bspace/entity/BSpace.java
+29
-18
BSpaceService.java
...va/org/rcisoft/business/bspace/service/BSpaceService.java
+36
-62
BSpaceServiceImpl.java
...isoft/business/bspace/service/impl/BSpaceServiceImpl.java
+58
-121
application-dev.yml
src/main/resources/application-dev.yml
+1
-1
logback-spring.xml
src/main/resources/logback-spring.xml
+6
-8
BSpaceMapper.xml
src/main/resources/mapper.biz/bspace/mapper/BSpaceMapper.xml
+0
-18
BSpaceMapper.xml
src/main/resources/mapper/biz/bspace/mapper/BSpaceMapper.xml
+20
-0
No files found.
pom.xml
View file @
fec74ef2
...
@@ -20,7 +20,7 @@
...
@@ -20,7 +20,7 @@
<dependency>
<dependency>
<groupId>
org.91isoft
</groupId>
<groupId>
org.91isoft
</groupId>
<artifactId>
91isoft_spbt
</artifactId>
<artifactId>
91isoft_spbt
</artifactId>
<version>
1.0-SNAPSHOT
</version>
<version>
1.0
.1
-SNAPSHOT
</version>
</dependency>
</dependency>
</dependencies>
</dependencies>
...
...
readMe.md
View file @
fec74ef2
...
@@ -113,7 +113,7 @@
...
@@ -113,7 +113,7 @@
<dependency>
<dependency>
<groupId>
org.91isoft
</groupId>
<groupId>
org.91isoft
</groupId>
<artifactId>
91isoft_spbt
</artifactId>
<artifactId>
91isoft_spbt
</artifactId>
<version>
1.0-SNAPSHOT
</version>
<version>
1.0
.1
-SNAPSHOT
</version>
</dependency>
</dependency>
</dependencies>
</dependencies>
~~~
~~~
...
...
sql/system_dept_alone.sql
View file @
fec74ef2
This diff is collapsed.
Click to expand it.
src/main/java/org/rcisoft/business/bspace/controller/BSpaceController.java
View file @
fec74ef2
This diff is collapsed.
Click to expand it.
src/main/java/org/rcisoft/business/bspace/dao/BSpaceRepository.java
View file @
fec74ef2
package
org
.
rcisoft
.
business
.
bspace
.
dao
;
package
org
.
rcisoft
.
business
.
bspace
.
dao
;
import
org.rcisoft.core.base.CyBaseMapper
;
import
org.rcisoft.business.bspace.entity.BSpace
;
import
org.rcisoft.business.bspace.entity.BSpace
;
import
org.apache.ibatis.annotations.ResultMap
;
import
org.apache.ibatis.annotations.ResultMap
;
import
org.apache.ibatis.annotations.Select
;
import
org.apache.ibatis.annotations.Select
;
import
org.rcisoft.core.base.CyBaseMapper
;
import
org.springframework.stereotype.Repository
;
import
org.springframework.stereotype.Repository
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
/**
/**
* Created with on 2018-6-21 17:10:54
.
* Created with cy on 2018-12-17 13:50:52
.
*/
*/
@Repository
@Repository
public
interface
BSpaceRepository
extends
CyBaseMapper
<
BSpace
>
{
public
interface
BSpaceRepository
extends
CyBaseMapper
<
BSpace
>
{
/**
/**
* 分页查询 bSpace
* 分页查询 bSpace
*
*
*/
*/
@Select
(
"<script>select * from b_space where 1=1 "
@Select
(
"<script>select * from b_space where 1=1 "
+
"and del_flag = 0 "
+
"<if test=\"delFlag !=null and delFlag != '' \">and del_flag = #{delFlag} </if> "
+
"and flag = 1 "
+
"<if test=\"flag !=null and flag != '' \">and flag = #{flag} </if> "
+
"<if test=\"businessId !=null and businessId != '' \">and business_id = #{businessId} </if> "
+
"</script>"
)
+
"</script>"
)
@ResultMap
(
value
=
"BaseResultMap"
)
@ResultMap
(
value
=
"BaseResultMap"
)
List
<
BSpace
>
queryBSpaces
(
BSpace
bSpace
);
List
<
BSpace
>
queryBSpaces
(
BSpace
bSpace
);
/**
* @param businessId
* @return
*/
@Select
(
"select count(*) from b_space where del_flag = 0 and flag = 1 and business_id = #{businessId}"
)
int
existSpace
(
String
businessId
);
/**
* 分页查询
* 分页增加
*
* */
@Select
(
"<script>select * from b_space where flag = '1' and del_flag = '0' "
+
"and business_id = #{businessId}"
+
"</script>"
)
@ResultMap
(
value
=
"BaseResultMap"
)
List
<
BSpace
>
querySpaceListsByName
(
BSpace
spaceList
);
/**
* 通过businessId查询
* @param spaceId
* @return
*/
@Select
(
"select * from b_space b where b.flag = '1' and b.del_flag = '0' and b.business_id=#{spaceId}"
)
@ResultMap
(
value
=
"BaseResultMap"
)
BSpace
querySpaceListByBusinessId
(
String
spaceId
);
/**
* spaceAdd 新增
* @param spaceList
* @return
*/
@Select
(
"<script>select * from b_space where flag = '1' and del_flag = '0' "
+
"and space_id = #{spaceId} "
+
"</script>"
)
@ResultMap
(
value
=
"BaseResultMap"
)
List
<
BSpace
>
querySpaceListsByCodeOrName
(
BSpace
spaceList
);
/**
* 分页查询 bSpaceCategory
*查询空间列表 不分页
*/
@Select
(
"<script>select * from b_space where "
+
" del_flag = 0 and flag = 1 </script>"
)
@ResultMap
(
value
=
"BaseResultMap"
)
List
<
BSpace
>
queryBSpaceCategorys
(
BSpace
spaceList
);
@Select
(
"<script> SELECT "
+
"bs.space_name as spaceName, bs.space_id as spaceId, "
+
"DATE_FORMAT( bs.create_date, '%Y-%m-%d' ) AS date "
+
"FROM "
+
"b_space bs "
+
"WHERE "
+
"1 = 1 "
+
"AND bs.create_date BETWEEN '2018-7-28' "
+
"AND '2018-8-28' "
+
"GROUP BY "
+
"bs.business_id, "
+
"date "
+
"</script>"
)
List
<
Map
<
String
,
Object
>>
queryAllSpacesByTime
(
String
beginTime
,
String
endTime
);
/**
* 查询空间数
* @param spaceList
* @return
*/
@Select
(
"select count(*) as spaceNum from b_space bs where bs.del_flag = 0 and bs.flag = 1"
)
List
<
BSpace
>
querySpaceNum
(
BSpace
spaceList
);
}
}
src/main/java/org/rcisoft/business/bspace/entity/BSpace.java
View file @
fec74ef2
...
@@ -2,36 +2,47 @@ package org.rcisoft.business.bspace.entity;
...
@@ -2,36 +2,47 @@ package org.rcisoft.business.bspace.entity;
import
lombok.*
;
import
lombok.*
;
import
org.hibernate.validator.constraints.Length
;
import
org.hibernate.validator.constraints.NotBlank
;
import
org.rcisoft.core.entity.CyIdEntity
;
import
org.rcisoft.core.entity.CyIdEntity
;
import
org.springframework.data.annotation.Transient
;
import
javax.persistence.*
;
import
javax.persistence.*
;
import
java.math.BigDecimal
;
import
java.math.BigInteger
;
import
java.io.Serializable
;
import
java.util.Date
;
import
java.util.List
;
/**
/**
* Created with on 2018-6-21 17:10:54.
* Created with cy on 2018-12-17 13:50:51.
*/
*/
@Entity
@Data
@Data
@Table
(
name
=
"b_space"
)
@NoArgsConstructor
@NoArgsConstructor
@AllArgsConstructor
@AllArgsConstructor
public
class
BSpace
extends
CyIdEntity
<
BSpace
>
{
@Table
(
name
=
"b_space"
)
public
class
BSpace
extends
CyIdEntity
<
BSpace
>
{
private
static
final
long
serialVersionUID
=
-
2165299707591725301L
;
@Length
(
min
=
1
,
max
=
64
,
message
=
"长度最小为1,最大为50"
)
@NotBlank
private
String
spaceName
;
@Length
(
min
=
1
,
max
=
64
,
message
=
"长度最小为1,最大为50"
)
@NotBlank
/**
* @desc 空间编号
* @column space_id
* @default
*/
private
String
spaceId
;
private
String
spaceId
;
@Length
(
min
=
1
,
max
=
64
,
message
=
"长度最小为1,最大为50"
)
/**
@NotBlank
* @desc 空间名
* @column space_name
* @default
*/
private
String
spaceName
;
/**
* @desc 域名
* @column realm_name
* @default
*/
private
String
realmName
;
private
String
realmName
;
@Transient
private
String
spaceNum
;
}
}
src/main/java/org/rcisoft/business/bspace/service/BSpaceService.java
View file @
fec74ef2
package
org
.
rcisoft
.
business
.
bspace
.
service
;
package
org
.
rcisoft
.
business
.
bspace
.
service
;
import
org.rcisoft.business.bspace.entity.BSpace
;
import
org.rcisoft.business.bspace.entity.BSpace
;
import
org.rcisoft.core.aop.CyPageUtil
;
import
org.rcisoft.core.model.CyPersistModel
;
import
org.rcisoft.core.model.CyPersistModel
;
import
org.rcisoft.core.aop.CyPageUtil
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
/**
/**
* Created by
on 2018-6-21 17:10:54
.
* Created by
cy on 2018-12-17 13:50:52
.
*/
*/
public
interface
BSpaceService
{
public
interface
BSpaceService
{
/**
/**
* 保存
* 保存
*
* @param bSpace
* @param bSpace
* @return
* @return
*/
*/
CyPersistModel
save
(
BSpace
bSpace
);
CyPersistModel
save
(
BSpace
bSpace
);
/**
/**
* 逻辑删除
* 删除
*
* @param bSpace
* @param bSpace
* @return
* @return
*/
*/
CyPersistModel
remove
(
BSpace
bSpace
);
CyPersistModel
remove
(
BSpace
bSpace
);
/**
/**
* 修改
* 逻辑删除
*
* @param bSpace
* @param bSpace
* @return
* @return
*/
*/
CyPersistModel
removeLogical
(
BSpace
bSpace
);
CyPersistModel
merge
(
BSpace
bSpace
);
/**
/**
* 根据id查询
* 修改
*
* @param bSpace
* @param id
* @return
* @return
*/
*/
CyPersistModel
merge
(
BSpace
bSpace
);
BSpace
findById
(
String
id
);
/**
/**
* 分页查询
* 根据id查询
*
* @param id
* @param bSpace
* @return
* @return
*/
*/
BSpace
findById
(
String
id
);
List
<
BSpace
>
findAllByPagination
(
CyPageUtil
<
BSpace
>
paginationUtility
,
BSpace
bSpace
);
/**
* @param bSpace
* @return java.util.List<org.rcisoft.business.bspace.entity.BSpace>
* @author ningxy
* @description 不分页查询所有空间
* @date 2018/7/20 下午1:36
*/
List
<
BSpace
>
listAllSpaces
(
BSpace
bSpace
);
/**
/**
* 增加/修改
* 分页查询
* @param spaceList
* @param bSpace
* @param token
* @return
* @return
*/
*/
List
<
BSpace
>
findAllByPagination
(
CyPageUtil
<
BSpace
>
paginationUtility
,
BSpace
bSpace
);
int
persistSpaceList
(
BSpace
spaceList
,
String
token
);
/**
/**
* 通过businessId查询
* 查询list
* @param businessId
* @param bSpace
* @return
* @return
*/
*/
BSpace
querySpaceListByBusinessId
(
String
businessId
);
List
<
BSpace
>
findAll
(
BSpace
bSpace
);
/**
* 查询 分页
* 查询所有角色,不分页
*/
List
<
BSpace
>
querySpaceListsByPagination
(
CyPageUtil
<
BSpace
>
paginationUtility
,
BSpace
spaceList
);
/**
* 查询空间数
* @param spaceList
* @return
*/
List
<
BSpace
>
querySpaceNum
(
BSpace
spaceList
);
}
}
src/main/java/org/rcisoft/business/bspace/service/impl/BSpaceServiceImpl.java
View file @
fec74ef2
package
org
.
rcisoft
.
business
.
bspace
.
service
.
impl
;
package
org
.
rcisoft
.
business
.
bspace
.
service
.
impl
;
import
org.apache.commons.lang3.StringUtils
;
import
org.rcisoft.core.aop.CyPageUtil
;
import
org.rcisoft.core.exception.CyServiceException
;
import
org.rcisoft.core.result.CyResultServiceExceptionEnums
;
import
org.rcisoft.core.util.CyUserUtil
;
import
org.rcisoft.core.util.CyUserUtil
;
import
org.rcisoft.core.aop.CyPageUtil
;
import
org.rcisoft.core.model.CyPersistModel
;
import
org.rcisoft.core.model.CyPersistModel
;
import
org.rcisoft.business.bspace.dao.BSpaceRepository
;
import
org.rcisoft.business.bspace.dao.BSpaceRepository
;
import
org.rcisoft.business.bspace.entity.BSpace
;
import
org.rcisoft.business.bspace.entity.BSpace
;
import
org.rcisoft.business.bspace.service.BSpaceService
;
import
org.rcisoft.business.bspace.service.BSpaceService
;
import
org.rcisoft.core.service.CyBaseService
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.boot.context.properties.ConfigurationProperties
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Isolation
;
import
org.springframework.transaction.annotation.Isolation
;
import
org.springframework.transaction.annotation.Propagation
;
import
org.springframework.transaction.annotation.Propagation
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.transaction.annotation.Transactional
;
import
java.util.*
;
import
lombok.extern.slf4j.Slf4j
;
import
java.util.List
;
import
lombok.extern.slf4j.Slf4j
;
/**
/**
* Created by
on 2018-6-21 17:10:54
.
* Created by
cy on 2018-12-17 13:50:52
.
*/
*/
@Service
@Service
@Transactional
(
readOnly
=
true
,
propagation
=
Propagation
.
NOT_SUPPORTED
)
@Transactional
(
readOnly
=
true
,
propagation
=
Propagation
.
NOT_SUPPORTED
)
@Slf4j
@Slf4j
@ConfigurationProperties
(
prefix
=
"cy.model.security"
,
ignoreUnknownFields
=
true
,
ignoreInvalidFields
=
true
)
public
class
BSpaceServiceImpl
extends
CyBaseService
implements
BSpaceService
{
public
class
BSpaceServiceImpl
implements
BSpaceService
{
private
static
final
long
serialVersionUID
=
-
3485875433825192456L
;
@Autowired
@Autowired
private
BSpaceRepository
bSpaceRepository
;
private
BSpaceRepository
bSpaceRepository
;
/**
/**
* 保存 bSpace
* 保存
* @param bSpace
* @param bSpace
* @return
* @return
*/
*/
@Transactional
(
propagation
=
Propagation
.
REQUIRED
,
isolation
=
Isolation
.
DEFAULT
)
@Transactional
(
propagation
=
Propagation
.
REQUIRED
,
isolation
=
Isolation
.
DEFAULT
)
@Override
@Override
public
CyPersistModel
save
(
BSpace
bSpace
){
public
CyPersistModel
save
(
BSpace
bSpace
){
//增加操作
//增加操作
CyUserUtil
.
setCurrentPersistOperation
(
bSpace
);
CyUserUtil
.
setCurrentPersistOperation
(
bSpace
);
int
line
=
bSpaceRepository
.
insertSelective
(
bSpace
);
int
line
=
bSpaceRepository
.
insertSelective
(
bSpace
);
log
.
info
(
CyUserUtil
.
getUserInfoProp
(
bSpace
.
getToken
(),
CyUserUtil
.
USER_USERNAME
)+
"新增了ID为"
+
this
.
dbInfo
(
CyUserUtil
.
getAuthenUsername
()
+
"新增了ID为"
+
bSpace
.
getBusinessId
()+
"的信息"
,
"新增"
);
bSpace
.
getBusinessId
()+
"的信息"
);
log
.
info
(
CyUserUtil
.
getAuthenUsername
()+
"新增了ID为"
+
bSpace
.
getBusinessId
()+
"的信息"
);
return
new
CyPersistModel
(
line
);
return
new
CyPersistModel
(
line
);
}
}
/**
/**
* 逻辑删除
* 删除
* @param bSpace
* @param bSpace
* @return
* @return
*/
*/
@Transactional
(
propagation
=
Propagation
.
REQUIRED
,
isolation
=
Isolation
.
DEFAULT
)
@Transactional
(
propagation
=
Propagation
.
REQUIRED
,
isolation
=
Isolation
.
DEFAULT
)
@Override
@Override
public
CyPersistModel
remove
(
BSpace
bSpace
){
public
CyPersistModel
remove
(
BSpace
bSpace
){
int
line
=
bSpaceRepository
.
deleteByPrimaryKey
(
bSpace
.
getBusinessId
());
this
.
dbInfo
(
CyUserUtil
.
getAuthenUsername
()+
"删除了ID为"
+
bSpace
.
getBusinessId
()+
"的信息"
,
"删除"
);
log
.
info
(
CyUserUtil
.
getAuthenUsername
()+
"删除了ID为"
+
bSpace
.
getBusinessId
()+
"的信息"
);
return
new
CyPersistModel
(
line
);
}
/**
* 逻辑删除
* @param bSpace
* @return
*/
@Transactional
(
propagation
=
Propagation
.
REQUIRED
,
isolation
=
Isolation
.
DEFAULT
)
@Override
public
CyPersistModel
removeLogical
(
BSpace
bSpace
){
CyUserUtil
.
setCurrentMergeOperation
(
bSpace
);
CyUserUtil
.
setCurrentMergeOperation
(
bSpace
);
bSpace
.
setDeleted
();
bSpace
.
setDeleted
();
int
line
=
bSpaceRepository
.
logicalDelete
(
bSpace
);
int
line
=
bSpaceRepository
.
logicalDelete
(
bSpace
);
log
.
info
(
CyUserUtil
.
getUserInfoProp
(
bSpace
.
getToken
(),
CyUserUtil
.
USER_USERNAME
)+
"逻辑删除了ID为"
+
this
.
dbInfo
(
CyUserUtil
.
getAuthenUsername
()+
"逻辑删除了ID为"
+
bSpace
.
getBusinessId
()+
"的信息"
,
"逻辑删除"
);
bSpace
.
getBusinessId
()+
"的信息"
);
log
.
info
(
CyUserUtil
.
getAuthenUsername
()+
"逻辑删除了ID为"
+
bSpace
.
getBusinessId
()+
"的信息"
);
return
new
CyPersistModel
(
line
);
return
new
CyPersistModel
(
line
);
}
}
/**
/**
* 修改 bSpace
* 修改
* @param bSpace
* @param bSpace
* @return
* @return
*/
*/
@Transactional
(
propagation
=
Propagation
.
REQUIRED
,
isolation
=
Isolation
.
DEFAULT
)
@Transactional
(
propagation
=
Propagation
.
REQUIRED
,
isolation
=
Isolation
.
DEFAULT
)
@Override
@Override
public
CyPersistModel
merge
(
BSpace
bSpace
){
public
CyPersistModel
merge
(
BSpace
bSpace
){
CyUserUtil
.
setCurrentMergeOperation
(
bSpace
);
CyUserUtil
.
setCurrentMergeOperation
(
bSpace
);
int
line
=
bSpaceRepository
.
updateByPrimaryKeySelective
(
bSpace
);
int
line
=
bSpaceRepository
.
updateByPrimaryKeySelective
(
bSpace
);
log
.
info
(
CyUserUtil
.
getUserInfoProp
(
bSpace
.
getToken
(),
CyUserUtil
.
USER_USERNAME
)+
"修改了ID为"
+
this
.
dbInfo
(
CyUserUtil
.
getAuthenUsername
()+
"修改了ID为"
+
bSpace
.
getBusinessId
()+
"的信息"
,
"修改"
);
bSpace
.
getBusinessId
()+
"的信息"
);
log
.
info
(
CyUserUtil
.
getAuthenUsername
()+
"修改了ID为"
+
bSpace
.
getBusinessId
()+
"的信息"
);
return
new
CyPersistModel
(
line
);
return
new
CyPersistModel
(
line
);
}
}
/**
/**
* 根据id查询 bSpace
* 根据id查询
* @param id
* @param id
* @return
* @return
*/
*/
@Override
@Override
public
BSpace
findById
(
String
id
){
public
BSpace
findById
(
String
id
){
return
bSpaceRepository
.
selectByPrimaryKey
(
id
);
return
bSpaceRepository
.
selectByPrimaryKey
(
id
);
}
}
/**
/**
* 分页查询 bSpace
* 分页查询
* @param bSpace
* @param bSpace
* @return
* @return
*/
*/
@Override
@Override
public
List
<
BSpace
>
findAllByPagination
(
CyPageUtil
<
BSpace
>
paginationUtility
,
public
List
<
BSpace
>
findAllByPagination
(
CyPageUtil
<
BSpace
>
paginationUtility
,
BSpace
bSpace
){
BSpace
bSpace
){
bSpace
.
setStart
();
bSpace
.
setNormal
();
bSpace
.
setNotDeleted
();
return
bSpaceRepository
.
queryBSpaces
(
bSpace
);
return
bSpaceRepository
.
queryBSpaces
(
bSpace
);
}
}
/**
/**
* @param bSpace
* 查询list
* @return java.util.List<org.rcisoft.business.bspace.entity.BSpace>
* @param bSpace
* @author ningxy
* @return
* @description 不分页查询所有空间
*/
* @date 2018/7/20 下午1:36
*/
@Override
@Override
public
List
<
BSpace
>
listAllSpaces
(
BSpace
bSpace
)
{
public
List
<
BSpace
>
findAll
(
BSpace
bSpace
){
bSpace
.
setNormal
();
return
bSpaceRepository
.
queryBSpaces
(
bSpace
);
return
bSpaceRepository
.
queryBSpaces
(
bSpace
);
}
}
/**
* 增加
*
* */
@Transactional
(
propagation
=
Propagation
.
REQUIRED
,
isolation
=
Isolation
.
DEFAULT
)
@Override
public
int
persistSpaceList
(
BSpace
spaceList
,
String
token
)
{
int
line
;
int
line2
=
0
;
int
result
=
0
;
if
(
StringUtils
.
isNotBlank
(
spaceList
.
getBusinessId
())){
//修改
List
<
BSpace
>
spaceLists
=
bSpaceRepository
.
querySpaceListsByName
(
spaceList
);
if
(
spaceLists
.
size
()
==
0
){
throw
new
CyServiceException
(
CyResultServiceExceptionEnums
.
USER_EXISTS
);
}
// Example example = new Example(BCategory.class);
// example.createCriteria().andEqualTo("spaceId",spaceList.getBusinessId());
// BCategory bcategory = new BCategory();
CyUserUtil
.
setCurrentMergeOperation
(
spaceList
);
// bcategory.setCategoryName(spaceList.getSpaceName());
// bcategory.setSpaceId(spaceList.getBusinessId());
line
=
bSpaceRepository
.
updateByPrimaryKeySelective
(
spaceList
);
// line2 = bCategoryRepository.updateByExampleSelective(bcategory,example);
}
else
{
//增加
List
<
BSpace
>
spaceLists
=
bSpaceRepository
.
querySpaceListsByCodeOrName
(
spaceList
);
if
(
spaceLists
.
size
()>
0
){
throw
new
CyServiceException
(
CyResultServiceExceptionEnums
.
USER_EXISTS
);
}
// BCategory bcategory = new BCategory();
// CyUserUtil.setCurrentPersistOperation(spaceList);
// CyUserUtil.setCurrentPersistOperation(bcategory);
// bcategory.setSpaceId(spaceList.getBusinessId());
// bcategory.setCategoryName(spaceList.getSpaceName());
// bcategory.setPid(0);
line
=
bSpaceRepository
.
insertSelective
(
spaceList
);
// line2 = bCategoryRepository.insertSelective(bcategory);
}
// if(line == line2){
// result = line;
// }
return
line
;
}
/**
* 通过businessId查询
* @param businessId
* @return
*/
@Override
public
BSpace
querySpaceListByBusinessId
(
String
businessId
)
{
return
bSpaceRepository
.
querySpaceListByBusinessId
(
businessId
);
}
@Override
public
List
<
BSpace
>
querySpaceListsByPagination
(
CyPageUtil
<
BSpace
>
paginationUtility
,
BSpace
spaceList
)
{
return
bSpaceRepository
.
queryBSpaceCategorys
(
spaceList
);
}
/**
* 查询空间数
* @param spaceList
* @return
*/
@Override
public
List
<
BSpace
>
querySpaceNum
(
BSpace
spaceList
)
{
return
bSpaceRepository
.
querySpaceNum
(
spaceList
);
}
}
}
src/main/resources/application-dev.yml
View file @
fec74ef2
...
@@ -16,7 +16,7 @@ server:
...
@@ -16,7 +16,7 @@ server:
# org.springframework.web: DEBUG
# org.springframework.web: DEBUG
druid
:
druid
:
url
:
jdbc:mysql://127.0.0.1:3306/mall
2
?useUnicode=true&characterEncoding=UTF-8&useSSL=false&zeroDateTimeBehavior=convertToNull&allowMultiQueries=true
url
:
jdbc:mysql://127.0.0.1:3306/mall
4
?useUnicode=true&characterEncoding=UTF-8&useSSL=false&zeroDateTimeBehavior=convertToNull&allowMultiQueries=true
username
:
root
username
:
root
password
:
123456
password
:
123456
initial-size
:
1
initial-size
:
1
...
...
src/main/resources/logback-spring.xml
View file @
fec74ef2
...
@@ -54,9 +54,9 @@
...
@@ -54,9 +54,9 @@
<connectionSource
class=
"ch.qos.logback.core.db.DataSourceConnectionSource"
>
<connectionSource
class=
"ch.qos.logback.core.db.DataSourceConnectionSource"
>
<dataSource
class=
"org.apache.tomcat.jdbc.pool.DataSource"
>
<dataSource
class=
"org.apache.tomcat.jdbc.pool.DataSource"
>
<driverClassName
class=
"com.mysql.jdbc.Driver"
/>
<driverClassName
class=
"com.mysql.jdbc.Driver"
/>
<url>
jdbc:mysql://127.0.0.1:3306/
family
?characterEncoding=UTF-8
</url>
<url>
jdbc:mysql://127.0.0.1:3306/
mall3
?characterEncoding=UTF-8
</url>
<username>
root
</username>
<username>
root
</username>
<password>
cy
</password>
<password>
123456
</password>
</dataSource>
</dataSource>
</connectionSource>
</connectionSource>
...
@@ -81,13 +81,11 @@
...
@@ -81,13 +81,11 @@
</appender>
</appender>
<!-- 用户操作日志logger -->
<!-- 用户操作日志logger -->
<
logger
name=
"DBLog"
level=
"INFO"
>
<
!--<logger name="DBLog" level="INFO" >--
>
<
appender-ref
ref=
"DBLog"
/
>
<
!--<appender-ref ref="DBLog"/>--
>
<
/logger
>
<
!--</logger>--
>
<!--
<!--指定对应包名 -->
指定对应包名
-->
<logger
name=
"com.minlia"
level=
"DEBUG"
/>
<logger
name=
"com.minlia"
level=
"DEBUG"
/>
<logger
name=
"org.springframework.data.mybatis"
level=
"DEBUG"
/>
<logger
name=
"org.springframework.data.mybatis"
level=
"DEBUG"
/>
<logger
name=
"org.springframework.aop.aspectj"
level=
"ERROR"
/>
<logger
name=
"org.springframework.aop.aspectj"
level=
"ERROR"
/>
...
...
src/main/resources/mapper.biz/bspace/mapper/BSpaceMapper.xml
deleted
100644 → 0
View file @
ed60f0b6
<?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=
"org.rcisoft.business.bspace.dao.BSpaceRepository"
>
<resultMap
id=
"BaseResultMap"
type=
"org.rcisoft.business.bspace.entity.BSpace"
>
<id
column=
"business_id"
jdbcType=
"VARCHAR"
property=
"businessId"
/>
<result
column=
"space_name"
jdbcType=
"VARCHAR"
property=
"spaceName"
/>
<result
column=
"space_id"
jdbcType=
"VARCHAR"
property=
"spaceId"
/>
<result
column=
"CREATE_BY"
property=
"createBy"
jdbcType=
"VARCHAR"
/>
<result
column=
"FLAG"
property=
"flag"
jdbcType=
"VARCHAR"
/>
<result
column=
"REMARKS"
property=
"remarks"
jdbcType=
"VARCHAR"
/>
<result
column=
"UPDATE_BY"
property=
"updateBy"
jdbcType=
"VARCHAR"
/>
<result
column=
"DEL_FLAG"
property=
"delFlag"
jdbcType=
"VARCHAR"
/>
<result
column=
"update_date"
property=
"updateDate"
jdbcType=
"TIMESTAMP"
/>
<result
column=
"create_date"
property=
"createDate"
jdbcType=
"TIMESTAMP"
/>
<result
column=
"realm_name"
property=
"realmName"
jdbcType=
"VARCHAR"
/>
</resultMap>
</mapper>
\ No newline at end of file
src/main/resources/mapper/biz/bspace/mapper/BSpaceMapper.xml
0 → 100644
View file @
fec74ef2
<?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=
"org.rcisoft.business.bspace.dao.BSpaceRepository"
>
<resultMap
id=
"BaseResultMap"
type=
"org.rcisoft.business.bspace.entity.BSpace"
>
<id
column=
"business_id"
jdbcType=
"VARCHAR"
property=
"businessId"
/>
<result
column=
"create_by"
jdbcType=
"VARCHAR"
property=
"createBy"
/>
<result
column=
"create_date"
jdbcType=
"TIMESTAMP"
property=
"createDate"
/>
<result
column=
"update_by"
jdbcType=
"VARCHAR"
property=
"updateBy"
/>
<result
column=
"update_date"
jdbcType=
"TIMESTAMP"
property=
"updateDate"
/>
<result
column=
"del_flag"
jdbcType=
"VARCHAR"
property=
"delFlag"
/>
<result
column=
"flag"
jdbcType=
"VARCHAR"
property=
"flag"
/>
<result
column=
"remarks"
jdbcType=
"VARCHAR"
property=
"remarks"
/>
<result
column=
"space_id"
jdbcType=
"VARCHAR"
property=
"spaceId"
/>
<result
column=
"space_name"
jdbcType=
"VARCHAR"
property=
"spaceName"
/>
<result
column=
"realm_name"
jdbcType=
"VARCHAR"
property=
"realmName"
/>
</resultMap>
<!--<cache type="${corePackag!}.util.RedisCache"/>-->
</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