Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
guns-vip
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
chenjunxiong
guns-vip
Commits
5e6533a4
Commit
5e6533a4
authored
Dec 04, 2017
by
naan1993
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
删掉测试多数据源的代码
parent
e60994cc
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
8 additions
and
173 deletions
+8
-173
guns-admin/src/main/java/com/stylefeng/guns/modular/biz/service/ITestService.java
+0
-36
guns-admin/src/main/java/com/stylefeng/guns/modular/biz/service/impl/TestServiceImpl.java
+0
-50
guns-admin/src/main/java/generator/config/GunsGeneratorConfig.java
+8
-8
guns-admin/src/main/resources/processes/holiday-request.bpmn20.xml
+0
-52
guns-admin/src/test/java/com/stylefeng/guns/biz/BizTest.java
+0
-27
No files found.
guns-admin/src/main/java/com/stylefeng/guns/modular/biz/service/ITestService.java
deleted
100644 → 0
View file @
e60994cc
package
com
.
stylefeng
.
guns
.
modular
.
biz
.
service
;
/**
* 测试多数据源的服务
*
* @author fengshuonan
* @date 2017-06-23 23:01
*/
public
interface
ITestService
{
/**
* 测试多数据源的业务
*
* @author stylefeng
* @Date 2017/6/23 23:02
*/
void
testBiz
();
/**
* 测试多数据源的业务
*
* @author stylefeng
* @Date 2017/6/23 23:02
*/
void
testGuns
();
/**
* 测试多数据源的业务
*
* @author stylefeng
* @Date 2017/6/23 23:02
*/
void
testAll
();
}
guns-admin/src/main/java/com/stylefeng/guns/modular/biz/service/impl/TestServiceImpl.java
deleted
100644 → 0
View file @
e60994cc
package
com
.
stylefeng
.
guns
.
modular
.
biz
.
service
.
impl
;
import
com.stylefeng.guns.common.constant.DSEnum
;
import
com.stylefeng.guns.common.persistence.dao.TestMapper
;
import
com.stylefeng.guns.common.persistence.model.Test
;
import
com.stylefeng.guns.core.mutidatasource.annotion.DataSource
;
import
com.stylefeng.guns.modular.biz.service.ITestService
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
/**
* 测试服务
*
* @author fengshuonan
* @date 2017-06-23 23:02
*/
@Service
public
class
TestServiceImpl
implements
ITestService
{
@Autowired
TestMapper
testMapper
;
@Override
@DataSource
(
name
=
DSEnum
.
DATA_SOURCE_BIZ
)
public
void
testBiz
()
{
Test
test
=
testMapper
.
selectById
(
1
);
test
.
setId
(
22
);
test
.
insert
();
}
@Override
@DataSource
(
name
=
DSEnum
.
DATA_SOURCE_GUNS
)
public
void
testGuns
()
{
Test
test
=
testMapper
.
selectById
(
1
);
test
.
setId
(
33
);
test
.
insert
();
}
@Override
@Transactional
public
void
testAll
()
{
testBiz
();
testGuns
();
//int i = 1 / 0;
}
}
guns-admin/src/main/java/generator/config/GunsGeneratorConfig.java
View file @
5e6533a4
...
...
@@ -13,7 +13,7 @@ public class GunsGeneratorConfig extends AbstractGeneratorConfig {
@Override
protected
void
globalConfig
()
{
globalConfig
.
setOutputDir
(
"
/Users/stylefeng/work/ideaSpace/guns/guns-admin/src/main/
java"
);
//写自己项目的绝对路径,注意具体到java目录
globalConfig
.
setOutputDir
(
"
D:\\ideaSpace\\guns\\guns-admin\\src\\main\\
java"
);
//写自己项目的绝对路径,注意具体到java目录
globalConfig
.
setFileOverride
(
true
);
globalConfig
.
setEnableCache
(
false
);
globalConfig
.
setBaseResultMap
(
true
);
...
...
@@ -34,7 +34,7 @@ public class GunsGeneratorConfig extends AbstractGeneratorConfig {
@Override
protected
void
strategyConfig
()
{
//strategy.setTablePrefix(new String[]{"_"});// 此处可以修改为您的表前缀
strategyConfig
.
setInclude
(
new
String
[]{
"
user
"
});
//这里限制需要生成的表,不写则是生成所有表
strategyConfig
.
setInclude
(
new
String
[]{
"
expense
"
});
//这里限制需要生成的表,不写则是生成所有表
strategyConfig
.
setNaming
(
NamingStrategy
.
underline_to_camel
);
}
...
...
@@ -48,12 +48,12 @@ public class GunsGeneratorConfig extends AbstractGeneratorConfig {
@Override
protected
void
contextConfig
()
{
contextConfig
.
setBizChName
(
"
用户
管理"
);
contextConfig
.
setBizEnName
(
"
user
"
);
contextConfig
.
setModuleName
(
"
system
"
);
contextConfig
.
setProjectPath
(
"
/Users/stylefeng/work/ideaSpace/guns/
guns-admin"
);
//写自己项目的绝对路径
contextConfig
.
setEntityName
(
"
User
"
);
sqlConfig
.
setParentMenuName
(
"系统管理"
);
//这里写已有菜单的名称,当做父节点
contextConfig
.
setBizChName
(
"
报销
管理"
);
contextConfig
.
setBizEnName
(
"
expense
"
);
contextConfig
.
setModuleName
(
"
flowable
"
);
contextConfig
.
setProjectPath
(
"
D:\\ideaSpace\\guns\\
guns-admin"
);
//写自己项目的绝对路径
contextConfig
.
setEntityName
(
"
Expense
"
);
sqlConfig
.
setParentMenuName
(
null
);
//这里写已有菜单的名称,当做父节点
/**
* mybatis-plus 生成器开关
...
...
guns-admin/src/main/resources/processes/holiday-request.bpmn20.xml
deleted
100644 → 0
View file @
e60994cc
<?xml version="1.0" encoding="UTF-8"?>
<definitions
xmlns=
"http://www.omg.org/spec/BPMN/20100524/MODEL"
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
xmlns:flowable=
"http://flowable.org/bpmn"
typeLanguage=
"http://www.w3.org/2001/XMLSchema"
expressionLanguage=
"http://www.w3.org/1999/XPath"
targetNamespace=
"http://www.flowable.org/processdef"
>
<process
id=
"holidayRequest"
name=
"Holiday Request"
isExecutable=
"true"
>
<startEvent
id=
"startEvent"
/>
<sequenceFlow
sourceRef=
"startEvent"
targetRef=
"approveTask"
/>
<userTask
id=
"approveTask"
name=
"Approve or reject request"
flowable:candidateGroups=
"managers"
/>
<sequenceFlow
sourceRef=
"approveTask"
targetRef=
"decision"
/>
<exclusiveGateway
id=
"decision"
/>
<sequenceFlow
sourceRef=
"decision"
targetRef=
"externalSystemCall"
>
<conditionExpression
xsi:type=
"tFormalExpression"
>
<![CDATA[
${approved}
]]>
</conditionExpression>
</sequenceFlow>
<sequenceFlow
sourceRef=
"decision"
targetRef=
"sendRejectionMail"
>
<conditionExpression
xsi:type=
"tFormalExpression"
>
<![CDATA[
${!approved}
]]>
</conditionExpression>
</sequenceFlow>
<serviceTask
id=
"externalSystemCall"
name=
"Enter holidays in external system"
flowable:class=
"com.stylefeng.guns.flowable.CallExternalSystemDelegate"
/>
<sequenceFlow
sourceRef=
"externalSystemCall"
targetRef=
"holidayApprovedTask"
/>
<userTask
id=
"holidayApprovedTask"
name=
"Holiday approved"
flowable:assignee=
"${employee}"
/>
<sequenceFlow
sourceRef=
"holidayApprovedTask"
targetRef=
"approveEnd"
/>
<serviceTask
id=
"sendRejectionMail"
name=
"Send out rejection email"
flowable:class=
"org.flowable.SendRejectionMail"
/>
<sequenceFlow
sourceRef=
"sendRejectionMail"
targetRef=
"rejectEnd"
/>
<endEvent
id=
"approveEnd"
/>
<endEvent
id=
"rejectEnd"
/>
</process>
</definitions>
\ No newline at end of file
guns-admin/src/test/java/com/stylefeng/guns/biz/BizTest.java
deleted
100644 → 0
View file @
e60994cc
package
com
.
stylefeng
.
guns
.
biz
;
import
com.stylefeng.guns.base.BaseJunit
;
import
com.stylefeng.guns.modular.biz.service.ITestService
;
import
org.junit.Test
;
import
org.springframework.beans.factory.annotation.Autowired
;
/**
* 业务测试
*
* @author fengshuonan
* @date 2017-06-23 23:12
*/
public
class
BizTest
extends
BaseJunit
{
@Autowired
ITestService
testService
;
@Test
public
void
test
()
{
//testService.testGuns();
testService
.
testBiz
();
//testService.testAll();
}
}
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