Browse Source

增加企业列表按创建时间倒序排序

wudi 1 year ago
parent
commit
341e25a1bc

+ 1 - 0
ruoyi-ent/src/main/java/com/ruoyi/enterprise/controller/CompanyController.java

@@ -80,6 +80,7 @@ public class CompanyController extends BaseController {
         // 模拟构件实例调用平台接口
 //        ComponentUtil.test001(param, "/company/company/component/"+company.getEntName());   // ---数据融合构件1
 
+        company.setCreaAt(new Date());
 
         return toAjax(companyService.insertCompany(company));
     }

+ 1 - 0
ruoyi-ent/src/main/resources/mapper/enterprise/CompanyMapper.xml

@@ -87,6 +87,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="updator != null  and updator != ''"> and updator = #{updator}</if>
             <if test="creator != null  and creator != ''"> and creator = #{creator}</if>
         </where>
+        order by crea_at desc
     </select>
 
     <select id="selectCompanyByEntGuid" parameterType="String" resultMap="CompanyResult">