补充客户维护过保日期
This commit is contained in:
parent
5d0d6e01f8
commit
7f01513e1c
@ -77,17 +77,24 @@ public class ByCustomerController extends BaseController {
|
|||||||
@PostMapping
|
@PostMapping
|
||||||
public AjaxResult add(@RequestBody ByCustomer byCustomer) {
|
public AjaxResult add(@RequestBody ByCustomer byCustomer) {
|
||||||
|
|
||||||
// 这里没写完 须将SimpleDateFormat转换为Date类型
|
|
||||||
SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd");
|
|
||||||
Date date = new Date();
|
|
||||||
Calendar calendar = Calendar.getInstance();
|
|
||||||
calendar.setTime(date);
|
|
||||||
calendar.add(Calendar.DATE, 15);
|
|
||||||
df.format(calendar.getTime());
|
|
||||||
|
|
||||||
byCustomer.setCreateUserid(SecurityUtils.getLoginUser().getUser().getUserId());
|
try {
|
||||||
byCustomer.setCreateTime(date);
|
// 获取当天日期并增加15天为过保日期
|
||||||
byCustomer.setGbtime(date);
|
SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd");
|
||||||
|
Date date = new Date();
|
||||||
|
Calendar calendar = Calendar.getInstance();
|
||||||
|
calendar.setTime(date);
|
||||||
|
calendar.add(Calendar.DATE, 15);
|
||||||
|
String dateStr = df.format(calendar.getTime());
|
||||||
|
Date dataGuobao = df.parse(dateStr);
|
||||||
|
|
||||||
|
byCustomer.setCreateUserid(SecurityUtils.getLoginUser().getUser().getUserId());
|
||||||
|
byCustomer.setCreateTime(date);
|
||||||
|
byCustomer.setGbtime(dataGuobao);
|
||||||
|
} catch (Exception e){
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
|
||||||
// 判断电话号码是否存在
|
// 判断电话号码是否存在
|
||||||
ByCustomer byCustomer1 = new ByCustomer();
|
ByCustomer byCustomer1 = new ByCustomer();
|
||||||
byCustomer1.setLxdh(byCustomer.getLxdh());
|
byCustomer1.setLxdh(byCustomer.getLxdh());
|
||||||
|
Loading…
x
Reference in New Issue
Block a user