Merge branch 'dev/dev_xp' into dev/dev
This commit is contained in:
@@ -5,7 +5,6 @@ import com.ai.da.model.dto.*;
|
|||||||
import com.ai.da.model.vo.*;
|
import com.ai.da.model.vo.*;
|
||||||
import com.ai.da.service.DesignItemService;
|
import com.ai.da.service.DesignItemService;
|
||||||
import com.ai.da.service.DesignService;
|
import com.ai.da.service.DesignService;
|
||||||
import com.ai.da.service.UserLikeService;
|
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
import io.swagger.annotations.ApiParam;
|
import io.swagger.annotations.ApiParam;
|
||||||
@@ -15,8 +14,6 @@ import org.springframework.web.bind.annotation.*;
|
|||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
import javax.validation.Valid;
|
import javax.validation.Valid;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.util.List;
|
|
||||||
import java.util.Map;
|
|
||||||
|
|
||||||
|
|
||||||
@Api(tags = "design Detail模块")
|
@Api(tags = "design Detail模块")
|
||||||
|
|||||||
@@ -16,11 +16,11 @@ public interface PaymentInfoMapper extends BaseMapper<PaymentInfo> {
|
|||||||
|
|
||||||
List<PaymentInfoVO> queryPaymentInfo(String paymentType,String payerTotal, String type, String status,
|
List<PaymentInfoVO> queryPaymentInfo(String paymentType,String payerTotal, String type, String status,
|
||||||
String country, String city, String startTime, String endTime,
|
String country, String city, String startTime, String endTime,
|
||||||
int limit, int offset, String order
|
int limit, int offset, String order, String payer
|
||||||
);
|
);
|
||||||
|
|
||||||
Long queryPaymentInfoCount(String paymentType,String payerTotal, String type, String status,
|
Long queryPaymentInfoCount(String paymentType,String payerTotal, String type, String status,
|
||||||
String country, String city, String startTime, String endTime
|
String country, String city, String startTime, String endTime, String payer
|
||||||
);
|
);
|
||||||
|
|
||||||
List<Map<String, String>> getCities();
|
List<Map<String, String>> getCities();
|
||||||
|
|||||||
@@ -25,4 +25,6 @@ public class QueryPaymentInfoDTO extends QueryPageByTimeDTO {
|
|||||||
private String city;
|
private String city;
|
||||||
@ApiModelProperty("按id排序 DESC || ASC")
|
@ApiModelProperty("按id排序 DESC || ASC")
|
||||||
private String order = "DESC";
|
private String order = "DESC";
|
||||||
|
@ApiModelProperty("付款用户名")
|
||||||
|
private String payer;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -11,6 +11,8 @@ import lombok.NoArgsConstructor;
|
|||||||
@ApiModel("交易记录详情")
|
@ApiModel("交易记录详情")
|
||||||
public class PaymentInfoVO {
|
public class PaymentInfoVO {
|
||||||
private Long id;
|
private Long id;
|
||||||
|
@ApiModelProperty("付款用户名")
|
||||||
|
private String payer;
|
||||||
@ApiModelProperty("选择的支付平台 PayPal || Stripe || Alipay-HK")
|
@ApiModelProperty("选择的支付平台 PayPal || Stripe || Alipay-HK")
|
||||||
private String platform;
|
private String platform;
|
||||||
@ApiModelProperty("支付的金额 单位:HKD")
|
@ApiModelProperty("支付的金额 单位:HKD")
|
||||||
|
|||||||
@@ -628,12 +628,12 @@ public class ConvenientInquiryServiceImpl extends ServiceImpl<QuestionnaireMappe
|
|||||||
queryPaymentInfoDTO.getType(), queryPaymentInfoDTO.getStatus(),
|
queryPaymentInfoDTO.getType(), queryPaymentInfoDTO.getStatus(),
|
||||||
queryPaymentInfoDTO.getCountry(), queryPaymentInfoDTO.getCity(),
|
queryPaymentInfoDTO.getCountry(), queryPaymentInfoDTO.getCity(),
|
||||||
queryPaymentInfoDTO.getStartTime(), queryPaymentInfoDTO.getEndTime(),
|
queryPaymentInfoDTO.getStartTime(), queryPaymentInfoDTO.getEndTime(),
|
||||||
size, offset, order);
|
size, offset, order, queryPaymentInfoDTO.getPayer());
|
||||||
// 查询数据总量
|
// 查询数据总量
|
||||||
Long total = paymentInfoMapper.queryPaymentInfoCount(queryPaymentInfoDTO.getPlatform(), queryPaymentInfoDTO.getPayerTotal(),
|
Long total = paymentInfoMapper.queryPaymentInfoCount(queryPaymentInfoDTO.getPlatform(), queryPaymentInfoDTO.getPayerTotal(),
|
||||||
queryPaymentInfoDTO.getType(), queryPaymentInfoDTO.getStatus(),
|
queryPaymentInfoDTO.getType(), queryPaymentInfoDTO.getStatus(),
|
||||||
queryPaymentInfoDTO.getCountry(), queryPaymentInfoDTO.getCity(),
|
queryPaymentInfoDTO.getCountry(), queryPaymentInfoDTO.getCity(),
|
||||||
queryPaymentInfoDTO.getStartTime(), queryPaymentInfoDTO.getEndTime());
|
queryPaymentInfoDTO.getStartTime(), queryPaymentInfoDTO.getEndTime(), queryPaymentInfoDTO.getPayer());
|
||||||
|
|
||||||
// 总页数
|
// 总页数
|
||||||
double totalPage = Math.ceil((double) total / size);
|
double totalPage = Math.ceil((double) total / size);
|
||||||
|
|||||||
@@ -46,52 +46,62 @@
|
|||||||
|
|
||||||
<select id="queryPaymentInfo" resultType="com.ai.da.model.vo.PaymentInfoVO">
|
<select id="queryPaymentInfo" resultType="com.ai.da.model.vo.PaymentInfoVO">
|
||||||
SELECT
|
SELECT
|
||||||
id,
|
p.id,
|
||||||
payment_type platform,
|
a.user_name payer,
|
||||||
payer_total,
|
p.payment_type platform,
|
||||||
type,
|
p.payer_total,
|
||||||
payment_method,
|
p.type,
|
||||||
last4,
|
p.payment_method,
|
||||||
country,
|
p.last4,
|
||||||
city,
|
p.country,
|
||||||
create_time,
|
p.city,
|
||||||
|
p.create_time,
|
||||||
CASE
|
CASE
|
||||||
WHEN trade_state IN ('paid', 'COMPLETED', 'complete', 'liquidated') THEN 'Success'
|
|
||||||
WHEN trade_state IN ('failed', 'expired', 'VOIDED', 'void', 'uncollectible') THEN 'Fail'
|
WHEN p.trade_state IN ( 'paid', 'COMPLETED', 'complete', 'liquidated' ) THEN
|
||||||
ELSE 'Pending'
|
'Success'
|
||||||
|
WHEN p.trade_state IN ( 'failed', 'expired', 'VOIDED', 'void', 'uncollectible' ) THEN
|
||||||
|
'Fail' ELSE 'Pending'
|
||||||
END AS status
|
END AS status
|
||||||
FROM
|
FROM
|
||||||
t_payment_info
|
t_payment_info p
|
||||||
|
LEFT JOIN
|
||||||
|
t_order_info o ON p.order_no = o.order_no
|
||||||
|
LEFT JOIN
|
||||||
|
t_account a ON a.id = o.account_id
|
||||||
WHERE
|
WHERE
|
||||||
1 = 1
|
1 = 1
|
||||||
<if test="paymentType != null and paymentType != ''">
|
<if test="paymentType != null and paymentType != ''">
|
||||||
AND payment_type = #{paymentType}
|
AND p.payment_type = #{paymentType}
|
||||||
</if>
|
</if>
|
||||||
<if test="payerTotal != null and payerTotal != ''">
|
<if test="payerTotal != null and payerTotal != ''">
|
||||||
AND payer_total = #{payerTotal}
|
AND p.payer_total = #{payerTotal}
|
||||||
</if>
|
</if>
|
||||||
<if test="type != null and type != ''">
|
<if test="type != null and type != ''">
|
||||||
AND type = #{type}
|
AND p.type = #{type}
|
||||||
</if>
|
</if>
|
||||||
<if test="status != null and status != ''">
|
<if test="status != null and status != ''">
|
||||||
AND
|
AND
|
||||||
CASE
|
CASE
|
||||||
WHEN trade_state IN ('paid', 'COMPLETED', 'complete', 'liquidated') THEN 'Success'
|
WHEN p.trade_state IN ('paid', 'COMPLETED', 'complete', 'liquidated') THEN 'Success'
|
||||||
WHEN trade_state IN ('failed', 'expired', 'VOIDED', 'void', 'uncollectible') THEN 'Fail'
|
WHEN p.trade_state IN ('failed', 'expired', 'VOIDED', 'void', 'uncollectible') THEN 'Fail'
|
||||||
ELSE 'Pending'
|
ELSE 'Pending'
|
||||||
END = #{status}
|
END = #{status}
|
||||||
</if>
|
</if>
|
||||||
<if test="country != null and country != ''">
|
<if test="country != null and country != ''">
|
||||||
AND country = #{country}
|
AND p.country = #{country}
|
||||||
</if>
|
</if>
|
||||||
<if test="city != null and city != ''">
|
<if test="city != null and city != ''">
|
||||||
AND city = #{city}
|
AND p.city = #{city}
|
||||||
</if>
|
</if>
|
||||||
<if test="startTime != null and startTime != '' and endTime != null and endTime != ''">
|
<if test="startTime != null and startTime != '' and endTime != null and endTime != ''">
|
||||||
AND create_time BETWEEN #{startTime} AND #{endTime}
|
AND p.create_time BETWEEN #{startTime} AND #{endTime}
|
||||||
|
</if>
|
||||||
|
<if test="payer != null and payer != ''">
|
||||||
|
AND a.user_name = #{payer}
|
||||||
</if>
|
</if>
|
||||||
ORDER BY
|
ORDER BY
|
||||||
id ${order}
|
p.id ${order}
|
||||||
LIMIT ${limit} OFFSET ${offset}
|
LIMIT ${limit} OFFSET ${offset}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
@@ -99,34 +109,41 @@
|
|||||||
SELECT
|
SELECT
|
||||||
COUNT(*)
|
COUNT(*)
|
||||||
FROM
|
FROM
|
||||||
t_payment_info
|
t_payment_info p
|
||||||
|
LEFT JOIN
|
||||||
|
t_order_info o ON p.order_no = o.order_no
|
||||||
|
LEFT JOIN
|
||||||
|
t_account a ON a.id = o.account_id
|
||||||
WHERE
|
WHERE
|
||||||
1 = 1
|
1 = 1
|
||||||
<if test="paymentType != null and paymentType != ''">
|
<if test="paymentType != null and paymentType != ''">
|
||||||
AND payment_type = #{paymentType}
|
AND p.payment_type = #{paymentType}
|
||||||
</if>
|
</if>
|
||||||
<if test="payerTotal != null and payerTotal != ''">
|
<if test="payerTotal != null and payerTotal != ''">
|
||||||
AND payer_total = #{payerTotal}
|
AND p.payer_total = #{payerTotal}
|
||||||
</if>
|
</if>
|
||||||
<if test="type != null and type != ''">
|
<if test="type != null and type != ''">
|
||||||
AND type = #{type}
|
AND p.type = #{type}
|
||||||
</if>
|
</if>
|
||||||
<if test="status != null and status != ''">
|
<if test="status != null and status != ''">
|
||||||
AND
|
AND
|
||||||
CASE
|
CASE
|
||||||
WHEN trade_state IN ('paid', 'COMPLETED', 'complete', 'liquidated') THEN 'Success'
|
WHEN p.trade_state IN ('paid', 'COMPLETED', 'complete', 'liquidated') THEN 'Success'
|
||||||
WHEN trade_state IN ('failed', 'expired', 'VOIDED', 'void', 'uncollectible') THEN 'Fail'
|
WHEN p.trade_state IN ('failed', 'expired', 'VOIDED', 'void', 'uncollectible') THEN 'Fail'
|
||||||
ELSE 'Pending'
|
ELSE 'Pending'
|
||||||
END = #{status}
|
END = #{status}
|
||||||
</if>
|
</if>
|
||||||
<if test="country != null and country != ''">
|
<if test="country != null and country != ''">
|
||||||
AND country = #{country}
|
AND p.country = #{country}
|
||||||
</if>
|
</if>
|
||||||
<if test="city != null and city != ''">
|
<if test="city != null and city != ''">
|
||||||
AND city = #{city}
|
AND p.city = #{city}
|
||||||
</if>
|
</if>
|
||||||
<if test="startTime != null and startTime != '' and endTime != null and endTime != ''">
|
<if test="startTime != null and startTime != '' and endTime != null and endTime != ''">
|
||||||
AND create_time BETWEEN #{startTime} AND #{endTime}
|
AND p.create_time BETWEEN #{startTime} AND #{endTime}
|
||||||
|
</if>
|
||||||
|
<if test="payer != null and payer != ''">
|
||||||
|
AND a.user_name = #{payer}
|
||||||
</if>
|
</if>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user