rtjuq
This commit is contained in:
parent
3cf1d27620
commit
5c51e43806
@ -10,7 +10,7 @@ import java.util.Date;import java.util.Date;
|
|||||||
/**
|
/**
|
||||||
*评论表
|
*评论表
|
||||||
* @author quyixiao
|
* @author quyixiao
|
||||||
* @since 2025-11-19
|
* @since 2025-12-04
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@Data
|
@Data
|
||||||
@ -48,6 +48,7 @@ private static final long serialVersionUID = 1L;
|
|||||||
public final static String gmt_reject = CLASS_NAME + "gmt_reject"; // 拒绝时间
|
public final static String gmt_reject = CLASS_NAME + "gmt_reject"; // 拒绝时间
|
||||||
public final static String agree_user = CLASS_NAME + "agree_user"; // 同意用户
|
public final static String agree_user = CLASS_NAME + "agree_user"; // 同意用户
|
||||||
public final static String reject_user = CLASS_NAME + "reject_user"; // 拒绝用户
|
public final static String reject_user = CLASS_NAME + "reject_user"; // 拒绝用户
|
||||||
|
public final static String avatar_ = CLASS_NAME + "avatar"; // 头像
|
||||||
//
|
//
|
||||||
@TableId(value = "id", type = IdType.AUTO)
|
@TableId(value = "id", type = IdType.AUTO)
|
||||||
private Long id;
|
private Long id;
|
||||||
@ -103,6 +104,8 @@ private static final long serialVersionUID = 1L;
|
|||||||
private String agreeUser;
|
private String agreeUser;
|
||||||
//拒绝用户
|
//拒绝用户
|
||||||
private String rejectUser;
|
private String rejectUser;
|
||||||
|
//头像
|
||||||
|
private String avatar;
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @return
|
* @return
|
||||||
@ -508,6 +511,21 @@ private static final long serialVersionUID = 1L;
|
|||||||
this.rejectUser = rejectUser;
|
this.rejectUser = rejectUser;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 头像
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public String getAvatar() {
|
||||||
|
return avatar;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 头像
|
||||||
|
* @param avatar
|
||||||
|
*/
|
||||||
|
public void setAvatar(String avatar) {
|
||||||
|
this.avatar = avatar;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
return "VvCommentEntity{" +
|
return "VvCommentEntity{" +
|
||||||
@ -538,6 +556,7 @@ private static final long serialVersionUID = 1L;
|
|||||||
",gmtReject=" + gmtReject +
|
",gmtReject=" + gmtReject +
|
||||||
",agreeUser=" + agreeUser +
|
",agreeUser=" + agreeUser +
|
||||||
",rejectUser=" + rejectUser +
|
",rejectUser=" + rejectUser +
|
||||||
|
",avatar=" + avatar +
|
||||||
"}";
|
"}";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -80,13 +80,13 @@ public enum ActionEnums {
|
|||||||
Admin_Seller_Reject_Draw("Admin_Seller_Reject_Draw", "卖家拒绝提现", "/mm/draw/reject",
|
Admin_Seller_Reject_Draw("Admin_Seller_Reject_Draw", "卖家拒绝提现", "/mm/draw/reject",
|
||||||
AwardStatusEnums.draw_failed.getStatus()),
|
AwardStatusEnums.draw_failed.getStatus()),
|
||||||
|
|
||||||
|
App_To_Pay("App_To_Pay", "去支付", "/app/to/pay", OrderStatusEnums.wait_shipping.getStatus()),
|
||||||
|
|
||||||
Admin_Track_Logistics("Admin_Track_Logistics", "admin查看物流", "/mm/logistics/query", null),
|
Admin_Track_Logistics("Admin_Track_Logistics", "admin查看物流", "/mm/logistics/query", null),
|
||||||
|
|
||||||
App_Track_Logistics("Admin_Track_Logistics", "app查看物流", "/app/logistics/query", null),
|
App_Track_Logistics("Admin_Track_Logistics", "app查看物流", "/app/logistics/query", null),
|
||||||
;
|
;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/***
|
/***
|
||||||
* 取消按钮
|
* 取消按钮
|
||||||
*/
|
*/
|
||||||
|
|||||||
@ -15,7 +15,6 @@ public abstract class AbstractOrderAction {
|
|||||||
|
|
||||||
public abstract ActionEnums getAction(VvTradeOrderLineEntity vvTradeOrderLineEntity, boolean isApp);
|
public abstract ActionEnums getAction(VvTradeOrderLineEntity vvTradeOrderLineEntity, boolean isApp);
|
||||||
|
|
||||||
|
|
||||||
public static final List<AbstractOrderAction> actions = Arrays.asList(
|
public static final List<AbstractOrderAction> actions = Arrays.asList(
|
||||||
new ApplyRefund(),
|
new ApplyRefund(),
|
||||||
new ApplyReturnRefund(),
|
new ApplyReturnRefund(),
|
||||||
@ -28,7 +27,8 @@ public abstract class AbstractOrderAction {
|
|||||||
new ShippedAction(),
|
new ShippedAction(),
|
||||||
new ToShippingAction(),
|
new ToShippingAction(),
|
||||||
new TrackLogisticsAction(),
|
new TrackLogisticsAction(),
|
||||||
new UnShippingAction()
|
new UnShippingAction(),
|
||||||
|
new AppToPayAction()
|
||||||
);
|
);
|
||||||
|
|
||||||
public static List<ActionDTO> getOrderActionDTO(VvTradeOrderLineEntity vvTradeOrderLineEntity, boolean isApp) {
|
public static List<ActionDTO> getOrderActionDTO(VvTradeOrderLineEntity vvTradeOrderLineEntity, boolean isApp) {
|
||||||
@ -46,7 +46,6 @@ public abstract class AbstractOrderAction {
|
|||||||
return actionDTOS;
|
return actionDTOS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public static boolean checkFailed(VvTradeOrderLineEntity vvTradeOrderLineEntity, boolean isApp, ActionEnums orderActionEnums) {
|
public static boolean checkFailed(VvTradeOrderLineEntity vvTradeOrderLineEntity, boolean isApp, ActionEnums orderActionEnums) {
|
||||||
List<ActionDTO> orderActionDTOS = getOrderActionDTO(vvTradeOrderLineEntity, isApp);
|
List<ActionDTO> orderActionDTOS = getOrderActionDTO(vvTradeOrderLineEntity, isApp);
|
||||||
if (CollectionUtils.isNotEmpty(orderActionDTOS)) {
|
if (CollectionUtils.isNotEmpty(orderActionDTOS)) {
|
||||||
|
|||||||
@ -0,0 +1,21 @@
|
|||||||
|
package com.heyu.api.data.service.impl.order;
|
||||||
|
|
||||||
|
import com.heyu.api.data.entity.vv.VvTradeOrderLineEntity;
|
||||||
|
import com.heyu.api.data.enums.ActionEnums;
|
||||||
|
import com.heyu.api.data.enums.OrderStatusEnums;
|
||||||
|
import com.heyu.api.data.service.impl.AbstractOrderAction;
|
||||||
|
|
||||||
|
public class AppToPayAction extends AbstractOrderAction {
|
||||||
|
@Override
|
||||||
|
public ActionEnums getAction(VvTradeOrderLineEntity vvTradeOrderLineEntity, boolean isApp) {
|
||||||
|
if (
|
||||||
|
OrderStatusEnums.wait_pay.getStatus().equals(vvTradeOrderLineEntity.getStatus())
|
||||||
|
) {
|
||||||
|
if (isApp) {
|
||||||
|
return ActionEnums.App_To_Pay;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -48,7 +48,7 @@ public class MysqlMain_update {
|
|||||||
}
|
}
|
||||||
List<TablesBean> list = new ArrayList<TablesBean>();
|
List<TablesBean> list = new ArrayList<TablesBean>();
|
||||||
|
|
||||||
list.add(new TablesBean("vv_trade_order_line"));
|
list.add(new TablesBean("vv_comment"));
|
||||||
|
|
||||||
Map<String, String> map = MysqlUtil2ShowCreateTable.getComments();
|
Map<String, String> map = MysqlUtil2ShowCreateTable.getComments();
|
||||||
for (int i = 0; i < list.size(); i++) {
|
for (int i = 0; i < list.size(); i++) {
|
||||||
|
|||||||
@ -0,0 +1,17 @@
|
|||||||
|
package com.heyu.api.alibaba.request.mm.order.resp;
|
||||||
|
|
||||||
|
|
||||||
|
import com.heyu.api.data.service.impl.AppBaseRequest;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class VvTradeOrderToPayDTO extends AppBaseRequest {
|
||||||
|
|
||||||
|
|
||||||
|
/***
|
||||||
|
* 订单id
|
||||||
|
*/
|
||||||
|
private Long tradeOrderId;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@ -58,8 +58,6 @@ public class AppCommentController {
|
|||||||
private VvCommentUserfulDao vvCommentUserfulDao;
|
private VvCommentUserfulDao vvCommentUserfulDao;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/***
|
/***
|
||||||
* 列表
|
* 列表
|
||||||
* http://localhost:8888/app/comment/list
|
* http://localhost:8888/app/comment/list
|
||||||
@ -100,10 +98,6 @@ public class AppCommentController {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
List<VvCommentEntity> vvCommentEntities = pageUtils.getRows();
|
List<VvCommentEntity> vvCommentEntities = pageUtils.getRows();
|
||||||
List<VvCommentDTO> vvCommentDTOS = new ArrayList<>();
|
List<VvCommentDTO> vvCommentDTOS = new ArrayList<>();
|
||||||
|
|
||||||
@ -200,6 +194,7 @@ public class AppCommentController {
|
|||||||
vvCommentEntity.setBuyerId(vvBuyerEntity.getId());
|
vvCommentEntity.setBuyerId(vvBuyerEntity.getId());
|
||||||
vvCommentEntity.setBuyerName(vvBuyerEntity.getBuyerName());
|
vvCommentEntity.setBuyerName(vvBuyerEntity.getBuyerName());
|
||||||
vvCommentEntity.setBuyerPhone(vvBuyerEntity.getBuyerPhone());
|
vvCommentEntity.setBuyerPhone(vvBuyerEntity.getBuyerPhone());
|
||||||
|
vvCommentEntity.setAvatar(vvBuyerEntity.getAvatar());
|
||||||
|
|
||||||
vvCommentDao.insert(vvCommentEntity);
|
vvCommentDao.insert(vvCommentEntity);
|
||||||
|
|
||||||
@ -217,6 +212,7 @@ public class AppCommentController {
|
|||||||
vvTradeOrderLineDao.updateVvTradeOrderLineCommentIdById(vvCommentEntity.getId(),vvTradeOrderLineEntity.getId());
|
vvTradeOrderLineDao.updateVvTradeOrderLineCommentIdById(vvCommentEntity.getId(),vvTradeOrderLineEntity.getId());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/***
|
/***
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|||||||
@ -504,6 +504,7 @@ public class AppOrderController {
|
|||||||
vvBuyerEntity.getOpenid()
|
vvBuyerEntity.getOpenid()
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
String prepay_id = jsapiPrepayResponse.getPrepayId();
|
String prepay_id = jsapiPrepayResponse.getPrepayId();
|
||||||
|
|
||||||
if (jsapiPrepayResponse != null && jsapiPrepayResponse.getPrepayId() != null) {
|
if (jsapiPrepayResponse != null && jsapiPrepayResponse.getPrepayId() != null) {
|
||||||
@ -554,6 +555,58 @@ public class AppOrderController {
|
|||||||
return R.ok().setData(vo);
|
return R.ok().setData(vo);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/***
|
||||||
|
* 订单 再次支付
|
||||||
|
*
|
||||||
|
* http://localhost:8888/app/order/to/pay
|
||||||
|
*/
|
||||||
|
@Describe("添加订单")
|
||||||
|
@RequestMapping("/to/pay")
|
||||||
|
public R toPay(@RequestBody VvTradeOrderToPayDTO vvOrderRequest) {
|
||||||
|
VvTradeOrderEntity vvTradeOrderEntity = vvTradeOrderDao.selectVvTradeOrderById(vvOrderRequest.getTradeOrderId());
|
||||||
|
|
||||||
|
VvBuyerEntity vvBuyerEntity = vvBuyerDao.selectVvBuyerById(vvOrderRequest.getBuyerId());
|
||||||
|
|
||||||
|
DirectAPIv3JsapiPrepayResponse jsapiPrepayResponse = jsapiPrepay.prePay(vvTradeOrderEntity.getId(),
|
||||||
|
BigDecimalUtil.multiply(vvTradeOrderEntity.getPayAmount(), new BigDecimal(100)).longValue(),
|
||||||
|
vvBuyerEntity.getOpenid()
|
||||||
|
);
|
||||||
|
|
||||||
|
String prepay_id = jsapiPrepayResponse.getPrepayId();
|
||||||
|
if (jsapiPrepayResponse != null && jsapiPrepayResponse.getPrepayId() != null) {
|
||||||
|
List<VvTradeOrderLineEntity> vvTradeOrderLineEntities = vvTradeOrderLineDao.selectVvTradeOrderLineByTradeOrderId(vvTradeOrderEntity.getId());
|
||||||
|
for (VvTradeOrderLineEntity vvTradeOrderLineEntity : vvTradeOrderLineEntities) {
|
||||||
|
vvTradeOrderLineEntity.setPayType(PayTypeEnums.weixin.getType());
|
||||||
|
vvTradeOrderLineEntity.setStatus(OrderStatusEnums.wait_pay.getStatus());
|
||||||
|
vvTradeOrderLineEntity.setPrepayId(jsapiPrepayResponse.getPrepayId());
|
||||||
|
vvTradeOrderLineEntity.setGmtPrePay(new Date());
|
||||||
|
vvTradeOrderLineDao.updateVvTradeOrderLineById(vvTradeOrderLineEntity);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
WxPayVO vo = new WxPayVO();
|
||||||
|
Long timeStamp = System.currentTimeMillis() / 1000;
|
||||||
|
String nonceStr = UUID.randomUUID().toString().replaceAll("-", "").substring(0, 32);
|
||||||
|
String signatureStr = Stream.of(appid, String.valueOf(timeStamp), nonceStr, "prepay_id=" + prepay_id)
|
||||||
|
.collect(Collectors.joining("\n", "", "\n"));
|
||||||
|
|
||||||
|
// "timeStamp": "1414561699",
|
||||||
|
// "nonceStr": "5K8264ILTKCH16CQ2502SI8ZNMTM67VS",
|
||||||
|
// "package": "prepay_id=wx201410272009395522657a690389285100",
|
||||||
|
// "signType": "RSA",
|
||||||
|
// "paySign": "oR9d",
|
||||||
|
|
||||||
|
String sign = JsapiPrepay.getSign(signatureStr, privateKey);
|
||||||
|
vo.setNonceStr(nonceStr);
|
||||||
|
vo.setTimeStamp(timeStamp);
|
||||||
|
vo.setMchid(mchid);
|
||||||
|
vo.setPaySign(sign);
|
||||||
|
vo.setPrepayId("prepay_id=" + prepay_id);
|
||||||
|
|
||||||
|
return R.ok().setData(vo);
|
||||||
|
}
|
||||||
|
|
||||||
// /app/order/delete
|
// /app/order/delete
|
||||||
@Describe("删除订单")
|
@Describe("删除订单")
|
||||||
@RequestMapping("/delete")
|
@RequestMapping("/delete")
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user