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