Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
D
dc-cost-system
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
bltdc
dc-cost-system
Commits
84e2d41d
Commit
84e2d41d
authored
Nov 03, 2020
by
huluobin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mp 和xml重名方法 去除
parent
6163cebe
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
25 additions
and
9 deletions
+25
-9
CostAttach.java
.../src/main/java/com/bailuntec/cost/api/dto/CostAttach.java
+2
-0
CostPlanDao.java
.../main/java/com/blt/other/module/cost/dao/CostPlanDao.java
+2
-1
CostPlanDomain.java
...a/com/blt/other/module/database/model/CostPlanDomain.java
+2
-1
Cost.xml
bailuntec-cost-core/src/main/resources/mapper/Cost.xml
+8
-2
CostPlanDao.xml
...untec-cost-core/src/main/resources/mapper/CostPlanDao.xml
+7
-2
CostPlanDaoTest.java
...t/java/com/blt/other/module/cost/dao/CostPlanDaoTest.java
+4
-3
No files found.
bailuntec-cost-api/src/main/java/com/bailuntec/cost/api/dto/CostAttach.java
View file @
84e2d41d
...
@@ -19,4 +19,6 @@ public class CostAttach {
...
@@ -19,4 +19,6 @@ public class CostAttach {
@ApiModelProperty
(
"附加字段值"
)
@ApiModelProperty
(
"附加字段值"
)
private
String
value
;
private
String
value
;
private
String
type
;
}
}
bailuntec-cost-core/src/main/java/com/blt/other/module/cost/dao/CostPlanDao.java
View file @
84e2d41d
...
@@ -10,7 +10,7 @@ import java.util.List;
...
@@ -10,7 +10,7 @@ import java.util.List;
public
interface
CostPlanDao
extends
BaseMapper
<
CostPlanDomain
>
{
public
interface
CostPlanDao
extends
BaseMapper
<
CostPlanDomain
>
{
CostPlanDomain
selectByNo
(
String
costP
lanNo
);
CostPlanDomain
selectByNo
(
String
p
lanNo
);
/**
/**
* <p>
* <p>
...
@@ -33,4 +33,5 @@ public interface CostPlanDao extends BaseMapper<CostPlanDomain> {
...
@@ -33,4 +33,5 @@ public interface CostPlanDao extends BaseMapper<CostPlanDomain> {
Integer
deleteByNo
(
String
costPlanNo
);
Integer
deleteByNo
(
String
costPlanNo
);
List
<
CostPlanDomain
>
selectAll
(
@Param
(
"userId"
)
Integer
userId
);
List
<
CostPlanDomain
>
selectAll
(
@Param
(
"userId"
)
Integer
userId
);
}
}
bailuntec-cost-core/src/main/java/com/blt/other/module/database/model/CostPlanDomain.java
View file @
84e2d41d
...
@@ -19,6 +19,7 @@ import org.springframework.beans.BeanUtils;
...
@@ -19,6 +19,7 @@ import org.springframework.beans.BeanUtils;
import
java.io.Serializable
;
import
java.io.Serializable
;
import
java.math.BigDecimal
;
import
java.math.BigDecimal
;
import
java.util.Date
;
import
java.util.Date
;
import
java.util.List
;
@Accessors
(
chain
=
true
)
@Accessors
(
chain
=
true
)
@TableName
(
value
=
"cost_plan"
,
autoResultMap
=
true
)
@TableName
(
value
=
"cost_plan"
,
autoResultMap
=
true
)
...
@@ -138,7 +139,7 @@ public class CostPlanDomain implements Serializable {
...
@@ -138,7 +139,7 @@ public class CostPlanDomain implements Serializable {
@TableField
(
value
=
"`attach`"
,
typeHandler
=
JacksonTypeHandler
.
class
)
@TableField
(
value
=
"`attach`"
,
typeHandler
=
JacksonTypeHandler
.
class
)
@ApiModelProperty
(
"附加字段"
)
@ApiModelProperty
(
"附加字段"
)
private
CostAttach
attach
;
private
List
<
CostAttach
>
attach
;
@ApiModelProperty
(
"费用模版id"
)
@ApiModelProperty
(
"费用模版id"
)
private
Integer
costTemplateId
;
private
Integer
costTemplateId
;
...
...
bailuntec-cost-core/src/main/resources/mapper/Cost.xml
View file @
84e2d41d
...
@@ -3,6 +3,12 @@
...
@@ -3,6 +3,12 @@
"http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
"http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper
namespace=
"com.blt.other.module.cost.dao.CostDao"
>
<mapper
namespace=
"com.blt.other.module.cost.dao.CostDao"
>
<resultMap
id=
"cost"
type=
"com.blt.other.module.cost.model.CostDomain"
>
<result
column=
"attach"
jdbcType=
"VARCHAR"
property=
"attach"
typeHandler=
"com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler"
/>
</resultMap>
<select
id=
"selectAll"
resultType=
"com.blt.other.module.cost.model.CostDomain"
>
<select
id=
"selectAll"
resultType=
"com.blt.other.module.cost.model.CostDomain"
>
SELECT
SELECT
*
*
...
@@ -21,7 +27,7 @@
...
@@ -21,7 +27,7 @@
id DESC
id DESC
</select>
</select>
<select
id=
"selectByCostNo"
result
Type=
"com.blt.other.module.cost.model.CostDomain
"
>
<select
id=
"selectByCostNo"
result
Map=
"cost
"
>
SELECT *
SELECT *
FROM cost
FROM cost
WHERE cost_no = #{costNo}
WHERE cost_no = #{costNo}
...
@@ -94,7 +100,7 @@
...
@@ -94,7 +100,7 @@
cost_no = #{costNo}
cost_no = #{costNo}
</update>
</update>
<select
id=
"selectByStatus"
result
Type=
"com.blt.other.module.cost.model.CostDomain
"
>
<select
id=
"selectByStatus"
result
Map=
"cost
"
>
SELECT *
SELECT *
FROM cost
FROM cost
WHERE cost_status >= #{costStatus}
WHERE cost_status >= #{costStatus}
...
...
bailuntec-cost-core/src/main/resources/mapper/CostPlanDao.xml
View file @
84e2d41d
...
@@ -2,7 +2,12 @@
...
@@ -2,7 +2,12 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper
namespace=
"com.blt.other.module.cost.dao.CostPlanDao"
>
<mapper
namespace=
"com.blt.other.module.cost.dao.CostPlanDao"
>
<select
id=
"selectByNo"
resultType=
"com.blt.other.module.database.model.CostPlanDomain"
>
<resultMap
id=
"costPlan"
type=
"com.blt.other.module.database.model.CostPlanDomain"
>
<result
column=
"attach"
jdbcType=
"VARCHAR"
property=
"attach"
typeHandler=
"com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler"
/>
</resultMap>
<select
id=
"selectByNo"
resultMap=
"costPlan"
>
SELECT *
SELECT *
FROM cost_plan
FROM cost_plan
WHERE cost_plan_no = #{costPlanNo}
WHERE cost_plan_no = #{costPlanNo}
...
@@ -64,7 +69,7 @@
...
@@ -64,7 +69,7 @@
WHERE cost_plan_no = #{costPlanNo}
WHERE cost_plan_no = #{costPlanNo}
</delete>
</delete>
<select
id=
"selectAll"
result
Type=
"com.blt.other.module.database.model.CostPlanDomai
n"
>
<select
id=
"selectAll"
result
Map=
"costPla
n"
>
SELECT
SELECT
*
*
FROM
FROM
...
...
bailuntec-cost-core/src/test/java/com/blt/other/module/cost/dao/CostPlanDaoTest.java
View file @
84e2d41d
...
@@ -3,6 +3,7 @@ package com.blt.other.module.cost.dao;
...
@@ -3,6 +3,7 @@ package com.blt.other.module.cost.dao;
import
com.bailuntec.cost.api.dto.CostAttach
;
import
com.bailuntec.cost.api.dto.CostAttach
;
import
com.blt.other.OtherApplication
;
import
com.blt.other.OtherApplication
;
import
com.blt.other.module.database.model.CostPlanDomain
;
import
com.blt.other.module.database.model.CostPlanDomain
;
import
com.google.common.collect.Lists
;
import
org.junit.Test
;
import
org.junit.Test
;
import
org.junit.runner.RunWith
;
import
org.junit.runner.RunWith
;
import
org.springframework.boot.test.context.SpringBootTest
;
import
org.springframework.boot.test.context.SpringBootTest
;
...
@@ -30,11 +31,11 @@ public class CostPlanDaoTest {
...
@@ -30,11 +31,11 @@ public class CostPlanDaoTest {
@Test
@Test
public
void
insert
()
{
public
void
insert
()
{
CostPlanDomain
costPlanDomain
=
new
CostPlanDomain
();
CostPlanDomain
costPlanDomain
=
new
CostPlanDomain
();
CostAttach
costAttach
=
new
CostAttach
();
costAttach
.
setName
(
"sda"
);
costPlanDomain
.
setAttach
(
Lists
.
newArrayList
());
costPlanDomain
.
setAttach
(
costAttach
);
costPlanDomain
.
setCostPlanStatus
(
1
);
costPlanDomain
.
setCostPlanStatus
(
1
);
costPlanDao
.
insert
(
costPlanDomain
);
costPlanDao
.
insert
(
costPlanDomain
);
}
}
}
}
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