Merge remote-tracking branch 'origin/guoshengxiong' into guoshengxiong
This commit is contained in:
commit
36918ca6d3
@ -121,11 +121,17 @@ public class XzVisitorManageRecordController {
|
||||
@PostMapping(value = "/save")
|
||||
public Result<Object> save(@RequestBody Map<String, Object> map) {
|
||||
if (map.get("beginTime") != null) {
|
||||
String[] split = map.get("beginTime").toString().split(":");
|
||||
if (split.length == 2) {
|
||||
map.put("beginTime", map.get("beginTime") + ":00");
|
||||
}
|
||||
}
|
||||
if (map.get("endTime") != null) {
|
||||
String[] split = map.get("endTime").toString().split(":");
|
||||
if (split.length == 2) {
|
||||
map.put("endTime", map.get("endTime") + ":00");
|
||||
}
|
||||
}
|
||||
XzVisitorManageRecord xzVisitorManageRecord = JSONObject.parseObject(JSON.toJSONString(map), XzVisitorManageRecord.class);
|
||||
xzVisitorManageRecord.setCreateTime(new Date());
|
||||
xzVisitorManageRecord.setIsEnable(DateUtil.compare(xzVisitorManageRecord.getEndTime(), new Date()) > 0 ? 1 : 0);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user