|
|
@@ -130,4 +130,40 @@ public class BusinessServiceImpl extends BaseMybatisDao<UserBusinessMapper> impl
|
|
|
return 1;
|
|
|
}
|
|
|
|
|
|
+ @Override
|
|
|
+ @Transactional
|
|
|
+ public int followOneBusiness(BussinessFollowBo bfb) throws ParseException {
|
|
|
+ Date updateTime = new Date();
|
|
|
+ SimpleDateFormat format = new SimpleDateFormat(AFTConstants.YYYYMMDDHHMMSS);
|
|
|
+ UserBusiness userBusiness = new UserBusiness();
|
|
|
+ userBusiness.setId(bfb.getBusinessId());
|
|
|
+ userBusiness.setUpdateTime(updateTime);
|
|
|
+ userBusiness.setCustomerStatus(Integer.parseInt(bfb.getCustomerStatus()));
|
|
|
+ userBusiness.setFollowSituation(Integer.parseInt(bfb.getFollowSituation()));
|
|
|
+ userBusinessMapper.updateByPrimaryKeySelective(userBusiness);
|
|
|
+ UserFollow userFollow = new UserFollow();
|
|
|
+ String followId = UUID.randomUUID().toString();
|
|
|
+ int followCount = userBusinessMapper.judgeBusiness(bfb.getUid(), null, TokenManager.getAdminId()) + 1;
|
|
|
+ userFollow.setId(followId);
|
|
|
+ userFollow.setResult(bfb.getResult());
|
|
|
+ userFollow.setCreateTime(format.parse(bfb.getFollowTime()));
|
|
|
+ userFollow.setEffective(0);
|
|
|
+ userFollow.setOcbId(bfb.getOcbId());
|
|
|
+ userFollow.setFollowCount(followCount);
|
|
|
+ userFollow.setContactType(Integer.parseInt(bfb.getContactType()));
|
|
|
+ userFollow.setAid(TokenManager.getAdminId());
|
|
|
+ userFollowMapper.insert(userFollow);
|
|
|
+ UserFollowBusiness userFollowBusiness = new UserFollowBusiness();
|
|
|
+ String ufbId = UUID.randomUUID().toString();
|
|
|
+ userFollowBusiness.setId(ufbId);
|
|
|
+ userFollowBusiness.setFollowId(followId);
|
|
|
+ userFollowBusiness.setBusinessGlossoryId(Integer.parseInt(bfb.getBusinessGlossoryId()));
|
|
|
+ userFollowBusiness.setBusinessId(bfb.getBusinessId());
|
|
|
+ userFollowBusiness.setCustomerStatus(Integer.parseInt(bfb.getCustomerStatus()));
|
|
|
+ userFollowBusiness.setFollowSituation(Integer.parseInt(bfb.getFollowSituation()));
|
|
|
+ userFollowBusiness.setRemarks(bfb.getRemarks());
|
|
|
+ userFollowBusinessMapper.insert(userFollowBusiness);
|
|
|
+ return 1;
|
|
|
+ }
|
|
|
+
|
|
|
}
|