Commit ec486450 by huluobin

后台发券

parent abeb73f5
......@@ -49,4 +49,11 @@ public interface TakeLeaveEventCmdService {
* @return
*/
List<StoreTechnician> queryCheckTechnicianList(Integer id, Integer departmentId);
/**
* 总后台驳回请假
*
* @param takeLeaveEventId
*/
void adminRefuseTakeLeaveEvent(Integer takeLeaveEventId);
}
......@@ -56,6 +56,7 @@ public class TakeLeaveEventCmdServiceImpl implements TakeLeaveEventCmdService {
private final OvertimeRecordMapper overtimeRecordRepository;
private final OverTimeRecordLogMapper overTimeRecordLogRepository;
private final MessageMapper messageMapper;
private final StoreManageMapper storeManageMapper;
@Override
public void applyTakeLeave(ApplyTakeLeaveCommand cmd) {
......@@ -243,7 +244,6 @@ public class TakeLeaveEventCmdServiceImpl implements TakeLeaveEventCmdService {
return page;
}
private final StoreManageMapper storeManageMapper;
@Override
public List<StoreTechnician> queryCheckTechnicianList(Integer technicianId, Integer departmentId) {
......@@ -255,4 +255,24 @@ public class TakeLeaveEventCmdServiceImpl implements TakeLeaveEventCmdService {
storeTechnician = storeTechnicianRepository.selectById((storeManage.getMasterUserId()));
return Lists.newArrayList(storeTechnician);
}
@Override
public void adminRefuseTakeLeaveEvent(Integer takeLeaveEventId) {
TakeLeaveEvent takeLeaveEvent = takeLeaveEventRepository.selectById(takeLeaveEventId);
//如果是通过的加班申请被驳回
if (takeLeaveEvent.getType().equals(TakeLeaveEvent.TYPE_OVER_TIME) &&
takeLeaveEvent.getStatus().equals(TakeLeaveEvent.STATUS_APPROVAL_PASS)) {
OvertimeRecord overtimeRecord = overtimeRecordRepository.selectOne(new LambdaQueryWrapper<OvertimeRecord>()
.eq(OvertimeRecord::getTakeLeaveEventId, takeLeaveEvent.getId()));
List<OverTimeRecordLog> overTimeRecordLogList = overTimeRecordLogRepository.selectList(new LambdaQueryWrapper<OverTimeRecordLog>()
.eq(OverTimeRecordLog::getOverTimeRecordId, overtimeRecord.getId()));
overTimeRecordLogList.forEach(overTimeRecordLog -> {
});
}
}
}
......@@ -120,6 +120,7 @@ public class CouponCustomerRelevance implements Serializable {
* @return
*/
public static CouponCustomerRelevance getInstance(Coupon coupon) {
CouponCustomerRelevance customerRelevance = CouponCustomerRelevance.builder()
//使用条件
.condition1(coupon.getCondition1())
......@@ -151,7 +152,8 @@ public class CouponCustomerRelevance implements Serializable {
customerRelevance.setValidEndTime(coupon.getValidEndTime());
} else {
long startMills = System.currentTimeMillis();
long endMills = startMills + coupon.getValidDate() * 24 * 60 * 60 * 1000;
//必须加L否则有精度错误
long endMills = startMills + coupon.getValidDate() * 24 * 60 * 60 * 1000L;
Date startTime = new Date(startMills);
Date endTime = new Date(endMills);
customerRelevance.setValidStartTime(startTime);
......
......@@ -38,7 +38,6 @@ public class LogAspect {
* @within和@target针对类的注解,
* @annotation是针对方法的注解,为自定义注解
*/
// @Pointcut("execution(public * com.*.web..*.*(..))")
@Pointcut("@within(org.springframework.web.bind.annotation.RestController)")
public void point() {
......
......@@ -28,7 +28,6 @@ public class TakeLeaveEventController {
private final TakeLeaveEventCmdService takeLeaveEventCmdService;
@ApiOperation("/申请请假")
@PostMapping("/technician/takeLeave/applyTakeLeave")
public JsonResult<Void> applyTakeLeave(@RequestHeader String token,
......@@ -77,4 +76,11 @@ public class TakeLeaveEventController {
takeLeaveEventCmdService.approvalTakeLeave(cmd);
return JsonResult.success();
}
@ApiOperation("/总后台驳回请假")
@PostMapping("/admin/takeLeave/adminRefuseTakeLeaveEvent/{takeLeaveEventId}")
public JsonResult<Void> adminRefuseTakeLeaveEvent(@PathVariable Integer takeLeaveEventId) {
takeLeaveEventCmdService.adminRefuseTakeLeaveEvent(takeLeaveEventId);
return JsonResult.success();
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment