update 设置dept等级

This commit is contained in:
2023-11-10 15:14:54 +08:00
parent 75e9d5296f
commit 5daad34fe7
9 changed files with 43 additions and 14 deletions

View File

@@ -2,7 +2,9 @@ package com.jsowell.pile.mapper;
import com.jsowell.pile.domain.MemberWalletInfo;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;
@Repository
public interface MemberWalletInfoMapper {
/**
* delete by primary key

View File

@@ -5,9 +5,11 @@ import com.jsowell.pile.dto.UniAppQueryMemberBalanceDTO;
import com.jsowell.pile.vo.uniapp.MemberBalanceVO;
import com.jsowell.pile.vo.uniapp.MemberWalletLogVO;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;
import java.util.List;
@Repository
public interface MemberWalletLogMapper {
/**
* delete by primary key

View File

@@ -104,4 +104,6 @@ public interface PileStationInfoMapper {
* @return
*/
List<PileStationVO> getStationSelectList(@Param("dto") QueryStationDTO dto);
PileStationInfo queryInfoByDeptId(@Param("deptId") String deptId);
}

View File

@@ -119,4 +119,6 @@ public interface IPileStationInfoService {
* 查询充电站下拉列表
*/
List<PileStationVO> getStationSelectList(QueryStationDTO dto);
PileStationInfo queryInfoByDeptId(String valueOf);
}

View File

@@ -20,10 +20,7 @@ import com.jsowell.pile.mapper.MemberBasicInfoMapper;
import com.jsowell.pile.mapper.MemberPlateNumberRelationMapper;
import com.jsowell.pile.mapper.MemberWalletInfoMapper;
import com.jsowell.pile.mapper.MemberWalletLogMapper;
import com.jsowell.pile.service.IMemberBasicInfoService;
import com.jsowell.pile.service.IMemberTransactionRecordService;
import com.jsowell.pile.service.IPileBasicInfoService;
import com.jsowell.pile.service.IPileMerchantInfoService;
import com.jsowell.pile.service.*;
import com.jsowell.pile.vo.base.MerchantInfoVO;
import com.jsowell.pile.vo.uniapp.MemberBalanceVO;
import com.jsowell.pile.vo.uniapp.MemberVO;
@@ -75,6 +72,9 @@ public class MemberBasicInfoServiceImpl implements IMemberBasicInfoService {
@Autowired
private IMemberTransactionRecordService memberTransactionRecordService;
@Autowired
private IPileStationInfoService pileStationInfoService;
/**
* 查询会员基础信息
*
@@ -452,6 +452,8 @@ public class MemberBasicInfoServiceImpl implements IMemberBasicInfoService {
return resultList;
}
// 根据部门id查询对应的运营商
PileMerchantInfo merchantInfo = pileMerchantInfoService.queryInfoByDeptId(String.valueOf(deptId));
PileStationInfo stationInfo = pileStationInfoService.queryInfoByDeptId(String.valueOf(deptId));
return null;
}

View File

@@ -122,6 +122,7 @@ public class PileMerchantInfoServiceImpl implements IPileMerchantInfoService {
dept.setDeptName(dto.getMerchantName());
dept.setLeader(dto.getManagerName());
dept.setPhone(dto.getManagerPhone());
dept.setDeptLevel("2");
dept.setStatus("0");
sysDeptService.insertDept(dept);

View File

@@ -18,7 +18,6 @@ import com.jsowell.common.util.StringUtils;
import com.jsowell.common.util.ip.AddressUtils;
import com.jsowell.pile.domain.PileBasicInfo;
import com.jsowell.pile.domain.PileStationInfo;
import com.jsowell.pile.domain.ThirdPartyPlatformConfig;
import com.jsowell.pile.domain.ThirdpartyParkingConfig;
import com.jsowell.pile.dto.FastCreateStationDTO;
import com.jsowell.pile.dto.QueryStationDTO;
@@ -566,5 +565,13 @@ public class PileStationInfoServiceImpl implements IPileStationInfoService {
return pileStationInfoMapper.getStationSelectList(dto);
}
@Override
public PileStationInfo queryInfoByDeptId(String deptId) {
if (StringUtils.isBlank(deptId)) {
return null;
}
return pileStationInfoMapper.queryInfoByDeptId(deptId);
}
}

View File

@@ -59,14 +59,17 @@
<result property="delFlag" column="del_flag" />
</resultMap>
<sql id="selectPileStationInfoVo">
select id,merchant_id, station_name, dept_id, parking_id, qrcode_prefix, alone_apply, account_number, capacity, public_parking, parking_number,
<sql id="Base_Column_List">
id,merchant_id, station_name, dept_id, parking_id, qrcode_prefix, alone_apply, account_number, capacity, public_parking, parking_number,
park_fee_describe, country_code, area_code, address, station_tel, service_tel, station_type, station_status, station_admin_name, park_nums,
station_lng, station_lat, site_guide, construction, pictures, match_cars, park_info, park_owner,
park_manager, open_all_day, business_hours, park_free, payment, support_order, remark, public_flag, amap_flag,
open_flag, toilet_flag, store_flag, restaurant_flag, lounge_flag, canopy_flag, printer_flag, barrier_flag,
parking_lock_flag, create_by, create_time, update_by, update_time, del_flag
from pile_station_info
</sql>
<sql id="selectPileStationInfoVo">
select <include refid="Base_Column_List"/> from pile_station_info
</sql>
<select id="selectPileStationInfoList" parameterType="com.jsowell.pile.domain.PileStationInfo" resultMap="PileStationInfoResult">
@@ -476,4 +479,12 @@
and public_flag = '1'
and amap_flag = '1'
</select>
<select id="queryInfoByDeptId" resultMap="PileStationInfoResult">
select
<include refid="Base_Column_List"/>
from pile_station_info
where del_flag = '0'
and dept_id = #{deptId,jdbcType=VARCHAR}
</select>
</mapper>

View File

@@ -192,7 +192,7 @@ public class SysDeptServiceImpl implements SysDeptService {
}
dept.setAncestors(info.getAncestors() + "," + dept.getParentId());
// 更新deptLevel字段
if (StringUtils.isNotBlank(info.getDeptLevel())) {
if (StringUtils.isBlank(dept.getDeptLevel()) && StringUtils.isNotBlank(info.getDeptLevel())) {
dept.setDeptLevel(String.valueOf(Integer.parseInt(info.getDeptLevel()) + 1));
}
return deptMapper.insertDept(dept);
@@ -215,7 +215,7 @@ public class SysDeptServiceImpl implements SysDeptService {
updateDeptChildren(dept.getDeptId(), newAncestors, oldAncestors);
// 更新deptLevel字段
if (StringUtils.isNotBlank(newParentDept.getDeptLevel())) {
if (StringUtils.isBlank(dept.getDeptLevel()) && StringUtils.isNotBlank(newParentDept.getDeptLevel())) {
dept.setDeptLevel(String.valueOf(Integer.parseInt(newParentDept.getDeptLevel()) + 1));
}
}