Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
X
xinrenli
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
郑云飞
xinrenli
Commits
ffecb09f
Commit
ffecb09f
authored
Apr 11, 2023
by
kaevom
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改支付接口判断
parent
0a3e375c
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
54 additions
and
16 deletions
+54
-16
yongqi-xinrenli/src/main/java/com/yongqi/xinrenli/controller/DbOrderController.java
+8
-1
yongqi-xinrenli/src/main/java/com/yongqi/xinrenli/domain/bo/DbOrderBo.java
+2
-2
yongqi-xinrenli/src/main/java/com/yongqi/xinrenli/domain/bo/DbWxUserBo.java
+1
-1
yongqi-xinrenli/src/main/java/com/yongqi/xinrenli/service/impl/DbArticleServiceImpl.java
+40
-2
yongqi-xinrenli/src/main/java/com/yongqi/xinrenli/service/impl/DbOrderServiceImpl.java
+1
-1
yongqi-xinrenli/src/main/resources/mapper/DbArticleMapper.xml
+1
-9
yongqi-xinrenli/src/main/resources/mapper/DbOrderMapper.xml
+1
-0
No files found.
yongqi-xinrenli/src/main/java/com/yongqi/xinrenli/controller/DbOrderController.java
View file @
ffecb09f
...
@@ -6,6 +6,7 @@ import java.util.List;
...
@@ -6,6 +6,7 @@ import java.util.List;
import
java.util.Arrays
;
import
java.util.Arrays
;
import
com.baomidou.mybatisplus.core.toolkit.ObjectUtils
;
import
com.baomidou.mybatisplus.core.toolkit.ObjectUtils
;
import
com.github.binarywang.wxpay.bean.notify.WxPayNotifyResponse
;
import
com.github.binarywang.wxpay.exception.WxPayException
;
import
com.github.binarywang.wxpay.exception.WxPayException
;
import
com.yongqi.common.core.domain.model.LoginUser
;
import
com.yongqi.common.core.domain.model.LoginUser
;
import
com.yongqi.common.helper.LoginHelper
;
import
com.yongqi.common.helper.LoginHelper
;
...
@@ -245,7 +246,7 @@ public class DbOrderController extends BaseController {
...
@@ -245,7 +246,7 @@ public class DbOrderController extends BaseController {
*/
*/
@SaCheckPermission
(
"xinrenli:order:exportReportForms"
)
@SaCheckPermission
(
"xinrenli:order:exportReportForms"
)
@Log
(
title
=
"订单"
,
businessType
=
BusinessType
.
EXPORT
)
@Log
(
title
=
"订单"
,
businessType
=
BusinessType
.
EXPORT
)
@
Ge
tMapping
(
"/exportReportForms"
)
@
Pos
tMapping
(
"/exportReportForms"
)
public
R
<
Void
>
exportReportForms
(
HttpServletResponse
response
)
{
public
R
<
Void
>
exportReportForms
(
HttpServletResponse
response
)
{
try
{
try
{
ReportFormsVo
vo
=
iDbOrderService
.
reportFormsExl
();
ReportFormsVo
vo
=
iDbOrderService
.
reportFormsExl
();
...
@@ -266,6 +267,12 @@ public class DbOrderController extends BaseController {
...
@@ -266,6 +267,12 @@ public class DbOrderController extends BaseController {
@Log
(
title
=
"报表"
,
businessType
=
BusinessType
.
DELETE
)
@Log
(
title
=
"报表"
,
businessType
=
BusinessType
.
DELETE
)
@PostMapping
(
"/createPay"
)
@PostMapping
(
"/createPay"
)
public
R
<
Void
>
createPay
(
@RequestBody
DbOrderEditBo
bo
)
{
public
R
<
Void
>
createPay
(
@RequestBody
DbOrderEditBo
bo
)
{
if
(
"2"
.
equals
(
bo
.
getStatus
())){
if
(
ObjectUtils
.
isEmpty
(
bo
.
getActualAmount
())){
return
R
.
fail
(
"沟通金额为空"
);
}
}
return
toAjax
(
iDbOrderService
.
createPay
(
bo
));
return
toAjax
(
iDbOrderService
.
createPay
(
bo
));
}
}
}
}
yongqi-xinrenli/src/main/java/com/yongqi/xinrenli/domain/bo/DbOrderBo.java
View file @
ffecb09f
...
@@ -36,7 +36,7 @@ public class DbOrderBo extends BaseEntity {
...
@@ -36,7 +36,7 @@ public class DbOrderBo extends BaseEntity {
/**
/**
* 用户id
* 用户id
*/
*/
@NotNull
(
message
=
"用户id不能为空"
,
groups
=
{
AddGroup
.
class
,
EditGroup
.
class
})
@NotNull
(
message
=
"用户id不能为空"
,
groups
=
{
EditGroup
.
class
})
private
Long
userId
;
private
Long
userId
;
/**
/**
...
@@ -119,7 +119,7 @@ public class DbOrderBo extends BaseEntity {
...
@@ -119,7 +119,7 @@ public class DbOrderBo extends BaseEntity {
/**
/**
* 文件列表
* 文件列表
*/
*/
@NotNull
(
message
=
"图片,视频,语音必须上传其中一个"
,
groups
=
{
EditGroup
.
class
})
//
@NotNull(message = "图片,视频,语音必须上传其中一个", groups = {EditGroup.class})
private
List
<
DbFileBo
>
fileVos
;
private
List
<
DbFileBo
>
fileVos
;
/**
/**
* 图片列表
* 图片列表
...
...
yongqi-xinrenli/src/main/java/com/yongqi/xinrenli/domain/bo/DbWxUserBo.java
View file @
ffecb09f
...
@@ -41,7 +41,7 @@ public class DbWxUserBo extends BaseEntity {
...
@@ -41,7 +41,7 @@ public class DbWxUserBo extends BaseEntity {
/**
/**
* 用户昵称
* 用户昵称
*/
*/
@NotBlank
(
message
=
"用户昵称不能为空"
,
groups
=
{
AddGroup
.
class
,
EditGroup
.
class
})
@NotBlank
(
message
=
"用户昵称不能为空"
,
groups
=
{
AddGroup
.
class
})
private
String
nickname
;
private
String
nickname
;
/**
/**
...
...
yongqi-xinrenli/src/main/java/com/yongqi/xinrenli/service/impl/DbArticleServiceImpl.java
View file @
ffecb09f
...
@@ -11,6 +11,7 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
...
@@ -11,6 +11,7 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import
com.baomidou.mybatisplus.core.toolkit.Wrappers
;
import
com.baomidou.mybatisplus.core.toolkit.Wrappers
;
import
com.yongqi.xinrenli.domain.DbFile
;
import
com.yongqi.xinrenli.domain.DbFile
;
import
com.yongqi.xinrenli.domain.DbUserComment
;
import
com.yongqi.xinrenli.domain.DbUserComment
;
import
com.yongqi.xinrenli.domain.vo.DbFileVo
;
import
com.yongqi.xinrenli.domain.vo.DbUserCommentVo
;
import
com.yongqi.xinrenli.domain.vo.DbUserCommentVo
;
import
com.yongqi.xinrenli.enums.DeleteStatusEnum
;
import
com.yongqi.xinrenli.enums.DeleteStatusEnum
;
import
com.yongqi.xinrenli.enums.FileEnumServiceType
;
import
com.yongqi.xinrenli.enums.FileEnumServiceType
;
...
@@ -50,10 +51,16 @@ public class DbArticleServiceImpl implements IDbArticleService {
...
@@ -50,10 +51,16 @@ public class DbArticleServiceImpl implements IDbArticleService {
@Override
@Override
public
DbArticleVo
queryById
(
Long
id
)
{
public
DbArticleVo
queryById
(
Long
id
)
{
DbArticleVo
vo
=
baseMapper
.
selectVoById
(
id
);
DbArticleVo
vo
=
baseMapper
.
selectVoById
(
id
);
IPage
<
DbUserCommentVo
>
voPage
=
commentMapper
.
selectVoPage
(
new
Page
<
DbUserComment
>(
1
,
3
),
Wrappers
.<
DbUserComment
>
lambdaQuery
()
IPage
<
DbUserCommentVo
>
voPage
=
commentMapper
.
selectVoPage
(
new
Page
<
DbUserComment
>(
1
,
3
),
Wrappers
.<
DbUserComment
>
lambdaQuery
()
.
eq
(
DbUserComment:
:
getArticleId
,
id
)
.
eq
(
DbUserComment:
:
getArticleId
,
id
)
.
eq
(
DbUserComment:
:
getDeleteStatus
,
0
));
.
eq
(
DbUserComment:
:
getDeleteStatus
,
0
));
vo
.
setCommentVos
(
voPage
.
getRecords
());
vo
.
setCommentVos
(
voPage
.
getRecords
());
List
<
DbFileVo
>
dbFileVo
=
fileMapper
.
selectVoList
(
Wrappers
.<
DbFile
>
lambdaQuery
()
.
eq
(
DbFile:
:
getServiceId
,
id
)
.
eq
(
DbFile:
:
getServiceType
,
FileEnumServiceType
.
ARTICLE
.
getServiceTyp
())
.
eq
(
DbFile:
:
getDeleteStatus
,
DeleteStatusEnum
.
OK
.
getCode
()));
vo
.
setFileVos
(
dbFileVo
);
return
vo
;
return
vo
;
}
}
...
@@ -65,11 +72,24 @@ public class DbArticleServiceImpl implements IDbArticleService {
...
@@ -65,11 +72,24 @@ public class DbArticleServiceImpl implements IDbArticleService {
LambdaQueryWrapper
<
DbArticle
>
lqw
=
buildQueryWrapper
(
bo
);
LambdaQueryWrapper
<
DbArticle
>
lqw
=
buildQueryWrapper
(
bo
);
Page
<
DbArticleVo
>
result
=
baseMapper
.
selectPageList
(
pageQuery
.
build
(),
lqw
);
Page
<
DbArticleVo
>
result
=
baseMapper
.
selectPageList
(
pageQuery
.
build
(),
lqw
);
result
.
getRecords
().
forEach
(
record
->
{
result
.
getRecords
().
forEach
(
record
->
{
IPage
<
DbUserCommentVo
>
voPage
=
commentMapper
.
selectVoPage
(
new
Page
<
DbUserComment
>(
1
,
3
),
Wrappers
.<
DbUserComment
>
lambdaQuery
()
IPage
<
DbUserCommentVo
>
voPage
=
commentMapper
.
selectVoPage
(
new
Page
<
DbUserComment
>(
0
,
3
),
Wrappers
.<
DbUserComment
>
lambdaQuery
()
.
eq
(
DbUserComment:
:
getArticleId
,
record
.
getId
())
.
eq
(
DbUserComment:
:
getArticleId
,
record
.
getId
())
.
eq
(
DbUserComment:
:
getDeleteStatus
,
0
));
.
eq
(
DbUserComment:
:
getDeleteStatus
,
0
));
record
.
setCommentVos
(
voPage
.
getRecords
());
record
.
setCommentVos
(
voPage
.
getRecords
());
List
<
DbFileVo
>
dbFileVo
=
fileMapper
.
selectVoList
(
Wrappers
.<
DbFile
>
lambdaQuery
()
.
eq
(
DbFile:
:
getServiceId
,
record
.
getId
())
.
eq
(
DbFile:
:
getServiceType
,
FileEnumServiceType
.
ARTICLE
.
getServiceTyp
())
.
eq
(
DbFile:
:
getDeleteStatus
,
DeleteStatusEnum
.
OK
.
getCode
()));
record
.
setFileVos
(
dbFileVo
);
});
});
for
(
DbArticleVo
article
:
result
.
getRecords
())
{
String
n
=
article
.
getContent
();
n
=
n
.
replace
(
"<p>"
,
""
);
n
=
n
.
replace
(
"</p>"
,
""
);
article
.
setContent
(
n
);
}
return
TableDataInfo
.
build
(
result
);
return
TableDataInfo
.
build
(
result
);
}
}
...
@@ -131,7 +151,25 @@ public class DbArticleServiceImpl implements IDbArticleService {
...
@@ -131,7 +151,25 @@ public class DbArticleServiceImpl implements IDbArticleService {
public
Boolean
updateByBo
(
DbArticleBo
bo
)
{
public
Boolean
updateByBo
(
DbArticleBo
bo
)
{
DbArticle
update
=
BeanUtil
.
toBean
(
bo
,
DbArticle
.
class
);
DbArticle
update
=
BeanUtil
.
toBean
(
bo
,
DbArticle
.
class
);
validEntityBeforeSave
(
update
);
validEntityBeforeSave
(
update
);
return
baseMapper
.
updateById
(
update
)
>
0
;
boolean
flag
=
baseMapper
.
updateById
(
update
)
>
0
;
if
(
flag
)
{
bo
.
setId
(
update
.
getId
());
List
<
DbFile
>
files
=
BeanUtil
.
copyToList
(
bo
.
getFileVos
(),
DbFile
.
class
);
if
(
ObjectUtils
.
isNotEmpty
(
files
)){
fileMapper
.
delete
(
Wrappers
.<
DbFile
>
lambdaQuery
()
.
eq
(
DbFile:
:
getDeleteStatus
,
DeleteStatusEnum
.
OK
.
getCode
())
.
eq
(
DbFile:
:
getServiceType
,
FileEnumServiceType
.
ARTICLE
.
getServiceTyp
())
.
eq
(
DbFile:
:
getServiceId
,
bo
.
getId
())
);
files
.
forEach
(
file
->
{
file
.
setServiceId
(
bo
.
getId
());
file
.
setServiceType
(
FileEnumServiceType
.
ARTICLE
.
getServiceTyp
());
file
.
setDeleteStatus
(
DeleteStatusEnum
.
OK
.
getCode
());
});
}
fileMapper
.
insertBatch
(
files
);
}
return
flag
;
}
}
/**
/**
...
...
yongqi-xinrenli/src/main/java/com/yongqi/xinrenli/service/impl/DbOrderServiceImpl.java
View file @
ffecb09f
...
@@ -137,7 +137,6 @@ public class DbOrderServiceImpl implements IDbOrderService {
...
@@ -137,7 +137,6 @@ public class DbOrderServiceImpl implements IDbOrderService {
@Transactional
@Transactional
public
Boolean
insertByBo
(
DbOrderBo
bo
,
LoginUser
user
)
{
public
Boolean
insertByBo
(
DbOrderBo
bo
,
LoginUser
user
)
{
DbOrder
add
=
BeanUtil
.
toBean
(
bo
,
DbOrder
.
class
);
DbOrder
add
=
BeanUtil
.
toBean
(
bo
,
DbOrder
.
class
);
validEntityBeforeSave
(
add
,
user
);
validEntityBeforeSave
(
add
,
user
);
add
.
setUserId
(
user
.
getUserId
());
add
.
setUserId
(
user
.
getUserId
());
...
@@ -257,6 +256,7 @@ public class DbOrderServiceImpl implements IDbOrderService {
...
@@ -257,6 +256,7 @@ public class DbOrderServiceImpl implements IDbOrderService {
LambdaQueryWrapper
<
DbOrder
>
lqw
=
Wrappers
.
lambdaQuery
();
LambdaQueryWrapper
<
DbOrder
>
lqw
=
Wrappers
.
lambdaQuery
();
lqw
.
ge
(
DbOrder:
:
getActualAmount
,
minamount
);
lqw
.
ge
(
DbOrder:
:
getActualAmount
,
minamount
);
lqw
.
eq
(
DbOrder:
:
getDeleteStatus
,
0
);
lqw
.
eq
(
DbOrder:
:
getDeleteStatus
,
0
);
lqw
.
eq
(
DbOrder:
:
getStatus
,
4
);
Page
<
DbOrderVo
>
result
=
baseMapper
.
selectVoPage
(
pageQuery
.
build
(),
lqw
);
Page
<
DbOrderVo
>
result
=
baseMapper
.
selectVoPage
(
pageQuery
.
build
(),
lqw
);
result
.
getRecords
().
forEach
(
record
->
{
result
.
getRecords
().
forEach
(
record
->
{
DbFileVo
dbFileVo
=
fileMapper
.
selectVoOne
(
Wrappers
.<
DbFile
>
lambdaQuery
()
DbFileVo
dbFileVo
=
fileMapper
.
selectVoOne
(
Wrappers
.<
DbFile
>
lambdaQuery
()
...
...
yongqi-xinrenli/src/main/resources/mapper/DbArticleMapper.xml
View file @
ffecb09f
...
@@ -24,20 +24,12 @@
...
@@ -24,20 +24,12 @@
<result
property=
"modifyUser"
column=
"modify_user"
/>
<result
property=
"modifyUser"
column=
"modify_user"
/>
<result
property=
"modifyTime"
column=
"modify_time"
/>
<result
property=
"modifyTime"
column=
"modify_time"
/>
<result
property=
"deleteStatus"
column=
"delete_status"
/>
<result
property=
"deleteStatus"
column=
"delete_status"
/>
<collection
property=
"fileVos"
ofType=
"com.yongqi.xinrenli.domain.vo.DbFileVo"
>
<result
property=
"serviceType"
column=
"service_type"
/>
<result
property=
"fileType"
column=
"file_type"
/>
<result
property=
"url"
column=
"url"
/>
<result
property=
"sort"
column=
"sort"
/>
</collection>
</resultMap>
</resultMap>
<select
id=
"selectPageList"
resultMap =
"DbArticleVo"
>
<select
id=
"selectPageList"
resultMap =
"DbArticleVo"
>
select
art.*,df.
*
select *
from db_article art
from db_article art
left join (select service_id,service_type,delete_status as de from db_file) df on art.id = df.service_id and df.service_type = 'wenzhang' and df.de = 0
${ew.getCustomSqlSegment}
${ew.getCustomSqlSegment}
</select>
</select>
</mapper>
</mapper>
yongqi-xinrenli/src/main/resources/mapper/DbOrderMapper.xml
View file @
ffecb09f
...
@@ -30,6 +30,7 @@
...
@@ -30,6 +30,7 @@
update db_order
update db_order
set modify_time=now(),
set modify_time=now(),
modify_user=#{modifyUser},
modify_user=#{modifyUser},
status=7,
delete_status=1
delete_status=1
where id = #{id}
where id = #{id}
...
...
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