记得上下班打卡 | git大法好,push需谨慎

Commit edeb9eca authored by 胡佳晨's avatar 胡佳晨

临时 过滤 券状态

parent 46003f2b
package com.liquidnet.client.admin.web.controller.zhengzai.tools;
import com.liquidnet.client.admin.common.core.controller.BaseController;
import com.liquidnet.client.admin.common.core.domain.AjaxResult;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.*;
@Controller
@RequestMapping("/tools")
public class ToolsBaseController extends BaseController {
private String prefix = "zhengzai/tools";
@GetMapping()
public String tools() {
return prefix + "/tools";
}
@GetMapping(value = "/details/{id}")
public String detailsRoadShow(@PathVariable("id") Integer id, ModelMap mmap) {
if (id == 1) {
return prefix + "/fun1";
} else {
return prefix + "/edit";
}
}
@PostMapping("/export/mobile")
@ResponseBody
public AjaxResult exportMobile(Integer mobileType) {
System.out.println(mobileType);
return toAjax(mobileType);
}
}
<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
<head>
<th:block th:include="include :: header('工具库')"/>
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
<div class="form-group">
<div class="radio check-box">
<input type="radio" value="1" name="mobileType" checked> 购票用户</label>
</div>
<div class="radio check-box">
<input type="radio" value="2" name="mobileType"> 下单用户</label>
</div>
</div>
</div>
<th:block th:include="include :: footer"/>
<script th:inline="javascript">
var prefix = ctx + "/tools";
function submitHandler() {
// $.operate.save(prefix + "/export/mobile", $('#form-fun1-edit').serialize());
var param = {
"mobileType": document.getElementsByName("mobileType")[0].checked ? 1 : 2
};
// $.operate.save(prefix + "/export/mobile", param);
$.operate.post(prefix + "/export/mobile", param, function (res) {
});
}
</script>
</body>
</html>
<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
<head>
<th:block th:include="include :: header('工具库')"/>
</head>
<style>
td {
horiz-align: center;
text-align: left;
padding: 10px;
}
</style>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
<form class="form-horizontal m" id="form-member-edit">
<div class="form-group">
<button id="fun1" type="button" class="btn btn-w-m btn-success" href="javascript:void(0)"
onclick="$.operate.edit(1)">
导出演出订单手机号
</button>
</div>
</form>
</div>
<th:block th:include="include :: footer"/>
<script th:inline="javascript">
var prefix = ctx+"tools/";
console.log(ctx);
var options = {
url: prefix,
modalName: "",
updateUrl: prefix + "details/{id}"
};
$.table.init(options);
var fun1Flag = [[${@permission.hasPermi('tools:fun1')}]];
if (fun1Flag == "hidden") {
document.getElementById("fun1").style.display = "none";
}
</script>
</body>
</html>
......@@ -163,8 +163,6 @@ public class CandyUserCouponBasicDto implements Serializable, Cloneable {
this.setUid(uid);
this.setState(1);
this.setBindAt(LocalDateTime.now());
// TODO: 2021/9/1
this.setBindAt(commonCouponBasicDto.getEffectAt());
this.setDuedAt(commonCouponBasicDto.getExpireAt());
......
......@@ -255,13 +255,13 @@ public class CouponBaseUtil {
//券状态
Integer data;
if (state.equals(1)) {
if (currentTime.isAfter(expireAt)) {
data = 3;
} else if (currentTime.isBefore(effectAt)) {
data = 31;
} else {
// if (currentTime.isAfter(expireAt)) {
// data = 3;
// } else if (currentTime.isBefore(effectAt)) {
// data = 31;
// } else {
data = state;
}
// }
} else {
data = state;
}
......
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