企业列表出来了
parent
42d0f186be
commit
89a6836a82
|
@ -133,13 +133,6 @@ public class MyApiController extends BaseController
|
|||
Long userId = SecurityUtils.getUserId();
|
||||
myApi.setUserId(userId);
|
||||
MyApi myApi1 = myApiService.selectMyApiByUserIdAndApiId(userId, myApi.getApiId());
|
||||
if (myApi1!=null) {
|
||||
myApi.setMyNum(myApi1.getMyNum()+myApi.getMyNum());
|
||||
if(myApi1.getMyStates().equals("N")){
|
||||
myApi.setMyStates("Y");
|
||||
}
|
||||
return toAjax(myApiService.updateById(myApi));
|
||||
}
|
||||
// 获取当前时间(没有时区)
|
||||
LocalDateTime now = LocalDateTime.now();
|
||||
|
||||
|
@ -155,6 +148,14 @@ public class MyApiController extends BaseController
|
|||
// 将Instant转换为Date
|
||||
Date date = Date.from(instant);
|
||||
myApi.setMyTime(date);
|
||||
if (myApi1!=null) {
|
||||
myApi.setMyNum(myApi1.getMyNum()+myApi.getMyNum());
|
||||
if(myApi1.getMyStates().equals("N")){
|
||||
myApi.setMyStates("Y");
|
||||
}
|
||||
return toAjax(myApiService.updateById(myApi));
|
||||
}
|
||||
|
||||
myApi.setMyStates("Y");
|
||||
return toAjax(myApiService.save(myApi));
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue