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
5e5a073f
Commit
5e5a073f
authored
Jan 06, 2020
by
jiaorz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
取消下单
parent
e6dbfcac
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
34 additions
and
0 deletions
+34
-0
OrderInvoice.java
...ain/java/com/xxfc/platform/order/entity/OrderInvoice.java
+9
-0
OrderInvoiceBiz.java
...ain/java/com/xxfc/platform/order/biz/OrderInvoiceBiz.java
+20
-0
OrderInvoiceController.java
.../com/xxfc/platform/order/rest/OrderInvoiceController.java
+5
-0
No files found.
xx-order/xx-order-api/src/main/java/com/xxfc/platform/order/entity/OrderInvoice.java
View file @
5e5a073f
...
...
@@ -114,4 +114,13 @@ public class OrderInvoice {
*/
private
String
extend
;
/**
* 1、开票成功,2、开票中
*/
private
Integer
status
;
/**
* 发票PDF路径
*/
private
String
invoiceUrl
;
}
\ No newline at end of file
xx-order/xx-order-server/src/main/java/com/xxfc/platform/order/biz/OrderInvoiceBiz.java
View file @
5e5a073f
package
com
.
xxfc
.
platform
.
order
.
biz
;
import
cn.hutool.core.bean.BeanUtil
;
import
cn.hutool.core.bean.copier.CopyOptions
;
import
com.github.wxiaoqi.security.admin.feign.UserFeign
;
import
com.github.wxiaoqi.security.admin.feign.dto.AppUserDTO
;
import
com.github.wxiaoqi.security.common.biz.BaseBiz
;
...
...
@@ -144,4 +146,22 @@ public class OrderInvoiceBiz extends BaseBiz<OrderInvoiceMapper, OrderInvoice> {
return
ObjectRestResponse
.
succ
(
pageDataVO
);
}
public
ObjectRestResponse
update
(
OrderInvoice
orderInvoice
)
{
AppUserDTO
appUserDTO
=
userFeign
.
userDetailByToken
(
request
.
getHeader
(
"Authorization"
)).
getData
();
if
(
appUserDTO
==
null
)
{
return
ObjectRestResponse
.
createFailedResult
(
ResultCode
.
RSTOKEN_EXPIRED_CODE
,
ResultCode
.
getMsg
(
ResultCode
.
RSTOKEN_EXPIRED_CODE
));
}
if
(
orderInvoice
==
null
||
orderInvoice
.
getId
()
==
null
)
{
return
ObjectRestResponse
.
paramIsEmpty
();
}
OrderInvoice
oldValue
=
mapper
.
selectByPrimaryKey
(
orderInvoice
.
getId
());
if
(
oldValue
!=
null
)
{
BeanUtil
.
copyProperties
(
orderInvoice
,
oldValue
,
CopyOptions
.
create
().
setIgnoreNullValue
(
true
).
setIgnoreError
(
true
));
updateSelectiveByIdRe
(
oldValue
);
return
ObjectRestResponse
.
succ
();
}
return
ObjectRestResponse
.
createFailedResult
(
ResultCode
.
FAILED_CODE
,
"发票不存在!"
);
}
}
xx-order/xx-order-server/src/main/java/com/xxfc/platform/order/rest/OrderInvoiceController.java
View file @
5e5a073f
...
...
@@ -42,4 +42,9 @@ public class OrderInvoiceController extends BaseController<OrderInvoiceBiz, Orde
return
baseBiz
.
getByParam
(
orderInvoiceDto
);
}
@PostMapping
(
value
=
"/update"
)
public
ObjectRestResponse
update
(
@RequestBody
OrderInvoice
orderInvoice
)
{
return
baseBiz
.
update
(
orderInvoice
);
}
}
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