diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/fleet/controller/FleetInfoController.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/fleet/controller/FleetInfoController.java index d935f98aa..6d6121793 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/fleet/controller/FleetInfoController.java +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/fleet/controller/FleetInfoController.java @@ -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)); diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/fleet/controller/FleetMemberController.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/fleet/controller/FleetMemberController.java index 6f68cdeb2..712a914fa 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/fleet/controller/FleetMemberController.java +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/fleet/controller/FleetMemberController.java @@ -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)); + } } diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/fleet/service/FleetMemberService.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/fleet/service/FleetMemberService.java index 9c0d2da30..cbdd12b8d 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/fleet/service/FleetMemberService.java +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/fleet/service/FleetMemberService.java @@ -80,4 +80,11 @@ public interface FleetMemberService { * @return */ int logOffFleetMember(Integer id); + + /** + * 额度调整 + * @param fleetMember + * @return + */ + int editLimit(FleetMember fleetMember); } diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/fleet/service/impl/FleetInfoServiceImpl.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/fleet/service/impl/FleetInfoServiceImpl.java index 08085e757..c9fa819a6 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/fleet/service/impl/FleetInfoServiceImpl.java +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/fleet/service/impl/FleetInfoServiceImpl.java @@ -306,7 +306,7 @@ public class FleetInfoServiceImpl extends ServiceImpl //获取所在车队的id集合 // List 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() diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/fleet/service/impl/FleetMemberServiceImpl.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/fleet/service/impl/FleetMemberServiceImpl.java index e3a2fd446..0f2a392f2 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/fleet/service/impl/FleetMemberServiceImpl.java +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/fleet/service/impl/FleetMemberServiceImpl.java @@ -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 queryPageByNameOrMobile(Page page, FleetMemberVo fleetMember) { -// AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo(); + AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo(); + FleetMember fleetMember1 = baseMapper.selectOne(new LambdaQueryWrapper() + .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() .eq(FleetMember::getMobile, fleetMember.getMobile()) @@ -115,7 +126,7 @@ public class FleetMemberServiceImpl extends ServiceImpl() .eq(MtUser::getMobile, fleetMember.getMobile()) .last("limit 1")); @@ -201,6 +212,18 @@ public class FleetMemberServiceImpl extends ServiceImpl { int isOnLine(Integer id); IPage selectAllByPageAndStoreId(Page page, CardCoupon cardCoupon); + + /** + * 卡券详情(小程序) + * @param id + * @return + */ + CardCouponUniVo getCouponOne(Integer id); } diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardCoupon/service/impl/CardCouponServiceImpl.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardCoupon/service/impl/CardCouponServiceImpl.java index 52e081aef..dbf94959c 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardCoupon/service/impl/CardCouponServiceImpl.java +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardCoupon/service/impl/CardCouponServiceImpl.java @@ -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 pageVo(Page page, CardCoupon cardCoupon) { return baseMapper.pageVo( page, cardCoupon); @@ -112,6 +118,26 @@ public class CardCouponServiceImpl extends ServiceImpl 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; diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/storeInformation/controller/LJStoreController.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/storeInformation/controller/LJStoreController.java index b3eeccadd..541cd0f0e 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/storeInformation/controller/LJStoreController.java +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/storeInformation/controller/LJStoreController.java @@ -135,6 +135,16 @@ public class LJStoreController extends BaseController { return getSuccessResult(storeService.selectListDepts(page,storeVo)); } + /** + * 根据店铺id查询连锁店下面所有商铺信息(小程序) + * @param chainStoreId + * @return + */ + @GetMapping("selectByStoreId") + List selectByStoreId(Integer chainStoreId){ + return storeService.selectByStoreId(chainStoreId); + } + // /** // * 修改等级规则信息 // * @param map diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/storeInformation/service/ILJStoreService.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/storeInformation/service/ILJStoreService.java index 243d3fe8c..af70f5d46 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/storeInformation/service/ILJStoreService.java +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/storeInformation/service/ILJStoreService.java @@ -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 { * @return */ IPage selectListDepts(IPage page, LjStoreVo storeVo); + + /** + * 根据店铺id查询连锁店下面所有商铺 + * @param chainStoreId + * @return + */ + List selectByStoreId(Integer chainStoreId); } diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/storeInformation/service/impl/LJStoreServiceImpl.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/storeInformation/service/impl/LJStoreServiceImpl.java index fc6f87221..e57d41be0 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/storeInformation/service/impl/LJStoreServiceImpl.java +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/storeInformation/service/impl/LJStoreServiceImpl.java @@ -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 impl } return ljStoreVoIPage; } + + /** + * 根据店铺id查询连锁店下面所有商铺 + * + * @param chainStoreId + * @return + */ + @Override + public List selectByStoreId(Integer chainStoreId) { + List ljStores = baseMapper.selectList(new LambdaQueryWrapper() + .eq(LJStore::getChainStoreId, chainStoreId)); + return ljStores; + } }