Commit de68a6c0 by 徐高华

应用模板过滤

parent 93c9a3fd
......@@ -7,12 +7,9 @@ import org.apache.ibatis.annotations.Param;
import com.gic.haoban.manage.service.entity.TabHaobanTemplateEnterpriseRelation;
public interface TabHaobanTemplateEnterpriseRelationMapper {
int deleteByPrimaryKey(String templateEnterpriseRelationId);
int insert(TabHaobanTemplateEnterpriseRelation record);
int insertSelective(TabHaobanTemplateEnterpriseRelation record);
TabHaobanTemplateEnterpriseRelation selectByPrimaryKey(String templateEnterpriseRelationId);
int updateByPrimaryKeySelective(TabHaobanTemplateEnterpriseRelation record);
......
......@@ -20,11 +20,7 @@
from tab_haoban_template_enterprise_relation
where template_enterprise_relation_id = #{templateEnterpriseRelationId,jdbcType=VARCHAR}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.String">
delete
from tab_haoban_template_enterprise_relation
where template_enterprise_relation_id = #{templateEnterpriseRelationId,jdbcType=VARCHAR}
</delete>
<insert id="insert" parameterType="com.gic.haoban.manage.service.entity.TabHaobanTemplateEnterpriseRelation">
insert into tab_haoban_template_enterprise_relation (template_enterprise_relation_id, wx_enterprise_id,
application_template_id, status_flag, create_time,
......@@ -34,56 +30,7 @@
#{createTime,jdbcType=TIMESTAMP},
#{updateTime,jdbcType=TIMESTAMP}, #{wxEnterpriseName,jdbcType=VARCHAR})
</insert>
<insert id="insertSelective"
parameterType="com.gic.haoban.manage.service.entity.TabHaobanTemplateEnterpriseRelation">
insert into tab_haoban_template_enterprise_relation
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="templateEnterpriseRelationId != null">
template_enterprise_relation_id,
</if>
<if test="wxEnterpriseId != null">
wx_enterprise_id,
</if>
<if test="wxEnterpriseName != null">
wx_enterprise_name,
</if>
<if test="applicationTemplateId != null">
application_template_id,
</if>
<if test="statusFlag != null">
status_flag,
</if>
<if test="createTime != null">
create_time,
</if>
<if test="updateTime != null">
update_time,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="templateEnterpriseRelationId != null">
#{templateEnterpriseRelationId,jdbcType=VARCHAR},
</if>
<if test="wxEnterpriseId != null">
#{wxEnterpriseId,jdbcType=VARCHAR},
</if>
<if test="wxEnterpriseName != null">
#{wxEnterpriseName,jdbcType=VARCHAR},
</if>
<if test="applicationTemplateId != null">
#{applicationTemplateId,jdbcType=VARCHAR},
</if>
<if test="statusFlag != null">
#{statusFlag,jdbcType=INTEGER},
</if>
<if test="createTime != null">
#{createTime,jdbcType=TIMESTAMP},
</if>
<if test="updateTime != null">
#{updateTime,jdbcType=TIMESTAMP},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective"
parameterType="com.gic.haoban.manage.service.entity.TabHaobanTemplateEnterpriseRelation">
update tab_haoban_template_enterprise_relation
......
......@@ -22,7 +22,6 @@ import org.springframework.web.bind.annotation.RestController;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.gic.commons.util.CollectionUtil;
import com.gic.commons.util.EntityUtil;
import com.gic.haoban.base.api.common.pojo.dto.WebLoginDTO;
import com.gic.haoban.common.anno.IgnoreLogin;
......@@ -101,12 +100,26 @@ public class ApplicationController extends WebBaseController {
String wxEnterpriseIds = o == null ? "" : o.toString();
if (!wxEnterpriseIds.contains(wxEnterpriseId)) {
Iterator<ApplicationDTO> it = list.iterator();
// 判断模板
List<String> tempIdList = null ;
List<ApplicationDTO> tempList = this.applicationApiService.listApplicationByWxEnterpriseId(wxEnterpriseId) ;
if(CollectionUtils.isNotEmpty(tempList)) {
tempIdList = tempList.stream().map(dto->dto.getApplicationId()).collect(Collectors.toList()) ;
}
while (it.hasNext()) {
ApplicationDTO s = it.next();
// 我的客户、营销任务、看数据、云日报、月指标、商品中心、订单评价、扫码核销、E袋洗、佣金结算
if(Arrays.asList("11111","11114","11121","11122").contains(s.getApplicationId())) {
it.remove();
}
// 11123E袋洗 11124佣金结算
if(CollectionUtils.isNotEmpty(tempIdList)) {
if(Arrays.asList("11123","11124").contains(s.getApplicationId())) {
if(!tempIdList.contains(s.getApplicationId())) {
it.remove();
}
}
}
}
}
//开启
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment