refactor: 接口调整
This commit is contained in:
parent
a078896306
commit
9bc028e89f
@ -12,7 +12,9 @@ import com.pnkx.domain.vo.PxCardRecordVo;
|
|||||||
import com.pnkx.service.*;
|
import com.pnkx.service.*;
|
||||||
import com.pnkx.system.domain.SysNotice;
|
import com.pnkx.system.domain.SysNotice;
|
||||||
import com.pnkx.system.domain.SysNoticeRead;
|
import com.pnkx.system.domain.SysNoticeRead;
|
||||||
|
import com.pnkx.system.service.ISysConfigService;
|
||||||
import com.pnkx.system.service.ISysNoticeService;
|
import com.pnkx.system.service.ISysNoticeService;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.web.bind.annotation.GetMapping;
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
@ -51,6 +53,10 @@ public class PxAdminController extends BaseController {
|
|||||||
private ISysNoticeService noticeService;
|
private ISysNoticeService noticeService;
|
||||||
@Resource
|
@Resource
|
||||||
private IPxCommemorationDayService pxCommemorationDayService;
|
private IPxCommemorationDayService pxCommemorationDayService;
|
||||||
|
@Resource
|
||||||
|
private IPxMenstruationRecordService pxMenstruationRecordService;
|
||||||
|
@Resource
|
||||||
|
private ISysConfigService configService;
|
||||||
/**
|
/**
|
||||||
* 全文检索
|
* 全文检索
|
||||||
*/
|
*/
|
||||||
@ -146,6 +152,16 @@ public class PxAdminController extends BaseController {
|
|||||||
// 纪念日
|
// 纪念日
|
||||||
List<PxCommemorationDay> commemorationDayList = pxCommemorationDayService.getCommemorationDayList(null);
|
List<PxCommemorationDay> commemorationDayList = pxCommemorationDayService.getCommemorationDayList(null);
|
||||||
result.put("commemoration", commemorationDayList);
|
result.put("commemoration", commemorationDayList);
|
||||||
|
|
||||||
|
// 姨妈助手
|
||||||
|
List<PxMenstruationRecord> pxMenstruationRecords = pxMenstruationRecordService.selectMenstruationRecordList(null);
|
||||||
|
result.put("menstruation", pxMenstruationRecords);
|
||||||
|
// 姨妈助手设置
|
||||||
|
JSONObject menstruationAssistantSetting = new JSONObject();
|
||||||
|
menstruationAssistantSetting.put("cycle", configService.selectConfigByKey("ymzq"));
|
||||||
|
menstruationAssistantSetting.put("duration", configService.selectConfigByKey("ymsc"));
|
||||||
|
menstruationAssistantSetting.put("state", configService.selectConfigByKey("ymdqzt"));
|
||||||
|
result.put("menstruationAssistantSetting", menstruationAssistantSetting);
|
||||||
return AjaxResult.success(result);
|
return AjaxResult.success(result);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -50,12 +50,12 @@
|
|||||||
icon, date, `repeat`, order_num, del_flag, version, create_by, create_time, update_by, update_time, remark
|
icon, date, `repeat`, order_num, del_flag, version, create_by, create_time, update_by, update_time, remark
|
||||||
from px_commemoration_day
|
from px_commemoration_day
|
||||||
where
|
where
|
||||||
( `repeat` = 1 AND TIMESTAMPDIFF( DAY, now(), CONCAT( LEFT ( now(), 4 ), RIGHT ( date, 15 ))) < 5
|
( `repeat` = 1 AND TIMESTAMPDIFF( DAY, now(), CONCAT( LEFT ( now(), 4 ), RIGHT ( date, 15 ))) < 30
|
||||||
AND TIMESTAMPDIFF( DAY, now(), CONCAT( LEFT ( now(), 4 ), RIGHT ( date, 15 ))) > 0
|
AND TIMESTAMPDIFF( DAY, now(), CONCAT( LEFT ( now(), 4 ), RIGHT ( date, 15 ))) > -1
|
||||||
)
|
)
|
||||||
OR (
|
OR (
|
||||||
`repeat` = 0
|
`repeat` = 0
|
||||||
AND TIMESTAMPDIFF( DAY, now(), date ) < 5 AND TIMESTAMPDIFF( DAY, now(), date ) > 0)
|
AND TIMESTAMPDIFF( DAY, now(), date ) < 30 AND TIMESTAMPDIFF( DAY, now(), date ) > -1)
|
||||||
and del_flag = '0'
|
and del_flag = '0'
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user