skyline 2 éve
szülő
commit
6083e4d389

+ 2 - 2
admin/src/main/java/com/kym/admin/controller/InvestorInfoController.java

@@ -37,7 +37,7 @@ public class InvestorInfoController {
     R<?> create(@RequestBody InvestorInfo investorInfo) {
         investorInfo.setId(null);
         investorInfo.setStationName(KymCache.INSTANCE.getStationNameById(investorInfo.getStationId()));
-        CommUtil.asserts(investorInfo.getAdminUserId() == null, "请选择关联客户");
+        CommUtil.asserts(investorInfo.getAdminUserId() != null, "请选择关联客户");
         return R.success(investorInfoService.save(investorInfo));
     }
 
@@ -49,7 +49,7 @@ public class InvestorInfoController {
     @PostMapping("/update")
     R<?> update(@RequestBody InvestorInfo investorInfo) {
         investorInfo.setStationName(KymCache.INSTANCE.getStationNameById(investorInfo.getStationId()));
-        CommUtil.asserts(investorInfo.getAdminUserId() == null, "请选择关联客户");
+        CommUtil.asserts(investorInfo.getAdminUserId() != null, "请选择关联客户");
         return R.success(investorInfoService.updateById(investorInfo));
     }
 

+ 1 - 0
service/src/main/java/com/kym/service/admin/impl/InvestorInfoServiceImpl.java

@@ -30,6 +30,7 @@ public class InvestorInfoServiceImpl extends ServiceImpl<InvestorInfoMapper, Inv
         var list = lambdaQuery()
                 .like(CommUtil.isNotEmptyAndNull(params.getMobilePhone()), InvestorInfo::getTelephone, params.getMobilePhone())
                 .like(CommUtil.isNotEmptyAndNull(params.getUsername()), InvestorInfo::getAdminUserName, params.getUsername())
+                .orderByDesc(InvestorInfo::getUpdateTime)
                 .list();
         return new PageBean<>(list);
     }