|
@@ -272,12 +272,12 @@ public class CompanyServiceImpl extends ServiceImpl<CompanyMapper, Company> impl
|
|
|
UserLogin userLogin = userMapper.selectById(companyVO.getOwner());
|
|
UserLogin userLogin = userMapper.selectById(companyVO.getOwner());
|
|
|
|
|
|
|
|
// 来源公司Id 分享的截止日期时间 是否超过 当前的日期时间 说明过期了,过期不加积分 240724
|
|
// 来源公司Id 分享的截止日期时间 是否超过 当前的日期时间 说明过期了,过期不加积分 240724
|
|
|
- log.info("邀请分享的记录:原公司id:{},截止日期:{},当前时间:{},",companyVO.getCpIdFrom(),companyVO.getShareEndDate(),LocalDateTime.now());
|
|
|
|
|
|
|
+ log.info("邀请分享的记录:原公司id:{},截止日期:{},当前时间:{},", companyVO.getCpIdFrom(), companyVO.getShareEndDate(), LocalDateTime.now());
|
|
|
if (companyVO.getCpIdFrom() != null && companyVO.getShareEndDate() != null
|
|
if (companyVO.getCpIdFrom() != null && companyVO.getShareEndDate() != null
|
|
|
&& companyVO.getShareEndDate().compareTo(LocalDateTime.now()) > 0) {
|
|
&& companyVO.getShareEndDate().compareTo(LocalDateTime.now()) > 0) {
|
|
|
// 积分策略 share_reg_integral 分享注册积分
|
|
// 积分策略 share_reg_integral 分享注册积分
|
|
|
List<IntegralTacticResponse> integralTacticResponses = integralTacticMapper.selectByCond(new IntegralTacticQuery());
|
|
List<IntegralTacticResponse> integralTacticResponses = integralTacticMapper.selectByCond(new IntegralTacticQuery());
|
|
|
- log.info("积分策略:{},",integralTacticResponses);
|
|
|
|
|
|
|
+ log.info("积分策略:{},", integralTacticResponses);
|
|
|
if (integralTacticResponses != null && integralTacticResponses.size() > 0) {
|
|
if (integralTacticResponses != null && integralTacticResponses.size() > 0) {
|
|
|
IntegralTacticResponse integralTactic = integralTacticResponses.get(0);
|
|
IntegralTacticResponse integralTactic = integralTacticResponses.get(0);
|
|
|
// 积分明细 新公司的
|
|
// 积分明细 新公司的
|
|
@@ -300,13 +300,13 @@ public class CompanyServiceImpl extends ServiceImpl<CompanyMapper, Company> impl
|
|
|
integralQuery.setFlgValid(true);
|
|
integralQuery.setFlgValid(true);
|
|
|
List<IntegralResponse> integralResponses = integralMapper.selectByCond(integralQuery);
|
|
List<IntegralResponse> integralResponses = integralMapper.selectByCond(integralQuery);
|
|
|
if (integralResponses != null && integralResponses.size() > 0) {
|
|
if (integralResponses != null && integralResponses.size() > 0) {
|
|
|
- integral.setIntegral(integralTactic.getRegIntegral() );
|
|
|
|
|
|
|
+ integral.setIntegral(integralTactic.getRegIntegral());
|
|
|
integralMapper.updateById(integral);
|
|
integralMapper.updateById(integral);
|
|
|
- }else{
|
|
|
|
|
|
|
+ } else {
|
|
|
integral.setIntegral(integralTactic.getRegIntegral());
|
|
integral.setIntegral(integralTactic.getRegIntegral());
|
|
|
integralMapper.insert(integral);
|
|
integralMapper.insert(integral);
|
|
|
}
|
|
}
|
|
|
- log.info("积分 新公司的:{},",integral);
|
|
|
|
|
|
|
+ log.info("积分 新公司的:{},", integral);
|
|
|
// 积分明细 来源公司公司的
|
|
// 积分明细 来源公司公司的
|
|
|
integralItem = new IntegralItem();
|
|
integralItem = new IntegralItem();
|
|
|
// 邀请的注册
|
|
// 邀请的注册
|
|
@@ -329,11 +329,11 @@ public class CompanyServiceImpl extends ServiceImpl<CompanyMapper, Company> impl
|
|
|
if (integralResponses != null && integralResponses.size() > 0) {
|
|
if (integralResponses != null && integralResponses.size() > 0) {
|
|
|
integral.setIntegral(integralTactic.getShareRegIntegral());
|
|
integral.setIntegral(integralTactic.getShareRegIntegral());
|
|
|
integralMapper.updateById(integral);
|
|
integralMapper.updateById(integral);
|
|
|
- }else{
|
|
|
|
|
|
|
+ } else {
|
|
|
integral.setIntegral(integralTactic.getShareRegIntegral());
|
|
integral.setIntegral(integralTactic.getShareRegIntegral());
|
|
|
integralMapper.insert(integral);
|
|
integralMapper.insert(integral);
|
|
|
}
|
|
}
|
|
|
- log.info("积分 来源公司公司的:{},",integral);
|
|
|
|
|
|
|
+ log.info("积分 来源公司公司的:{},", integral);
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -609,6 +609,8 @@ public class CompanyServiceImpl extends ServiceImpl<CompanyMapper, Company> impl
|
|
|
trade.setActivityItemIds(companyVO.getActivityItemIds());
|
|
trade.setActivityItemIds(companyVO.getActivityItemIds());
|
|
|
// 前台传入 暂时用这个字段
|
|
// 前台传入 暂时用这个字段
|
|
|
trade.setStaffName(companyVO.getStaffNameFrom());
|
|
trade.setStaffName(companyVO.getStaffNameFrom());
|
|
|
|
|
+ trade.setIntegral(companyVO.getIntegral() != null ? companyVO.getIntegral() : 0);
|
|
|
|
|
+ trade.setCouponUseId(companyVO.getCouponUseId());
|
|
|
tradeMapper.insert(trade);
|
|
tradeMapper.insert(trade);
|
|
|
|
|
|
|
|
return ResponseResultUtil.success(trade);
|
|
return ResponseResultUtil.success(trade);
|
|
@@ -655,6 +657,8 @@ public class CompanyServiceImpl extends ServiceImpl<CompanyMapper, Company> impl
|
|
|
trade.setTradeDesc(companyVO.getRemarks());
|
|
trade.setTradeDesc(companyVO.getRemarks());
|
|
|
// 前台传入 暂时用这个字段
|
|
// 前台传入 暂时用这个字段
|
|
|
trade.setStaffName(companyVO.getStaffNameFrom());
|
|
trade.setStaffName(companyVO.getStaffNameFrom());
|
|
|
|
|
+ trade.setIntegral(companyVO.getIntegral() != null ? companyVO.getIntegral() : 0);
|
|
|
|
|
+ trade.setCouponUseId(companyVO.getCouponUseId());
|
|
|
tradeMapper.insert(trade);
|
|
tradeMapper.insert(trade);
|
|
|
return ResponseResultUtil.success(trade);
|
|
return ResponseResultUtil.success(trade);
|
|
|
}
|
|
}
|
|
@@ -730,9 +734,9 @@ public class CompanyServiceImpl extends ServiceImpl<CompanyMapper, Company> impl
|
|
|
*/
|
|
*/
|
|
|
public ResponseResultVO<Map<String, Object>> getCurrentDate(Map<String, Object> param) {
|
|
public ResponseResultVO<Map<String, Object>> getCurrentDate(Map<String, Object> param) {
|
|
|
Map<String, Object> res = new HashMap<>();
|
|
Map<String, Object> res = new HashMap<>();
|
|
|
- if (param.get("flgTime") !=null){
|
|
|
|
|
|
|
+ if (param.get("flgTime") != null) {
|
|
|
res.put("currentDate", LocalDateTime.now());
|
|
res.put("currentDate", LocalDateTime.now());
|
|
|
- }else{
|
|
|
|
|
|
|
+ } else {
|
|
|
res.put("currentDate", LocalDate.now());
|
|
res.put("currentDate", LocalDate.now());
|
|
|
}
|
|
}
|
|
|
return ResponseResultUtil.success(res);
|
|
return ResponseResultUtil.success(res);
|