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
df4c6241
Commit
df4c6241
authored
Dec 23, 2020
by
unset
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加意见反馈添加信息
parent
a240b1a0
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
84 additions
and
25 deletions
+84
-25
CustomFormDto.java
...ava/com/upyuns/platform/rs/website/dto/CustomFormDto.java
+29
-0
CustomForm.java
...ava/com/upyuns/platform/rs/website/entity/CustomForm.java
+16
-0
OrderInfoBiz.java
...java/com/upyuns/platform/rs/website/biz/OrderInfoBiz.java
+39
-25
No files found.
rs-website/rs-website-api/src/main/java/com/upyuns/platform/rs/website/dto/CustomFormDto.java
0 → 100644
View file @
df4c6241
package
com
.
upyuns
.
platform
.
rs
.
website
.
dto
;
import
lombok.Data
;
import
java.math.BigDecimal
;
/**
* @ClassName : CustomFormDto
* @Description : 定制表单
* @Author : jiaoruizhen
* @Date: 2020-12-23 10:49
*/
@Data
public
class
CustomFormDto
{
//定制表单ID
Integer
customId
;
//审核状态
Integer
auditStatus
;
//审核原因
String
auditReason
;
//价格
BigDecimal
amount
;
}
rs-website/rs-website-api/src/main/java/com/upyuns/platform/rs/website/entity/CustomForm.java
View file @
df4c6241
package
com
.
upyuns
.
platform
.
rs
.
website
.
entity
;
package
com
.
upyuns
.
platform
.
rs
.
website
.
entity
;
import
java.io.Serializable
;
import
java.io.Serializable
;
import
java.math.BigDecimal
;
import
java.util.Date
;
import
java.util.Date
;
import
javax.persistence.*
;
import
javax.persistence.*
;
import
io.swagger.annotations.ApiModelProperty
;
import
io.swagger.annotations.ApiModelProperty
;
...
@@ -244,4 +245,19 @@ public class CustomForm implements Serializable {
...
@@ -244,4 +245,19 @@ public class CustomForm implements Serializable {
@Column
(
name
=
"status"
)
@Column
(
name
=
"status"
)
@ApiModelProperty
(
value
=
"状态 1--已提交;2--已转订单"
)
@ApiModelProperty
(
value
=
"状态 1--已提交;2--已转订单"
)
private
Integer
status
;
private
Integer
status
;
/**
* 审核状态:1、待审核,2、已审核, 3、审核不通过
*/
private
Integer
auditStatus
;
/**
* 审核不通过原因
*/
private
String
auditReason
;
/**
* 价格
*/
private
BigDecimal
amount
;
}
}
rs-website/rs-website-server/src/main/java/com/upyuns/platform/rs/website/biz/OrderInfoBiz.java
View file @
df4c6241
...
@@ -640,7 +640,9 @@ public class OrderInfoBiz extends BaseBiz<OrderInfoMapper, OrderInfo> {
...
@@ -640,7 +640,9 @@ public class OrderInfoBiz extends BaseBiz<OrderInfoMapper, OrderInfo> {
if
(
StringUtils
.
isNotBlank
(
userOrderDto
.
getPhone
()))
{
if
(
StringUtils
.
isNotBlank
(
userOrderDto
.
getPhone
()))
{
orderInfoCriteria
.
andEqualTo
(
"phone"
,
userOrderDto
.
getPhone
());
orderInfoCriteria
.
andEqualTo
(
"phone"
,
userOrderDto
.
getPhone
());
}
}
if
(
StringUtils
.
isNotBlank
(
userOrderDto
.
getStartTime
())
&&
StringUtils
.
isNotBlank
(
userOrderDto
.
getEndTime
()))
{
orderItemCriteria
.
andBetween
(
"crtTime"
,
userOrderDto
.
getStartTime
(),
userOrderDto
.
getEndTime
());
}
if
(
StringUtils
.
isNotBlank
(
userOrderDto
.
getName
()))
{
if
(
StringUtils
.
isNotBlank
(
userOrderDto
.
getName
()))
{
orderItemCriteria
.
andLike
(
"name"
,
"%"
+
userOrderDto
.
getName
()
+
"%"
);
orderItemCriteria
.
andLike
(
"name"
,
"%"
+
userOrderDto
.
getName
()
+
"%"
);
}
}
...
@@ -659,39 +661,51 @@ public class OrderInfoBiz extends BaseBiz<OrderInfoMapper, OrderInfo> {
...
@@ -659,39 +661,51 @@ public class OrderInfoBiz extends BaseBiz<OrderInfoMapper, OrderInfo> {
/**
/**
* 定制信息转订单
* 定制信息转订单
*
*
* @param custom
erId
* @param custom
FormDto
* @return
* @return
*/
*/
public
ObjectRestResponse
customerToOrderInfo
(
Integer
customerId
)
{
public
ObjectRestResponse
customerToOrderInfo
(
CustomFormDto
customFormDto
)
{
if
(
custom
erId
==
null
)
{
if
(
custom
FormDto
==
null
||
customFormDto
.
getCustomId
()
==
null
||
customFormDto
.
getAuditStatus
()
==
null
)
{
return
ObjectRestResponse
.
paramIsEmpty
();
return
ObjectRestResponse
.
paramIsEmpty
();
}
}
CustomForm
customForm
=
customFormBiz
.
selectById
(
custom
erId
);
CustomForm
customForm
=
customFormBiz
.
selectById
(
custom
FormDto
.
getCustomId
()
);
if
(
customForm
==
null
)
{
if
(
customForm
==
null
)
{
return
ObjectRestResponse
.
createFailedResult
(
ResultCode
.
NOTEXIST_CODE
,
ResultCode
.
getMsg
(
ResultCode
.
NOTEXIST_CODE
));
return
ObjectRestResponse
.
createFailedResult
(
ResultCode
.
NOTEXIST_CODE
,
ResultCode
.
getMsg
(
ResultCode
.
NOTEXIST_CODE
));
}
}
AppUserDTO
appUserDTO
=
userFeign
.
userDetailById
(
customForm
.
getUserId
()).
getData
();
if
(
customFormDto
.
getAuditStatus
()
==
2
)
{
//审核通过
if
(
appUserDTO
==
null
)
{
AppUserDTO
appUserDTO
=
userFeign
.
userDetailById
(
customForm
.
getUserId
()).
getData
();
return
ObjectRestResponse
.
createFailedResult
(
ResultCode
.
USER_NOTEXIST_CODE
,
ResultCode
.
getMsg
(
ResultCode
.
USER_NOTEXIST_CODE
));
if
(
appUserDTO
==
null
)
{
return
ObjectRestResponse
.
createFailedResult
(
ResultCode
.
USER_NOTEXIST_CODE
,
ResultCode
.
getMsg
(
ResultCode
.
USER_NOTEXIST_CODE
));
}
OrderInfo
orderInfo
=
new
OrderInfo
();
orderInfo
.
setRealName
(
appUserDTO
.
getRealname
());
orderInfo
.
setUserId
(
appUserDTO
.
getUserid
());
orderInfo
.
setPhone
(
appUserDTO
.
getUsername
());
orderInfo
.
setNickname
(
appUserDTO
.
getNickname
());
orderInfo
.
setHeadImg
(
appUserDTO
.
getHeadimgurl
());
orderInfo
.
setStatus
(
OrderStatusEnum
.
ORDER_NO_PRICE
.
getType
());
orderInfo
.
setCustomerId
(
customFormDto
.
getCustomId
());
orderInfo
.
setCustomerJson
(
JSONObject
.
toJSONString
(
customForm
));
orderInfo
.
setAmount
(
customFormDto
.
getAmount
());
orderInfo
.
setTotalAmount
(
customFormDto
.
getAmount
());
orderInfo
.
setNumber
(
1
);
orderInfo
.
setType
(
2
);
generateOrder
(
orderInfo
);
customForm
.
setOrderId
(
Integer
.
parseInt
(
String
.
valueOf
(
orderInfo
.
getOrderId
())));
//设置定制信息为已转成订单
customForm
.
setStatus
(
2
);
customForm
.
setAuditStatus
(
customFormDto
.
getAuditStatus
());
customForm
.
setAmount
(
customFormDto
.
getAmount
());
customFormBiz
.
updateSelectiveByIdRe
(
customForm
);
return
ObjectRestResponse
.
succ
();
}
else
{
customForm
.
setAuditStatus
(
customFormDto
.
getAuditStatus
());
customForm
.
setAuditReason
(
customFormDto
.
getAuditReason
());
customFormBiz
.
updateSelectiveByIdRe
(
customForm
);
return
ObjectRestResponse
.
succ
();
}
}
OrderInfo
orderInfo
=
new
OrderInfo
();
orderInfo
.
setRealName
(
appUserDTO
.
getRealname
());
orderInfo
.
setUserId
(
appUserDTO
.
getUserid
());
orderInfo
.
setPhone
(
appUserDTO
.
getUsername
());
orderInfo
.
setNickname
(
appUserDTO
.
getNickname
());
orderInfo
.
setHeadImg
(
appUserDTO
.
getHeadimgurl
());
orderInfo
.
setStatus
(
OrderStatusEnum
.
ORDER_NO_PRICE
.
getType
());
orderInfo
.
setCustomerId
(
customerId
);
orderInfo
.
setCustomerJson
(
JSONObject
.
toJSONString
(
customForm
));
orderInfo
.
setNumber
(
1
);
orderInfo
.
setType
(
2
);
generateOrder
(
orderInfo
);
customForm
.
setOrderId
(
Integer
.
parseInt
(
String
.
valueOf
(
orderInfo
.
getOrderId
())));
//设置定制信息为已转成订单
customForm
.
setStatus
(
2
);
customFormBiz
.
updateSelectiveByIdRe
(
customForm
);
return
ObjectRestResponse
.
succ
();
}
}
...
...
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