Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
cloud-platform
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
youjj
cloud-platform
Commits
e05ef22e
Commit
e05ef22e
authored
Nov 12, 2020
by
周健威
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master-chw' into dev-chw
parents
29922bc5
db66ce15
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
57 additions
and
6 deletions
+57
-6
BaseBiz.java
.../java/com/github/wxiaoqi/security/common/biz/BaseBiz.java
+9
-0
ShuntApplyBiz.java
.../main/java/com/xxfc/platform/order/biz/ShuntApplyBiz.java
+7
-0
ShuntApplyMapper.java
...java/com/xxfc/platform/order/mapper/ShuntApplyMapper.java
+5
-1
ShuntApplyController.java
...va/com/xxfc/platform/order/rest/ShuntApplyController.java
+8
-5
ShuntApplyMapper.xml
...der-server/src/main/resources/mapper/ShuntApplyMapper.xml
+28
-0
No files found.
ace-common/src/main/java/com/github/wxiaoqi/security/common/biz/BaseBiz.java
View file @
e05ef22e
...
@@ -78,6 +78,15 @@ public abstract class BaseBiz<M extends Mapper<T>, T> {
...
@@ -78,6 +78,15 @@ public abstract class BaseBiz<M extends Mapper<T>, T> {
return
selectByExample
(
example
);
return
selectByExample
(
example
);
}
}
public
List
<
T
>
selectByBuilder
(
Function
<
Example
.
Builder
,
Example
.
Builder
>
builderFun
,
String
orderStr
)
{
Example
.
Builder
builder
=
builderFun
.
apply
(
new
Example
.
Builder
(
entityClass
));
Example
example
=
builder
.
build
();
if
(
StrUtil
.
isNotBlank
(
orderStr
))
{
example
.
setOrderByClause
(
orderStr
);
}
return
selectByExample
(
example
);
}
public
List
<
T
>
selectByWeekendsOr
(
Supplier
<
List
<
WeekendSqls
<
T
>>>
where
,
String
orderStr
)
{
public
List
<
T
>
selectByWeekendsOr
(
Supplier
<
List
<
WeekendSqls
<
T
>>>
where
,
String
orderStr
)
{
List
<
WeekendSqls
<
T
>>
whereSqlss
=
where
.
get
();
List
<
WeekendSqls
<
T
>>
whereSqlss
=
where
.
get
();
Example
.
Builder
builder
=
new
Example
.
Builder
(
entityClass
);
Example
.
Builder
builder
=
new
Example
.
Builder
(
entityClass
);
...
...
xx-order/xx-order-server/src/main/java/com/xxfc/platform/order/biz/ShuntApplyBiz.java
View file @
e05ef22e
package
com
.
xxfc
.
platform
.
order
.
biz
;
package
com
.
xxfc
.
platform
.
order
.
biz
;
import
com.xxfc.platform.order.rest.ShuntApplyController
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
com.xxfc.platform.order.entity.ShuntApply
;
import
com.xxfc.platform.order.entity.ShuntApply
;
import
com.xxfc.platform.order.mapper.ShuntApplyMapper
;
import
com.xxfc.platform.order.mapper.ShuntApplyMapper
;
import
com.github.wxiaoqi.security.common.biz.BaseBiz
;
import
com.github.wxiaoqi.security.common.biz.BaseBiz
;
import
java.util.List
;
/**
/**
* 调车申请
* 调车申请
*
*
...
@@ -15,4 +18,8 @@ import com.github.wxiaoqi.security.common.biz.BaseBiz;
...
@@ -15,4 +18,8 @@ import com.github.wxiaoqi.security.common.biz.BaseBiz;
*/
*/
@Service
@Service
public
class
ShuntApplyBiz
extends
BaseBiz
<
ShuntApplyMapper
,
ShuntApply
>
{
public
class
ShuntApplyBiz
extends
BaseBiz
<
ShuntApplyMapper
,
ShuntApply
>
{
public
List
<
ShuntApply
>
pageList
(
ShuntApplyController
.
QueryDTO
dto
){
return
mapper
.
pageList
(
dto
);
}
}
}
\ No newline at end of file
xx-order/xx-order-server/src/main/java/com/xxfc/platform/order/mapper/ShuntApplyMapper.java
View file @
e05ef22e
package
com
.
xxfc
.
platform
.
order
.
mapper
;
package
com
.
xxfc
.
platform
.
order
.
mapper
;
import
com.xxfc.platform.order.entity.ShuntApply
;
import
com.xxfc.platform.order.entity.ShuntApply
;
import
com.xxfc.platform.order.rest.ShuntApplyController
;
import
tk.mybatis.mapper.common.Mapper
;
import
tk.mybatis.mapper.common.Mapper
;
import
java.util.List
;
/**
/**
* 调车申请
* 调车申请
*
*
...
@@ -11,5 +14,6 @@ import tk.mybatis.mapper.common.Mapper;
...
@@ -11,5 +14,6 @@ import tk.mybatis.mapper.common.Mapper;
* @date 2020-09-09 14:49:51
* @date 2020-09-09 14:49:51
*/
*/
public
interface
ShuntApplyMapper
extends
Mapper
<
ShuntApply
>
{
public
interface
ShuntApplyMapper
extends
Mapper
<
ShuntApply
>
{
public
List
<
ShuntApply
>
pageList
(
ShuntApplyController
.
QueryDTO
dto
);
}
}
xx-order/xx-order-server/src/main/java/com/xxfc/platform/order/rest/ShuntApplyController.java
View file @
e05ef22e
...
@@ -41,6 +41,7 @@ import lombok.Data;
...
@@ -41,6 +41,7 @@ import lombok.Data;
import
org.mockito.internal.util.collections.Sets
;
import
org.mockito.internal.util.collections.Sets
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.bind.annotation.*
;
import
tk.mybatis.mapper.weekend.WeekendSqls
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Map
;
...
@@ -170,11 +171,7 @@ public class ShuntApplyController extends BaseController<ShuntApplyBiz, ShuntApp
...
@@ -170,11 +171,7 @@ public class ShuntApplyController extends BaseController<ShuntApplyBiz, ShuntApp
}
}
dto
.
setUserId
(
Integer
.
valueOf
(
BaseContextHandler
.
getUserID
()));
dto
.
setUserId
(
Integer
.
valueOf
(
BaseContextHandler
.
getUserID
()));
Query
query
=
new
Query
(
dto
);
Query
query
=
new
Query
(
dto
);
PageDataVO
<
ShuntApplyVO
>
pages
=
PageDataVO
.
pageInfo
(
query
,
()
->
baseBiz
.
selectByWeekend
(
w
->
{
PageDataVO
<
ShuntApplyVO
>
pages
=
PageDataVO
.
pageInfo
(
query
,
()
->
baseBiz
.
pageList
(
dto
),
ShuntApplyVO
.
class
);
w
.
andEqualTo
(
ShuntApply:
:
getUserId
,
dto
.
getUserId
());
w
.
andEqualTo
(
ShuntApply:
:
getIsDel
,
SYS_FALSE
);
return
w
;
},
" crt_time desc "
),
ShuntApplyVO
.
class
);
pages
.
getData
().
forEach
(
data
->
{
pages
.
getData
().
forEach
(
data
->
{
data
.
setAppUserDTO
(
userFeign
.
userDetailById
(
data
.
getUserId
()).
getData
());
data
.
setAppUserDTO
(
userFeign
.
userDetailById
(
data
.
getUserId
()).
getData
());
});
});
...
@@ -223,7 +220,13 @@ public class ShuntApplyController extends BaseController<ShuntApplyBiz, ShuntApp
...
@@ -223,7 +220,13 @@ public class ShuntApplyController extends BaseController<ShuntApplyBiz, ShuntApp
@Data
@Data
public
static
class
QueryDTO
extends
PageParam
{
public
static
class
QueryDTO
extends
PageParam
{
public
static
final
int
PAGE_STATUS_ING
=
1
;
public
static
final
int
PAGE_STATUS_TOPAY
=
2
;
public
static
final
int
PAGE_STATUS_PAYED
=
3
;
public
static
final
int
PAGE_STATUS_CNL
=
4
;
Integer
userId
;
Integer
userId
;
Integer
pageStatus
;
}
}
@Data
@Data
...
...
xx-order/xx-order-server/src/main/resources/mapper/ShuntApplyMapper.xml
View file @
e05ef22e
...
@@ -24,4 +24,32 @@
...
@@ -24,4 +24,32 @@
<result
property=
"endCompanyName"
column=
"end_company_name"
/>
<result
property=
"endCompanyName"
column=
"end_company_name"
/>
</resultMap>
</resultMap>
<select
id=
"pageList"
resultType=
"com.xxfc.platform.order.entity.ShuntApply"
>
select *
from shunt_apply
<where>
is_del = 0
<if
test=
"userId != null"
>
and user_id = #{userId}
</if>
<if
test=
"pageStatus != null"
>
<if
test=
"pageStatus == 1"
>
and status = 1
</if>
<if
test=
"pageStatus == 2"
>
and ((status = 4 and order_status = 1) or status = 3)
</if>
<if
test=
"pageStatus == 3"
>
and status = 4 and order_status = 2
</if>
<if
test=
"pageStatus == 4"
>
and status in (2, 501, 502, 503, 504)
</if>
</if>
</where>
order by crt_time desc
</select>
</mapper>
</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