添加留言板列表删除用户接口
This commit is contained in:
parent
dca4ddc639
commit
41112d2f32
@ -15,6 +15,8 @@ import java.util.Date;
|
|||||||
@SuppressWarnings("all")
|
@SuppressWarnings("all")
|
||||||
public class MyDateUtil {
|
public class MyDateUtil {
|
||||||
|
|
||||||
|
public static final String DATE_FORMAT_DATE_TIME = "yyyy-MM-dd HH:mm:ss";
|
||||||
|
|
||||||
public static void main(String[] args) {
|
public static void main(String[] args) {
|
||||||
|
|
||||||
System.out.println(getCurrentDateStr());
|
System.out.println(getCurrentDateStr());
|
||||||
@ -43,8 +45,6 @@ public class MyDateUtil {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static final String DATE_FORMAT_DATE_TIME = "yyyy-MM-dd HH:mm:ss";
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取表示所传入的Date对象的Calendar对象
|
* 获取表示所传入的Date对象的Calendar对象
|
||||||
*
|
*
|
||||||
|
|||||||
@ -24,6 +24,21 @@ public class XhpcMessageBoardController {
|
|||||||
@Resource
|
@Resource
|
||||||
XhpcMessageBoardService xhpcMessageBoardService;
|
XhpcMessageBoardService xhpcMessageBoardService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 平台删除所查看的用户列表中的指定用户
|
||||||
|
*
|
||||||
|
* @author WH
|
||||||
|
* @date 2022/1/13 18:43
|
||||||
|
* @since version-1.0
|
||||||
|
*/
|
||||||
|
@DeleteMapping("/platform/list/user")
|
||||||
|
public AjaxResult deleteListUser(@Validated @RequestBody UserInfo userInfo) {
|
||||||
|
|
||||||
|
xhpcMessageBoardService.deleteListUser(userInfo);
|
||||||
|
|
||||||
|
return AjaxResult.success();
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 平台给用户发送消息
|
* 平台给用户发送消息
|
||||||
*
|
*
|
||||||
@ -62,8 +77,8 @@ public class XhpcMessageBoardController {
|
|||||||
* @date 2022/1/15 18:47
|
* @date 2022/1/15 18:47
|
||||||
* @since version-1.0
|
* @since version-1.0
|
||||||
*/
|
*/
|
||||||
@GetMapping("/user/message")
|
@PatchMapping("/user/message")
|
||||||
public AjaxResult platformQueryMessage(UserQueryCondition userQueryCondition) throws Exception {
|
public AjaxResult platformQueryMessage(UserQueryCondition userQueryCondition) {
|
||||||
|
|
||||||
QueryUserMassageResponse queryUserMassageResponse = xhpcMessageBoardService.platformQueryMessage(userQueryCondition);
|
QueryUserMassageResponse queryUserMassageResponse = xhpcMessageBoardService.platformQueryMessage(userQueryCondition);
|
||||||
|
|
||||||
|
|||||||
@ -0,0 +1,48 @@
|
|||||||
|
package com.xhpc.board.domain;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
import javax.validation.constraints.Min;
|
||||||
|
import javax.validation.constraints.NotBlank;
|
||||||
|
import javax.validation.constraints.NotNull;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 用户信息
|
||||||
|
*
|
||||||
|
* @author WH
|
||||||
|
* @date 2022/1/18 17:34
|
||||||
|
* @since version-1.0
|
||||||
|
*/
|
||||||
|
@NoArgsConstructor
|
||||||
|
@Data
|
||||||
|
public class UserInfo {
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* userAccount
|
||||||
|
*/
|
||||||
|
@JsonProperty("userAccount")
|
||||||
|
@NotNull(message = "userAccount的参数名不正确或者userAccount的值为空,请检查传入参数")
|
||||||
|
@NotBlank(message = "userAccount的参数不能为''字符串,请检查传入参数")
|
||||||
|
private String userAccount;
|
||||||
|
/**
|
||||||
|
* userType
|
||||||
|
*/
|
||||||
|
@JsonProperty("userType")
|
||||||
|
@NotNull(message = "userType的参数名不正确或者userType的值为空,请检查传入参数")
|
||||||
|
@Min(value = 0, message = "userType的参数不能小于0,请检查传入参数")
|
||||||
|
private Integer userType;
|
||||||
|
/**
|
||||||
|
* tenantId
|
||||||
|
*/
|
||||||
|
@JsonProperty("tenantId")
|
||||||
|
private String tenantId;
|
||||||
|
/**
|
||||||
|
* tenantType
|
||||||
|
*/
|
||||||
|
@JsonProperty("tenantType")
|
||||||
|
private Integer tenantType;
|
||||||
|
|
||||||
|
}
|
||||||
@ -78,4 +78,14 @@ public interface XhpcMessageBoardService {
|
|||||||
*/
|
*/
|
||||||
QueryUserMassageResponse platformQueryMessage(UserQueryCondition userQueryCondition);
|
QueryUserMassageResponse platformQueryMessage(UserQueryCondition userQueryCondition);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除指定租户用户列表中的用户
|
||||||
|
*
|
||||||
|
* @param userInfo 指定用户信息
|
||||||
|
* @author WH
|
||||||
|
* @date 2022/1/18 17:39
|
||||||
|
* @since version-1.0
|
||||||
|
*/
|
||||||
|
void deleteListUser(UserInfo userInfo);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -366,4 +366,17 @@ public class XhpcMessageBoardServiceImpl implements XhpcMessageBoardService {
|
|||||||
return response;
|
return response;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@Transactional(rollbackFor = Exception.class)
|
||||||
|
public void deleteListUser(UserInfo userInfo) {
|
||||||
|
|
||||||
|
SysUser sysUser = tokenService.getLoginUser().getSysUser();
|
||||||
|
userInfo.setTenantId(sysUser.getTenantId());
|
||||||
|
userInfo.setTenantType(0);
|
||||||
|
UserQueryCondition userQueryCondition = new UserQueryCondition();
|
||||||
|
BeanUtils.copyProperties(userInfo, userQueryCondition);
|
||||||
|
xhpcMessageBoardReceiveUserMapper.updateHaveNewInfoIsNull(userQueryCondition);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user