完成基本京粉功能推送,订单统计,订单拉取的稳定版初版
This commit is contained in:
@@ -7,7 +7,7 @@ package cn.van.business.repository;
|
||||
* @description:
|
||||
*/
|
||||
|
||||
import cn.van.business.model.OrderRow;
|
||||
import cn.van.business.model.jd.OrderRow;
|
||||
import org.springframework.data.jpa.repository.JpaRepository;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
@@ -25,4 +25,8 @@ public interface OrderRowRepository extends JpaRepository<OrderRow, String> {
|
||||
|
||||
// 根据有效码查询订单行
|
||||
List<OrderRow> findByValidCode(int validCode);
|
||||
|
||||
// 查找 validCode != 15 或者 !=-1 的订单行 ,并且按orderTime 降序
|
||||
List<OrderRow> findByValidCodeNotInOrderByOrderTimeDesc(int[] validCodes);
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
package cn.van.business.repository;
|
||||
|
||||
import cn.van.business.model.wx.Setting;
|
||||
import org.springframework.data.jpa.repository.JpaRepository;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import java.util.Optional;
|
||||
|
||||
@Repository
|
||||
public interface SettingRepository extends JpaRepository<Setting, Integer> {
|
||||
|
||||
// Find a setting by its unique key
|
||||
Optional<Setting> findBySettingKey(String settingKey);
|
||||
|
||||
// You could add more queries if needed, example:
|
||||
// List<Setting> findBySettingKeyStartingWith(String prefix);
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
package cn.van.business.repository;
|
||||
|
||||
import cn.van.business.model.wx.WxMessageDataForChat;
|
||||
import org.springframework.data.jpa.repository.JpaRepository;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Repository
|
||||
public interface WxMessageDataForChatRepository extends JpaRepository<WxMessageDataForChat, Integer> {
|
||||
// 根据消息来源wxid查询消息记录
|
||||
List<WxMessageDataForChat> findByFromWxid(String fromWxid);
|
||||
|
||||
// 根据消息类型查询消息记录
|
||||
List<WxMessageDataForChat> findByMsgType(Integer msgType);
|
||||
|
||||
// 根据消息ID查询单条消息记录
|
||||
WxMessageDataForChat findByMsgId(String msgId);
|
||||
|
||||
// 添加其他可能需要的自定义查询方法,例如:
|
||||
// 根据消息类型和是否是静默消息查询
|
||||
List<WxMessageDataForChat> findByMsgTypeAndSilence(Integer msgType, Integer silence);
|
||||
|
||||
// 根据消息来源和消息类型查询
|
||||
List<WxMessageDataForChat> findByFromWxidAndMsgType(String fromWxid, Integer msgType);
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
package cn.van.business.repository;
|
||||
|
||||
import cn.van.business.model.wx.WxMessageDataForTransfer;
|
||||
import org.springframework.data.jpa.repository.JpaRepository;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
|
||||
@Repository
|
||||
public interface WxMessageDataForTransferRepository extends JpaRepository<WxMessageDataForTransfer, Integer> {
|
||||
|
||||
// Find transfers by the sender's WeChat ID
|
||||
List<WxMessageDataForTransfer> findByFromWxid(String fromWxid);
|
||||
|
||||
// Find a single transfer by its unique transfer ID
|
||||
WxMessageDataForTransfer findByTransferid(String transferid);
|
||||
|
||||
// Find transfers by transaction type
|
||||
List<WxMessageDataForTransfer> findByTransType(Integer transType);
|
||||
|
||||
// Find transfers that have a specific amount of money
|
||||
List<WxMessageDataForTransfer> findByMoney(BigDecimal money);
|
||||
|
||||
// Optional: Find transfers by msgSource, which could represent different sources or contexts of the transactions
|
||||
List<WxMessageDataForTransfer> findByMsgSource(Integer msgSource);
|
||||
|
||||
// Optional: Find transfers by their invalid time parameter
|
||||
List<WxMessageDataForTransfer> findByInvalidtime(Integer invalidtime);
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
package cn.van.business.repository;
|
||||
|
||||
import cn.van.business.model.wx.WxUser;
|
||||
import org.springframework.data.jpa.repository.JpaRepository;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
import java.util.Optional;
|
||||
|
||||
@Repository
|
||||
public interface WxUserRepository extends JpaRepository<WxUser, Integer> {
|
||||
|
||||
// Find users by their wxid
|
||||
Optional<WxUser> findByWxid(String wxid);
|
||||
|
||||
// Find users by their name
|
||||
List<WxUser> findByName(String name);
|
||||
|
||||
// Find users by status
|
||||
List<WxUser> findByStatus(Integer status);
|
||||
|
||||
// Optional: Find users by the range of total accumulated money
|
||||
List<WxUser> findByMoneyLeijiBetween(BigDecimal min, BigDecimal max);
|
||||
|
||||
// Optional: Find users by the remaining money
|
||||
List<WxUser> findByMoneyShengyuLessThanEqual(BigDecimal amount);
|
||||
|
||||
// Add more customized queries as needed based on your application requirements
|
||||
}
|
||||
Reference in New Issue
Block a user