support tag for customer create
This commit is contained in:
@@ -3,6 +3,7 @@ package com.imyeyu.api.modules.gao.entity;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.fasterxml.jackson.databind.JsonNode;
|
||||
import com.imyeyu.api.modules.common.entity.Attachment;
|
||||
import com.imyeyu.api.modules.common.entity.TagApply;
|
||||
import com.imyeyu.api.modules.user.bean.Gender;
|
||||
import com.imyeyu.api.modules.user.entity.User;
|
||||
import com.imyeyu.java.TimiJava;
|
||||
@@ -109,6 +110,9 @@ public class GaoCustomer extends UUIDEntity {
|
||||
@Transient
|
||||
private List<GaoEventRecord> eventRecordList;
|
||||
|
||||
@Transient
|
||||
private TagApply tagApply;
|
||||
|
||||
public boolean hasIntroducer() {
|
||||
return TimiJava.isNotEmpty(introducerCustomerId);
|
||||
}
|
||||
|
||||
+9
@@ -121,6 +121,10 @@ public class GaoCustomerServiceImplement extends AbstractEntityService<GaoCustom
|
||||
customer.setCreatorUserId(userLoginService.getRequireLoginUserId());
|
||||
|
||||
super.create(customer);
|
||||
// 标签
|
||||
if (customer.getTagApply() != null) {
|
||||
tagService.apply(TagApply.BizType.GAO_CUSTOMER, customer.getId(), customer.getTagApply().getTagIdList());
|
||||
}
|
||||
// 附件
|
||||
attachmentService.updateByBizId(Attachment.BizType.GAO_CUSTOMER, customer.getId(), customer.getAttachmentList());
|
||||
|
||||
@@ -178,6 +182,11 @@ public class GaoCustomerServiceImplement extends AbstractEntityService<GaoCustom
|
||||
dbCustomer.setConditioningPart(customer.getConditioningPart());
|
||||
mapper.update(dbCustomer);
|
||||
|
||||
// 标签
|
||||
if (customer.getTagApply() != null) {
|
||||
tagService.apply(TagApply.BizType.GAO_CUSTOMER, customer.getId(), customer.getTagApply().getTagIdList());
|
||||
}
|
||||
|
||||
logger.setLevel(Logger.Level.INFO);
|
||||
logger.setResult(customer.getId());
|
||||
} catch (TimiException e) {
|
||||
|
||||
Reference in New Issue
Block a user