Commit 9dd08c7f authored by 王淑君's avatar 王淑君

Merge branch 'dev' into 'master'

Dev

See merge request !8
parents cb560164 fec74ef2
......@@ -5,9 +5,9 @@
<modelVersion>4.0.0</modelVersion>
<groupId>org.rcisoft</groupId>
<artifactId>projectArtifact</artifactId>
<version>2.0-SNAPSHOT</version>
<description> education 2.0</description>
<artifactId>91isoft_spbt_project</artifactId>
<version>1.0-SNAPSHOT</version>
<description> 91isoft_spbt_project </description>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
......@@ -20,12 +20,12 @@
<dependency>
<groupId>org.91isoft</groupId>
<artifactId>91isoft_spbt</artifactId>
<version>1.0-SNAPSHOT</version>
<version>1.0.1-SNAPSHOT</version>
</dependency>
</dependencies>
<build>
<finalName>projectArtifacture</finalName>
<finalName>91isoft_spbt_project</finalName>
<resources>
<resource>
<directory>src/main/resources</directory>
......
......@@ -3,9 +3,12 @@
`ssh://git@103.249.252.28:10022/wangshujun/91isoft_spbt_project.git`
## 配置 settings.xml
清空`<mirrors></mirrors> `
~~~
<profile>
<mirrors>
</mirrors>
<profiles>
<profile>
<id>nexus</id>
<repositories>
<repository>
......@@ -110,7 +113,7 @@
<dependency>
<groupId>org.91isoft</groupId>
<artifactId>91isoft_spbt</artifactId>
<version>1.0-SNAPSHOT</version>
<version>1.0.1-SNAPSHOT</version>
</dependency>
</dependencies>
~~~
......@@ -158,9 +161,8 @@ server:
port: 8084
~~~~
http://localhost:8084 访问 代码生成器,可以选择数据库信息 自动生成代码
图片地址:
http://learning.91isoft.com:18080/resourceServer/family/upload/mdfiles/8CE2352AE4BE4D9CBB13E891ABE8A63B.png
![swagger](http://learning.91isoft.com:18080/resourceServer/family/upload/mdfiles/8CE2352AE4BE4D9CBB13E891ABE8A63B.png "代码生成器")
点击生成 就会自动下载,解压后将
` org/rcisoft/business/`下 `bexception/mapper` 文件夹放在
......@@ -172,5 +174,135 @@ http://learning.91isoft.com:18080/resourceServer/family/upload/mdfiles/8CE2352AE
### swaggerUI
http://localhost:8084/swagger-ui.html#/ 访问swaggerUI
可以看到当前项目所有的接口详情 并测试接口
图片地址:
http://learning.91isoft.com:18080/resourceServer/family/upload/mdfiles/95089C91B7B742B5A589156C456AFDDB.png
![swagger](http://learning.91isoft.com:18080/resourceServer/family/upload/mdfiles/95089C91B7B742B5A589156C456AFDDB.png "swagger")
## 91isoft_spbt
| 版本 | 组件 | 描述 | 维护人 |
| ------------ | ------------ | ------------ |------------ |
| v1.0 | lombok | 简化冗余代码,连通编辑器和构建工具 | cy |
| v1.0 | ssm | springmvc+spring+mybatis+mybatis扩展 | cy |
| v1.0 | springboot | 简化spring配置 | cy |
| v1.0 | springfox-swagger2 | 在线api | cy |
| v1.0 | logback | 日志 | cy |
| v1.0 | jwt | json web token 身份验证 | cy |
| v1.0 | spring-security | 安全性框架 | cy |
### 编码规范
| 版本 | 维护人员 | 维护时间 | 主要内容 |
| ------------ | ------------ | ------------ | ------------ |
| v1.0 | 李丛阳 | 2018-12-14 | 基础结构搭建 |
### 数据库设计规范
| 编号 | 类型 | 标题 | 描述 |
| ------------ | ------------ | ------------ | ------------ |
| 1 | 表 | 表名 | 小写,单词之间使用下划线 |
| 2 | 表 | 表名 | 中间表使用r_间隔 eg: b_r_teacher_course |
| 3 | 表 | 表结构 | 主表必须要有6+字段(创建时间,修改时间等),中间表不需要 |
| 4 | 列 | 列名 | 小写,单词之间使用下划线 |
| 5 | 列 | 列名 | 每一列必须要有备注 |
| 6 | 列 | 状态列 | char(1) 或 varchar(1),备注要描述清楚状态 |
### 微服务编码规范
| 编号 | 类型 | 标题 | 描述 |
| ------------ | ------------ | ------------ | ------------ |
| 0 | 结构 | 目录规范 | 详见 91isoft_spbt_project|
| 1 | 接口 | 提供其它服务调用的接口要标明 | 模块要单独提出一个controller,requestMappeing使用/api/ 开头|
| 2 | 接口 | 返回值 | Result / GridModel|
| 3 | 接口 | 使用restful风格 | get post pust delete,/id/ |
| 4 | 接口 | requestMappeing命名规范 | queryUsers, queryUserByPagination, detail/businessId, delete/businessId, add, update/businessId |
| 5 | 接口 | swagger | controller api docs |
| 6 | 结构 | service dao | 注释,尽量复用 |
| 7 | 结构 | tcc | 分布式事务书写规范 |
| 8 | 结构 | entity | @Entity @Data @NoArgsConstructor @AllArgsConstructor @Table |
### sql规范
~~~~
#!bin/bash
${basedir}/sql
-- db_init.sql
-- db_data.sql
-- db_clear.sql
-- date
-- db.bak.sql
-- db.alter.sql
~~~~
## 91isoft_spbt_project
| 版本 | 模块 | 描述 | 缺省 | 能否改变状态
| ------------ | ------------ | ------------ |------------ |
| v1.0 | pageUtil | 分页组件 | 开启 | 否 |
| v1.0 | quartz | 定时任务 | 关闭 | 是 |
| v1.0 | redis | 缓存 | 关闭 | 是 |
| v1.0 | ssl | https | 关闭 | 是 |
| v1.0 | decryptParam | 报文加密 | 关闭 | 是 |
| v1.0 | entityParam | 参数格式验证 | 开启 | 是 |
| v1.0 | swagger2 | 文档 | 开启 | 是 |
| v1.0 | multipleDs | 多数据源 | 关闭 | 是 |
| v1.0 | dbLod | 数据库日志 | 关闭 | 是 |
### pageUtil
1. 默认开启,不能关闭
2. service 下impl中` serviceImpl` 中要分页的方法的方法名以` ByPagination` 结尾,方法返回值为 `CyGridModel `
3. 用法模板:` public CyGridModel querySpaceListsByPagination(BSpace spaceList){
bSpaceServiceImpl.querySpaceListsByPagination(getPaginationUtility(),spaceList);
CyGridModel CyGridModel = getGridModelResponse();
return CyGridModel;
}`
### quartz
1. 定时任务 默认关闭 可以在`application-dev.yml`中配置参数`cy.model.quartz` 为true设为开启
### redis
1. 缓存机制 默认关闭 可以在`application-dev.yml`中配置`cy.model.redis` 为true设为开启
2. `application-dev.yml`中配置`spring.redis` 配置相关信息
3. 用法参考`org\rcisoft\core\service\impl\CyRedisServiceImpl.java`
### ssl
1. https请求 默认关闭
2. 开启方法:用Java自生成`.p12` 文件 添加在resource中,并在`application-dev.yml`中添加`server.ssl` 相关配置
### decryptParam
1. 报文加密 默认关闭 可以在`application-dev.yml`中配置`cy.model.decryptParam` 为true设为开启
2. 开启之后 前端需将参数和`global.decryptKey `的key值一起经过md5加密,形成sign 传到后端,
### entityParam
1. 参数格式验证 默认关闭 可以在`application-dev.yml`中配置`cy.model.entityParam` 为true设为开启
### swagger2
1. 文档测试工具 默认开启 可以在`application-dev.yml`中配置`cy.model.entityParam` 为false即为关闭
2. 启动项目之后再浏览器访问`http://localhost:8084/swagger-ui.html#/ `
### multipleDs
1. 多数据源 默认关闭 可以在`application-dev.yml`中配置`cy.model.multipleDs` true即为开启
2.`application-dev.yml`中修改`druid.power`` druid.pmiss` 以配置数据库相关信息
### dbLod
1. 日志存数据库 默认关闭
2.`resources\logback-spring.xml` 修改`<appender name="DBLog"></appender>`中的配置为自己数据库的信息即可
## seurity(权限)
#### `application-dev.yml`中`cy.model.security` 下相关配置
1. 目前是登陆后才可访问其他接口
2. 开启所有接口的直接访问:`cy.model.security.permitUnStatic` 下加` - "*/**" `即可
\ No newline at end of file
This diff is collapsed.
package org.rcisoft.business.bspace.dao;
import org.rcisoft.core.base.CyBaseMapper;
import org.rcisoft.business.bspace.entity.BSpace;
import org.apache.ibatis.annotations.ResultMap;
import org.apache.ibatis.annotations.Select;
import org.rcisoft.core.base.CyBaseMapper;
import org.springframework.stereotype.Repository;
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
public interface BSpaceRepository extends CyBaseMapper<BSpace> {
/**
* 分页查询 bSpace
*
*/
* 分页查询 bSpace
*
*/
@Select("<script>select * from b_space where 1=1 "
+ "and del_flag = 0 "
+ "and flag = 1 "
+ "<if test=\"businessId !=null and businessId != '' \">and business_id = #{businessId} </if> "
+ "<if test=\"delFlag !=null and delFlag != '' \">and del_flag = #{delFlag} </if> "
+ "<if test=\"flag !=null and flag != '' \">and flag = #{flag} </if> "
+ "</script>")
@ResultMap(value = "BaseResultMap" )
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);
}
......@@ -2,36 +2,47 @@ package org.rcisoft.business.bspace.entity;
import lombok.*;
import org.hibernate.validator.constraints.Length;
import org.hibernate.validator.constraints.NotBlank;
import org.rcisoft.core.entity.CyIdEntity;
import org.springframework.data.annotation.Transient;
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
@Table(name = "b_space")
@NoArgsConstructor
@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;
@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;
@Transient
private String spaceNum;
}
package org.rcisoft.business.bspace.service;
import org.rcisoft.business.bspace.entity.BSpace;
import org.rcisoft.core.aop.CyPageUtil;
import org.rcisoft.core.model.CyPersistModel;
import org.rcisoft.core.aop.CyPageUtil;
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 {
/**
* 保存
*
* @param bSpace
* @return
*/
* 保存
* @param bSpace
* @return
*/
CyPersistModel save(BSpace bSpace);
/**
* 逻辑删除
*
* @param bSpace
* @return
*/
* 删除
* @param bSpace
* @return
*/
CyPersistModel remove(BSpace bSpace);
/**
* 修改
*
* @param bSpace
* @return
*/
CyPersistModel merge(BSpace bSpace);
* 逻辑删除
* @param bSpace
* @return
*/
CyPersistModel removeLogical(BSpace bSpace);
/**
* 根据id查询
*
* @param id
* @return
*/
BSpace findById(String id);
* 修改
* @param bSpace
* @return
*/
CyPersistModel merge(BSpace bSpace);
/**
* 分页查询
*
* @param bSpace
* @return
*/
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);
* 根据id查询
* @param id
* @return
*/
BSpace findById(String id);
/**
* 增加/修改
* @param spaceList
* @param token
* @return
*/
* 分页查询
* @param bSpace
* @return
*/
List<BSpace> findAllByPagination(CyPageUtil<BSpace> paginationUtility,
BSpace bSpace);
int persistSpaceList(BSpace spaceList, String token);
/**
* 通过businessId查询
* @param businessId
* @return
*/
BSpace querySpaceListByBusinessId(String businessId);
/**
* 查询 分页
* 查询所有角色,不分页
*/
List<BSpace> querySpaceListsByPagination(CyPageUtil<BSpace> paginationUtility, BSpace spaceList);
* 查询list
* @param bSpace
* @return
*/
List<BSpace> findAll(BSpace bSpace);
/**
* 查询空间数
* @param spaceList
* @return
*/
List<BSpace> querySpaceNum(BSpace spaceList);
}
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.aop.CyPageUtil;
import org.rcisoft.core.model.CyPersistModel;
import org.rcisoft.business.bspace.dao.BSpaceRepository;
import org.rcisoft.business.bspace.entity.BSpace;
import org.rcisoft.business.bspace.service.BSpaceService;
import org.rcisoft.core.service.CyBaseService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Isolation;
import org.springframework.transaction.annotation.Propagation;
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
@Transactional(readOnly = true,propagation = Propagation.NOT_SUPPORTED)
@Slf4j
@ConfigurationProperties(prefix = "cy.model.security", ignoreUnknownFields = true,ignoreInvalidFields = true)
public class BSpaceServiceImpl implements BSpaceService {
public class BSpaceServiceImpl extends CyBaseService implements BSpaceService {
private static final long serialVersionUID = -3485875433825192456L;
@Autowired
private BSpaceRepository bSpaceRepository;
/**
* 保存 bSpace
* @param bSpace
* @return
*/
* 保存
* @param bSpace
* @return
*/
@Transactional(propagation = Propagation.REQUIRED,isolation = Isolation.DEFAULT)
@Override
public CyPersistModel save(BSpace bSpace){
//增加操作
CyUserUtil.setCurrentPersistOperation(bSpace);
int line = bSpaceRepository.insertSelective(bSpace);
log.info(CyUserUtil.getUserInfoProp(bSpace.getToken(),CyUserUtil.USER_USERNAME)+"新增了ID为"+
bSpace.getBusinessId()+"的信息");
this.dbInfo(CyUserUtil.getAuthenUsername() + "新增了ID为"+bSpace.getBusinessId()+"的信息","新增");
log.info(CyUserUtil.getAuthenUsername()+"新增了ID为"+
bSpace.getBusinessId()+"的信息");
return new CyPersistModel(line);
}
/**
* 逻辑删除
* @param bSpace
* @return
*/
* 删除
* @param bSpace
* @return
*/
@Transactional(propagation = Propagation.REQUIRED,isolation = Isolation.DEFAULT)
@Override
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);
bSpace.setDeleted();
int line = bSpaceRepository.logicalDelete(bSpace);
log.info(CyUserUtil.getUserInfoProp(bSpace.getToken(),CyUserUtil.USER_USERNAME)+"逻辑删除了ID为"+
bSpace.getBusinessId()+"的信息");
this.dbInfo(CyUserUtil.getAuthenUsername()+"逻辑删除了ID为"+bSpace.getBusinessId()+"的信息","逻辑删除");
log.info(CyUserUtil.getAuthenUsername()+"逻辑删除了ID为"+bSpace.getBusinessId()+"的信息");
return new CyPersistModel(line);
}
/**
* 修改 bSpace
* @param bSpace
* @return
*/
* 修改
* @param bSpace
* @return
*/
@Transactional(propagation = Propagation.REQUIRED,isolation = Isolation.DEFAULT)
@Override
public CyPersistModel merge(BSpace bSpace){
CyUserUtil.setCurrentMergeOperation(bSpace);
int line = bSpaceRepository.updateByPrimaryKeySelective(bSpace);
log.info(CyUserUtil.getUserInfoProp(bSpace.getToken(),CyUserUtil.USER_USERNAME)+"修改了ID为"+
bSpace.getBusinessId()+"的信息");
this.dbInfo(CyUserUtil.getAuthenUsername()+"修改了ID为"+bSpace.getBusinessId()+"的信息","修改");
log.info(CyUserUtil.getAuthenUsername()+"修改了ID为"+bSpace.getBusinessId()+"的信息");
return new CyPersistModel(line);
}
/**
* 根据id查询 bSpace
* @param id
* @return
*/
* 根据id查询
* @param id
* @return
*/
@Override
public BSpace findById(String id){
return bSpaceRepository.selectByPrimaryKey(id);
}
/**
* 分页查询 bSpace
* @param bSpace
* @return
*/
* 分页查询
* @param bSpace
* @return
*/
@Override
public List<BSpace> findAllByPagination(CyPageUtil<BSpace> paginationUtility,
BSpace bSpace){
bSpace.setStart();
bSpace.setNotDeleted();
BSpace bSpace){
bSpace.setNormal();
return bSpaceRepository.queryBSpaces(bSpace);
}
/**
* @param bSpace
* @return java.util.List<org.rcisoft.business.bspace.entity.BSpace>
* @author ningxy
* @description 不分页查询所有空间
* @date 2018/7/20 下午1:36
*/
* 查询list
* @param bSpace
* @return
*/
@Override
public List<BSpace> listAllSpaces(BSpace bSpace) {
public List<BSpace> findAll(BSpace bSpace){
bSpace.setNormal();
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);
}
}
......@@ -16,7 +16,7 @@ server:
# org.springframework.web: DEBUG
druid:
url: jdbc:mysql://127.0.0.1:3306/mall2?useUnicode=true&characterEncoding=UTF-8&useSSL=false&zeroDateTimeBehavior=convertToNull&allowMultiQueries=true
url: jdbc:mysql://127.0.0.1:3306/mall4?useUnicode=true&characterEncoding=UTF-8&useSSL=false&zeroDateTimeBehavior=convertToNull&allowMultiQueries=true
username: root
password: 123456
initial-size: 1
......@@ -24,24 +24,24 @@ druid:
max-active: 20
test-on-borrow: true
power:
url: jdbc:mysql://127.0.0.1:3306/power?useUnicode=true&characterEncoding=UTF-8&useSSL=false&zeroDateTimeBehavior=convertToNull&allowMultiQueries=true
username: root
password: 123456
initial-size: 1
min-idle: 1
max-active: 20
test-on-borrow: true
driverClass: com.mysql.jdbc.Driver
pmiss:
url: jdbc:mysql://127.0.0.1:3306/mall2?useUnicode=true&characterEncoding=UTF-8&useSSL=false&zeroDateTimeBehavior=convertToNull&allowMultiQueries=true
username: root
password: 123456
initial-size: 1
min-idle: 1
max-active: 20
test-on-borrow: true
driverClass: com.mysql.jdbc.Driver
# power:
# url: jdbc:mysql://127.0.0.1:3306/power?useUnicode=true&characterEncoding=UTF-8&useSSL=false&zeroDateTimeBehavior=convertToNull&allowMultiQueries=true
# username: root
# password: 123456
# initial-size: 1
# min-idle: 1
# max-active: 20
# test-on-borrow: true
# driverClass: com.mysql.jdbc.Driver
# pmiss:
# url: jdbc:mysql://127.0.0.1:3306/mall2?useUnicode=true&characterEncoding=UTF-8&useSSL=false&zeroDateTimeBehavior=convertToNull&allowMultiQueries=true
# username: root
# password: 123456
# initial-size: 1
# min-idle: 1
# max-active: 20
# test-on-borrow: true
# driverClass: com.mysql.jdbc.Driver
mybatis:
......@@ -80,17 +80,17 @@ spring:
charset: UTF-8
suffix: .ftl
template-loader-path: classpath:/templates/
redis:
host: 127.0.0.1
port: 6379
pool:
max-idle: 50
max-active: 1000
min-idle: 5
max-wait: -1
database: 0
password: 123456
timeout: 3600
# redis:
# host: 127.0.0.1
# port: 6379
# pool:
# max-idle: 50
# max-active: 1000
# min-idle: 5
# max-wait: -1
# database: 0
# password: 123456
# timeout: 3600
springfox:
documentation:
swagger:
......@@ -116,7 +116,7 @@ cy:
multipleDs: false
quartz: false
redis: false
entityParam: false
entityParam: true
decryptParam: false
swagger2Config: true
security:
......@@ -131,7 +131,7 @@ cy:
- "/code/**/**"
- "/excelUtil/**"
- "/cros/**"
- "/bspace/*"
# - "*/**"
permitStatic: ["/", "/*.html", "/favicon.ico", "/**/*.html", "/**/*.js", "/**/*.css"]
logoutSuccessUrl: "/login"
loginPage: "/login"
......
......@@ -54,9 +54,9 @@
<connectionSource class="ch.qos.logback.core.db.DataSourceConnectionSource">
<dataSource class="org.apache.tomcat.jdbc.pool.DataSource">
<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>
<password>cy</password>
<password>123456</password>
</dataSource>
</connectionSource>
......@@ -81,13 +81,11 @@
</appender>
<!-- 用户操作日志logger -->
<logger name="DBLog" level="INFO" >
<appender-ref ref="DBLog"/>
</logger>
<!--<logger name="DBLog" level="INFO" >-->
<!--<appender-ref ref="DBLog"/>-->
<!--</logger>-->
<!--
指定对应包名
-->
<!--指定对应包名 -->
<logger name="com.minlia" level="DEBUG"/>
<logger name="org.springframework.data.mybatis" level="DEBUG"/>
<logger name="org.springframework.aop.aspectj" level="ERROR"/>
......
<?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
<?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
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment