对接前端列表启用、停用功能.

pull/12/head
chen.ma 3 years ago
parent 7ce2c86c1a
commit a90b24dcc4

@ -53,4 +53,12 @@ public interface NotifyService {
*/ */
void delete(NotifyReqDTO reqDTO); void delete(NotifyReqDTO reqDTO);
/**
* .
*
* @param id
* @param status
*/
void enableNotify(String id, Integer status);
} }

@ -96,6 +96,14 @@ public class NotifyServiceImpl implements NotifyService {
notifyInfoMapper.delete(updateWrapper); notifyInfoMapper.delete(updateWrapper);
} }
@Override
public void enableNotify(String id, Integer status) {
NotifyInfo notifyInfo = new NotifyInfo();
notifyInfo.setId(Long.parseLong(id));
notifyInfo.setEnable(status);
notifyInfoMapper.updateById(notifyInfo);
}
private List<NotifyInfo> listNotifyCommon(String type, String[] parseKey) { private List<NotifyInfo> listNotifyCommon(String type, String[] parseKey) {
LambdaQueryWrapper<NotifyInfo> queryWrapper = Wrappers.lambdaQuery(NotifyInfo.class) LambdaQueryWrapper<NotifyInfo> queryWrapper = Wrappers.lambdaQuery(NotifyInfo.class)
.eq(NotifyInfo::getTenantId, parseKey[2]) .eq(NotifyInfo::getTenantId, parseKey[2])

@ -57,4 +57,10 @@ public class NotifyController {
return Results.success(); return Results.success();
} }
@PostMapping("/enable/{id}/{status}")
public Result enableNotify(@PathVariable("id") String id, @PathVariable("status") Integer status) {
notifyService.enableNotify(id, status);
return Results.success();
}
} }

Loading…
Cancel
Save