选择性导出
This commit is contained in:
parent
bbd8c8f01d
commit
0d2940081e
|
|
@ -1,5 +1,6 @@
|
||||||
package com.bonus.base.api.domain;
|
package com.bonus.base.api.domain;
|
||||||
|
|
||||||
|
import com.bonus.common.core.web.domain.BaseEntity;
|
||||||
import lombok.AllArgsConstructor;
|
import lombok.AllArgsConstructor;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.NoArgsConstructor;
|
import lombok.NoArgsConstructor;
|
||||||
|
|
@ -15,7 +16,7 @@ import java.io.Serializable;
|
||||||
@Data
|
@Data
|
||||||
@AllArgsConstructor
|
@AllArgsConstructor
|
||||||
@NoArgsConstructor
|
@NoArgsConstructor
|
||||||
public class MaHouse implements Serializable {
|
public class MaHouse extends BaseEntity implements Serializable {
|
||||||
private static final long serialVersionUID = -11758888261312379L;
|
private static final long serialVersionUID = -11758888261312379L;
|
||||||
|
|
||||||
private Integer id;
|
private Integer id;
|
||||||
|
|
|
||||||
|
|
@ -8,6 +8,7 @@ import lombok.Setter;
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -47,10 +48,23 @@ public class BaseEntity implements Serializable
|
||||||
|
|
||||||
private String keyWord;
|
private String keyWord;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导出所选数据
|
||||||
|
*/
|
||||||
|
private List<Long> dataCondition;
|
||||||
|
|
||||||
/** 请求参数 */
|
/** 请求参数 */
|
||||||
@JsonInclude(JsonInclude.Include.NON_EMPTY)
|
@JsonInclude(JsonInclude.Include.NON_EMPTY)
|
||||||
private Map<String, Object> params;
|
private Map<String, Object> params;
|
||||||
|
|
||||||
|
public List<Long> getDataCondition() {
|
||||||
|
return dataCondition;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDataCondition(List<Long> dataCondition) {
|
||||||
|
this.dataCondition = dataCondition;
|
||||||
|
}
|
||||||
|
|
||||||
public String getSearchValue() {
|
public String getSearchValue() {
|
||||||
return searchValue;
|
return searchValue;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -67,6 +67,12 @@
|
||||||
OR ba.authorizing_phone LIKE CONCAT('%',#{keyWord},'%')
|
OR ba.authorizing_phone LIKE CONCAT('%',#{keyWord},'%')
|
||||||
)
|
)
|
||||||
</if>
|
</if>
|
||||||
|
<if test="dataCondition != null and dataCondition.size()>0">
|
||||||
|
AND ba.id in
|
||||||
|
<foreach collection="dataCondition" item="proId" index="index" open="(" separator="," close=")">
|
||||||
|
#{proId}
|
||||||
|
</foreach>
|
||||||
|
</if>
|
||||||
order by ba.sign_date desc
|
order by ba.sign_date desc
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -33,6 +33,12 @@
|
||||||
<if test="name != null and name != ''">
|
<if test="name != null and name != ''">
|
||||||
AND name like concat('%', #{name}, '%')
|
AND name like concat('%', #{name}, '%')
|
||||||
</if>
|
</if>
|
||||||
|
<if test="dataCondition != null and dataCondition.size()>0">
|
||||||
|
AND id in
|
||||||
|
<foreach collection="dataCondition" item="proId" index="index" open="(" separator="," close=")">
|
||||||
|
#{proId}
|
||||||
|
</foreach>
|
||||||
|
</if>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -96,6 +96,12 @@
|
||||||
<if test="name != null and name != ''">
|
<if test="name != null and name != ''">
|
||||||
and `NAME` like concat('%',#{name},'%')
|
and `NAME` like concat('%',#{name},'%')
|
||||||
</if>
|
</if>
|
||||||
|
<if test="dataCondition != null and dataCondition.size()>0">
|
||||||
|
AND ID in
|
||||||
|
<foreach collection="dataCondition" item="proId" index="index" open="(" separator="," close=")">
|
||||||
|
#{proId}
|
||||||
|
</foreach>
|
||||||
|
</if>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<update id="updateById">
|
<update id="updateById">
|
||||||
|
|
|
||||||
|
|
@ -74,6 +74,12 @@
|
||||||
<if test="stats != null and stats != ''">
|
<if test="stats != null and stats != ''">
|
||||||
and bmp.stats = #{stats,jdbcType=VARCHAR}
|
and bmp.stats = #{stats,jdbcType=VARCHAR}
|
||||||
</if>
|
</if>
|
||||||
|
<if test="dataCondition != null and dataCondition.size()>0">
|
||||||
|
AND bmp.id in
|
||||||
|
<foreach collection="dataCondition" item="proId" index="index" open="(" separator="," close=")">
|
||||||
|
#{proId}
|
||||||
|
</foreach>
|
||||||
|
</if>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
|
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
|
||||||
|
|
|
||||||
|
|
@ -47,6 +47,12 @@
|
||||||
OR pic_url LIKE CONCAT('%',#{keyWord},'%')
|
OR pic_url LIKE CONCAT('%',#{keyWord},'%')
|
||||||
)
|
)
|
||||||
</if>
|
</if>
|
||||||
|
<if test="dataCondition != null and dataCondition.size()>0">
|
||||||
|
AND id in
|
||||||
|
<foreach collection="dataCondition" item="proId" index="index" open="(" separator="," close=")">
|
||||||
|
#{proId}
|
||||||
|
</foreach>
|
||||||
|
</if>
|
||||||
ORDER BY id DESC
|
ORDER BY id DESC
|
||||||
</select>
|
</select>
|
||||||
<select id="queryByName" resultType="com.bonus.base.api.domain.BmSupplier">
|
<select id="queryByName" resultType="com.bonus.base.api.domain.BmSupplier">
|
||||||
|
|
@ -56,7 +62,7 @@
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<insert id="insert">
|
<insert id="insert">
|
||||||
insert into bm_supplier(
|
insert into bm_supplier
|
||||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||||
<if test="name != null">name,</if>
|
<if test="name != null">name,</if>
|
||||||
<if test="address != null">address,</if>
|
<if test="address != null">address,</if>
|
||||||
|
|
@ -66,7 +72,7 @@
|
||||||
<if test="scopeBusiness != null">scope_business,</if>
|
<if test="scopeBusiness != null">scope_business,</if>
|
||||||
<if test="notes != null">notes,</if>
|
<if test="notes != null">notes,</if>
|
||||||
<if test="picUrl != null">pic_url,</if>
|
<if test="picUrl != null">pic_url,</if>
|
||||||
<if test="isActive != null">is_active,</if>
|
is_active,
|
||||||
<if test="companyId != null">company_id</if>
|
<if test="companyId != null">company_id</if>
|
||||||
</trim>
|
</trim>
|
||||||
values
|
values
|
||||||
|
|
@ -79,7 +85,7 @@
|
||||||
<if test="scopeBusiness != null">#{scopeBusiness},</if>
|
<if test="scopeBusiness != null">#{scopeBusiness},</if>
|
||||||
<if test="notes != null">#{notes},</if>
|
<if test="notes != null">#{notes},</if>
|
||||||
<if test="picUrl != null">#{picUrl},</if>
|
<if test="picUrl != null">#{picUrl},</if>
|
||||||
"1",
|
1,
|
||||||
<if test="companyId != null">#{companyId}</if>
|
<if test="companyId != null">#{companyId}</if>
|
||||||
</trim>
|
</trim>
|
||||||
</insert>
|
</insert>
|
||||||
|
|
|
||||||
|
|
@ -26,6 +26,12 @@
|
||||||
<if test="name != null and name != ''">
|
<if test="name != null and name != ''">
|
||||||
and name like concat('%',#{name},'%')
|
and name like concat('%',#{name},'%')
|
||||||
</if>
|
</if>
|
||||||
|
<if test="dataCondition != null and dataCondition.size()>0">
|
||||||
|
AND id in
|
||||||
|
<foreach collection="dataCondition" item="proId" index="index" open="(" separator="," close=")">
|
||||||
|
#{proId}
|
||||||
|
</foreach>
|
||||||
|
</if>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="queryByName" resultType="com.bonus.base.api.domain.MaHouse">
|
<select id="queryByName" resultType="com.bonus.base.api.domain.MaHouse">
|
||||||
|
|
|
||||||
|
|
@ -162,6 +162,12 @@
|
||||||
<if test="code != null and code != ''">
|
<if test="code != null and code != ''">
|
||||||
and t.`CODE` like CONCAT(#{code},'%')
|
and t.`CODE` like CONCAT(#{code},'%')
|
||||||
</if>
|
</if>
|
||||||
|
<if test="dataCondition != null and dataCondition.size()>0">
|
||||||
|
AND t.id in
|
||||||
|
<foreach collection="dataCondition" item="proId" index="index" open="(" separator="," close=")">
|
||||||
|
#{proId}
|
||||||
|
</foreach>
|
||||||
|
</if>
|
||||||
ORDER BY t.`CODE`
|
ORDER BY t.`CODE`
|
||||||
</select>
|
</select>
|
||||||
<select id="selectCode" resultType="java.lang.String">
|
<select id="selectCode" resultType="java.lang.String">
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue