|
|
@@ -10,14 +10,12 @@ import org.springframework.util.CollectionUtils;
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
import org.springframework.web.multipart.MultipartRequest;
|
|
|
import shop.alien.entity.result.R;
|
|
|
-import shop.alien.entity.store.StoreBusinessInfo;
|
|
|
-import shop.alien.entity.store.StoreImg;
|
|
|
-import shop.alien.entity.store.StoreInfo;
|
|
|
-import shop.alien.entity.store.StoreInfoDraft;
|
|
|
+import shop.alien.entity.store.*;
|
|
|
import shop.alien.entity.store.dto.StoreInfoDto;
|
|
|
import shop.alien.entity.store.vo.*;
|
|
|
import shop.alien.mapper.StoreImgMapper;
|
|
|
import shop.alien.mapper.TagsMainMapper;
|
|
|
+import shop.alien.mapper.WebAuditMapper;
|
|
|
import shop.alien.store.service.StoreInfoService;
|
|
|
|
|
|
import java.io.IOException;
|
|
|
@@ -46,6 +44,8 @@ public class StoreInfoController {
|
|
|
|
|
|
private final TagsMainMapper tagsMainMapper;
|
|
|
|
|
|
+ private final WebAuditMapper webAuditMapper;
|
|
|
+
|
|
|
@ApiOperation("获取所有门店")
|
|
|
@ApiOperationSupport(order = 1)
|
|
|
@GetMapping("/getAll")
|
|
|
@@ -668,6 +668,12 @@ public class StoreInfoController {
|
|
|
log.info("StoreInfoController.uploadfoodLicence?storeImg={}", storeImg);
|
|
|
int num = storeInfoService.uploadfoodLicence(storeImg);
|
|
|
if (num > 0) {
|
|
|
+ WebAudit webAudit = new WebAudit();
|
|
|
+ webAudit.setStoreInfoId(storeImg.getStoreId().toString());
|
|
|
+ webAudit.setType("7");
|
|
|
+ webAudit.setStatus("0");
|
|
|
+ webAudit.setContent("经营许可证");
|
|
|
+ webAuditMapper.insert(webAudit);
|
|
|
return R.success("食品经营许可证图片添加成功");
|
|
|
}
|
|
|
return R.fail("食品经营许可证图片添加失败");
|
|
|
@@ -692,6 +698,12 @@ public class StoreInfoController {
|
|
|
storeInfo.setFoodLicenceStatus(storeInfoDto.getFoodLicenceStatus());
|
|
|
boolean flag = storeInfoService.updateById(storeInfo);
|
|
|
if (flag) {
|
|
|
+ //待审核状态变为已审核
|
|
|
+ WebAudit webAudit = webAuditMapper.selectOne(new LambdaQueryWrapper<WebAudit>().eq(WebAudit::getStoreInfoId,storeInfo.getId()).eq(WebAudit::getDeleteFlag,0).eq(WebAudit::getType,"7"));
|
|
|
+ if(webAudit != null){
|
|
|
+ webAudit.setStatus("1");
|
|
|
+ webAuditMapper.updateById(webAudit);
|
|
|
+ }
|
|
|
return R.success("拒绝审核成功");
|
|
|
} else {
|
|
|
return R.fail("拒绝审核失败");
|
|
|
@@ -701,7 +713,15 @@ public class StoreInfoController {
|
|
|
storeInfo.setFoodLicenceStatus(storeInfoDto.getFoodLicenceStatus());
|
|
|
boolean flag = storeInfoService.updateById(storeInfo);
|
|
|
if (flag) {
|
|
|
- storeInfoService.foodLicenceType(storeInfoDto.getId());
|
|
|
+ int num = storeInfoService.foodLicenceType(storeInfoDto.getId());
|
|
|
+ if(num > 0){
|
|
|
+ //待审核状态变为已审核
|
|
|
+ WebAudit webAudit = webAuditMapper.selectOne(new LambdaQueryWrapper<WebAudit>().eq(WebAudit::getStoreInfoId,storeInfo.getId()).eq(WebAudit::getDeleteFlag,0).eq(WebAudit::getType,"7"));
|
|
|
+ if(webAudit != null){
|
|
|
+ webAudit.setStatus("1");
|
|
|
+ webAuditMapper.updateById(webAudit);
|
|
|
+ }
|
|
|
+ }
|
|
|
return R.success("审核通过成功");
|
|
|
}else{
|
|
|
return R.fail("审核失败");
|