时间工具类-添加Date日期转换成指定格式的日期字符串
This commit is contained in:
parent
261f565469
commit
6aeb2f8719
@ -2,6 +2,7 @@ package cn.iocoder.yudao.framework.common.util.date;
|
||||
|
||||
import cn.hutool.core.date.LocalDateTimeUtil;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.time.*;
|
||||
import java.util.Calendar;
|
||||
import java.util.Date;
|
||||
@ -29,6 +30,18 @@ public class DateUtils {
|
||||
|
||||
public static final String FORMAT_HOUR_MINUTE_SECOND = "HH:mm:ss";
|
||||
|
||||
/**
|
||||
* 根据传入的时间格式,将Date对象,转换成对应的时间格式
|
||||
* @param date
|
||||
* @param format
|
||||
* @return
|
||||
*/
|
||||
public static String dateFormat(Date date, String format) {
|
||||
SimpleDateFormat formatter = new SimpleDateFormat(format);
|
||||
String formattedDate = formatter.format(date);
|
||||
return formattedDate ;
|
||||
}
|
||||
|
||||
/**
|
||||
* 将 LocalDateTime 转换成 Date
|
||||
*
|
||||
|
@ -0,0 +1,25 @@
|
||||
package cn.iocoder.yudao.module.system.api.subscribe;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
|
||||
import cn.iocoder.yudao.module.system.api.subscribe.dto.SubscribeMessageReqDTO;
|
||||
import cn.iocoder.yudao.module.system.enums.ApiConstants;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import org.springframework.cloud.openfeign.FeignClient;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
|
||||
@FeignClient(name = ApiConstants.NAME) // TODO 芋艿:fallbackFactory =
|
||||
@Tag(name = "RPC 服务 - 微信小程序订阅消息发送")
|
||||
public interface SubscribeMessageSendApi {
|
||||
|
||||
String PREFIX = ApiConstants.PREFIX + "/subscribe/send";
|
||||
|
||||
@PostMapping(PREFIX + "/send-approval-result-notification")
|
||||
@Operation(summary = "发送审批结果通知")
|
||||
CommonResult<Long> sendApprovalResultNotification(SubscribeMessageReqDTO reqDTO);
|
||||
|
||||
@PostMapping(PREFIX + "/send-process-todo-reminder")
|
||||
@Operation(summary = "发送OA流程待办提醒")
|
||||
CommonResult<Long> sendProcessToDoReminder(SubscribeMessageReqDTO reqDTO);
|
||||
}
|
Loading…
Reference in New Issue
Block a user