企业列表出来了
parent
42d0f186be
commit
89a6836a82
|
@ -133,13 +133,6 @@ public class MyApiController extends BaseController
|
||||||
Long userId = SecurityUtils.getUserId();
|
Long userId = SecurityUtils.getUserId();
|
||||||
myApi.setUserId(userId);
|
myApi.setUserId(userId);
|
||||||
MyApi myApi1 = myApiService.selectMyApiByUserIdAndApiId(userId, myApi.getApiId());
|
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();
|
LocalDateTime now = LocalDateTime.now();
|
||||||
|
|
||||||
|
@ -155,6 +148,14 @@ public class MyApiController extends BaseController
|
||||||
// 将Instant转换为Date
|
// 将Instant转换为Date
|
||||||
Date date = Date.from(instant);
|
Date date = Date.from(instant);
|
||||||
myApi.setMyTime(date);
|
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");
|
myApi.setMyStates("Y");
|
||||||
return toAjax(myApiService.save(myApi));
|
return toAjax(myApiService.save(myApi));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue