diff --git a/src/main/java/com/kiisoo/ic/customer/CustomerService.java b/src/main/java/com/kiisoo/ic/customer/CustomerService.java index fee91fb..ab64b68 100644 --- a/src/main/java/com/kiisoo/ic/customer/CustomerService.java +++ b/src/main/java/com/kiisoo/ic/customer/CustomerService.java @@ -1,6 +1,7 @@ package com.kiisoo.ic.customer; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.kiisoo.ic.constants.Constants; import com.kiisoo.ic.customer.bean.CustomerDTO; import com.kiisoo.ic.customer.bean.CustomerModifyDTO; import com.kiisoo.ic.customer.entity.OpCustomer; @@ -76,6 +77,7 @@ public class CustomerService { sellerCustomerRelation(opCustomer,customerDTO.getStaffCode(),poiStore.getId(),poiStoreStaff.getUserId()); return opCustomer.getId(); }else { + insertCustomer.setCreateBy(Constants.SYS_OPERATION); //不存在 opCustomerDOMapper.insert(insertCustomer); //添加关系 @@ -91,6 +93,7 @@ public class CustomerService { @Transactional(rollbackFor = Exception.class) public void customerVipRelation(CustomerModifyDTO customerModifyDTO){ OpCustomer opCustomer = new OpCustomer(customerModifyDTO.getName(),customerModifyDTO.getPhone()); + opCustomer.setUpdateBy(Constants.SYS_OPERATION); QueryWrapper wrapper = new QueryWrapper<>(); wrapper.eq("phone",customerModifyDTO.getPhone()).last("limit 1"); OpVip opVip = opVipDOMapper.selectOne(wrapper); @@ -120,6 +123,8 @@ public class CustomerService { insertRelation.setCustomerId(opCustomer.getId()); insertRelation.setStoreId(shopId); insertRelation.setUserId(sellerId); + insertRelation.setCreateBy(Constants.SYS_OPERATION); + insertRelation.setUpdateBy(Constants.SYS_OPERATION); opSellerCustomerRelationDOMapper.insert(insertRelation); } }