Merge remote-tracking branch 'origin/main'
This commit is contained in:
commit
a25303b23a
@ -47,5 +47,6 @@ public interface CardCouponUserMapper extends BaseMapper<CardCouponUser> {
|
||||
|
||||
List<Map<String, Object>> selectUserCardVerification(@Param("str") String str);
|
||||
|
||||
CardCouponUser selectByOrderId(String orderNo);
|
||||
}
|
||||
|
||||
|
@ -71,6 +71,10 @@
|
||||
AND userCard.STATUS = 0
|
||||
AND userCard.start_time <= NOW() AND userCard.end_time >= NOW()
|
||||
</select>
|
||||
<select id="selectByOrderId"
|
||||
resultType="com.fuint.business.marketingActivity.cardCoupon.entity.CardCouponUser">
|
||||
select * from card_coupon_user where order_id = #{orderId}
|
||||
</select>
|
||||
|
||||
|
||||
</mapper>
|
||||
|
@ -33,7 +33,7 @@ public class CashierOrderController extends BaseController {
|
||||
*/
|
||||
@GetMapping("/list")
|
||||
public ResponseObject list(CashierOrder order,
|
||||
@RequestParam(value = "page[page]",defaultValue = "1") Integer pageNo,
|
||||
@RequestParam(value = "page",defaultValue = "1") Integer pageNo,
|
||||
@RequestParam(value = "pageSize",defaultValue = "10") Integer pageSize){
|
||||
Page page =new Page(pageNo,pageSize);
|
||||
IPage<CashierOrder> list = cashierOrderService.selectCashierOrderList(page,order);
|
||||
|
@ -105,4 +105,6 @@ public interface AllOrderInfoMapper extends BaseMapper<AllOrderInfo> {
|
||||
IPage<AllOrderInfoUniVo> queryAllByLimit(Page page, @Param("allOrderInfo") AllOrderInfoUniVo allOrderInfo);
|
||||
|
||||
Double getCountMemberBalance(@Param("storeId") Integer storeId,@Param("endTime") String endTime);
|
||||
|
||||
AllOrderInfoVo selectByOrderNo(String orderNo);
|
||||
}
|
@ -851,6 +851,9 @@
|
||||
store_id = #{storeId}
|
||||
AND pay_time < #{endTime};
|
||||
</select>
|
||||
<select id="selectByOrderNo" resultType="com.fuint.business.order.vo.AllOrderInfoVo">
|
||||
select * from all_order_info where order_no = #{orderNo}
|
||||
</select>
|
||||
|
||||
<!-- <where>-->
|
||||
<!-- store_id = #{order.storeId}-->
|
||||
|
@ -21,6 +21,8 @@ import com.fuint.business.convenienceSore.mapper.LJGoodsMapper;
|
||||
import com.fuint.business.convenienceSore.service.LJGoodsService;
|
||||
import com.fuint.business.convenienceSore.service.StockTrackService;
|
||||
import com.fuint.business.largeSscreen.vo.OrderGoodsVO;
|
||||
import com.fuint.business.marketingActivity.cardCoupon.entity.CardCouponUser;
|
||||
import com.fuint.business.marketingActivity.cardCoupon.mapper.CardCouponUserMapper;
|
||||
import com.fuint.business.marketingActivity.cardFavorable.service.CardFavorableRecordService;
|
||||
import com.fuint.business.marketingActivity.cardValueOrders.entity.CardValueOrders;
|
||||
import com.fuint.business.order.dto.AllOrderInfoDto;
|
||||
@ -398,6 +400,9 @@ public class AllOrderInfoServiceImpl extends ServiceImpl<AllOrderInfoMapper, All
|
||||
@Resource
|
||||
GrowthValueChangeService growthValueChangeService;
|
||||
|
||||
@Resource
|
||||
private CardCouponUserMapper cardCouponUserMapper;
|
||||
|
||||
@Override
|
||||
@Transactional
|
||||
public int refund(Map<String, String> map) {
|
||||
@ -465,6 +470,16 @@ public class AllOrderInfoServiceImpl extends ServiceImpl<AllOrderInfoMapper, All
|
||||
allOrderInfo.setRefOrderNo(map.get("refundOrderNo"));
|
||||
allOrderInfo.setRefBy(nowAccountInfo.getStaffId().toString());
|
||||
baseMapper.updateById(allOrderInfo);
|
||||
|
||||
// 退回优惠卷
|
||||
AllOrderInfoVo allOrderInfoVo = allOrderInfoMapper.selectByOrderNo(map.get("orderNo"));
|
||||
CardCouponUser cardCouponUser = cardCouponUserMapper.selectByOrderId(String.valueOf(allOrderInfoVo.getId()));
|
||||
// 如果有优惠券信息 再做退回优惠券操作
|
||||
if (ObjectUtil.isNotEmpty(cardCouponUser)){
|
||||
cardCouponUser.setStatus("0");
|
||||
cardCouponUserMapper.updateById(cardCouponUser);
|
||||
}
|
||||
|
||||
// 处理油品订单
|
||||
OilOrder oilOrder = new OilOrder();
|
||||
if (ObjectUtil.isNotEmpty(map.get("isOil")) && "true".equals(map.get("isOil"))) {
|
||||
|
@ -34,6 +34,8 @@ import com.fuint.business.marketingActivity.activeDiscount.vo.ActiveDiscountVO;
|
||||
import com.fuint.business.marketingActivity.activeExchange.vo.PaymentActiveVO;
|
||||
import com.fuint.business.marketingActivity.activeFullminus.service.ActiveFullminusService;
|
||||
import com.fuint.business.marketingActivity.activeFullminus.vo.ActiveFullminusVO;
|
||||
import com.fuint.business.marketingActivity.cardCoupon.entity.CardCouponUser;
|
||||
import com.fuint.business.marketingActivity.cardCoupon.mapper.CardCouponUserMapper;
|
||||
import com.fuint.business.marketingActivity.cardFavorable.entity.CardFavorableRecord;
|
||||
import com.fuint.business.marketingActivity.cardFavorable.service.CardFavorableRecordService;
|
||||
import com.fuint.business.marketingActivity.cardFavorable.service.CardFavorableService;
|
||||
@ -51,10 +53,12 @@ import com.fuint.business.marketingActivity.favorableRecords.entity.FavorableRec
|
||||
import com.fuint.business.marketingActivity.favorableRecords.service.FavorableRecordsService;
|
||||
import com.fuint.business.member.mapper.LJStaffMapper;
|
||||
import com.fuint.business.order.entity.*;
|
||||
import com.fuint.business.order.mapper.AllOrderInfoMapper;
|
||||
import com.fuint.business.order.mapper.LJOrderMapper;
|
||||
import com.fuint.business.order.mapper.OilOrderMapper;
|
||||
import com.fuint.business.order.service.*;
|
||||
import com.fuint.business.order.vo.AllOrderInfoUniVo;
|
||||
import com.fuint.business.order.vo.AllOrderInfoVo;
|
||||
import com.fuint.business.order.vo.Excel.OilOrderExcel;
|
||||
import com.fuint.business.order.vo.OilOrderVo;
|
||||
import com.fuint.business.petrolStationManagement.entity.*;
|
||||
@ -211,6 +215,12 @@ public class OilOrderServiceImpl extends ServiceImpl<OilOrderMapper, OilOrder> i
|
||||
@Autowired
|
||||
private FleetConsumeRecordService fleetConsumeRecordService;
|
||||
|
||||
@Autowired
|
||||
private CardCouponUserMapper cardCouponUserMapper;
|
||||
|
||||
@Autowired
|
||||
private AllOrderInfoMapper allOrderInfoMapper;
|
||||
|
||||
@Override
|
||||
public IPage<OilOrder> selectOilOrderList(Page page, OilOrder order) {
|
||||
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
|
||||
@ -430,8 +440,8 @@ public class OilOrderServiceImpl extends ServiceImpl<OilOrderMapper, OilOrder> i
|
||||
Double activeAmount = Double.valueOf(ObjectUtil.isNotEmpty(map.get("activeAmount")) ? map.get("activeAmount") : "0.0");
|
||||
// 优惠券 用户 id
|
||||
Integer couponUserId = null;
|
||||
if (StringUtils.isNotEmpty(map.get("couponUserId"))) {
|
||||
couponUserId = Integer.valueOf(map.get("couponUserId"));
|
||||
if (StringUtils.isNotEmpty(map.get("userId"))) {
|
||||
couponUserId = Integer.valueOf(map.get("userId"));
|
||||
}
|
||||
// 优惠券类型
|
||||
String couponType = map.get("couponType");
|
||||
@ -747,6 +757,16 @@ public class OilOrderServiceImpl extends ServiceImpl<OilOrderMapper, OilOrder> i
|
||||
}
|
||||
orders.put("orderNo", orderNo);
|
||||
cashierOrderService.insertCashierOrder(cashierOrder);
|
||||
|
||||
// 下单完成需要更新一下优惠券的状态 当订单退款以后也要调用这样的代码修改优惠券的状态
|
||||
if(StringUtils.isNotEmpty(map.get("couponId"))){
|
||||
CardCouponUser cardCouponUser = cardCouponUserMapper.selectById(map.get("couponId"));
|
||||
cardCouponUser.setStatus("1");
|
||||
// 查询订单号并赋值
|
||||
AllOrderInfoVo allOrderInfoVo = allOrderInfoMapper.selectByOrderNo(orderNo);
|
||||
cardCouponUser.setOrderId(allOrderInfoVo.getId());
|
||||
cardCouponUserMapper.updateById(cardCouponUser);
|
||||
}
|
||||
return orders;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user