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/order/dividents/TeamDividentsRecordServiceImpl.java | 82 ++++++++++++++++++++-------------------- 1 files changed, 41 insertions(+), 41 deletions(-) diff --git a/fanli/src/main/java/com/yeshi/fanli/service/impl/order/dividents/TeamDividentsRecordServiceImpl.java b/fanli/src/main/java/com/yeshi/fanli/service/impl/order/dividents/TeamDividentsRecordServiceImpl.java index ecb098e..2adc544 100644 --- a/fanli/src/main/java/com/yeshi/fanli/service/impl/order/dividents/TeamDividentsRecordServiceImpl.java +++ b/fanli/src/main/java/com/yeshi/fanli/service/impl/order/dividents/TeamDividentsRecordServiceImpl.java @@ -1,41 +1,41 @@ -package com.yeshi.fanli.service.impl.order.dividents; - -import java.util.Date; - -import javax.annotation.Resource; - -import org.springframework.stereotype.Service; - -import com.yeshi.fanli.dao.mybatis.order.dividents.TeamDividentsRecordMapper; -import com.yeshi.fanli.entity.order.dividents.TeamDividentsRecord; -import com.yeshi.fanli.exception.ParamsException; -import com.yeshi.fanli.exception.order.dividents.TeamDividentsRecordException; -import com.yeshi.fanli.service.inter.order.dividents.TeamDividentsRecordService; -import com.yeshi.fanli.util.StringUtil; - -@Service -public class TeamDividentsRecordServiceImpl implements TeamDividentsRecordService { - - @Resource - private TeamDividentsRecordMapper teamDividentsRecordMapper; - - @Override - public void addTeamDividentsRecord(TeamDividentsRecord record) - throws TeamDividentsRecordException, ParamsException { - // 楠岃瘉鍙傛暟瀹屾暣鎬� - if (record == null || StringUtil.isNullOrEmpty(record.getDay()) || record.getMoney() == null - || record.getState() == null || record.getUid() == null) - throw new ParamsException(1, "鍙傛暟涓嶅畬鏁�"); - - // 鍒ゆ柇鏄惁瀛樺湪 - TeamDividentsRecord old = teamDividentsRecordMapper.selectByUidAndDayAndTypeForUpdate(record.getUid(), - record.getDay(),record.getType()); - if (old != null) - throw new TeamDividentsRecordException(TeamDividentsRecordException.CODE_EXIST, "璁板綍宸插瓨鍦�"); - // 鍔犲叆璁板綍 - if (record.getCreateTime() == null) - record.setCreateTime(new Date()); - teamDividentsRecordMapper.insertSelective(record); - } - -} +package com.yeshi.fanli.service.impl.order.dividents; + +import java.util.Date; + +import javax.annotation.Resource; + +import org.springframework.stereotype.Service; + +import com.yeshi.fanli.dao.mybatis.order.dividents.TeamDividentsRecordMapper; +import com.yeshi.fanli.entity.order.dividents.TeamDividentsRecord; +import com.yeshi.fanli.exception.ParamsException; +import com.yeshi.fanli.exception.order.dividents.TeamDividentsRecordException; +import com.yeshi.fanli.service.inter.order.dividents.TeamDividentsRecordService; +import com.yeshi.fanli.util.StringUtil; + +@Service +public class TeamDividentsRecordServiceImpl implements TeamDividentsRecordService { + + @Resource + private TeamDividentsRecordMapper teamDividentsRecordMapper; + + @Override + public void addTeamDividentsRecord(TeamDividentsRecord record) + throws TeamDividentsRecordException, ParamsException { + // 楠岃瘉鍙傛暟瀹屾暣鎬� + if (record == null || StringUtil.isNullOrEmpty(record.getDay()) || record.getMoney() == null + || record.getState() == null || record.getUid() == null) + throw new ParamsException(1, "鍙傛暟涓嶅畬鏁�"); + + // 鍒ゆ柇鏄惁瀛樺湪 + TeamDividentsRecord old = teamDividentsRecordMapper.selectByUidAndDayAndTypeForUpdate(record.getUid(), + record.getDay(),record.getType()); + if (old != null) + throw new TeamDividentsRecordException(TeamDividentsRecordException.CODE_EXIST, "璁板綍宸插瓨鍦�"); + // 鍔犲叆璁板綍 + if (record.getCreateTime() == null) + record.setCreateTime(new Date()); + teamDividentsRecordMapper.insertSelective(record); + } + +} -- Gitblit v1.8.0