From 5e7b0ed4a154ad067cbcf4aa1a1c7cce32f9864c Mon Sep 17 00:00:00 2001
From: admin <weikou2014>
Date: 星期五, 26 四月 2024 18:02:17 +0800
Subject: [PATCH] 唯品会链接解析升级
---
fanli/src/main/java/com/yeshi/fanli/service/impl/user/UserSystemCouponGiveRecordServiceImpl.java | 135 ++++++++++++++++++++++++++++++--------------
1 files changed, 91 insertions(+), 44 deletions(-)
diff --git a/fanli/src/main/java/com/yeshi/fanli/service/impl/user/UserSystemCouponGiveRecordServiceImpl.java b/fanli/src/main/java/com/yeshi/fanli/service/impl/user/UserSystemCouponGiveRecordServiceImpl.java
index 6a42f30..31342f0 100644
--- a/fanli/src/main/java/com/yeshi/fanli/service/impl/user/UserSystemCouponGiveRecordServiceImpl.java
+++ b/fanli/src/main/java/com/yeshi/fanli/service/impl/user/UserSystemCouponGiveRecordServiceImpl.java
@@ -1,44 +1,91 @@
-package com.yeshi.fanli.service.impl.user;
-
-import java.util.List;
-
-import javax.annotation.Resource;
-
-import org.springframework.stereotype.Service;
-
-import com.yeshi.fanli.dao.mybatis.user.UserSystemCouponGiveRecordMapper;
-import com.yeshi.fanli.entity.bus.user.UserSystemCouponGiveRecord;
-import com.yeshi.fanli.service.inter.user.UserSystemCouponGiveRecordService;
-
-@Service
-public class UserSystemCouponGiveRecordServiceImpl implements UserSystemCouponGiveRecordService{
-
- @Resource
- private UserSystemCouponGiveRecordMapper userSystemCouponGiveRecordMapper;
-
-
- @Override
- public void insertSelective(UserSystemCouponGiveRecord record) {
- userSystemCouponGiveRecordMapper.insertSelective(record);
- }
-
- @Override
- public UserSystemCouponGiveRecord selectByPrimaryKey(Long id) {
- return userSystemCouponGiveRecordMapper.selectByPrimaryKey(id);
- }
-
- @Override
- public UserSystemCouponGiveRecord getRecordByUidAndCouponId(Long giveUid, Long couponId) {
- return userSystemCouponGiveRecordMapper.getRecordByUidAndCouponId(giveUid, couponId);
- }
-
- @Override
- public void updateByPrimaryKeySelective(UserSystemCouponGiveRecord giveRecord) {
- userSystemCouponGiveRecordMapper.updateByPrimaryKeySelective(giveRecord);
- }
-
- @Override
- public List<UserSystemCouponGiveRecord> overdueList(int count) {
- return userSystemCouponGiveRecordMapper.overdueList(count);
- }
-}
+package com.yeshi.fanli.service.impl.user;
+
+import java.util.List;
+
+import javax.annotation.Resource;
+
+import org.springframework.stereotype.Service;
+
+import com.yeshi.fanli.dao.mybatis.user.UserSystemCouponGiveRecordMapper;
+import com.yeshi.fanli.entity.bus.user.UserInfo;
+import com.yeshi.fanli.entity.bus.user.UserSystemCouponGiveRecord;
+import com.yeshi.fanli.service.inter.user.UserInfoService;
+import com.yeshi.fanli.service.inter.user.UserSystemCouponGiveRecordService;
+
+@Service
+public class UserSystemCouponGiveRecordServiceImpl implements UserSystemCouponGiveRecordService{
+
+ @Resource
+ private UserSystemCouponGiveRecordMapper userSystemCouponGiveRecordMapper;
+
+ @Resource
+ private UserInfoService userInfoService;
+
+ @Override
+ public void insertSelective(UserSystemCouponGiveRecord record) {
+ userSystemCouponGiveRecordMapper.insertSelective(record);
+ }
+
+ @Override
+ public UserSystemCouponGiveRecord selectByPrimaryKey(Long id) {
+ return userSystemCouponGiveRecordMapper.selectByPrimaryKey(id);
+ }
+
+ @Override
+ public UserSystemCouponGiveRecord getRecordByUidAndCouponId(Long giveUid, Long couponId) {
+ return userSystemCouponGiveRecordMapper.getRecordByUidAndCouponId(giveUid, couponId);
+ }
+
+ @Override
+ public void updateByPrimaryKeySelective(UserSystemCouponGiveRecord giveRecord) {
+ userSystemCouponGiveRecordMapper.updateByPrimaryKeySelective(giveRecord);
+ }
+
+ @Override
+ public List<UserSystemCouponGiveRecord> overdueList(int count) {
+ return userSystemCouponGiveRecordMapper.overdueList(count);
+ }
+
+ @Override
+ public List<UserSystemCouponGiveRecord> overdueListByUser(Long uid) {
+ return userSystemCouponGiveRecordMapper.overdueListByUser(uid);
+ }
+
+ @Override
+ public UserSystemCouponGiveRecord getByReceiveId(Long receiveId) {
+ return userSystemCouponGiveRecordMapper.getByReceiveId(receiveId);
+ }
+
+ @Override
+ public List<UserSystemCouponGiveRecord> listGiveRecord(long start, int count, String type, Integer state) {
+ List<UserSystemCouponGiveRecord> list = userSystemCouponGiveRecordMapper.listGiveRecord(start, count, type, state);
+ if (list == null || list.size() == 0)
+ return list;
+
+ for (UserSystemCouponGiveRecord giveRecord: list) {
+ UserInfo giveUser = userInfoService.selectByPKey(giveRecord.getGiveUid());
+ if (giveUser != null)
+ giveRecord.setGiveName(giveUser.getNickName());
+
+ Long receiveUid = giveRecord.getReceiveUid();
+ if (receiveUid == null)
+ continue;
+
+ UserInfo receiveUser = userInfoService.selectByPKey(receiveUid);
+ if (receiveUser != null)
+ giveRecord.setReceiveName(receiveUser.getNickName());
+ }
+ return list;
+ }
+
+
+ @Override
+ public long countGiveRecord(String type, Integer state) {
+ return userSystemCouponGiveRecordMapper.countGiveRecord(type, state);
+ }
+
+ @Override
+ public UserSystemCouponGiveRecord getByCouponId(Long couponId) {
+ return userSystemCouponGiveRecordMapper.getByCouponId(couponId);
+ }
+}
--
Gitblit v1.8.0