Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
serviceApi
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
antaile
serviceApi
Commits
efb5f72e
Commit
efb5f72e
authored
Jul 15, 2021
by
XiaHou
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
查询展览纪念馆
parent
40858f9b
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
241 additions
and
20 deletions
+241
-20
ApiOshServicesOrderController.java
...rvicecenter/controller/ApiOshServicesOrderController.java
+25
-14
AtlTimeOrderDTO.java
...a/com/atlgroupasia/servicecenter/dto/AtlTimeOrderDTO.java
+21
-0
OshServicesOrderDTO.java
...m/atlgroupasia/servicecenter/dto/OshServicesOrderDTO.java
+44
-0
OshServicesOrderItemDTO.java
...lgroupasia/servicecenter/dto/OshServicesOrderItemDTO.java
+26
-0
OshServicesOrderMapper.java
...roupasia/servicecenter/mapper/OshServicesOrderMapper.java
+55
-2
QueryOrderRelationTimeParam.java
...servicecenter/queryparam/QueryOrderRelationTimeParam.java
+22
-0
OshServicesOrderSerice.java
...oupasia/servicecenter/service/OshServicesOrderSerice.java
+0
-0
JsonResult.java
...java/com/atlgroupasia/servicecenter/utils/JsonResult.java
+5
-2
WXOfficeConfigUtil.java
.../atlgroupasia/servicecenter/utils/WXOfficeConfigUtil.java
+1
-1
OshServicesOrderVo.java
...com/atlgroupasia/servicecenter/vo/OshServicesOrderVo.java
+1
-1
OshServicesOrderMapper.xml
src/main/resources/mapper/OshServicesOrderMapper.xml
+41
-0
No files found.
src/main/java/com/atlgroupasia/servicecenter/controller/ApiOshServicesOrderController.java
View file @
efb5f72e
package
com
.
atlgroupasia
.
servicecenter
.
controller
;
import
com.atlgroupasia.servicecenter.common.CommonPage
;
import
com.atlgroupasia.servicecenter.common.Page
;
import
com.atlgroupasia.servicecenter.dto.DonorDto
;
import
com.atlgroupasia.servicecenter.
entity.DonateOrder
;
import
com.atlgroupasia.servicecenter.
entity.User
;
import
com.atlgroupasia.servicecenter.
dto.OshServicesOrderDTO
;
import
com.atlgroupasia.servicecenter.
queryparam.QueryOrderRelationTimeParam
;
import
com.atlgroupasia.servicecenter.service.*
;
import
com.atlgroupasia.servicecenter.utils.JsonResult
;
import
com.atlgroupasia.servicecenter.utils.StringUtilSS
;
import
com.atlgroupasia.servicecenter.vo.DonorVo
;
import
com.atlgroupasia.servicecenter.vo.OshServicesOrderItemVo
;
import
com.atlgroupasia.servicecenter.vo.OshServicesOrderVo
;
import
com.atlgroupasia.servicecenter.vo.OshServicesVo
;
import
com.github.wxpay.sdk.WXPayUtil
;
import
com.google.common.collect.Lists
;
import
com.google.common.collect.Maps
;
import
io.swagger.annotations.*
;
...
...
@@ -19,16 +18,10 @@ import org.apache.commons.lang3.StringUtils;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.*
;
import
javax.annotation.Resource
;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletResponse
;
import
java.io.IOException
;
import
java.io.InputStream
;
import
java.security.KeyManagementException
;
import
java.security.NoSuchAlgorithmException
;
import
java.security.NoSuchProviderException
;
import
java.text.SimpleDateFormat
;
import
java.util.ArrayList
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.Map
;
...
...
@@ -254,13 +247,13 @@ public class ApiOshServicesOrderController {
if
(
selfList
.
size
()
>
0
)
{
for
(
Map
<
String
,
Object
>
item
:
selfList
)
{
String
itemId
=
item
.
get
(
"id"
).
toString
();
if
(
itemId
.
equals
(
id
))
{
if
(
itemId
.
equals
(
id
))
{
isMySelf
=
"1"
;
break
;
}
}
}
map
.
put
(
"isMySelf"
,
isMySelf
);
map
.
put
(
"isMySelf"
,
isMySelf
);
}
return
JsonResult
.
success
(
"获取福位列表成功!"
,
list
);
}
...
...
@@ -298,7 +291,7 @@ public class ApiOshServicesOrderController {
Map
<
String
,
Object
>
result
=
Maps
.
newHashMap
();
result
.
put
(
"orderId"
,
returnVo
.
getId
());
result
.
put
(
"code"
,
returnVo
.
getCode
());
result
.
put
(
"createDate"
,
System
.
currentTimeMillis
());
result
.
put
(
"createDate"
,
System
.
currentTimeMillis
());
result
.
put
(
"payPrice"
,
returnVo
.
getTotalPrice
());
return
JsonResult
.
success
(
"新增请求成功"
,
result
);
}
...
...
@@ -461,4 +454,22 @@ public class ApiOshServicesOrderController {
return
JsonResult
.
success
(
"获取评价列表成功"
,
oshServicesOrderSerice
.
findEvaluateList
(
vo
));
}
@ApiOperation
(
"根据时光纪查询 订单List ,不传分页参数不分页"
)
@RequestMapping
(
value
=
"/selectTimesNumberByTimeId"
,
method
=
RequestMethod
.
GET
)
public
JsonResult
<
CommonPage
<
OshServicesOrderDTO
>>
selectTimesNumberByTimeId
(
@ModelAttribute
QueryOrderRelationTimeParam
queryOrderRelationTimeParam
,
@ModelAttribute
Page
page
)
{
return
JsonResult
.
success
(
"查询成功"
,
this
.
oshServicesOrderSerice
.
selectTimesNumberByTimeId
(
queryOrderRelationTimeParam
,
page
));
}
@ApiOperation
(
"获取时光纪相关纪念次数 以及 订单总金额"
)
@RequestMapping
(
value
=
"/getOrderTimesNumber"
,
method
=
RequestMethod
.
GET
)
public
JsonResult
<
Map
>
getOrderTimesNumber
(
@ModelAttribute
QueryOrderRelationTimeParam
queryOrderRelationTimeParam
)
{
return
JsonResult
.
success
(
"查询成功"
,
this
.
oshServicesOrderSerice
.
getOrderTimesNumber
(
queryOrderRelationTimeParam
));
}
@ApiOperation
(
"查询纪念排行人数数据 ,不传分页参数不分页"
)
@RequestMapping
(
value
=
"/selectOrderListGroupByUserId"
,
method
=
RequestMethod
.
GET
)
public
JsonResult
<
CommonPage
<
OshServicesOrderDTO
>>
selectOrderListGroupByUserId
(
@ModelAttribute
QueryOrderRelationTimeParam
queryOrderRelationTimeParam
,
@ModelAttribute
Page
page
)
{
return
JsonResult
.
success
(
"查询成功"
,
this
.
oshServicesOrderSerice
.
selectOrderListGroupByUserId
(
queryOrderRelationTimeParam
,
page
));
}
}
src/main/java/com/atlgroupasia/servicecenter/dto/AtlTimeOrderDTO.java
0 → 100644
View file @
efb5f72e
package
com
.
atlgroupasia
.
servicecenter
.
dto
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
java.io.Serializable
;
import
java.util.List
;
/**
* @Author xh
* @Date 2021/7/14
* description:时光纪相关 订单统计参数类
*/
@Data
public
class
AtlTimeOrderDTO
implements
Serializable
{
@ApiModelProperty
(
value
=
"纪念次数"
)
private
Long
commemorateTimes
;
@ApiModelProperty
(
value
=
"活跃值"
)
private
Long
activeValue
;
}
src/main/java/com/atlgroupasia/servicecenter/dto/OshServicesOrderDTO.java
0 → 100644
View file @
efb5f72e
package
com
.
atlgroupasia
.
servicecenter
.
dto
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
java.io.Serializable
;
import
java.math.BigDecimal
;
import
java.util.Date
;
import
java.util.List
;
/**
* @Author xh
* @Date 2021/7/14
* description:
*/
@Data
public
class
OshServicesOrderDTO
implements
Serializable
{
@ApiModelProperty
(
value
=
"订单id"
)
private
Long
id
;
@ApiModelProperty
(
value
=
"下单人昵称"
)
private
String
nickName
;
@ApiModelProperty
(
value
=
"订单创建时间"
)
private
Date
createTime
;
@ApiModelProperty
(
value
=
"订单状态 1:易付款 2: 已支付 3服务中 4:已完成"
)
private
String
status
;
@ApiModelProperty
(
value
=
"用户表备注"
)
private
String
remark
;
@ApiModelProperty
(
value
=
"总价"
)
private
BigDecimal
totalPrice
;
@ApiModelProperty
(
value
=
"支付方式 0:微信 1:支付宝"
)
private
String
payWay
;
@ApiModelProperty
(
value
=
"下单人头像"
)
private
String
pic
;
@ApiModelProperty
(
value
=
"订单item详情List"
)
private
List
<
OshServicesOrderItemDTO
>
oshServicesOrderItemDTOList
;
@ApiModelProperty
(
value
=
"纪念次数"
)
private
Long
times
;
@ApiModelProperty
(
value
=
"活跃值
)
private
BigDecimal
sumTotalPrice
;
}
src/main/java/com/atlgroupasia/servicecenter/dto/OshServicesOrderItemDTO.java
0 → 100644
View file @
efb5f72e
package
com
.
atlgroupasia
.
servicecenter
.
dto
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
java.io.Serializable
;
import
java.math.BigDecimal
;
/**
* @Author xh
* @Date 2021/7/14
* description:
*/
@Data
public
class
OshServicesOrderItemDTO
implements
Serializable
{
@ApiModelProperty
(
value
=
"订单明细id"
)
private
Long
id
;
@ApiModelProperty
(
value
=
"商品规格名称"
)
private
String
name
;
@ApiModelProperty
(
value
=
"数量"
)
private
Integer
num
;
@ApiModelProperty
(
value
=
"订单价格"
)
private
BigDecimal
price
;
}
src/main/java/com/atlgroupasia/servicecenter/mapper/OshServicesOrderMapper.java
View file @
efb5f72e
package
com
.
atlgroupasia
.
servicecenter
.
mapper
;
import
com.atlgroupasia.servicecenter.dto.OshServicesOrderDTO
;
import
com.atlgroupasia.servicecenter.dto.OshServicesOrderItemDTO
;
import
com.atlgroupasia.servicecenter.queryparam.QueryOrderRelationTimeParam
;
import
com.atlgroupasia.servicecenter.vo.OshServicesOrderVo
;
import
com.atlgroupasia.servicecenter.vo.OshServicesVo
;
import
org.apache.ibatis.annotations.Param
;
import
java.math.BigDecimal
;
import
java.util.List
;
import
java.util.Map
;
...
...
@@ -12,24 +15,74 @@ public interface OshServicesOrderMapper {
/*订单列表*/
List
<
Map
<
String
,
Object
>>
findList
(
OshServicesOrderVo
vo
);
/*订单评价详情*/
Map
<
String
,
Object
>
evaluateView
(
OshServicesOrderVo
vo
);
/*订单评价*/
void
evaluate
(
OshServicesOrderVo
vo
);
/*查询已评价订单列表*/
List
<
Map
<
String
,
Object
>>
findEvaluateList
(
OshServicesOrderVo
vo
);
/*查询好评评价订单条数*/
List
<
Map
<
String
,
Object
>>
findRateListByOrderId
(
OshServicesOrderVo
vo
);
/*新增订单*/
void
insert
(
OshServicesOrderVo
vo
);
/*订单详情*/
Map
<
String
,
Object
>
view
(
OshServicesOrderVo
vo
);
/*订单支付*/
void
payOrder
(
OshServicesOrderVo
vo
);
/*通过订单编码查询订单*/
OshServicesOrderVo
getViewByCode
(
OshServicesOrderVo
vo
);
/*查看订单提交视频和图片列表*/
List
<
Map
<
String
,
Object
>>
videoAndImageList
(
@Param
(
"orderId"
)
Long
orderId
);
/*查看未观看视频列表*/
List
<
Map
<
String
,
Object
>>
findVideoListUnWatch
(
Long
orderId
);
List
<
Map
<
String
,
Object
>>
findVideoListUnWatch
(
Long
orderId
);
/**
* 查询时光纪相关联的订单
*
* @param queryOrderRelationTimeParam
* @return
*/
List
<
OshServicesOrderDTO
>
selectOrderListByTimeId
(
QueryOrderRelationTimeParam
queryOrderRelationTimeParam
);
/**
* 根据订单id 查询相关订单item详情数据
*
* @param orderId
* @return
*/
List
<
OshServicesOrderItemDTO
>
selectOrderItemListByOrderId
(
Long
orderId
);
/**
* 查询支付订单次数
*
* @param queryOrderRelationTimeParam
* @return
*/
Long
selectPayOrderTimes
(
QueryOrderRelationTimeParam
queryOrderRelationTimeParam
);
/**
* 查询支付订单总金额
*
* @param queryOrderRelationTimeParam
* @return
*/
BigDecimal
selectPayOrderTotalPrice
(
QueryOrderRelationTimeParam
queryOrderRelationTimeParam
);
/**
* 查询纪念排行人数数据
*
* @param queryOrderRelationTimeParam
* @return
*/
List
<
OshServicesOrderDTO
>
selectOrderListGroupByUserId
(
QueryOrderRelationTimeParam
queryOrderRelationTimeParam
);
}
src/main/java/com/atlgroupasia/servicecenter/queryparam/QueryOrderRelationTimeParam.java
0 → 100644
View file @
efb5f72e
package
com
.
atlgroupasia
.
servicecenter
.
queryparam
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
java.io.Serializable
;
/**
* @Author xh
* @Date 2021/7/14
* description:查询时光纪相关的订单数据
*/
@Data
public
class
QueryOrderRelationTimeParam
implements
Serializable
{
@ApiModelProperty
(
value
=
"关联app时光纪id"
)
private
Long
relationTimeId
;
@ApiModelProperty
(
value
=
"关联app纪念的用户id(谁下的单就是谁的id)"
)
private
Long
relationUserId
;
}
src/main/java/com/atlgroupasia/servicecenter/service/OshServicesOrderSerice.java
View file @
efb5f72e
This diff is collapsed.
Click to expand it.
src/main/java/com/atlgroupasia/servicecenter/utils/JsonResult.java
View file @
efb5f72e
...
...
@@ -5,6 +5,8 @@ import io.swagger.annotations.ApiModel;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
java.io.Serializable
;
/**
* JsonResult
*
...
...
@@ -12,8 +14,7 @@ import lombok.Data;
* @date 2018/7/29 22:19
*/
@Data
@ApiModel
public
class
JsonResult
<
T
>
{
public
class
JsonResult
<
T
>
implements
Serializable
{
@ApiModelProperty
(
name
=
"success"
,
value
=
"是否正常通讯"
)
private
Boolean
success
=
Boolean
.
TRUE
;
@ApiModelProperty
(
name
=
"status"
,
value
=
"状态码,200:OK,401:未登录,500:错误"
)
...
...
@@ -22,6 +23,8 @@ public class JsonResult<T> {
private
String
message
;
@ApiModelProperty
(
name
=
"data"
,
value
=
"返回数据"
)
private
Object
data
;
@ApiModelProperty
(
value
=
"返回结果"
)
private
T
result
;
public
static
JsonResult
success
()
{
JsonResult
res
=
new
JsonResult
();
...
...
src/main/java/com/atlgroupasia/servicecenter/utils/WXOfficeConfigUtil.java
View file @
efb5f72e
...
...
@@ -24,7 +24,7 @@ public class WXOfficeConfigUtil implements WXPayConfig {
public
static
final
String
APP_SECRET
=
"4bbb492abc6c12756e4bcbb775ae5069"
;
public
WXOfficeConfigUtil
()
throws
Exception
{
String
certPath
=
"
/www/wwwroot/userapi.atlxm.com
/apiclient_cert.p12"
;
String
certPath
=
"
D:/myWindos/document/项目文档/安泰乐二开项目对接
/apiclient_cert.p12"
;
File
file
=
new
File
(
certPath
);
InputStream
certStream
=
new
FileInputStream
(
file
);
this
.
certData
=
new
byte
[(
int
)
file
.
length
()];
...
...
src/main/java/com/atlgroupasia/servicecenter/vo/OshServicesOrderVo.java
View file @
efb5f72e
...
...
@@ -71,6 +71,6 @@ public class OshServicesOrderVo {
private
String
payChooseType
;
@ApiModelProperty
(
value
=
"关联app时光纪id"
,
required
=
false
)
private
Long
relationTimeId
;
@ApiModelProperty
(
value
=
"关联app
的用户id
"
,
required
=
false
)
@ApiModelProperty
(
value
=
"关联app
纪念的用户id(谁下的单就是谁的id)
"
,
required
=
false
)
private
Long
relationUserId
;
}
src/main/resources/mapper/OshServicesOrderMapper.xml
View file @
efb5f72e
...
...
@@ -189,8 +189,49 @@
<where>
is_del = 0 and order_id = #{orderId}
</where>
</select>
<select
id=
"selectOrderListByTimeId"
parameterType=
"com.atlgroupasia.servicecenter.queryparam.QueryOrderRelationTimeParam"
resultType=
"com.atlgroupasia.servicecenter.dto.OshServicesOrderDTO"
>
select
a.id,a.create_time createTime,a.status,a.remark,a.total_price totalPrice,a.pay_way payWay,a.pic
from osh_services_order a
where a.relation_time_id =#{relationTimeId}
</select>
<select
id=
"selectOrderItemListByOrderId"
parameterType=
"java.lang.Long"
resultType=
"com.atlgroupasia.servicecenter.dto.OshServicesOrderItemDTO"
>
select
a.id.a.name,a.num,aprice
from osh_services_order_item a
where a.order_id = #{orderId}
</select>
<select
id=
"selectPayOrderTimes"
parameterType=
"com.atlgroupasia.servicecenter.queryparam.QueryOrderRelationTimeParam"
resultType=
"java.lang.Long"
>
select IFNULL(count(*),0) from osh_services_order
where pay_price is not null
<if
test=
"relationTimeId != null"
>
and relation_time_id =#{relationTimeId}
</if>
</select>
<select
id=
"selectPayOrderTotalPrice"
parameterType=
"com.atlgroupasia.servicecenter.queryparam.QueryOrderRelationTimeParam"
resultType=
"java.math.BigDecimal"
>
select
IFNULL(sum(total_price),0)
from osh_services_order a
where pay_price is not null
<if
test=
"relationTimeId != null"
>
and relation_time_id =#{relationTimeId}
</if>
</select>
<select
id=
"selectOrderListGroupByUserId"
parameterType=
"com.atlgroupasia.servicecenter.queryparam.QueryOrderRelationTimeParam"
resultType=
"com.atlgroupasia.servicecenter.dto.OshServicesOrderDTO"
>
select
a.id,a.create_time createTime,a.status,a.remark,a.total_price totalPrice,a.pay_way payWay,a.pic,
IFNULL(count(*),0) times,IFNULL(sum(total_price),0) sumTotalPrice
from osh_services_order a
where a.relation_time_id =#{relationTimeId}
and a.pay_price is not null
group by a.relation_user_id
order by sumTotalPrice desc,a.create_time desc
</select>
</mapper>
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