Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
R
rs-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
周健威
rs-cloud-platform
Commits
3d176807
Commit
3d176807
authored
Dec 29, 2020
by
unset
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加通知信息
parent
c6964937
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
71 additions
and
9 deletions
+71
-9
NoticeInfoDto.java
...ava/com/upyuns/platform/rs/website/dto/NoticeInfoDto.java
+19
-0
NoticeInfoBiz.java
...ava/com/upyuns/platform/rs/website/biz/NoticeInfoBiz.java
+24
-0
OrderInfoBiz.java
...java/com/upyuns/platform/rs/website/biz/OrderInfoBiz.java
+8
-8
NoticeInfoWebController.java
...rm/rs/website/controller/web/NoticeInfoWebController.java
+20
-1
No files found.
rs-website/rs-website-api/src/main/java/com/upyuns/platform/rs/website/dto/NoticeInfoDto.java
0 → 100644
View file @
3d176807
package
com
.
upyuns
.
platform
.
rs
.
website
.
dto
;
import
com.github.wxiaoqi.security.common.vo.PageParam
;
import
lombok.Data
;
/**
* @ClassName : NoticeInfoDto
* @Description : 通知信息
* @Author : jiaoruizhen
* @Date: 2020-12-29 09:14
*/
@Data
public
class
NoticeInfoDto
extends
PageParam
{
Integer
userId
;
Integer
read
;
}
rs-website/rs-website-server/src/main/java/com/upyuns/platform/rs/website/biz/NoticeInfoBiz.java
View file @
3d176807
package
com
.
upyuns
.
platform
.
rs
.
website
.
biz
;
import
com.github.wxiaoqi.security.common.msg.ObjectRestResponse
;
import
com.github.wxiaoqi.security.common.util.Query
;
import
com.github.wxiaoqi.security.common.vo.PageDataVO
;
import
com.upyuns.platform.rs.website.dto.NoticeInfoDto
;
import
org.springframework.stereotype.Service
;
import
com.upyuns.platform.rs.website.entity.NoticeInfo
;
import
com.upyuns.platform.rs.website.mapper.NoticeInfoMapper
;
import
com.github.wxiaoqi.security.common.biz.BaseBiz
;
import
tk.mybatis.mapper.entity.Example
;
import
java.util.Date
;
import
java.util.concurrent.ExecutorService
;
...
...
@@ -23,4 +28,23 @@ public class NoticeInfoBiz extends BaseBiz<NoticeInfoMapper,NoticeInfo> {
public
void
addObj
(
String
message
,
Integer
type
,
Integer
userId
,
String
relationId
)
{
insertSelectiveRe
(
new
NoticeInfo
(){{
setMessage
(
message
);
setType
(
type
);
setUserId
(
userId
);
setRelationId
(
relationId
);
setCrtTime
(
new
Date
());
setUpdTime
(
new
Date
());}});
}
/**
* 查询用户所有通知信息
* @param noticeInfoDto
* @return
*/
public
ObjectRestResponse
getByUserId
(
NoticeInfoDto
noticeInfoDto
)
{
Example
example
=
new
Example
(
NoticeInfo
.
class
);
Example
.
Criteria
criteria
=
example
.
createCriteria
();
if
(
noticeInfoDto
.
getRead
()
!=
null
)
{
criteria
.
andEqualTo
(
"read"
,
noticeInfoDto
.
getRead
());
}
criteria
.
andEqualTo
(
"userId"
,
noticeInfoDto
.
getUserId
());
example
.
orderBy
(
"read"
);
Query
query
=
new
Query
(
noticeInfoDto
);
PageDataVO
<
NoticeInfo
>
pageDataVO
=
PageDataVO
.
pageInfo
(
query
,
()
->
mapper
.
selectByExample
(
example
));
return
ObjectRestResponse
.
succ
(
pageDataVO
);
}
}
\ No newline at end of file
rs-website/rs-website-server/src/main/java/com/upyuns/platform/rs/website/biz/OrderInfoBiz.java
View file @
3d176807
...
...
@@ -383,14 +383,6 @@ public class OrderInfoBiz extends BaseBiz<OrderInfoMapper, OrderInfo> {
orderInfo
.
setRemark
(
orderInfoDto
.
getRemark
());
orderInfo
.
setAmount
(
new
BigDecimal
(
amount
.
get
()));
orderInfo
.
setNumber
(
number
.
get
());
Dictionary
dictionary
=
thirdFeign
.
findDictionaryByTypeAndCode
(
DictionaryKey
.
APP_ORDER
,
DictionaryKey
.
SEND_FEE
);
if
(
dictionary
!=
null
&&
StringUtils
.
isNotBlank
(
dictionary
.
getDetail
()))
{
orderInfo
.
setFee
(
new
BigDecimal
(
dictionary
.
getDetail
()));
}
if
(
orderInfo
.
getFee
()
!=
null
)
{
orderInfo
.
setTotalAmount
(
orderInfo
.
getAmount
().
add
(
orderInfo
.
getFee
()));
}
//订单发票信息
if
(
orderInfoDto
.
getUserInvoiceId
()
!=
null
)
{
UserInvoice
userInvoice
=
userInvoiceBiz
.
selectById
(
orderInfoDto
.
getUserInvoiceId
());
...
...
@@ -412,6 +404,14 @@ public class OrderInfoBiz extends BaseBiz<OrderInfoMapper, OrderInfo> {
orderEInvoiceBiz
.
addUpdate
(
orderEInvoice
);
orderInfo
.
setInvoiceStatus
(
2
);
orderInfo
.
setInvoiceId
(
orderEInvoice
.
getId
());
Dictionary
dictionary
=
thirdFeign
.
findDictionaryByTypeAndCode
(
DictionaryKey
.
APP_ORDER
,
DictionaryKey
.
SEND_FEE
);
if
(
dictionary
!=
null
&&
StringUtils
.
isNotBlank
(
dictionary
.
getDetail
()))
{
orderInfo
.
setFee
(
new
BigDecimal
(
dictionary
.
getDetail
()));
}
if
(
orderInfo
.
getFee
()
!=
null
)
{
orderInfo
.
setTotalAmount
(
orderInfo
.
getAmount
().
add
(
orderInfo
.
getFee
()));
}
}
}
...
...
rs-website/rs-website-server/src/main/java/com/upyuns/platform/rs/website/controller/web/NoticeInfoWebController.java
View file @
3d176807
package
com
.
upyuns
.
platform
.
rs
.
website
.
controller
.
web
;
import
com.github.wxiaoqi.security.admin.feign.UserFeign
;
import
com.github.wxiaoqi.security.admin.feign.rest.UserRestInterface
;
import
com.github.wxiaoqi.security.common.msg.ObjectRestResponse
;
import
com.github.wxiaoqi.security.common.rest.BaseController
;
import
com.upyuns.platform.rs.website.biz.NoticeInfoBiz
;
import
com.upyuns.platform.rs.website.dto.NoticeInfoDto
;
import
com.upyuns.platform.rs.website.entity.NoticeInfo
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
@RestController
@RequestMapping
(
"noticeInfo/web"
)
public
class
NoticeInfoWebController
extends
BaseController
<
NoticeInfoBiz
,
NoticeInfo
>
{
public
class
NoticeInfoWebController
extends
BaseController
<
NoticeInfoBiz
,
NoticeInfo
>
implements
UserRestInterface
{
@Autowired
UserFeign
userFeign
;
@Override
public
UserFeign
getUserFeign
()
{
return
userFeign
;
}
@GetMapping
(
value
=
"getAllByUser"
)
public
ObjectRestResponse
getUserList
(
NoticeInfoDto
noticeInfoDto
)
{
noticeInfoDto
.
setUserId
(
getAppUser
().
getUserid
());
return
baseBiz
.
getByUserId
(
noticeInfoDto
);
}
}
\ 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