|
|
|
@@ -125,14 +125,15 @@ public class WxActivityJoinServiceImpl implements WxActivityJoinService { |
|
|
|
@Transactional(propagation = Propagation.REQUIRED, rollbackFor = {Exception.class}) |
|
|
|
@Override |
|
|
|
public ResultData join(WxActivityJoin wxActivityJoin) { |
|
|
|
WxCUser user = wxCUserMapper.selectByPrimaryKey(wxActivityJoin.getUserId()); |
|
|
|
//保存到报名表中 |
|
|
|
final IdWorker idWorker = IdWorker.get(); |
|
|
|
wxActivityJoin.setId(idWorker.nextId()); |
|
|
|
wxActivityJoin.setPhone(user.getPhone()); |
|
|
|
wxActivityJoinMapper.insertSelective(wxActivityJoin); |
|
|
|
//查询是否消耗积分 |
|
|
|
WxActivity wxActivity = wxActivityMapper.selectByPrimaryKey(wxActivityJoin.getActivityId()); |
|
|
|
if (wxActivity.getUseCredit().equals(EnumActivityUseCreditStatus.YES.getCode())) { |
|
|
|
WxCUser user = wxCUserMapper.selectByPrimaryKey(wxActivityJoin.getUserId()); |
|
|
|
Integer userCredit = user.getCredit(); |
|
|
|
Integer credit = wxActivity.getCredit(); |
|
|
|
Map<String, Object> data = new HashMap<>(); |
|
|
|
|