新增客户备注字段
This commit is contained in:
+1
@@ -189,6 +189,7 @@ public class AdminManagerController {
|
||||
userDTO.setPhone(phone.isEmpty() ? null : phone);
|
||||
userDTO.setContactPhone(phone.isEmpty() ? null : phone);
|
||||
userDTO.setAccount(account);
|
||||
userDTO.setSignature(dto.getRemark() == null ? "" : dto.getRemark().trim());
|
||||
userDTO.setType(0);
|
||||
userDTO.setShopId(shopId);
|
||||
userDTO.setShopIds(List.of(shopId));
|
||||
|
||||
+4
@@ -4,6 +4,7 @@ import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import javax.validation.constraints.Pattern;
|
||||
import javax.validation.constraints.Size;
|
||||
|
||||
@Data
|
||||
public class ManagerCustomerCreateDTO {
|
||||
@@ -13,4 +14,7 @@ public class ManagerCustomerCreateDTO {
|
||||
|
||||
@Pattern(regexp = "^1[3-9]\\d{9}$", message = "手机号格式不正确")
|
||||
private String phone;
|
||||
|
||||
@Size(max = 200, message = "客户备注不能超过200个字符")
|
||||
private String remark;
|
||||
}
|
||||
|
||||
+2
@@ -197,6 +197,7 @@ class AdminManagerControllerTest {
|
||||
ManagerCustomerCreateDTO dto = new ManagerCustomerCreateDTO();
|
||||
dto.setNickname(" 小王客户 ");
|
||||
dto.setPhone(" 13800138000 ");
|
||||
dto.setRemark(" 常做裸色 ");
|
||||
when(adminScopeHelper.getCurrentUser(request)).thenReturn(manager);
|
||||
when(adminScopeHelper.resolveShopScope(manager, null)).thenReturn(8L);
|
||||
when(userService.createUser(any(UserDTO.class))).thenReturn(103L);
|
||||
@@ -210,6 +211,7 @@ class AdminManagerControllerTest {
|
||||
&& "13800138000".equals(userDTO.getPhone())
|
||||
&& "13800138000".equals(userDTO.getContactPhone())
|
||||
&& "13800138000".equals(userDTO.getAccount())
|
||||
&& "常做裸色".equals(userDTO.getSignature())
|
||||
&& Integer.valueOf(0).equals(userDTO.getType())
|
||||
&& Long.valueOf(8L).equals(userDTO.getShopId())
|
||||
&& userDTO.getShopIds().equals(List.of(8L))
|
||||
|
||||
Reference in New Issue
Block a user