From 30d8e227e8d823b6c38c3b9c90ac2df03b63befe Mon Sep 17 00:00:00 2001 From: admin <weikou2014> Date: 星期二, 25 二月 2025 16:41:22 +0800 Subject: [PATCH] 淘宝转链接口更新 --- fanli/src/main/java/com/yeshi/fanli/service/impl/user/UserSystemCouponActivateServiceImpl.java | 95 +++++++++++++++++++++++++++-------------------- 1 files changed, 54 insertions(+), 41 deletions(-) diff --git a/fanli/src/main/java/com/yeshi/fanli/service/impl/user/UserSystemCouponActivateServiceImpl.java b/fanli/src/main/java/com/yeshi/fanli/service/impl/user/UserSystemCouponActivateServiceImpl.java index 4be5a11..90e3ea2 100644 --- a/fanli/src/main/java/com/yeshi/fanli/service/impl/user/UserSystemCouponActivateServiceImpl.java +++ b/fanli/src/main/java/com/yeshi/fanli/service/impl/user/UserSystemCouponActivateServiceImpl.java @@ -1,41 +1,54 @@ -package com.yeshi.fanli.service.impl.user; - -import javax.annotation.Resource; - -import org.springframework.stereotype.Service; - -import com.yeshi.fanli.dao.mybatis.user.UserSystemCouponActivateMapper; -import com.yeshi.fanli.entity.bus.user.UserSystemCouponActivate; -import com.yeshi.fanli.service.inter.config.ConfigService; -import com.yeshi.fanli.service.inter.user.UserSystemCouponActivateService; - -@Service -public class UserSystemCouponActivateServiceImpl implements UserSystemCouponActivateService{ - - @Resource - private UserSystemCouponActivateMapper userSystemCouponActivateMapper; - - @Resource - private ConfigService configService; - - - - @Override - public UserSystemCouponActivate selectForUpdate(Long id) { - return userSystemCouponActivateMapper.selectForUpdate(id); - } - - @Override - public void updateByPrimaryKeySelective(UserSystemCouponActivate record) { - userSystemCouponActivateMapper.updateByPrimaryKeySelective(record); - } - - @Override - public int getActivateCount(Long id) { - UserSystemCouponActivate coupon = userSystemCouponActivateMapper.selectByPrimaryKey(id); - if (coupon != null) - return coupon.getCount(); - - return 0; - } -} +package com.yeshi.fanli.service.impl.user; + +import java.util.Date; + +import javax.annotation.Resource; + +import org.springframework.stereotype.Service; + +import com.yeshi.fanli.dao.mybatis.user.UserSystemCouponActivateMapper; +import com.yeshi.fanli.entity.bus.user.UserSystemCouponActivate; +import com.yeshi.fanli.service.inter.config.ConfigService; +import com.yeshi.fanli.service.inter.user.UserSystemCouponActivateService; + +@Service +public class UserSystemCouponActivateServiceImpl implements UserSystemCouponActivateService{ + + @Resource + private UserSystemCouponActivateMapper userSystemCouponActivateMapper; + + @Resource + private ConfigService configService; + + + + @Override + public UserSystemCouponActivate selectForUpdate(Long id) { + return userSystemCouponActivateMapper.selectForUpdate(id); + } + + @Override + public void addActivateRecord(Long id) { + UserSystemCouponActivate record = new UserSystemCouponActivate(); + record.setId(id); + record.setCount(0); + record.setState(UserSystemCouponActivate.STATE_INIT); + record.setCreateTime(new Date()); + record.setUpdateTime(new Date()); + userSystemCouponActivateMapper.insertSelective(record); + } + + @Override + public void updateByPrimaryKeySelective(UserSystemCouponActivate record) { + userSystemCouponActivateMapper.updateByPrimaryKeySelective(record); + } + + @Override + public int getActivateCount(Long id) { + UserSystemCouponActivate coupon = userSystemCouponActivateMapper.selectByPrimaryKey(id); + if (coupon != null) + return coupon.getCount(); + + return 0; + } +} -- Gitblit v1.8.0