|
|
@@ -91,13 +91,13 @@ public class CouponSendService extends BaseService<CouponSend> {
|
|
|
return ResponseResultUtil.success(map);
|
|
|
} else {
|
|
|
//region 新建
|
|
|
- this.insertCouponSend(couponSendVO);
|
|
|
+ CouponSend couponSend = this.insertCouponSend(couponSendVO);
|
|
|
//endregion
|
|
|
// 返回请求数据时系统的当前时间
|
|
|
LocalDateTime now = LocalDateTime.now();
|
|
|
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
|
|
|
- couponSendVO.setNowTime(now.format(formatter));
|
|
|
- return ResponseResultUtil.success(couponSendVO);
|
|
|
+ couponSend.setNowTime(now.format(formatter));
|
|
|
+ return ResponseResultUtil.success(couponSend);
|
|
|
}
|
|
|
|
|
|
// 20240801
|
|
|
@@ -169,7 +169,7 @@ public class CouponSendService extends BaseService<CouponSend> {
|
|
|
* @author : 寇珊珊
|
|
|
*/
|
|
|
@Transactional(rollbackFor = {Exception.class})
|
|
|
- public void insertCouponSend(CouponSendVO couponSendVO) {
|
|
|
+ public CouponSend insertCouponSend(CouponSendVO couponSendVO) {
|
|
|
//查询优惠券
|
|
|
List<CouponResponse> couponResponses = couponMapper.selectByCond(new CouponQuery());
|
|
|
//发出时间
|
|
|
@@ -179,6 +179,7 @@ public class CouponSendService extends BaseService<CouponSend> {
|
|
|
couponSendVO.setEndDate(couponSendVO.getSendDate().plusHours(linkValidTimes));
|
|
|
CouponSend couponSend = couponSendConvert.convertToPo(couponSendVO);
|
|
|
couponSendMapper.insert(couponSend);
|
|
|
+ return couponSend;
|
|
|
}
|
|
|
|
|
|
/**
|