getOrgIdListByUserEffId
This commit is contained in:
parent
6f7ee75ae7
commit
e4b64130c8
|
|
@ -19,6 +19,8 @@ public interface MktEffectiveMapper extends BaseMapper<MktEffective> {
|
||||||
|
|
||||||
List<MktEffectiveUserVO> selectAllUserEff(@Param("effType") Integer effType, @Param("delFlag") Integer delFlag);
|
List<MktEffectiveUserVO> selectAllUserEff(@Param("effType") Integer effType, @Param("delFlag") Integer delFlag);
|
||||||
|
|
||||||
|
Long getUserEffIdByCustId(@Param("custId") Long custId, @Param("delFlag") Integer delFlag);
|
||||||
|
|
||||||
@Select({"select warehouse_id, warehouse_name from drp_warehouse where del_flag = #{delFlag}"})
|
@Select({"select warehouse_id, warehouse_name from drp_warehouse where del_flag = #{delFlag}"})
|
||||||
List<DrpWarehouseAllVO> selectAllWareHouse(Integer delFlag);
|
List<DrpWarehouseAllVO> selectAllWareHouse(Integer delFlag);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,7 @@ package com.bonus.canteen.core.marketing.service.impl;
|
||||||
|
|
||||||
import cn.hutool.core.bean.BeanUtil;
|
import cn.hutool.core.bean.BeanUtil;
|
||||||
import cn.hutool.core.collection.CollUtil;
|
import cn.hutool.core.collection.CollUtil;
|
||||||
|
import cn.hutool.core.util.ObjectUtil;
|
||||||
import cn.hutool.json.JSONUtil;
|
import cn.hutool.json.JSONUtil;
|
||||||
import com.alibaba.fastjson.JSON;
|
import com.alibaba.fastjson.JSON;
|
||||||
import com.alibaba.fastjson.JSONObject;
|
import com.alibaba.fastjson.JSONObject;
|
||||||
|
|
@ -32,6 +33,7 @@ import com.bonus.common.houqin.i18n.I18n;
|
||||||
import com.bonus.common.houqin.utils.CopyListUtil;
|
import com.bonus.common.houqin.utils.CopyListUtil;
|
||||||
import com.bonus.common.houqin.utils.id.Id;
|
import com.bonus.common.houqin.utils.id.Id;
|
||||||
import com.bonus.common.security.utils.SecurityUtils;
|
import com.bonus.common.security.utils.SecurityUtils;
|
||||||
|
import com.bonus.system.api.model.LoginUser;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
|
@ -372,15 +374,14 @@ public class MktEffectiveServiceImpl extends ServiceImpl<MktEffectiveMapper, Mkt
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<Long> getOrgIdListByUser() {
|
public List<Long> getOrgIdListByUser() {
|
||||||
// PigxUser user = SecurityUtils.getUser();
|
LoginUser user = SecurityUtils.getLoginUser();
|
||||||
// if (ObjectUtil.isNull(user)) {
|
if (ObjectUtil.isNull(user)) {
|
||||||
// return new ArrayList();
|
return new ArrayList();
|
||||||
// } else {
|
} else {
|
||||||
// Long custEffId = user.getCustEffId();
|
long custId = user.getCustId();
|
||||||
// return ((MktEffectiveMapper)this.baseMapper).selectOrgIdListByEffId(custEffId);
|
Long custEffId = ((MktEffectiveMapper)this.baseMapper).getUserEffIdByCustId(custId, LeConstants.COMMON_NO);
|
||||||
// }
|
return ((MktEffectiveMapper)this.baseMapper).selectOrgIdListByEffId(custEffId);
|
||||||
//TODO SecurityUtils 里面需要 custEffId
|
}
|
||||||
return new ArrayList<>();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
||||||
|
|
@ -26,6 +26,15 @@
|
||||||
and me.del_flag = #{delFlag}
|
and me.del_flag = #{delFlag}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
<select id="getUserEffIdByCustId" resultType="java.lang.Long">
|
||||||
|
select med.eff_id
|
||||||
|
from cust_info ci
|
||||||
|
left join cust_org co on ci.org_id = co.org_id
|
||||||
|
left join mkt_effective_detail med on co.org_id = med.org_id
|
||||||
|
left join mkt_effective me on me.eff_id = med.eff_id
|
||||||
|
where me.del_flag = #{delFlag} and ci.cust_id = #{custId}
|
||||||
|
</select>
|
||||||
|
|
||||||
<!-- 获取生效范围名称,根据范围id列表 -->
|
<!-- 获取生效范围名称,根据范围id列表 -->
|
||||||
<select id="getEffNameStrByIdList" resultType="java.lang.String">
|
<select id="getEffNameStrByIdList" resultType="java.lang.String">
|
||||||
SELECT
|
SELECT
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue