Просмотр исходного кода

Merge remote-tracking branch 'origin/master'

ZhangWenQiang 6 лет назад
Родитель
Сommit
b5e869be13

+ 30 - 0
happy-boot-module-hppay/src/main/java/org/jeecg/modules/company/controller/CompanyAuthenticationController.java

@@ -72,6 +72,36 @@ public class CompanyAuthenticationController {
 		result.setResult(pageList);
 		return result;
 	}
+
+
+
+	 /**
+	  * 分页列表查询
+	  * @param companyAuthentication
+	  * @param pageNo
+	  * @param pageSize
+	  * @param req
+	  * @return
+	  */
+	 @AutoLog(value = "企业审核-分页列表查询")
+	 @ApiOperation(value="企业审核-分页列表查询", notes="企业审核-分页列表查询")
+	 @GetMapping(value = "/list1")
+	 public Result<Page<CompanyAuthentication>> queryPageList1(CompanyAuthentication companyAuthentication,
+															   @RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
+															   @RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
+															   HttpServletRequest req) {
+		 Result<Page<CompanyAuthentication>> result = new Result<Page<CompanyAuthentication>>();
+		 Page<CompanyAuthentication> pageList = new Page<CompanyAuthentication>(pageNo,pageSize);
+		 pageList = companyAuthenticationService.queryPageList1(pageList,companyAuthentication);//通知公告消息
+		 log.info("查询当前页:"+pageList.getCurrent());
+		 log.info("查询当前页数量:"+pageList.getSize());
+		 log.info("查询结果数量:"+pageList.getRecords().size());
+		 log.info("数据总数:"+pageList.getTotal());
+		 result.setSuccess(true);
+		 result.setResult(pageList);;
+		 return result;
+	 }
+
 	
 	/**
 	  *   添加

+ 2 - 0
happy-boot-module-hppay/src/main/java/org/jeecg/modules/company/mapper/CompanyAuthenticationMapper.java

@@ -2,6 +2,7 @@ package org.jeecg.modules.company.mapper;
 
 import java.util.List;
 
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import org.apache.ibatis.annotations.Param;
 import org.jeecg.modules.company.entity.CompanyAuthentication;
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
@@ -14,4 +15,5 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
  */
 public interface CompanyAuthenticationMapper extends BaseMapper<CompanyAuthentication> {
 
+    List<CompanyAuthentication> queryPageList1(Page<CompanyAuthentication> page,@Param("CompanyAuthentication") CompanyAuthentication companyAuthentication);
 }

+ 42 - 0
happy-boot-module-hppay/src/main/java/org/jeecg/modules/company/mapper/xml/CompanyAuthenticationMapper.xml

@@ -2,4 +2,46 @@
 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 <mapper namespace="org.jeecg.modules.company.mapper.CompanyAuthenticationMapper">
 
+    <sql id="companyColumns">
+       a.id as "id",
+       a.user_id as "userId",
+       a.license_front as "licenseFront",
+       a.other_license as "otherLicense",
+       a.enterprise_name as "enterpriseName",
+       a.expiry_date as "expiryDate",
+       a.is_human_resource as "isHumanResource",
+       a.authentication_status as "authenticationStatus",
+       a.create_time as "createTime",
+       a.update_time as "updateTime",
+       a.del_flag as "delFlag"
+	</sql>
+
+    <sql id="companyJoins">
+
+    </sql>
+
+
+    <select id="queryPageList1" resultType="org.jeecg.modules.company.entity.CompanyAuthentication">
+        SELECT
+        <include refid="companyColumns"/>
+        FROM dp_enterprise_authentication a
+        <include refid="companyJoins"/>
+        <where>
+            1=1
+
+            <if test="CompanyAuthentication.enterpriseName != null and CompanyAuthentication.enterpriseName != ''">
+                and a.enterprise_name LIKE concat('%',#{CompanyAuthentication.enterpriseName},'%')
+            </if>
+
+            <if test="CompanyAuthentication.isHumanResource != null and (CompanyAuthentication.isHumanResource).toString != ''">
+                AND a.is_human_resource=#{CompanyAuthentication.isHumanResource}
+            </if>
+            <if test="CompanyAuthentication.authenticationStatus != null and (CompanyAuthentication.authenticationStatus).toString != ''">
+                AND a.authentication_status=#{CompanyAuthentication.authenticationStatus}
+            </if>
+
+        </where>
+
+    </select>
+
 </mapper>

+ 2 - 0
happy-boot-module-hppay/src/main/java/org/jeecg/modules/company/service/ICompanyAuthenticationService.java

@@ -1,5 +1,6 @@
 package org.jeecg.modules.company.service;
 
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import org.jeecg.modules.company.entity.CompanyAuthentication;
 import com.baomidou.mybatisplus.extension.service.IService;
 
@@ -11,4 +12,5 @@ import com.baomidou.mybatisplus.extension.service.IService;
  */
 public interface ICompanyAuthenticationService extends IService<CompanyAuthentication> {
 
+    Page<CompanyAuthentication> queryPageList1(Page<CompanyAuthentication> pageList, CompanyAuthentication companyAuthentication);
 }

+ 9 - 1
happy-boot-module-hppay/src/main/java/org/jeecg/modules/company/service/impl/CompanyAuthenticationServiceImpl.java

@@ -1,5 +1,6 @@
 package org.jeecg.modules.company.service.impl;
 
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import org.jeecg.modules.company.entity.CompanyAuthentication;
 import org.jeecg.modules.company.mapper.CompanyAuthenticationMapper;
 import org.jeecg.modules.company.service.ICompanyAuthenticationService;
@@ -7,6 +8,8 @@ import org.springframework.stereotype.Service;
 
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 
+import javax.annotation.Resource;
+
 /**
  * @Description: 企业审核
  * @Author: jeecg-boot
@@ -15,5 +18,10 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
  */
 @Service
 public class CompanyAuthenticationServiceImpl extends ServiceImpl<CompanyAuthenticationMapper, CompanyAuthentication> implements ICompanyAuthenticationService {
-
+    @Resource
+    private CompanyAuthenticationMapper companyAuthenticationMapper;
+    @Override
+    public Page<CompanyAuthentication> queryPageList1(Page<CompanyAuthentication> page, CompanyAuthentication companyAuthentication ) {
+        return page.setRecords(companyAuthenticationMapper.queryPageList1(page,companyAuthentication));
+    }
 }