|
|
@@ -1,6 +1,5 @@
|
|
|
package com.fs.hisStore.controller.store;
|
|
|
|
|
|
-import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
|
|
|
import com.baomidou.mybatisplus.core.toolkit.ObjectUtils;
|
|
|
import com.fs.common.annotation.Log;
|
|
|
import com.fs.common.core.controller.BaseController;
|
|
|
@@ -11,9 +10,7 @@ import com.fs.common.enums.BusinessType;
|
|
|
import com.fs.common.utils.ServletUtils;
|
|
|
import com.fs.common.utils.poi.ExcelUtil;
|
|
|
import com.fs.framework.service.TokenServiceScrm;
|
|
|
-import com.fs.his.param.FsStoreProductListSParam;
|
|
|
import com.fs.his.vo.FsStoreProductExcelVO;
|
|
|
-import com.fs.his.vo.FsStoreProductListSVO;
|
|
|
import com.fs.his.vo.OptionsVO;
|
|
|
import com.fs.hisStore.domain.*;
|
|
|
import com.fs.hisStore.param.FsStoreProductAddEditParam;
|
|
|
@@ -22,13 +19,13 @@ import com.fs.hisStore.service.IFsStoreProductScrmService;
|
|
|
import com.fs.hisStore.utils.StoreAuditLogUtil;
|
|
|
import com.fs.hisStore.utils.UserUtil;
|
|
|
import com.fs.hisStore.vo.FsStoreProductListVO;
|
|
|
+import com.fs.hisStore.vo.SelectForbiddenKeywordsVo;
|
|
|
import com.fs.store.vo.FsStoreProductStoreExcelVO;
|
|
|
import com.mysql.cj.util.StringUtils;
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.http.HttpStatus;
|
|
|
import org.springframework.http.ResponseEntity;
|
|
|
-import org.springframework.security.access.prepost.PreAuthorize;
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
import org.springframework.web.multipart.MultipartFile;
|
|
|
|
|
|
@@ -63,15 +60,14 @@ public class FsStoreProductScrmController extends BaseController
|
|
|
* @param keyWords
|
|
|
* @return
|
|
|
*/
|
|
|
- @Log(title = "商品管理", businessType = BusinessType.AUDIT, isStoreLog = true, logParam = {"商品", "商品关键字检查"})
|
|
|
@GetMapping("/selectForbiddenKeywords/{keyWords}")
|
|
|
public R selectForbiddenKeywords(@PathVariable("keyWords")String keyWords) {
|
|
|
if(org.apache.commons.lang3.StringUtils.isEmpty(keyWords))return R.ok().put("data", true);
|
|
|
- List<ForbiddenOnlineMedicine> list = fsStoreProductService.selectForbiddenKeywords(keyWords);
|
|
|
- if(CollectionUtils.isEmpty(list)){
|
|
|
+ SelectForbiddenKeywordsVo selectForbiddenKeywordsVo = fsStoreProductService.selectForbiddenKeywords(keyWords);
|
|
|
+ if(ObjectUtils.isEmpty(selectForbiddenKeywordsVo)){
|
|
|
return R.ok().put("data", true);
|
|
|
}else{
|
|
|
- return R.ok().put("data", false).put("msg", list.get(0).getModule());
|
|
|
+ return R.ok().put("data", false).put("msg", selectForbiddenKeywordsVo.getMsg());
|
|
|
}
|
|
|
}
|
|
|
|
|
|
@@ -182,7 +178,6 @@ public class FsStoreProductScrmController extends BaseController
|
|
|
@DeleteMapping("/{productIds}")
|
|
|
public R remove(@PathVariable Long[] productIds)
|
|
|
{
|
|
|
-
|
|
|
return fsStoreProductService.deleteFsStoreProductByIds(productIds);
|
|
|
}
|
|
|
|
|
|
@@ -210,7 +205,6 @@ public class FsStoreProductScrmController extends BaseController
|
|
|
@GetMapping(value = "/{productId}")
|
|
|
public R getInfo(@PathVariable("productId") Long productId)
|
|
|
{
|
|
|
-
|
|
|
FsStoreProductScrm product = fsStoreProductService.selectFsStoreProductByProductId(productId);
|
|
|
List<FsStoreProductAttrScrm> attrs=attrService.selectFsStoreProductAttrByProductId(productId);
|
|
|
return R.ok().put("data",product).put("attrs", attrs);
|
|
|
@@ -220,7 +214,6 @@ public class FsStoreProductScrmController extends BaseController
|
|
|
@GetMapping("/getAllStoreProductRule")
|
|
|
public R getAllList()
|
|
|
{
|
|
|
-
|
|
|
List<FsStoreProductRuleScrm> list = fsStoreProductService.selectFsStoreProductRuleList();
|
|
|
return R.ok().put("data",list);
|
|
|
}
|