Commit 50f06362 authored by libin's avatar libin

活动注册id

parent 60e2b2ea
......@@ -16,6 +16,7 @@ import lombok.RequiredArgsConstructor;
import org.apache.commons.collections.CollectionUtils;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
......@@ -45,10 +46,16 @@ public class CustomerBehaviorNotesBiz extends BaseBiz<CustomerBehaviorNotesMappe
private final ActivityBehaviorRelationBiz activityBehaviorRelationBiz;
@Value("${activity.register.id}")
private Integer activityId;
public void saveCustomerBehavior(CustomerBehaviorNoteDTO customerBehaviorNoteDTO) {
CustomerBehaviorNotes customerBehaviorNotes = new CustomerBehaviorNotes();
BeanUtils.copyProperties(customerBehaviorNoteDTO, customerBehaviorNotes);
customerBehaviorNotes.setCrtTime(Instant.now().toEpochMilli());
if (customerBehaviorNoteDTO.getType()==BehaviorEnum.REGISTRY.getCode()){
customerBehaviorNotes.setTypeId(activityId);
}
mapper.insertSelective(customerBehaviorNotes);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment