wl
2022-11-18 8f66aa7785d8cc0bf1e642f638a7f1d8c67a5f69
ycl-platform/src/main/java/com/ycl/controller/store/StoreInfoController.java
@@ -5,10 +5,9 @@
import com.ycl.annotation.LogSave;
import com.ycl.api.CommonPage;
import com.ycl.api.CommonResult;
import com.ycl.common.util.UtilNumber;
import com.ycl.controller.video.common.util.UtilNumber;
import com.ycl.dto.store.UmsStoreInfoParam;
import com.ycl.entity.store.StoreInfo;
import com.ycl.entity.video.VideoPoint;
import com.ycl.service.store.StoreInfoService;
import com.ycl.service.video.impl.IVideoPointService;
import com.ycl.vo.store.StoreInfoVO;
@@ -49,6 +48,7 @@
    @ApiOperation("根据门店名称分页获取门店列表列表")
    @RequestMapping(value = "/list", method = RequestMethod.GET)
    @ResponseBody
    @LogSave(operationType = "门店管理", contain = "查询门店")
    public CommonResult<CommonPage<StoreInfoVO>> list(@RequestParam(value = "keyword", required = false) String keyword,
                                                      @RequestParam(value = "pageSize", defaultValue = "5") Integer pageSize,
                                                      @RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum) {
@@ -59,18 +59,19 @@
    @ApiOperation("根据id获取门店信息")
    @RequestMapping(value = "/{id}", method = RequestMethod.GET)
    @ResponseBody
    public CommonResult<StoreInfo> getItem(@PathVariable Long id) {
    @LogSave(operationType = "门店管理", contain = "查询门店")
    public CommonResult<StoreInfoVO> getItem(@PathVariable Long id) {
        StoreInfo storeInfo = storeInfoService.getById(id);
        StoreInfoVO vo = new StoreInfoVO();
        BeanUtils.copyProperties(storeInfo,vo);
        BeanUtils.copyProperties(storeInfo, vo);
        vo.setVideoPoint(videoPointService.getById(storeInfo.getVideoId()));
        return CommonResult.success(storeInfo);
        return CommonResult.success(vo);
    }
    @ApiOperation(value = "添加门店信息")
    @RequestMapping(value = "/add", method = RequestMethod.POST)
    @ResponseBody
    @LogSave(operationType = "门店管理",contain = "添加门店")
    @LogSave(operationType = "门店管理", contain = "添加门店")
    public CommonResult<StoreInfo> add(@Validated @RequestBody UmsStoreInfoParam umsStoreInfoParam) {
        StoreInfo storeInfo = StoreInfo.builder()
                .owner(umsStoreInfoParam.getOwner())
@@ -96,6 +97,7 @@
    @ApiOperation(value = "根据id删除门店信息")
    @RequestMapping(value = "/delete/{id}", method = RequestMethod.GET)
    @ResponseBody
    @LogSave(operationType = "门店管理", contain = "删除门店")
    public CommonResult delete(@PathVariable Long id) {
        boolean success = storeInfoService.removeById(id);
        if (success) {
@@ -108,6 +110,7 @@
    @ApiOperation(value = "修改门店信息")
    @RequestMapping(value = "/update", method = RequestMethod.PUT)
    @ResponseBody
    @LogSave(operationType = "门店管理", contain = "修改门店")
    public CommonResult update(@RequestBody StoreInfo storeInfo) {
        boolean success = storeInfoService.updateById(storeInfo);
        if (success) {
@@ -120,6 +123,7 @@
    @ApiOperation(value = "根据excel模板批量导入门店信息")
    @RequestMapping(value = "/add/excel", method = RequestMethod.POST)
    @ResponseBody
    @LogSave(operationType = "门店管理", contain = "导入门店")
    public CommonResult addByExcel(MultipartFile file) {
        boolean success = storeInfoService.addByExcel(file);
        if (success) {