更新9.27
This commit is contained in:
parent
b5ee5634d7
commit
3653651021
@ -105,6 +105,11 @@ public class FleetInfoController extends BaseController {
|
||||
return getSuccessResult(fleetInfoService.addFleetInfo(fleetInfo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据车队id查询车队信息
|
||||
* @param fleetId
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/getFleetInfoByFleetId")
|
||||
public ResponseObject getFleetInfoByFleetId(@Param("fleetId")Integer fleetId){
|
||||
return getSuccessResult(fleetInfoService.queryByFleetId(fleetId));
|
||||
|
@ -196,5 +196,14 @@ public class FleetMemberController extends BaseController {
|
||||
}
|
||||
return getSuccessResult(map);
|
||||
}
|
||||
|
||||
/**
|
||||
* 额度调整(小程序)
|
||||
* @return
|
||||
*/
|
||||
@PutMapping("editLimit")
|
||||
public ResponseObject editLimit(@RequestBody FleetMember fleetMember){
|
||||
return getSuccessResult(fleetMemberService.editLimit(fleetMember));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -80,4 +80,11 @@ public interface FleetMemberService {
|
||||
* @return
|
||||
*/
|
||||
int logOffFleetMember(Integer id);
|
||||
|
||||
/**
|
||||
* 额度调整
|
||||
* @param fleetMember
|
||||
* @return
|
||||
*/
|
||||
int editLimit(FleetMember fleetMember);
|
||||
}
|
||||
|
@ -306,7 +306,7 @@ public class FleetInfoServiceImpl extends ServiceImpl<FleetInfoMapper,FleetInfo>
|
||||
//获取所在车队的id集合
|
||||
// List<Integer> fleetIds = fleetMembers.stream().map(FleetMember::getFleetId).collect(Collectors.toList());
|
||||
if (ObjectUtil.isEmpty(fleetMembers)) {
|
||||
throw new RuntimeException("未绑定车队");
|
||||
throw new RuntimeException("未绑定该车队");
|
||||
}
|
||||
|
||||
FleetInfo fleetInfo = baseMapper.selectOne(new LambdaQueryWrapper<FleetInfo>()
|
||||
|
@ -12,6 +12,7 @@ import com.fuint.business.fleet.entity.FleetMember;
|
||||
import com.fuint.business.fleet.mapper.FleetMemberMapper;
|
||||
import com.fuint.business.fleet.service.FleetInfoService;
|
||||
import com.fuint.business.fleet.service.FleetMemberService;
|
||||
import com.fuint.business.fleet.vo.FleetInfoUniVo;
|
||||
import com.fuint.business.fleet.vo.FleetMemberVo;
|
||||
import com.fuint.business.storeInformation.entity.LJStore;
|
||||
import com.fuint.business.storeInformation.service.ILJStoreService;
|
||||
@ -70,7 +71,13 @@ public class FleetMemberServiceImpl extends ServiceImpl<FleetMemberMapper,FleetM
|
||||
}
|
||||
@Override
|
||||
public IPage<FleetMemberVo> queryPageByNameOrMobile(Page page, FleetMemberVo fleetMember) {
|
||||
// AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
|
||||
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
|
||||
FleetMember fleetMember1 = baseMapper.selectOne(new LambdaQueryWrapper<FleetMember>()
|
||||
.eq(FleetMember::getFleetId, fleetMember.getFleetId())
|
||||
.eq(FleetMember::getUserId, nowAccountInfo.getId()));
|
||||
if (ObjectUtil.isEmpty(fleetMember1)){
|
||||
throw new RuntimeException("未绑定该车队,无法查看当前车队成员信息");
|
||||
}
|
||||
return baseMapper.queryPageByNameOrMobile(page,fleetMember);
|
||||
}
|
||||
|
||||
@ -102,7 +109,11 @@ public class FleetMemberServiceImpl extends ServiceImpl<FleetMemberMapper,FleetM
|
||||
@Override
|
||||
public int insert(FleetMember fleetMember) {
|
||||
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
|
||||
// FleetMember fleetMember1 = queryByMobile(fleetMember.getMobile());
|
||||
//判断当前用户是否是车队负责人
|
||||
FleetInfoUniVo fleetInfoUniVo = fleetInfoService.queryByFleetId(fleetMember.getFleetId());
|
||||
if (ObjectUtil.isNotEmpty(fleetInfoUniVo) && (fleetInfoUniVo.getUserId() != nowAccountInfo.getId())){
|
||||
throw new RuntimeException("请由车队负责人进行此操作");
|
||||
}
|
||||
//判断用户是否存在选择的车队
|
||||
FleetMember fleetMember2 = baseMapper.selectOne(new LambdaQueryWrapper<FleetMember>()
|
||||
.eq(FleetMember::getMobile, fleetMember.getMobile())
|
||||
@ -115,7 +126,7 @@ public class FleetMemberServiceImpl extends ServiceImpl<FleetMemberMapper,FleetM
|
||||
// return 0;
|
||||
// }
|
||||
// LJUserVo user = userService.selectUserByMobileAndChantStoreId(fleetMember.getMobile());
|
||||
//判断当前车队负责人是否存在账号
|
||||
//判断当前车队成员否存在账号
|
||||
MtUser mtUser = mtUserMapper.selectOne(new LambdaQueryWrapper<MtUser>()
|
||||
.eq(MtUser::getMobile, fleetMember.getMobile())
|
||||
.last("limit 1"));
|
||||
@ -201,6 +212,18 @@ public class FleetMemberServiceImpl extends ServiceImpl<FleetMemberMapper,FleetM
|
||||
return baseMapper.updateById(fleetMember);
|
||||
}
|
||||
|
||||
/**
|
||||
* 额度调整
|
||||
*
|
||||
* @param fleetMember
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public int editLimit(FleetMember fleetMember) {
|
||||
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* 创建用户的基础信息
|
||||
*/
|
||||
|
@ -160,5 +160,10 @@ public class CardCouponController extends BaseController {
|
||||
return getSuccessResult(this.cardCouponService.selectAllByPageAndStoreId(page, cardCoupon));
|
||||
|
||||
}
|
||||
|
||||
@GetMapping("getCouponOne")
|
||||
public ResponseObject getCouponOne(Integer id) {
|
||||
return getSuccessResult(cardCouponService.getCouponOne(id));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.fuint.business.marketingActivity.cardCoupon.entity.CardCoupon;
|
||||
import com.fuint.business.marketingActivity.cardCoupon.vo.CardCouponUniVo;
|
||||
|
||||
/**
|
||||
* 油站优惠卷表2024(CardCoupon)表服务接口
|
||||
@ -22,5 +23,12 @@ public interface CardCouponService extends IService<CardCoupon> {
|
||||
int isOnLine(Integer id);
|
||||
|
||||
IPage selectAllByPageAndStoreId(Page page, CardCoupon cardCoupon);
|
||||
|
||||
/**
|
||||
* 卡券详情(小程序)
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
CardCouponUniVo getCouponOne(Integer id);
|
||||
}
|
||||
|
||||
|
@ -5,6 +5,7 @@ import cn.hutool.core.collection.CollUtil;
|
||||
import cn.hutool.core.date.DateTime;
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
@ -15,6 +16,7 @@ import com.fuint.business.marketingActivity.cardCoupon.mapper.CardCouponUserMapp
|
||||
import com.fuint.business.marketingActivity.cardCoupon.service.CardCouponService;
|
||||
import com.fuint.business.marketingActivity.cardCoupon.vo.CardCouponUniVo;
|
||||
import com.fuint.business.marketingActivity.cardCoupon.vo.CardCouponVO;
|
||||
import com.fuint.business.petrolStationManagement.mapper.OilNameMapper;
|
||||
import com.fuint.business.store.entity.MtStore;
|
||||
import com.fuint.business.store.mapper.MtStoreMapper;
|
||||
import com.fuint.common.dto.AccountInfo;
|
||||
@ -23,6 +25,7 @@ import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.stream.Collectors;
|
||||
@ -41,6 +44,9 @@ public class CardCouponServiceImpl extends ServiceImpl<CardCouponMapper, CardCou
|
||||
|
||||
@Autowired
|
||||
private CardCouponUserMapper cardCouponUserMapper;
|
||||
|
||||
@Autowired
|
||||
private OilNameMapper oilNameMapper;
|
||||
@Override
|
||||
public IPage<CardCoupon> pageVo(Page page, CardCoupon cardCoupon) {
|
||||
return baseMapper.pageVo( page, cardCoupon);
|
||||
@ -112,6 +118,26 @@ public class CardCouponServiceImpl extends ServiceImpl<CardCouponMapper, CardCou
|
||||
return cardCouponUniVoIPage;
|
||||
}
|
||||
|
||||
/**
|
||||
* 卡券详情(小程序)
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public CardCouponUniVo getCouponOne(Integer id) {
|
||||
CardCoupon cardCoupon = baseMapper.selectById(id);
|
||||
CardCouponUniVo cardCouponUniVo = BeanUtil.copyProperties(cardCoupon, CardCouponUniVo.class);
|
||||
String oilNumber = cardCouponUniVo.getOilNumber();
|
||||
//以逗号隔开
|
||||
if (StrUtil.isNotEmpty(oilNumber)) {
|
||||
String[] split = oilNumber.split(",");
|
||||
List<String> list = Arrays.asList(split);
|
||||
// list.stream().forEach(item -> {Integer.parseInt(item)});
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
private static void extracted(CardCouponUniVo coupon) {
|
||||
//计算领取的比例
|
||||
double scale = (coupon.getTfGetNum() * 1.0 / coupon.getTfTotal()) * 100;
|
||||
|
@ -135,6 +135,16 @@ public class LJStoreController extends BaseController {
|
||||
return getSuccessResult(storeService.selectListDepts(page,storeVo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据店铺id查询连锁店下面所有商铺信息(小程序)
|
||||
* @param chainStoreId
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("selectByStoreId")
|
||||
List<LJStore> selectByStoreId(Integer chainStoreId){
|
||||
return storeService.selectByStoreId(chainStoreId);
|
||||
}
|
||||
|
||||
// /**
|
||||
// * 修改等级规则信息
|
||||
// * @param map
|
||||
|
@ -6,6 +6,7 @@ import com.fuint.business.storeInformation.entity.LJStore;
|
||||
import com.fuint.business.storeInformation.vo.LjStoreVo;
|
||||
import io.swagger.models.auth.In;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
@ -92,4 +93,11 @@ public interface ILJStoreService extends IService<LJStore> {
|
||||
* @return
|
||||
*/
|
||||
IPage<LjStoreVo> selectListDepts(IPage page, LjStoreVo storeVo);
|
||||
|
||||
/**
|
||||
* 根据店铺id查询连锁店下面所有商铺
|
||||
* @param chainStoreId
|
||||
* @return
|
||||
*/
|
||||
List<LJStore> selectByStoreId(Integer chainStoreId);
|
||||
}
|
||||
|
@ -1,6 +1,7 @@
|
||||
package com.fuint.business.storeInformation.service.impl;
|
||||
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
@ -376,4 +377,17 @@ public class LJStoreServiceImpl extends ServiceImpl<LJStoreMapper, LJStore> impl
|
||||
}
|
||||
return ljStoreVoIPage;
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据店铺id查询连锁店下面所有商铺
|
||||
*
|
||||
* @param chainStoreId
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public List<LJStore> selectByStoreId(Integer chainStoreId) {
|
||||
List<LJStore> ljStores = baseMapper.selectList(new LambdaQueryWrapper<LJStore>()
|
||||
.eq(LJStore::getChainStoreId, chainStoreId));
|
||||
return ljStores;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user