!62 功能模块优化,敏感词模块优化

Merge pull request !62 from chopper711/liushuai
This commit is contained in:
chopper711 2021-11-29 03:47:20 +00:00 committed by Gitee
commit 96f57b7df8
5 changed files with 38 additions and 68 deletions

View File

@ -1,57 +0,0 @@
package cn.lili.controller.member;
import cn.lili.common.enums.ResultUtil;
import cn.lili.common.vo.PageVO;
import cn.lili.common.vo.ResultMessage;
import cn.lili.modules.system.entity.dos.ServiceNotice;
import cn.lili.modules.system.service.ServiceNoticeService;
import cn.lili.mybatis.util.PageUtil;
import com.baomidou.mybatisplus.core.metadata.IPage;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
/**
* 买家端,会员站服务消息接口
*
* @author Chopper
* @since 2020/11/17 2:31 下午
*/
@RestController
@RequestMapping("/service/notice")
@Api(tags = "买家端,会员站服务消息接口")
public class ServiceNoticeBuyerController {
/**
* 服务消息
*/
@Autowired
private ServiceNoticeService serviceNoticeService;
@ApiOperation(value = "获取消息详情")
@ApiImplicitParam(name = "id", value = "商品ID", required = true, dataType = "Long", paramType = "path")
@GetMapping(value = "/{id}")
public ResultMessage<ServiceNotice> get(@PathVariable String id) {
ServiceNotice serviceNotice = serviceNoticeService.getById(id);
return ResultUtil.data(serviceNotice);
}
@ApiOperation(value = "分页获取服务消息")
@GetMapping
@ApiImplicitParam(name = "storeId", value = "商家id默认为-1代表平台消息如果查询某商家发布的消息传递商家id即可", dataType = "int", paramType = "query")
public ResultMessage<IPage<ServiceNotice>> getByPage(PageVO page, String storeId) {
ServiceNotice serviceNotice = new ServiceNotice();
if (storeId == null) {
storeId = "-1";
}
serviceNotice.setStoreId(storeId);
IPage<ServiceNotice> data = serviceNoticeService.page(PageUtil.initPage(page));
return ResultUtil.data(data);
}
}

View File

@ -3,10 +3,17 @@ package cn.lili.modules.order.order.service;
import cn.lili.common.vo.PageVO;
import cn.lili.modules.order.aftersale.entity.dos.AfterSale;
import cn.lili.modules.order.order.entity.dos.StoreFlow;
import cn.lili.modules.store.entity.vos.StoreFlowPayDownloadVO;
import cn.lili.modules.store.entity.vos.StoreFlowRefundDownloadVO;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.baomidou.mybatisplus.extension.service.IService;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import java.util.Date;
import java.util.List;
/**
* 商家订单流水业务层
@ -43,4 +50,20 @@ public interface StoreFlowService extends IService<StoreFlow> {
*/
IPage<StoreFlow> getStoreFlow(String storeId, String type, boolean distribution, PageVO pageVO, Date startTime, Date endTime);
/**
* 获取结算单的入账流水
*
* @param queryWrapper 查询条件
* @return 入账流水
*/
List<StoreFlowPayDownloadVO> getStoreFlowPayDownloadVO(Wrapper<StoreFlow> queryWrapper);
/**
* 获取结算单的退款流水
*
* @param queryWrapper 查询条件
* @return 退款流水
*/
List<StoreFlowRefundDownloadVO> getStoreFlowRefundDownloadVO(Wrapper<StoreFlow> queryWrapper);
}

View File

@ -15,7 +15,10 @@ import cn.lili.modules.order.order.service.OrderService;
import cn.lili.modules.order.order.service.StoreFlowService;
import cn.lili.modules.payment.entity.RefundLog;
import cn.lili.modules.payment.service.RefundLogService;
import cn.lili.modules.store.entity.vos.StoreFlowPayDownloadVO;
import cn.lili.modules.store.entity.vos.StoreFlowRefundDownloadVO;
import cn.lili.mybatis.util.PageUtil;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
@ -167,4 +170,14 @@ public class StoreFlowServiceImpl extends ServiceImpl<StoreFlowMapper, StoreFlow
lambdaQueryWrapper.eq(StringUtils.isNotEmpty(type), StoreFlow::getFlowType, type);
return this.page(PageUtil.initPage(pageVO), lambdaQueryWrapper);
}
@Override
public List<StoreFlowPayDownloadVO> getStoreFlowPayDownloadVO(Wrapper<StoreFlow> queryWrapper) {
return baseMapper.getStoreFlowPayDownloadVO(queryWrapper);
}
@Override
public List<StoreFlowRefundDownloadVO> getStoreFlowRefundDownloadVO(Wrapper<StoreFlow> queryWrapper) {
return baseMapper.getStoreFlowRefundDownloadVO(queryWrapper);
}
}

View File

@ -66,8 +66,6 @@ public class BillServiceImpl extends ServiceImpl<BillMapper, Bill> implements Bi
*/
@Autowired
private StoreFlowService storeFlowService;
@Resource
private StoreFlowMapper storeFlowMapper;
@Override
public void createBill(String storeId, Date startTime, DateTime endTime) {
@ -256,7 +254,7 @@ public class BillServiceImpl extends ServiceImpl<BillMapper, Bill> implements Bi
lambdaQueryWrapper.eq(StoreFlow::getStoreId, bill.getStoreId());
lambdaQueryWrapper.between(StoreFlow::getCreateTime, bill.getStartTime(), bill.getCreateTime());
lambdaQueryWrapper.eq(StoreFlow::getFlowType, FlowTypeEnum.PAY.name());
List<StoreFlowPayDownloadVO> storeFlowList = storeFlowMapper.getStoreFlowPayDownloadVO(lambdaQueryWrapper);
List<StoreFlowPayDownloadVO> storeFlowList = storeFlowService.getStoreFlowPayDownloadVO(lambdaQueryWrapper);
writer.write(storeFlowList, true);
writer.setSheet("退款订单");
@ -288,7 +286,7 @@ public class BillServiceImpl extends ServiceImpl<BillMapper, Bill> implements Bi
storeFlowlambdaQueryWrapper.eq(StoreFlow::getStoreId, bill.getStoreId());
storeFlowlambdaQueryWrapper.between(StoreFlow::getCreateTime, bill.getStartTime(), bill.getCreateTime());
storeFlowlambdaQueryWrapper.eq(StoreFlow::getFlowType, FlowTypeEnum.PAY.name());
List<StoreFlowRefundDownloadVO> storeFlowRefundDownloadVOList = storeFlowMapper.getStoreFlowRefundDownloadVO(storeFlowlambdaQueryWrapper);
List<StoreFlowRefundDownloadVO> storeFlowRefundDownloadVOList = storeFlowService.getStoreFlowRefundDownloadVO(storeFlowlambdaQueryWrapper);
writer.write(storeFlowRefundDownloadVOList, true);
ServletOutputStream out = null;

View File

@ -72,11 +72,6 @@ public class StoreServiceImpl extends ServiceImpl<StoreMapper, Store> implements
*/
@Autowired
private StoreDetailService storeDetailService;
/**
* 页面
*/
@Autowired
private PageDataService pageDataService;
/**
* 店铺收藏
*/
@ -187,8 +182,6 @@ public class StoreServiceImpl extends ServiceImpl<StoreMapper, Store> implements
}
if (passed == 0) {
store.setStoreDisable(StoreStatusEnum.OPEN.value());
//添加店铺页面
pageDataService.addStorePageData(store.getId());
//修改会员 表示已有店铺
Member member = memberService.getById(store.getMemberId());
member.setHaveStore(true);