Commit 556d1f4a by lpx

# 优化

parent 944b67a3
......@@ -5,6 +5,7 @@ import com.jumeirah.api.merchant.entity.param.StrokeDiscountCheckParam;
import com.jumeirah.common.entity.AppUser;
import com.jumeirah.common.entity.Stroke;
import com.jumeirah.common.enums.StatePaymentStatusEnum;
import com.jumeirah.common.enums.StrokeAuditStatusEnum;
import com.jumeirah.common.enums.StrokeStatusEnum;
import com.jumeirah.common.factory.PushFactory;
import com.jumeirah.common.param.McStrokePageParam;
......@@ -121,6 +122,10 @@ public class McStrokeController extends BaseController {
stroke.setId(strokeDiscountCheckParam.getId())
.setUpdateTime(new Timestamp(System.currentTimeMillis()))
.setAuditStatus(strokeDiscountCheckParam.getAuditStatus());
//审核失败时,订单标记成已完成
if (StrokeAuditStatusEnum.AUDIT_FAILED.getCode() == strokeDiscountCheckParam.getAuditStatus().intValue()) {
stroke.setStatus(StrokeStatusEnum.COMPLETED.getCode());
}
boolean flag = strokeService.updateStroke(stroke);
return ApiResult.result(flag);
}
......
package com.jumeirah.common.enums;
import io.geekidea.springbootplus.framework.common.enums.BaseEnum;
import lombok.AllArgsConstructor;
import lombok.Getter;
/**
* 审核状态,0审核中,1审核通过,2审核未通过
*/
@Getter
@AllArgsConstructor
public enum StrokeAuditStatusEnum implements BaseEnum {
UNDER_REVIEW(0, "审核中"),
AUDIT_OK(1, "审核通过"),
AUDIT_FAILED(2, "审核未通过"),
;
/**
* 编号
*/
private final Integer code;
/**
* 名称
*/
private final String desc;
}
......@@ -88,9 +88,9 @@
<include refid="Page_Column_List"/>
from stroke s
INNER JOIN merchant_user mu ON mu.id = s.mc_id
INNER JOIN city_three_code ctco ON ctco.id = s.city_outset_id
INNER JOIN city_three_code ctca ON ctca.id = s.city_arrive_id
INNER JOIN plain_type pt ON pt.id = s.plain_type_id
LEFT JOIN city_three_code ctco ON ctco.id = s.city_outset_id
LEFT JOIN city_three_code ctca ON ctca.id = s.city_arrive_id
LEFT JOIN plain_type pt ON pt.id = s.plain_type_id
<where>
and s.user_id = #{userId}
and s.deleted = 0
......@@ -100,7 +100,7 @@
and s.`status` = #{param.status}
</if>
</where>
ORDER BY s.create_time DESC
</select>
<!-- 已完成订单-->
......@@ -125,15 +125,15 @@
<include refid="Page_Column_List"/>
from stroke s
INNER JOIN merchant_user mu ON mu.id = s.mc_id
INNER JOIN city_three_code ctco ON ctco.id = s.city_outset_id
INNER JOIN city_three_code ctca ON ctca.id = s.city_arrive_id
INNER JOIN plain_type pt ON pt.id = s.plain_type_id
LEFT JOIN city_three_code ctco ON ctco.id = s.city_outset_id
LEFT JOIN city_three_code ctca ON ctca.id = s.city_arrive_id
LEFT JOIN plain_type pt ON pt.id = s.plain_type_id
<where>
and s.user_id = #{userId}
and s.deleted = 0
AND s.`status` IN (#{param.status},99)
</where>
ORDER BY s.create_time DESC
</select>
<select id="getMcStrokePageList" parameterType="com.jumeirah.common.param.McStrokePageParam"
resultType="com.jumeirah.common.vo.McStrokeQueryVo">
......@@ -192,8 +192,8 @@
stroke s
LEFT JOIN app_user au ON au.id = s.user_id
LEFT JOIN plain_type pt ON pt.id = s.plain_type_id
INNER JOIN city_three_code ctco ON ctco.id = s.city_outset_id
INNER JOIN city_three_code ctca ON ctca.id = s.city_arrive_id
LEFT JOIN city_three_code ctco ON ctco.id = s.city_outset_id
LEFT JOIN city_three_code ctca ON ctca.id = s.city_arrive_id
<where>
s.mc_id = #{mcId}
AND s.is_discount = #{mcStrokePageParam.isDiscount}
......@@ -293,8 +293,8 @@
FROM stroke s
LEFT JOIN app_user au ON au.id = s.user_id
LEFT JOIN plain_type pt ON pt.id = s.plain_type_id
INNER JOIN city_three_code ctco ON ctco.id = s.city_outset_id
INNER JOIN city_three_code ctca ON ctca.id = s.city_arrive_id
LEFT JOIN city_three_code ctco ON ctco.id = s.city_outset_id
LEFT JOIN city_three_code ctca ON ctca.id = s.city_arrive_id
where
s.id = #{id}
and s.mc_id = #{mcId}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment