|
|
@@ -48,13 +48,13 @@ public class FsStoreVerifyCodeScrmController extends BaseController
|
|
|
/**
|
|
|
* 查询核销码列表
|
|
|
*/
|
|
|
- @PreAuthorize("@ss.hasPermi('shop:scrm:list')")
|
|
|
+// @PreAuthorize("@ss.hasPermi('shop:scrm:list')")
|
|
|
@GetMapping("/list")
|
|
|
public TableDataInfo list(FsStoreVerifyCodeScrm fsStoreVerifyCodeScrm)
|
|
|
{
|
|
|
startPage();
|
|
|
StoreLoginUserScrm loginUser = tokenService.getLoginUser(ServletUtils.getRequest());
|
|
|
- fsStoreVerifyCodeScrm.setCreateBy(loginUser.getStoreId().toString());
|
|
|
+ fsStoreVerifyCodeScrm.setCreateBy(loginUser.getFsStore().getStoreId().toString());
|
|
|
List<FsStoreVerifyCodeScrm> list = fsStoreVerifyCodeScrmService.selectFsStoreVerifyCodeScrmList(fsStoreVerifyCodeScrm);
|
|
|
return getDataTable(list);
|
|
|
}
|
|
|
@@ -62,7 +62,7 @@ public class FsStoreVerifyCodeScrmController extends BaseController
|
|
|
/**
|
|
|
* 导出核销码列表
|
|
|
*/
|
|
|
- @PreAuthorize("@ss.hasPermi('shop:scrm:export')")
|
|
|
+// @PreAuthorize("@ss.hasPermi('shop:scrm:export')")
|
|
|
@Log(title = "核销码", businessType = BusinessType.EXPORT)
|
|
|
@GetMapping("/export")
|
|
|
public AjaxResult export(FsStoreVerifyCodeScrm fsStoreVerifyCodeScrm)
|
|
|
@@ -75,7 +75,7 @@ public class FsStoreVerifyCodeScrmController extends BaseController
|
|
|
/**
|
|
|
* 获取核销码详细信息
|
|
|
*/
|
|
|
- @PreAuthorize("@ss.hasPermi('shop:scrm:query')")
|
|
|
+// @PreAuthorize("@ss.hasPermi('shop:scrm:query')")
|
|
|
@GetMapping(value = "/{id}")
|
|
|
public AjaxResult getInfo(@PathVariable("id") String id)
|
|
|
{
|
|
|
@@ -85,39 +85,39 @@ public class FsStoreVerifyCodeScrmController extends BaseController
|
|
|
/**
|
|
|
* 新增核销码
|
|
|
*/
|
|
|
- @PreAuthorize("@ss.hasPermi('shop:scrm:add')")
|
|
|
+// @PreAuthorize("@ss.hasPermi('shop:scrm:add')")
|
|
|
@Log(title = "核销码", businessType = BusinessType.INSERT)
|
|
|
@PostMapping
|
|
|
public AjaxResult add(@RequestBody FsStoreVerifyCodeScrm fsStoreVerifyCodeScrm)
|
|
|
{
|
|
|
StoreLoginUserScrm loginUser = tokenService.getLoginUser(ServletUtils.getRequest());
|
|
|
- fsStoreVerifyCodeScrm.setCreateBy(loginUser.getStoreId().toString());
|
|
|
+ fsStoreVerifyCodeScrm.setCreateBy(loginUser.getFsStore().getStoreId().toString());
|
|
|
return toAjax(fsStoreVerifyCodeScrmService.insertFsStoreVerifyCodeScrm(fsStoreVerifyCodeScrm));
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 修改核销码
|
|
|
*/
|
|
|
- @PreAuthorize("@ss.hasPermi('shop:scrm:edit')")
|
|
|
+// @PreAuthorize("@ss.hasPermi('shop:scrm:edit')")
|
|
|
@Log(title = "核销码", businessType = BusinessType.UPDATE)
|
|
|
@PutMapping
|
|
|
public AjaxResult edit(@RequestBody FsStoreVerifyCodeScrm fsStoreVerifyCodeScrm)
|
|
|
{
|
|
|
StoreLoginUserScrm loginUser = tokenService.getLoginUser(ServletUtils.getRequest());
|
|
|
- fsStoreVerifyCodeScrm.setCreateBy(loginUser.getStoreId().toString());
|
|
|
+ fsStoreVerifyCodeScrm.setCreateBy(loginUser.getFsStore().getStoreId().toString());
|
|
|
return toAjax(fsStoreVerifyCodeScrmService.updateFsStoreVerifyCodeScrm(fsStoreVerifyCodeScrm));
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 删除核销码
|
|
|
*/
|
|
|
- @PreAuthorize("@ss.hasPermi('shop:scrm:remove')")
|
|
|
+// @PreAuthorize("@ss.hasPermi('shop:scrm:remove')")
|
|
|
@Log(title = "核销码", businessType = BusinessType.DELETE)
|
|
|
@DeleteMapping("/{ids}")
|
|
|
public AjaxResult remove(@PathVariable Long[] ids)
|
|
|
{
|
|
|
StoreLoginUserScrm loginUser = tokenService.getLoginUser(ServletUtils.getRequest());
|
|
|
- return toAjax(fsStoreVerifyCodeScrmService.deleteFsStoreVerifyCodeScrmByIds(ids,loginUser.getStoreId()));
|
|
|
+ return toAjax(fsStoreVerifyCodeScrmService.deleteFsStoreVerifyCodeScrmByIds(ids,loginUser.getFsStore().getStoreId()));
|
|
|
}
|
|
|
|
|
|
@GetMapping("/downloadTemplate")
|
|
|
@@ -132,7 +132,6 @@ public class FsStoreVerifyCodeScrmController extends BaseController
|
|
|
* @return R
|
|
|
* **/
|
|
|
@Log(title = "核销码批量导入", businessType = BusinessType.IMPORT)
|
|
|
- @PreAuthorize("@ss.hasPermi('shop:scrm:importExpress')")
|
|
|
@PostMapping("/importExpress")
|
|
|
public R importExpress(@RequestParam("file") MultipartFile file,@RequestParam("productId") Long productId) {
|
|
|
// 1. 检查文件是否为空
|
|
|
@@ -157,7 +156,7 @@ public class FsStoreVerifyCodeScrmController extends BaseController
|
|
|
R.error("操作失败,导入数据不能大于200条!");
|
|
|
}
|
|
|
StoreLoginUserScrm loginUser = tokenService.getLoginUser(ServletUtils.getRequest());
|
|
|
- return fsStoreVerifyCodeScrmService.importExpress(dtoList,loginUser.getStoreId().toString(),productId);
|
|
|
+ return fsStoreVerifyCodeScrmService.importExpress(dtoList,loginUser.getFsStore().getStoreId().toString(),productId);
|
|
|
}else {
|
|
|
R.error("操作失败,导入数据不能小于1条!");
|
|
|
}
|
|
|
@@ -171,7 +170,7 @@ public class FsStoreVerifyCodeScrmController extends BaseController
|
|
|
* 核销码核销
|
|
|
* @return R
|
|
|
* **/
|
|
|
- @PreAuthorize("@ss.hasPermi('shop:scrm:writeOff')")
|
|
|
+// @PreAuthorize("@ss.hasPermi('shop:scrm:writeOff')")
|
|
|
@Log(title = "核销码核销", businessType = BusinessType.IMPORT)
|
|
|
@PostMapping("/writeOff")
|
|
|
public R writeOff(@RequestBody WriteOffDTO writeOffDTO){
|
|
|
@@ -179,7 +178,7 @@ public class FsStoreVerifyCodeScrmController extends BaseController
|
|
|
return R.error("操作失败,核销ID列表不能为空!");
|
|
|
}
|
|
|
StoreLoginUserScrm loginUser = tokenService.getLoginUser(ServletUtils.getRequest());
|
|
|
- return fsStoreVerifyCodeScrmService.writeOff(writeOffDTO.getIds(),String.valueOf(loginUser.getStoreId()));
|
|
|
+ return fsStoreVerifyCodeScrmService.writeOff(writeOffDTO.getIds(),loginUser.getFsStore().getStoreId().toString());
|
|
|
}
|
|
|
|
|
|
|