通讯录添加修改
parent
c7ba36b3cc
commit
6f853e4653
1
pom.xml
1
pom.xml
|
|
@ -198,7 +198,6 @@
|
||||||
<version>1.30.0</version>
|
<version>1.30.0</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
|
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
<build>
|
<build>
|
||||||
|
|
|
||||||
|
|
@ -11,6 +11,7 @@ import com.whdc.model.group.Find;
|
||||||
import com.whdc.model.group.Insert;
|
import com.whdc.model.group.Insert;
|
||||||
import com.whdc.model.group.Update;
|
import com.whdc.model.group.Update;
|
||||||
import com.whdc.service.IAddressBookService;
|
import com.whdc.service.IAddressBookService;
|
||||||
|
import com.whdc.service.IOrganizationService;
|
||||||
import com.whdc.service.IUserService;
|
import com.whdc.service.IUserService;
|
||||||
import com.whdc.service.IVersionsService;
|
import com.whdc.service.IVersionsService;
|
||||||
import com.whdc.utils.ResultJson;
|
import com.whdc.utils.ResultJson;
|
||||||
|
|
@ -18,6 +19,7 @@ import io.swagger.annotations.Api;
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.apache.commons.collections.CollectionUtils;
|
import org.apache.commons.collections.CollectionUtils;
|
||||||
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.validation.annotation.Validated;
|
import org.springframework.validation.annotation.Validated;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
@ -43,6 +45,9 @@ public class AddressBookController {
|
||||||
@Autowired
|
@Autowired
|
||||||
private IVersionsService versionsService;
|
private IVersionsService versionsService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private IOrganizationService organizationsService;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// @ApiOperation(value = "查询所有")
|
// @ApiOperation(value = "查询所有")
|
||||||
|
|
@ -89,7 +94,14 @@ public class AddressBookController {
|
||||||
boolean save = service.save(model);
|
boolean save = service.save(model);
|
||||||
|
|
||||||
if (save){
|
if (save){
|
||||||
userService.register( model.getPhone(), model.getId());
|
// 没有手机号用名字注册
|
||||||
|
if ("省防指".equals(organizationsService.getById(model.getOrganization()).getName())
|
||||||
|
&& StringUtils.isBlank(model.getPhone())){
|
||||||
|
|
||||||
|
userService.register( model.getName(), model.getId());
|
||||||
|
}else{
|
||||||
|
userService.register( model.getPhone(), model.getId());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return ResultJson.ok(save);
|
return ResultJson.ok(save);
|
||||||
|
|
|
||||||
|
|
@ -1,12 +1,14 @@
|
||||||
package com.whdc.model.dto;
|
package com.whdc.model.dto;
|
||||||
|
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Author xusan
|
* @Author xusan
|
||||||
* @Date 2024/5/14 15:17
|
* @Date 2024/5/14 15:17
|
||||||
* @Notes
|
* @Notes
|
||||||
**/
|
**/
|
||||||
|
@Data
|
||||||
public class CommDto extends FindPageDto {
|
public class CommDto extends FindPageDto {
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -39,4 +39,8 @@ public class AbUdR extends Model<AbUdR> implements Serializable {
|
||||||
@TableField("SORT")
|
@TableField("SORT")
|
||||||
@ApiModelProperty(value = "序号")
|
@ApiModelProperty(value = "序号")
|
||||||
private Integer sort;
|
private Integer sort;
|
||||||
|
|
||||||
|
@TableField("TYPE")
|
||||||
|
@ApiModelProperty(value = "0:组织,1:单位")
|
||||||
|
private String type;
|
||||||
}
|
}
|
||||||
|
|
@ -84,4 +84,5 @@ public class AddressBook extends Model<AddressBook> implements Serializable {
|
||||||
@TableField(exist = false)
|
@TableField(exist = false)
|
||||||
@ApiModelProperty(value = "创建人id")
|
@ApiModelProperty(value = "创建人id")
|
||||||
private String createId;
|
private String createId;
|
||||||
|
|
||||||
}
|
}
|
||||||
Loading…
Reference in New Issue