| | |
| | | |
| | | import cc.mrbird.febs.common.entity.FebsResponse; |
| | | import cc.mrbird.febs.common.entity.QueryRequest; |
| | | import cc.mrbird.febs.dapp.dto.AddMallGoodsDto; |
| | | import cc.mrbird.febs.dapp.dto.HlmBasicPerkDto; |
| | | import cc.mrbird.febs.dapp.dto.MallGoodsUpdateDto; |
| | | import cc.mrbird.febs.dapp.dto.MallOrderInfoDto; |
| | | import cc.mrbird.febs.dapp.dto.*; |
| | | import cc.mrbird.febs.dapp.entity.*; |
| | | import cc.mrbird.febs.dapp.enumerate.DataDictionaryEnum; |
| | | import cc.mrbird.febs.dapp.mapper.*; |
| | |
| | | import cc.mrbird.febs.dapp.vo.AdminMallGoodsCategoryTreeVo; |
| | | import cc.mrbird.febs.dapp.vo.AdminMallGoodsCategoryVo; |
| | | import cc.mrbird.febs.dapp.vo.AdminMallMoneyFlowVo; |
| | | import cc.mrbird.febs.dapp.vo.AdminMallOrderVo; |
| | | import cn.hutool.core.bean.BeanUtil; |
| | | import cn.hutool.core.collection.CollUtil; |
| | | import cn.hutool.core.util.ObjectUtil; |
| | |
| | | |
| | | } |
| | | |
| | | @Override |
| | | public AdminMallOrderVo getMallOrderInfoById(long id) { |
| | | return this.baseMapper.getMallOrderInfoById(id); |
| | | } |
| | | |
| | | public void updateDataDic(String type, String code, String value) { |
| | | DataDictionaryCustom dic = dataDictionaryCustomMapper.selectDicDataByTypeAndCode(type, code); |
| | | if (dic != null) { |
| | |
| | | } |
| | | } |
| | | |
| | | @Override |
| | | public FebsResponse deliverGoods(DeliverGoodsDto deliverGoodsDto) { |
| | | MallOrderInfo mallOrderInfo = mallOrderInfoMapper.selectById(deliverGoodsDto.getId()); |
| | | if(ObjectUtil.isEmpty(mallOrderInfo)){ |
| | | return new FebsResponse().fail().message("订单不存在,刷新后重试"); |
| | | } |
| | | Integer status = mallOrderInfo.getStatus(); |
| | | if(2 != status){ |
| | | return new FebsResponse().fail().message("订单不是已完成状态"); |
| | | } |
| | | Integer deliverState = mallOrderInfo.getDeliverState(); |
| | | if(1 != deliverState){ |
| | | return new FebsResponse().fail().message("订单不是待发货状态"); |
| | | } |
| | | String expressNo = deliverGoodsDto.getExpressNo(); |
| | | if(StrUtil.isEmpty(expressNo)){ |
| | | return new FebsResponse().fail().message("请输入物流单号"); |
| | | } |
| | | String expressCom = deliverGoodsDto.getExpressCom(); |
| | | if(StrUtil.isEmpty(expressCom)){ |
| | | return new FebsResponse().fail().message("请输入物流公司"); |
| | | } |
| | | mallOrderInfo.setDeliverState(2); |
| | | mallOrderInfo.setDeliverName(expressCom); |
| | | mallOrderInfo.setDeliverCode(expressNo); |
| | | mallOrderInfoMapper.updateById(mallOrderInfo); |
| | | return new FebsResponse().success(); |
| | | } |
| | | |
| | | } |