产权公司

This commit is contained in:
weicw
2023-06-06 10:26:38 +08:00
parent a53406898f
commit f1b1ab0642
5 changed files with 16 additions and 7 deletions

View File

@@ -20,6 +20,9 @@
<if test="param.companyType != null">
AND a.company_type = #{param.companyType}
</if>
<if test="param.companyTypeMultiple != null">
AND a.company_type_multiple -> '$[*]' = CONCAT('%', #{param.companyTypeMultiple}, '%')
</if>
<if test="param.companyLogo != null">
AND a.company_logo LIKE CONCAT('%', #{param.companyLogo}, '%')
</if>

View File

@@ -38,9 +38,9 @@ public class TowerFallController extends BaseController {
public ApiResult<PageResult<TowerFall>> page(TowerFallParam param) {
PageParam<TowerFall, TowerFallParam> page = new PageParam<>(param);
page.setDefaultOrder("create_time desc");
return success(towerFallService.page(page, page.getWrapper()));
// return success(towerFallService.page(page, page.getWrapper()));
// 使用关联查询
//return success(towerFallService.pageRel(param));
return success(towerFallService.pageRel(param));
}
@PreAuthorize("hasAuthority('tower:towerFall:list')")
@@ -50,9 +50,9 @@ public class TowerFallController extends BaseController {
public ApiResult<List<TowerFall>> list(TowerFallParam param) {
PageParam<TowerFall, TowerFallParam> page = new PageParam<>(param);
page.setDefaultOrder("create_time desc");
return success(towerFallService.list(page.getOrderWrapper()));
// return success(towerFallService.list(page.getOrderWrapper()));
// 使用关联查询
//return success(towerFallService.listRel(param));
return success(towerFallService.listRel(param));
}
@PreAuthorize("hasAuthority('tower:towerFall:list')")

View File

@@ -1,6 +1,7 @@
package com.gxwebsoft.tower.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import java.time.LocalDateTime;
import com.baomidou.mybatisplus.annotation.TableLogic;
@@ -38,7 +39,11 @@ public class TowerFall implements Serializable {
private String factory;
@ApiModelProperty(value = "产权单位")
private String companyId;
private Integer companyId;
@ApiModelProperty(value = "产权单位名称")
@TableField(exist = false)
private String companyName;
@ApiModelProperty(value = "出厂日期")
private Date factoryDate;

View File

@@ -4,8 +4,9 @@
<!-- 关联查询sql -->
<sql id="selectSql">
SELECT a.*
SELECT a.*,b.company_name as companyName
FROM tower_fall a
left join sys_company b on a.company_id = b.company_id
<where>
<if test="param.id != null">
AND a.id = #{param.id}

View File

@@ -36,7 +36,7 @@ public class TowerFallParam extends BaseParam {
private String factory;
@ApiModelProperty(value = "产权单位")
private String companyId;
private Integer companyId;
@ApiModelProperty(value = "出厂日期")
private String factoryDate;