|
|
@@ -27,10 +27,13 @@ import com.dk.oauth.model.pojo.integral.Integral;
|
|
|
import com.dk.oauth.model.pojo.integral.IntegralItem;
|
|
|
import com.dk.oauth.model.pojo.integral.IntegralTactic;
|
|
|
import com.dk.oauth.model.query.integral.IntegralQuery;
|
|
|
+import com.dk.oauth.model.query.integral.IntegralTacticQuery;
|
|
|
import com.dk.oauth.model.response.integral.IntegralResponse;
|
|
|
+import com.dk.oauth.model.response.integral.IntegralTacticResponse;
|
|
|
import com.dk.oauth.query.*;
|
|
|
import com.dk.oauth.response.*;
|
|
|
import com.dk.oauth.service.ICompanyService;
|
|
|
+import lombok.extern.slf4j.Slf4j;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
|
@@ -54,6 +57,7 @@ import java.util.Map;
|
|
|
* @since 2023-07-01 09:41:05
|
|
|
*/
|
|
|
@Service("companyService")
|
|
|
+@Slf4j
|
|
|
public class CompanyServiceImpl extends ServiceImpl<CompanyMapper, Company> implements ICompanyService {
|
|
|
@Resource
|
|
|
CompanyMapper companyMapper;
|
|
|
@@ -268,12 +272,14 @@ public class CompanyServiceImpl extends ServiceImpl<CompanyMapper, Company> impl
|
|
|
UserLogin userLogin = userMapper.selectById(companyVO.getOwner());
|
|
|
|
|
|
// 来源公司Id 分享的截止日期时间 是否超过 当前的日期时间 说明过期了,过期不加积分 240724
|
|
|
+ log.info("邀请分享的记录:原公司id:{},截止日期:{},当前时间:{},",companyVO.getCpIdFrom(),companyVO.getShareEndTime(),LocalDateTime.now());
|
|
|
if (companyVO.getCpIdFrom() != null && companyVO.getShareEndTime() != null
|
|
|
&& companyVO.getShareEndTime().compareTo(LocalDateTime.now()) > 0) {
|
|
|
// 积分策略 share_reg_integral 分享注册积分
|
|
|
- List<IntegralTactic> integralTactics = integralTacticMapper.selectByCond(new IntegralTactic());
|
|
|
- if (integralTactics != null && integralTactics.size() > 0) {
|
|
|
- IntegralTactic integralTactic = integralTactics.get(0);
|
|
|
+ List<IntegralTacticResponse> integralTacticResponses = integralTacticMapper.selectByCond(new IntegralTacticQuery());
|
|
|
+ log.info("积分策略:{},",integralTacticResponses);
|
|
|
+ if (integralTacticResponses != null && integralTacticResponses.size() > 0) {
|
|
|
+ IntegralTacticResponse integralTactic = integralTacticResponses.get(0);
|
|
|
// 积分明细 新公司的
|
|
|
IntegralItem integralItem = new IntegralItem();
|
|
|
integralItem.setIntegralType(Constant.IntegralType.INTEGRAL_TYPE_REGISTER.getName());
|
|
|
@@ -300,7 +306,7 @@ public class CompanyServiceImpl extends ServiceImpl<CompanyMapper, Company> impl
|
|
|
integral.setIntegral(integralTactic.getRegIntegral());
|
|
|
integralMapper.insert(integral);
|
|
|
}
|
|
|
-
|
|
|
+ log.info("积分 新公司的:{},",integral);
|
|
|
// 积分明细 来源公司公司的
|
|
|
integralItem = new IntegralItem();
|
|
|
// 邀请的注册
|
|
|
@@ -327,6 +333,7 @@ public class CompanyServiceImpl extends ServiceImpl<CompanyMapper, Company> impl
|
|
|
integral.setIntegral(integralTactic.getShareRegIntegral());
|
|
|
integralMapper.insert(integral);
|
|
|
}
|
|
|
+ log.info("积分 来源公司公司的:{},",integral);
|
|
|
}
|
|
|
}
|
|
|
|