| | |
| | | package com.yeshi.fanli.service.inter.user.cloud;
|
| | |
|
| | | import java.util.List;
|
| | |
|
| | | import com.yeshi.fanli.entity.bus.user.cloud.UserCloudOrder;
|
| | | import com.yeshi.fanli.exception.user.cloud.UserCloudOrderException;
|
| | |
|
| | | public interface UserCloudOrderService {
|
| | |
|
| | | /**
|
| | | * 创建未付款订单
|
| | | * @param uid
|
| | | * @param type
|
| | | * @throws UserCloudOrderException
|
| | | */
|
| | | public UserCloudOrder addCloudOrder(Long uid, String type) throws UserCloudOrderException;
|
| | |
|
| | | /**
|
| | | * 查询后一条订单 -未支付的
|
| | | * @param uid
|
| | | * @param type
|
| | | * @return
|
| | | */
|
| | | public UserCloudOrder getLastOrderByUnpaid(Long uid, String type);
|
| | | |
| | | /**
|
| | | * 查询后一条订单 -支付完成的
|
| | | * @param uid
|
| | | * @param type
|
| | | * @return
|
| | | */
|
| | | public UserCloudOrder getLastOrderByPayEnd(Long uid, String type);
|
| | |
|
| | | /**
|
| | | * 查询订单记录
|
| | | * @param page
|
| | | * @param count
|
| | | * @param uid
|
| | | * @param state 1-成功 -未支付
|
| | | * @return
|
| | | */
|
| | | public List<UserCloudOrder> getOrderRecord(int page, int count, Long uid, Integer state);
|
| | |
|
| | | /**
|
| | | * 统计状态
|
| | | * @param uid
|
| | | * @param state
|
| | | * @return
|
| | | */
|
| | | public long countOrderRecord(Long uid, Integer state);
|
| | |
|
| | | public UserCloudOrder selectByPrimaryKey(Long id);
|
| | |
|
| | | /**
|
| | | * 更新
|
| | | * @param cloudOrder
|
| | | */
|
| | | public void updateByPrimaryKeySelective(UserCloudOrder cloudOrder);
|
| | |
|
| | | /**
|
| | | * 支付成功更新订单状态
|
| | | * @param orderId
|
| | | * @throws UserCloudOrderException
|
| | | */
|
| | | public void cloudPayCloudSuccess(Long orderId) throws UserCloudOrderException;
|
| | |
|
| | | /**
|
| | | * 查询最近更新但未付款的
|
| | | * @return
|
| | | */
|
| | | public List<UserCloudOrder> getLasthourByUnpaid();
|
| | |
|
| | | /**
|
| | | * 查询
|
| | | * @param page
|
| | | * @param count
|
| | | * @param key
|
| | | * @param state
|
| | | * @return
|
| | | */
|
| | | public List<UserCloudOrder> query(int page, int count, String key, Integer state);
|
| | |
|
| | | long count(String key, Integer state);
|
| | |
|
| | | }
|
| | | package com.yeshi.fanli.service.inter.user.cloud; |
| | | |
| | | import java.util.List; |
| | | |
| | | import com.yeshi.fanli.entity.bus.user.cloud.UserCloudOrder; |
| | | import com.yeshi.fanli.exception.user.cloud.UserCloudOrderException; |
| | | |
| | | public interface UserCloudOrderService { |
| | | |
| | | /** |
| | | * 创建未付款订单 |
| | | * @param uid |
| | | * @param type |
| | | * @throws UserCloudOrderException |
| | | */ |
| | | public UserCloudOrder addCloudOrder(Long uid, String type) throws UserCloudOrderException; |
| | | |
| | | /** |
| | | * 查询后一条订单 -未支付的 |
| | | * @param uid |
| | | * @param type |
| | | * @return |
| | | */ |
| | | public UserCloudOrder getLastOrderByUnpaid(Long uid, String type); |
| | | |
| | | /** |
| | | * 查询后一条订单 -支付完成的 |
| | | * @param uid |
| | | * @param type |
| | | * @return |
| | | */ |
| | | public UserCloudOrder getLastOrderByPayEnd(Long uid, String type); |
| | | |
| | | /** |
| | | * 查询订单记录 |
| | | * @param page |
| | | * @param count |
| | | * @param uid |
| | | * @param state 1-成功 -未支付 |
| | | * @return |
| | | */ |
| | | public List<UserCloudOrder> getOrderRecord(int page, int count, Long uid, Integer state); |
| | | |
| | | /** |
| | | * 统计状态 |
| | | * @param uid |
| | | * @param state |
| | | * @return |
| | | */ |
| | | public long countOrderRecord(Long uid, Integer state); |
| | | |
| | | public UserCloudOrder selectByPrimaryKey(Long id); |
| | | |
| | | /** |
| | | * 更新 |
| | | * @param cloudOrder |
| | | */ |
| | | public void updateByPrimaryKeySelective(UserCloudOrder cloudOrder); |
| | | |
| | | /** |
| | | * 支付成功更新订单状态 |
| | | * @param orderId |
| | | * @throws UserCloudOrderException |
| | | */ |
| | | public void cloudPayCloudSuccess(Long orderId) throws UserCloudOrderException; |
| | | |
| | | /** |
| | | * 查询最近更新但未付款的 |
| | | * @return |
| | | */ |
| | | public List<UserCloudOrder> getLasthourByUnpaid(); |
| | | |
| | | /** |
| | | * 查询 |
| | | * @param page |
| | | * @param count |
| | | * @param key |
| | | * @param state |
| | | * @return |
| | | */ |
| | | public List<UserCloudOrder> query(int page, int count, String key, Integer state); |
| | | |
| | | long count(String key, Integer state); |
| | | |
| | | } |