no message

This commit is contained in:
wangh 2024-01-06 15:51:41 +08:00
parent 214ab014ec
commit a345536e57
6 changed files with 35 additions and 13 deletions

View File

@ -73,5 +73,10 @@ public interface LJGoodsService extends IService<LJGoods> {
public int updateLJGoods(LJGoods goods);
/**
* 修改商品库存
* @param goods
* @return
*/
boolean editGoodsInventory(LJGoodsDto goods);
}

View File

@ -7,6 +7,8 @@ import com.fuint.api.fuyou.entity.MerchantConfig;
import com.fuint.api.fuyou.entity.ReceiveParameter;
import com.fuint.api.fuyou.service.FyPayService;
import com.fuint.api.fuyou.service.MerchantConfigService;
import com.fuint.business.convenienceSore.dto.LJGoodsDto;
import com.fuint.business.convenienceSore.service.LJGoodsService;
import com.fuint.business.integral.dto.IntegralOrdersDTO;
import com.fuint.business.integral.entity.IntegralDetail;
import com.fuint.business.integral.entity.IntegralGift;
@ -256,6 +258,9 @@ public class IntegralOrdersServiceImpl implements IntegralOrdersService {
CardFavorableRecordService cardFavorableRecordService;
@Resource
LJStaffMapper ljStaffMapper;
@Resource
LJGoodsService ljGoodsService;
@Override
public IntegralOrders checkTheStatusOfYourPaymentByIntegral(String orderNo) {
@ -305,6 +310,15 @@ public class IntegralOrdersServiceImpl implements IntegralOrdersService {
cardFavorableRecord.setStatus("0");
cardFavorableRecord.setExchangeFrom("积分兑换");
cardFavorableRecordService.addCardFavorableRecord(cardFavorableRecord);
}else if(integralGift.getGiftType().equals("实物商品")) {
// 查询礼品信息
// 修改商品库存并增加记录
LJGoodsDto goods = new LJGoodsDto();
goods.setId(integralGift.getGoodsId());
// goods.setDocument();
ljGoodsService.editGoodsInventory(goods);
}
}

View File

@ -110,7 +110,5 @@ public interface StoreService extends IService<MtStore> {
void flowflowConfiguration();
void petrolStationsAreExpired();
// 假删除店铺
boolean ifDeleteByDeptId(Long deptId);
}

View File

@ -546,16 +546,5 @@ public class StoreServiceImpl extends ServiceImpl<MtStoreMapper, MtStore> implem
}
@Override
public boolean ifDeleteByDeptId(Long deptId) {
// 创建 UpdateWrapper用于更新 if_delete
UpdateWrapper<MtStore> updateWrapper = new UpdateWrapper<>();
updateWrapper.set("if_delete", "1");
updateWrapper.eq("contract_dept_id",deptId);
// 使用 MyBatis-Plus 提供的 update 方法更新
int affectedRows = mtStoreMapper.update(null, updateWrapper);
return affectedRows>0;
}
}

View File

@ -76,4 +76,7 @@ public interface ILJStoreService extends IService<LJStore> {
// * @return
// */
// public int updateStoreRule(Map<String,String> map);
// 假删除店铺
boolean ifDeleteByDeptId(Long deptId);
}

View File

@ -1,9 +1,11 @@
package com.fuint.business.storeInformation.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.fuint.business.petrolStationManagement.service.OilNumberService;
import com.fuint.business.petrolStationManagement.vo.OilNumberNameVo;
import com.fuint.business.store.entity.MtStore;
import com.fuint.business.storeInformation.entity.LJStore;
import com.fuint.business.storeInformation.mapper.LJStoreMapper;
import com.fuint.business.storeInformation.service.ILJStoreService;
@ -210,4 +212,15 @@ public class LJStoreServiceImpl extends ServiceImpl<LJStoreMapper, LJStore> impl
int row = baseMapper.updateById(store);
return row;
}
@Override
public boolean ifDeleteByDeptId(Long deptId) {
// 创建 UpdateWrapper用于更新 if_delete
UpdateWrapper<LJStore> updateWrapper = new UpdateWrapper<>();
updateWrapper.set("if_delete", "1");
updateWrapper.eq("contract_dept_id",deptId);
// 使用 MyBatis-Plus 提供的 update 方法更新
int affectedRows = baseMapper.update(null, updateWrapper);
return affectedRows>0;
}
}