|
|
@@ -15,9 +15,7 @@ import shop.alien.entity.store.*;
|
|
|
import shop.alien.entity.store.dto.StoreInfoDto;
|
|
|
import shop.alien.entity.store.vo.*;
|
|
|
import shop.alien.entity.storePlatform.StoreLicenseHistory;
|
|
|
-import shop.alien.mapper.StoreCommentSummaryInterestMapper;
|
|
|
-import shop.alien.mapper.TagsMainMapper;
|
|
|
-import shop.alien.mapper.WebAuditMapper;
|
|
|
+import shop.alien.mapper.*;
|
|
|
import shop.alien.mapper.storePlantform.StoreLicenseHistoryMapper;
|
|
|
import shop.alien.storeplatform.service.StoreBusinessService;
|
|
|
|
|
|
@@ -33,7 +31,7 @@ import java.util.Set;
|
|
|
* @since 2024-12-05
|
|
|
*/
|
|
|
@Slf4j
|
|
|
-@Api(tags = {"二期-门店信息"})
|
|
|
+@Api(tags = {"商家平台-门店信息"})
|
|
|
@ApiSort(1)
|
|
|
@CrossOrigin
|
|
|
@RestController
|
|
|
@@ -41,7 +39,7 @@ import java.util.Set;
|
|
|
@RequiredArgsConstructor
|
|
|
public class StoreBusinessController {
|
|
|
|
|
|
- private final StoreBusinessService storeInfoService;
|
|
|
+ private final StoreBusinessService storeBusinessService;
|
|
|
|
|
|
private final TagsMainMapper tagsMainMapper;
|
|
|
|
|
|
@@ -54,12 +52,16 @@ public class StoreBusinessController {
|
|
|
/** 商户证照历史记录数据访问对象 */
|
|
|
private final StoreLicenseHistoryMapper licenseHistoryMapper;
|
|
|
|
|
|
+ private final StoreUserMapper storeUserMapper;
|
|
|
+
|
|
|
+ private final StoreImgMapper storeImgMapper;
|
|
|
+
|
|
|
@ApiOperation("获取所有门店")
|
|
|
@ApiOperationSupport(order = 1)
|
|
|
@GetMapping("/getAll")
|
|
|
public R<List<StoreInfo>> getAll() {
|
|
|
log.info("StoreInfoController.getAll");
|
|
|
- return R.data(storeInfoService.list());
|
|
|
+ return R.data(storeBusinessService.list());
|
|
|
}
|
|
|
|
|
|
@ApiOperation("根据id获取门店")
|
|
|
@@ -68,7 +70,7 @@ public class StoreBusinessController {
|
|
|
@GetMapping("/getOne")
|
|
|
public R<StoreInfo> getOne(Integer id) {
|
|
|
log.info("StoreInfoController.getOne?id={}", id);
|
|
|
- return R.data(storeInfoService.getById(id));
|
|
|
+ return R.data(storeBusinessService.getById(id));
|
|
|
}
|
|
|
|
|
|
@ApiOperation("门店装修-编辑门店信息")
|
|
|
@@ -77,7 +79,7 @@ public class StoreBusinessController {
|
|
|
public R<StoreInfo> saveOrUpdate(@RequestBody StoreInfoDto storeInfo) {
|
|
|
log.info("StoreInfoController.saveOrUpdate?storeInfo={}", storeInfo);
|
|
|
try {
|
|
|
- int num = storeInfoService.saveOrUpdateStoreInfo(storeInfo);
|
|
|
+ int num = storeBusinessService.saveOrUpdateStoreInfo(storeInfo);
|
|
|
if (num > 0) {
|
|
|
return R.success("成功");
|
|
|
}
|
|
|
@@ -92,7 +94,7 @@ public class StoreBusinessController {
|
|
|
@PostMapping("/saveStoreInfo")
|
|
|
public R saveStoreInfo(@RequestBody StoreInfoDto storeInfoDto) throws Exception {
|
|
|
log.info("StoreInfoController.saveStoreInfo?storeInfoDto={}", storeInfoDto);
|
|
|
- StoreInfoVo storeInfoVo = storeInfoService.saveStoreInfo(storeInfoDto);
|
|
|
+ StoreInfoVo storeInfoVo = storeBusinessService.saveStoreInfo(storeInfoDto);
|
|
|
if (storeInfoVo != null) {
|
|
|
return R.data(storeInfoVo);
|
|
|
}
|
|
|
@@ -104,7 +106,7 @@ public class StoreBusinessController {
|
|
|
@PostMapping("/saveStoreInfoDraft")
|
|
|
public R<Boolean> saveStoreInfoDraft(@RequestBody StoreInfoDraft storeInfoDraft) {
|
|
|
log.info("StoreInfoController.saveStoreInfoDraft?storeInfoDraft={}", storeInfoDraft);
|
|
|
- int num = storeInfoService.saveStoreInfoDraft(storeInfoDraft);
|
|
|
+ int num = storeBusinessService.saveStoreInfoDraft(storeInfoDraft);
|
|
|
if (num > 0) {
|
|
|
return R.data(true);
|
|
|
}
|
|
|
@@ -116,7 +118,7 @@ public class StoreBusinessController {
|
|
|
@GetMapping("/selectDraftByUserId")
|
|
|
public R<StoreInfoDraft> selectDraftByUserId(int storeUserId) throws Exception {
|
|
|
log.info("StoreInfoController.saveStoreInfoDraft?storeUserId={}", storeUserId);
|
|
|
- return R.data(storeInfoService.selectDraftByUserId(storeUserId));
|
|
|
+ return R.data(storeBusinessService.selectDraftByUserId(storeUserId));
|
|
|
}
|
|
|
|
|
|
|
|
|
@@ -125,7 +127,7 @@ public class StoreBusinessController {
|
|
|
@PostMapping("/editStoreInfo")
|
|
|
public R editStoreInfo(@RequestBody StoreInfoDto storeInfoDto) {
|
|
|
log.info("StoreInfoController.editStoreInfo?storeInfoDto={}", storeInfoDto);
|
|
|
- StoreInfoVo storeInfoVo = storeInfoService.editStoreInfo(storeInfoDto);
|
|
|
+ StoreInfoVo storeInfoVo = storeBusinessService.editStoreInfo(storeInfoDto);
|
|
|
if (storeInfoVo != null) {
|
|
|
return R.data(storeInfoVo);
|
|
|
}
|
|
|
@@ -137,7 +139,7 @@ public class StoreBusinessController {
|
|
|
@PostMapping("/updateStoreCommissionRate")
|
|
|
public R updateStoreCommissionRate(@RequestBody StoreInfoDto storeInfoDto) {
|
|
|
log.info("StoreInfoController.updateStoreCommissionRate?storeInfoDto={}", storeInfoDto);
|
|
|
- if (storeInfoService.editStoreCommissionRate(storeInfoDto) > 0) {
|
|
|
+ if (storeBusinessService.editStoreCommissionRate(storeInfoDto) > 0) {
|
|
|
return R.data("成功");
|
|
|
}
|
|
|
return R.fail("失败");
|
|
|
@@ -150,7 +152,7 @@ public class StoreBusinessController {
|
|
|
log.info("StoreInfoController.deleteStoreInfo?storeInfoDto={}", storeInfoDto);
|
|
|
String s;
|
|
|
try {
|
|
|
- s = storeInfoService.deleteStoreInfo(storeInfoDto);
|
|
|
+ s = storeBusinessService.deleteStoreInfo(storeInfoDto);
|
|
|
} catch (Exception e) {
|
|
|
return R.fail("失败");
|
|
|
}
|
|
|
@@ -167,7 +169,7 @@ public class StoreBusinessController {
|
|
|
public R restPassword(@RequestBody StoreInfoDto storeInfoDto) {
|
|
|
log.info("StoreInfoController.restPassword?storeInfoDto={}", storeInfoDto);
|
|
|
try {
|
|
|
- storeInfoService.restPassword(storeInfoDto);
|
|
|
+ storeBusinessService.restPassword(storeInfoDto);
|
|
|
} catch (Exception e) {
|
|
|
return R.fail("失败");
|
|
|
}
|
|
|
@@ -179,7 +181,7 @@ public class StoreBusinessController {
|
|
|
@PostMapping("/delete")
|
|
|
public R<String> delete(@RequestBody List<Integer> ids) {
|
|
|
log.info("StoreInfoController.delete?ids={}", ids);
|
|
|
- if (storeInfoService.removeByIds(ids)) {
|
|
|
+ if (storeBusinessService.removeByIds(ids)) {
|
|
|
return R.success("删除成功");
|
|
|
}
|
|
|
return R.fail("删除失败");
|
|
|
@@ -191,7 +193,7 @@ public class StoreBusinessController {
|
|
|
@GetMapping("/getDetail")
|
|
|
public R<StoreMainInfoVo> getDetail(Integer id) {
|
|
|
log.info("StoreInfoController.getDetail?id={}", id);
|
|
|
- return R.data(storeInfoService.getDetail(id));
|
|
|
+ return R.data(storeBusinessService.getDetail(id));
|
|
|
}
|
|
|
|
|
|
@ApiOperation(value = "门店信息-修改后展示")
|
|
|
@@ -200,7 +202,7 @@ public class StoreBusinessController {
|
|
|
@GetMapping("/getStoreInfo")
|
|
|
public R<StoreMainInfoVo> getStoreInfo(Integer id) {
|
|
|
log.info("StoreInfoController.getStoreInfo?id={}", id);
|
|
|
- return R.data(storeInfoService.getStoreInfo(id));
|
|
|
+ return R.data(storeBusinessService.getStoreInfo(id));
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
@@ -220,7 +222,7 @@ public class StoreBusinessController {
|
|
|
@GetMapping("/getStorePage")
|
|
|
public R<IPage<StoreInfoVo>> getStoresPage(@RequestParam(defaultValue = "1") int pageNum, @RequestParam(defaultValue = "10") int pageSize, @RequestParam(required = false) String storeName, @RequestParam(required = false) String storeContact, @RequestParam(required = false) String id, @RequestParam(required = false) String storePhone, @RequestParam(required = false) String storeType, @RequestParam(required = false) String expiredState, @RequestParam(required = false) String storeApplicationStatus, @RequestParam(required = false) String businessSection, @RequestParam(required = false) String storeStatus, @RequestParam(required = false) String jingdu, @RequestParam(required = false) String weidu, @RequestParam(required = false) String renewContractStatus, @RequestParam(required = false) String foodLicenceStatus, @RequestParam(required = false) String foodLicenceWhetherExpiredStatus) {
|
|
|
log.info("StoreInfoController.getStoresPage?pageNum={},pageSize={},storeName={},storeContact={},id={},storePhone={},storeType={},expiredState={},storeApplicationStatus={},storeStatus={},businessSection={},jingdu={},weidu={},renewContractStatus={},foodLicenceStatus={},foodLicenceWhetherExpiredStatus={}", pageNum, pageSize, storeName, storeContact, id, storePhone, storeType, expiredState, storeApplicationStatus, storeStatus, businessSection, jingdu, weidu, renewContractStatus, foodLicenceStatus, foodLicenceWhetherExpiredStatus);
|
|
|
- return R.data(storeInfoService.getStorePage(pageNum, pageSize, storeName, storeContact, id, storePhone, storeType, expiredState, storeApplicationStatus, storeStatus, businessSection, jingdu, weidu, renewContractStatus, foodLicenceStatus, foodLicenceWhetherExpiredStatus));
|
|
|
+ return R.data(storeBusinessService.getStorePage(pageNum, pageSize, storeName, storeContact, id, storePhone, storeType, expiredState, storeApplicationStatus, storeStatus, businessSection, jingdu, weidu, renewContractStatus, foodLicenceStatus, foodLicenceWhetherExpiredStatus));
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
@@ -235,7 +237,7 @@ public class StoreBusinessController {
|
|
|
@GetMapping("/resetPassword")
|
|
|
public R<Boolean> resetPassword(@RequestParam("storeId") String storeId) {
|
|
|
log.info("StoreInfoController.resetPassword?id={}", storeId);
|
|
|
- if (storeInfoService.resetPassword(storeId)) {
|
|
|
+ if (storeBusinessService.resetPassword(storeId)) {
|
|
|
return R.success("密码重置成功");
|
|
|
}
|
|
|
return R.fail("密码重置失败");
|
|
|
@@ -254,7 +256,7 @@ public class StoreBusinessController {
|
|
|
@GetMapping("/setStoreState")
|
|
|
public R<Boolean> setStoreState(@RequestParam("storeId") String storeId, @RequestParam("businessStatus") Integer businessStatus) {
|
|
|
log.info("StoreInfoController.setStoreState?storeId={},storeState={}", storeId, businessStatus);
|
|
|
- if (storeInfoService.setStoreState(storeId, businessStatus)) {
|
|
|
+ if (storeBusinessService.setStoreState(storeId, businessStatus)) {
|
|
|
return R.success("状态修改成功");
|
|
|
}
|
|
|
return R.fail("状态修改失败");
|
|
|
@@ -273,7 +275,7 @@ public class StoreBusinessController {
|
|
|
public R<Boolean> saveStore(MultipartRequest multipartRequest, StoreInfo store) {
|
|
|
Set<String> fileNameSet = multipartRequest.getMultiFileMap().keySet();
|
|
|
log.info("StoreInfoController.saveStore?store={}&file={}", store.toString(), fileNameSet);
|
|
|
- if (storeInfoService.saveStore(multipartRequest, store)) {
|
|
|
+ if (storeBusinessService.saveStore(multipartRequest, store)) {
|
|
|
return R.success("新增成功");
|
|
|
}
|
|
|
return R.fail("新增失败");
|
|
|
@@ -284,7 +286,7 @@ public class StoreBusinessController {
|
|
|
@GetMapping("/export")
|
|
|
public ResponseEntity<byte[]> exportToExcel() {
|
|
|
log.info("StoreInfoController.exportToExcel");
|
|
|
- return storeInfoService. exportToExcel();
|
|
|
+ return storeBusinessService. exportToExcel();
|
|
|
}
|
|
|
|
|
|
@ApiOperation(value = "web端查询经营板块信息")
|
|
|
@@ -292,7 +294,7 @@ public class StoreBusinessController {
|
|
|
@GetMapping("/getBusinessSection")
|
|
|
public R<List<StoreDictionaryVo>> getBusinessSection() {
|
|
|
log.info("StoreInfoController.getBusinessSection");
|
|
|
- return R.data(storeInfoService.getBusinessSection());
|
|
|
+ return R.data(storeBusinessService.getBusinessSection());
|
|
|
}
|
|
|
|
|
|
@ApiOperation(value = "web端查询经营板块的经营种类信息")
|
|
|
@@ -300,7 +302,7 @@ public class StoreBusinessController {
|
|
|
@GetMapping("/getBusinessSectionTypes")
|
|
|
public R<List<StoreDictionaryVo>> getBusinessSectionTypes(@RequestParam("parentId") String parentId) {
|
|
|
log.info("StoreInfoController.getBusinessSectionTypes?parentId={}", parentId);
|
|
|
- return R.data(storeInfoService.getBusinessSectionTypes(parentId));
|
|
|
+ return R.data(storeBusinessService.getBusinessSectionTypes(parentId));
|
|
|
}
|
|
|
|
|
|
@ApiOperation(value = "web端查询未绑定店铺的商家端账号")
|
|
|
@@ -308,7 +310,7 @@ public class StoreBusinessController {
|
|
|
@GetMapping("/getUnboundAccountList")
|
|
|
public R<List<StoreUserVo>> getUnboundAccountList(@RequestParam(value = "id", required = false) String id) {
|
|
|
log.info("StoreInfoController.getUnboundAccountList");
|
|
|
- return R.data(storeInfoService.getUnboundAccountList(id));
|
|
|
+ return R.data(storeBusinessService.getUnboundAccountList(id));
|
|
|
}
|
|
|
|
|
|
@ApiOperation(value = "web端新增经营板块及经营类型")
|
|
|
@@ -316,7 +318,7 @@ public class StoreBusinessController {
|
|
|
@PostMapping("/addBusinessSectionAndTypes")
|
|
|
public R addBusinessSectionAndTypes(@RequestBody StoreInfoDto storeInfoDto) {
|
|
|
log.info("StoreInfoController.addBusinessSectionAndTypes");
|
|
|
- storeInfoService.addBusinessSectionAndTypes(storeInfoDto);
|
|
|
+ storeBusinessService.addBusinessSectionAndTypes(storeInfoDto);
|
|
|
return R.success("新增成功");
|
|
|
}
|
|
|
|
|
|
@@ -325,7 +327,7 @@ public class StoreBusinessController {
|
|
|
@GetMapping("/getStoreDetail")
|
|
|
public R getStoreDetail(@RequestParam("id") String id, @RequestParam(value = "userId", required = false) String userId, @RequestParam(value = "jingdu", required = false) String jingdu, @RequestParam(value = "weidu", required = false) String weidu) {
|
|
|
log.info("StoreInfoController.getStoreDetail?id={},userId={},jingdu={},weidu={}", id, jingdu, weidu);
|
|
|
- StoreInfoVo storeDetail = storeInfoService.getStoreDetail(id, userId, jingdu, weidu);
|
|
|
+ StoreInfoVo storeDetail = storeBusinessService.getStoreDetail(id, userId, jingdu, weidu);
|
|
|
return R.data(storeDetail);
|
|
|
}
|
|
|
|
|
|
@@ -335,7 +337,7 @@ public class StoreBusinessController {
|
|
|
@ApiImplicitParams({@ApiImplicitParam(name = "id", value = "门店id", dataType = "String", paramType = "query"), @ApiImplicitParam(name = "approvalStatus", value = "审批状态(1:审批成功,2:审批失败)", dataType = "int", paramType = "query"), @ApiImplicitParam(name = "reason", value = "原因", dataType = "String", paramType = "query")})
|
|
|
public R approveStoreInfo(@RequestParam("id") String id, @RequestParam("approvalStatus") Integer approvalStatus, @RequestParam(value = "reason", required = false) String reason) {
|
|
|
log.info("StoreInfoController.approveStoreInfo?id={}&approvalStatus={}&reason={}", id, approvalStatus, reason);
|
|
|
- storeInfoService.approveStoreInfo(id, approvalStatus, reason);
|
|
|
+ storeBusinessService.approveStoreInfo(id, approvalStatus, reason);
|
|
|
return R.success("审批完成");
|
|
|
}
|
|
|
|
|
|
@@ -345,7 +347,7 @@ public class StoreBusinessController {
|
|
|
@ApiImplicitParams({@ApiImplicitParam(name = "id", value = "门店id", dataType = "String", paramType = "query"), @ApiImplicitParam(name = "storePhone", value = "联系电话", dataType = "String", paramType = "query"), @ApiImplicitParam(name = "businessSection", value = "经营板块", dataType = "String", paramType = "query"), @ApiImplicitParam(name = "storeApplicationStatus", value = "审核状态", dataType = "String", paramType = "query"),})
|
|
|
public R exportExcel(@RequestParam(value = "id", required = false) String id, @RequestParam(value = "storePhone", required = false) String storePhone, @RequestParam(value = "businessSection", required = false) String businessSection, @RequestParam(value = "storeApplicationStatus", required = false) String storeApplicationStatus) throws IOException {
|
|
|
log.info("StoreInfoController.exportExcel");
|
|
|
- String excelPath = storeInfoService.exportExcel(id, storePhone, businessSection, storeApplicationStatus);
|
|
|
+ String excelPath = storeBusinessService.exportExcel(id, storePhone, businessSection, storeApplicationStatus);
|
|
|
return R.data(excelPath);
|
|
|
}
|
|
|
|
|
|
@@ -355,7 +357,7 @@ public class StoreBusinessController {
|
|
|
@ApiImplicitParams({@ApiImplicitParam(name = "id", value = "门店id", dataType = "String", paramType = "query"), @ApiImplicitParam(name = "storePhone", value = "联系电话", dataType = "String", paramType = "query"), @ApiImplicitParam(name = "businessSection", value = "经营板块", dataType = "String", paramType = "query"), @ApiImplicitParam(name = "storeApplicationStatus", value = "审核状态", dataType = "String", paramType = "query"),})
|
|
|
public R exportExcelExpirationTime(@RequestParam(value = "id", required = false) String id, @RequestParam(value = "expiredState", required = false) String expiredState) throws IOException {
|
|
|
log.info("StoreInfoController.exportExcelExpirationTime");
|
|
|
- String excelPath = storeInfoService.exportExcelExpirationTime(id, expiredState);
|
|
|
+ String excelPath = storeBusinessService.exportExcelExpirationTime(id, expiredState);
|
|
|
return R.data(excelPath);
|
|
|
}
|
|
|
|
|
|
@@ -373,7 +375,7 @@ public class StoreBusinessController {
|
|
|
return R.fail("验证码错误");
|
|
|
}
|
|
|
try {
|
|
|
- storeInfoService.logoutStore(storeInfo);
|
|
|
+ storeBusinessService.logoutStore(storeInfo);
|
|
|
} catch (Exception e) {
|
|
|
return R.fail(e.getMessage());
|
|
|
}
|
|
|
@@ -386,7 +388,7 @@ public class StoreBusinessController {
|
|
|
public R cancelLogoutStore(@RequestBody StoreInfoVo storeInfo) {
|
|
|
log.info("StoreInfoController.cancelLogoutStore?id={}", storeInfo.getId());
|
|
|
try {
|
|
|
- storeInfoService.cancelLogoutStore(storeInfo);
|
|
|
+ storeBusinessService.cancelLogoutStore(storeInfo);
|
|
|
} catch (Exception e) {
|
|
|
return R.fail(e.getMessage());
|
|
|
}
|
|
|
@@ -411,7 +413,7 @@ public class StoreBusinessController {
|
|
|
log.info("八大类用户端筛选请求 - 参数: screeningId={}, lon={}, lat={}, distance={}, flag={}, pageNum={}, pageSize={}", screeningOfEightMajorCategoriesVO.getScreeningId(), screeningOfEightMajorCategoriesVO.getLon(), screeningOfEightMajorCategoriesVO.getLat(), screeningOfEightMajorCategoriesVO.getDistance(), screeningOfEightMajorCategoriesVO.getFlag(), screeningOfEightMajorCategoriesVO.getPageNum(), screeningOfEightMajorCategoriesVO.getPageSize());
|
|
|
try {
|
|
|
// 调用服务层获取筛选结果
|
|
|
- IPage<StoreInfo> result = storeInfoService.getScreening(screeningOfEightMajorCategoriesVO);
|
|
|
+ IPage<StoreInfo> result = storeBusinessService.getScreening(screeningOfEightMajorCategoriesVO);
|
|
|
// 记录响应日志
|
|
|
log.info("八大类用户端筛选响应 - 总记录数: {}, 当前页: {}, 页大小: {}", result.getTotal(), result.getCurrent(), result.getSize());
|
|
|
return R.data(result);
|
|
|
@@ -442,7 +444,7 @@ public class StoreBusinessController {
|
|
|
log.info("新八大类用户端筛选请求 - 参数: screeningId={}, lon={}, lat={}, distance={}, flag={}, pageNum={}, pageSize={}", screeningOfEightMajorCategoriesVO.getScreeningId(), screeningOfEightMajorCategoriesVO.getLon(), screeningOfEightMajorCategoriesVO.getLat(), screeningOfEightMajorCategoriesVO.getDistance(), screeningOfEightMajorCategoriesVO.getFlag(), screeningOfEightMajorCategoriesVO.getPageNum(), screeningOfEightMajorCategoriesVO.getPageSize());
|
|
|
try {
|
|
|
// 调用服务层获取筛选结果
|
|
|
- IPage<StoreInfoVo> result = storeInfoService.getScreeningNew(screeningOfEightMajorCategoriesVO);
|
|
|
+ IPage<StoreInfoVo> result = storeBusinessService.getScreeningNew(screeningOfEightMajorCategoriesVO);
|
|
|
// 记录响应日志
|
|
|
log.info("新八大类用户端筛选响应 - 总记录数: {}, 当前页: {}, 页大小: {}", result.getTotal(), result.getCurrent(), result.getSize());
|
|
|
|
|
|
@@ -471,7 +473,7 @@ public class StoreBusinessController {
|
|
|
public R<List<StoreInfo>> getBusinessTypesName(@RequestParam(value = "businessTypesNames", required = false) String businessTypesNames) {
|
|
|
log.info("StoreInfoController.getBusinessTypesName?businessTypesNames={}", businessTypesNames);
|
|
|
try {
|
|
|
- List<StoreInfo> result = storeInfoService.getBusinessTypesName(businessTypesNames);
|
|
|
+ List<StoreInfo> result = storeBusinessService.getBusinessTypesName(businessTypesNames);
|
|
|
return R.data(result);
|
|
|
} catch (Exception e) {
|
|
|
log.error("八大类用户端经营类型筛选失败", e);
|
|
|
@@ -490,7 +492,7 @@ public class StoreBusinessController {
|
|
|
@GetMapping("/getStoreInfoByStoreTel")
|
|
|
public R<List<StoreInfo>> getStoreInfoByCreateUser(@RequestParam(value = "storeTel") String storeTel) {
|
|
|
log.info("StoreInfoController.getStoreInfoByStoreTel?storeTel={}", storeTel);
|
|
|
- return R.data(storeInfoService.getStoreInfoByStoreTel(storeTel));
|
|
|
+ return R.data(storeBusinessService.getStoreInfoByStoreTel(storeTel));
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
@@ -503,7 +505,7 @@ public class StoreBusinessController {
|
|
|
@GetMapping("/storeInfoVerification")
|
|
|
public R<Map<String, String>> storeInfoVerification(int id) {
|
|
|
log.info("StoreInfoController.storeInfoVerification?id={}", id);
|
|
|
- return R.data(storeInfoService.storeInfoVerification(id));
|
|
|
+ return R.data(storeBusinessService.storeInfoVerification(id));
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
@@ -514,7 +516,7 @@ public class StoreBusinessController {
|
|
|
@GetMapping("/deleteManualStoreInfo")
|
|
|
public R<StoreUserVo> deleteManualStoreInfo(int id) {
|
|
|
log.info("StoreUserController.deleteManualStoreInfo?id={}", id);
|
|
|
- storeInfoService.deleteManualStoreInfo(id);
|
|
|
+ storeBusinessService.deleteManualStoreInfo(id);
|
|
|
return R.success("删除成功");
|
|
|
}
|
|
|
|
|
|
@@ -523,7 +525,7 @@ public class StoreBusinessController {
|
|
|
@GetMapping("/getDecorationDetail")
|
|
|
public R<StoreMainInfoVo> getDecorationDetail(Integer id) {
|
|
|
log.info("StoreInfoController.getDecorationDetail?id={}", id);
|
|
|
- return R.data(storeInfoService.getDecorationDetail(id));
|
|
|
+ return R.data(storeBusinessService.getDecorationDetail(id));
|
|
|
}
|
|
|
|
|
|
@ApiOperation(value = "门店装修-门店营业时间")
|
|
|
@@ -531,14 +533,14 @@ public class StoreBusinessController {
|
|
|
@GetMapping("/getStoreInfoBusinessHours")
|
|
|
public R<List<StoreBusinessInfo>> getStoreInfoBusinessHours(Integer id) {
|
|
|
log.info("StoreInfoController.getStoreInfoBusinessHours?id={}", id);
|
|
|
- return R.data(storeInfoService.getStoreInfoBusinessHours(id));
|
|
|
+ return R.data(storeBusinessService.getStoreInfoBusinessHours(id));
|
|
|
}
|
|
|
|
|
|
@ApiOperation(value = "门店装修-续签合同")
|
|
|
@PostMapping("/uploadRenewalContract")
|
|
|
public R<String> uploadRenewalContract(@RequestBody List<StoreImg> storeImgList) {
|
|
|
log.info("StoreInfoController.uploadRenewalContract?storeImgList={}", storeImgList);
|
|
|
- int num = storeInfoService.uploadRenewalContract(storeImgList);
|
|
|
+ int num = storeBusinessService.uploadRenewalContract(storeImgList);
|
|
|
if (num <= 0) {
|
|
|
return R.fail("续签合同图片添加失败");
|
|
|
}
|
|
|
@@ -550,19 +552,19 @@ public class StoreBusinessController {
|
|
|
@GetMapping("/getStoreContractStatus")
|
|
|
public R<Map<String, Object>> getStoreContractStatus(int id) {
|
|
|
log.info("StoreInfoController.getStoreContractStatus?id={}", id);
|
|
|
- return R.data(storeInfoService.getStoreContractStatus(id));
|
|
|
+ return R.data(storeBusinessService.getStoreContractStatus(id));
|
|
|
}
|
|
|
|
|
|
@ApiOperation(value = "门店装修-审核续签合同状态")
|
|
|
@PostMapping("/updateContractImageStatus")
|
|
|
public R<String> updateContractImageStatus(@RequestBody StoreInfoDto storeInfoDto) {
|
|
|
log.info("StoreInfoController.updateContractImageStatus?storeInfoDto={}", storeInfoDto);
|
|
|
- StoreInfo storeInfo = storeInfoService.getOne(new LambdaQueryWrapper<StoreInfo>().eq(StoreInfo::getId, storeInfoDto.getId()));
|
|
|
+ StoreInfo storeInfo = storeBusinessService.getOne(new LambdaQueryWrapper<StoreInfo>().eq(StoreInfo::getId, storeInfoDto.getId()));
|
|
|
if (storeInfo != null) {
|
|
|
if (storeInfoDto.getRenewContractStatus() == 3) {
|
|
|
storeInfo.setContractReason(storeInfoDto.getContractReason());
|
|
|
storeInfo.setRenewContractStatus(storeInfoDto.getRenewContractStatus());
|
|
|
- boolean flag = storeInfoService.updateById(storeInfo);
|
|
|
+ boolean flag = storeBusinessService.updateById(storeInfo);
|
|
|
if (flag) {
|
|
|
return R.success("拒绝审核成功");
|
|
|
} else {
|
|
|
@@ -571,10 +573,10 @@ public class StoreBusinessController {
|
|
|
}
|
|
|
storeInfo.setRenewContractStatus(storeInfoDto.getRenewContractStatus());
|
|
|
storeInfo.setContractReason(storeInfoDto.getContractReason());
|
|
|
- boolean flag = storeInfoService.updateById(storeInfo);
|
|
|
+ boolean flag = storeBusinessService.updateById(storeInfo);
|
|
|
if (flag) {
|
|
|
//审核通过后删除原店铺合同 续签合同类型变为合同
|
|
|
- int num = storeInfoService.conversionContract(storeInfoDto.getId());
|
|
|
+ int num = storeBusinessService.conversionContract(storeInfoDto.getId());
|
|
|
if (num > 0) {
|
|
|
return R.success("审核通过成功");
|
|
|
} else {
|
|
|
@@ -589,7 +591,7 @@ public class StoreBusinessController {
|
|
|
@PostMapping("/uploadfoodLicence")
|
|
|
public R<String> uploadfoodLicence(@RequestBody StoreImg storeImg) {
|
|
|
log.info("StoreInfoController.uploadfoodLicence?storeImg={}", storeImg);
|
|
|
- int num = storeInfoService.uploadfoodLicence(storeImg);
|
|
|
+ int num = storeBusinessService.uploadfoodLicence(storeImg);
|
|
|
if (num > 0) {
|
|
|
WebAudit webAudit = new WebAudit();
|
|
|
webAudit.setStoreInfoId(storeImg.getStoreId().toString());
|
|
|
@@ -607,19 +609,19 @@ public class StoreBusinessController {
|
|
|
@GetMapping("/getStoreFoodLicenceStatus")
|
|
|
public R<Map<String, Object>> getStoreFoodLicenceStatus(int id) {
|
|
|
log.info("StoreInfoController.getStoreFoodLicenceStatus?id={}", id);
|
|
|
- return R.data(storeInfoService.getStoreFoodLicenceStatus(id));
|
|
|
+ return R.data(storeBusinessService.getStoreFoodLicenceStatus(id));
|
|
|
}
|
|
|
|
|
|
@ApiOperation(value = "门店装修-审核食品经营许可证状态")
|
|
|
@PostMapping("/updatefoodLicenceImageStatus")
|
|
|
public R<String> updatefoodLicenceImageStatus(@RequestBody StoreInfoDto storeInfoDto) {
|
|
|
log.info("StoreInfoController.updatefoodLicenceImageStatus?storeInfoDto={}", storeInfoDto);
|
|
|
- StoreInfo storeInfo = storeInfoService.getOne(new LambdaQueryWrapper<StoreInfo>().eq(StoreInfo::getId, storeInfoDto.getId()));
|
|
|
+ StoreInfo storeInfo = storeBusinessService.getOne(new LambdaQueryWrapper<StoreInfo>().eq(StoreInfo::getId, storeInfoDto.getId()));
|
|
|
if (storeInfo != null) {
|
|
|
if (storeInfoDto.getFoodLicenceStatus() == 3) {
|
|
|
storeInfo.setFoodLicenceReason(storeInfoDto.getFoodLicenceReason());
|
|
|
storeInfo.setFoodLicenceStatus(storeInfoDto.getFoodLicenceStatus());
|
|
|
- boolean flag = storeInfoService.updateById(storeInfo);
|
|
|
+ boolean flag = storeBusinessService.updateById(storeInfo);
|
|
|
if (flag) {
|
|
|
// 审核拒绝时修改提交记录
|
|
|
LambdaUpdateWrapper<StoreLicenseHistory> wrapper = new LambdaUpdateWrapper<>();
|
|
|
@@ -642,9 +644,9 @@ public class StoreBusinessController {
|
|
|
}
|
|
|
storeInfo.setFoodLicenceReason(storeInfoDto.getFoodLicenceReason());
|
|
|
storeInfo.setFoodLicenceStatus(storeInfoDto.getFoodLicenceStatus());
|
|
|
- boolean flag = storeInfoService.updateById(storeInfo);
|
|
|
+ boolean flag = storeBusinessService.updateById(storeInfo);
|
|
|
if (flag) {
|
|
|
- int num = storeInfoService.foodLicenceType(storeInfoDto.getId());
|
|
|
+ int num = storeBusinessService.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"));
|
|
|
@@ -681,4 +683,85 @@ public class StoreBusinessController {
|
|
|
return R.data(list);
|
|
|
}
|
|
|
|
|
|
+
|
|
|
+
|
|
|
+ @ApiOperation("删除标签经营类型关系")
|
|
|
+ @ApiOperationSupport(order = 7)
|
|
|
+ @PostMapping("/setStoreUserInfo")
|
|
|
+ public R<Boolean> setStoreUserInfo(@RequestBody StoreInfoVo storeInfo) {
|
|
|
+ log.info("StoreUserController.setStoreUserInfo?storeInfo={}", storeInfo);
|
|
|
+
|
|
|
+ // 查询店铺图片信息
|
|
|
+ LambdaQueryWrapper<StoreImg> queryWrapper = new LambdaQueryWrapper<StoreImg>().eq(StoreImg::getImgType, 10).eq(StoreImg::getStoreId, storeInfo.getId());
|
|
|
+ StoreImg storeImg = storeImgMapper.selectOne(queryWrapper);
|
|
|
+
|
|
|
+ // 如果查询到店铺图片信息,则更新图片 URL
|
|
|
+ if (storeImg != null) {
|
|
|
+ storeImg.setImgUrl(storeInfo.getImgUrl());
|
|
|
+ int imgUpdateResult = storeImgMapper.updateById(storeImg);
|
|
|
+ if (imgUpdateResult == 0) {
|
|
|
+ return R.fail("修改失败");
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ StoreImg storeImg1 = new StoreImg();
|
|
|
+ storeImg1.setStoreId(storeInfo.getId());
|
|
|
+ storeImg1.setImgType(10);
|
|
|
+ storeImg1.setImgUrl(storeInfo.getImgUrl());
|
|
|
+ storeImg1.setImgSort(0);
|
|
|
+ int insert = storeImgMapper.insert(storeImg1);
|
|
|
+ if (insert == 0) {
|
|
|
+ return R.fail("添加失败");
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ // 更新店铺信息
|
|
|
+ boolean infoUpdateResult = storeBusinessService.updateById(storeInfo);
|
|
|
+ if (!infoUpdateResult) {
|
|
|
+ return R.fail("修改失败");
|
|
|
+ }
|
|
|
+
|
|
|
+ // 所有更新操作成功,返回成功信息
|
|
|
+ return R.success("修改成功");
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * web端查询用户列表
|
|
|
+ */
|
|
|
+ @ApiOperation("创建标签经营类型关系")
|
|
|
+ @ApiOperationSupport(order = 7)
|
|
|
+ @GetMapping("/getStoreUserList")
|
|
|
+ @ApiImplicitParams({@ApiImplicitParam(name = "pageNum", value = "页数", dataType = "int", paramType = "query", required = true), @ApiImplicitParam(name = "pageSize", value = "页容", dataType = "int", paramType = "query", required = true), @ApiImplicitParam(name = "storeName", value = "门店名称", dataType = "String", paramType = "query"), @ApiImplicitParam(name = "storeContact", value = "门店联系人", dataType = "String", paramType = "query"), @ApiImplicitParam(name = "storePhone", value = "门店电话", dataType = "String", paramType = "query"), @ApiImplicitParam(name = "storeType", value = "门店类型", dataType = "String", paramType = "query")})
|
|
|
+ public R<IPage<StoreUserVo>> getStoreUserList(@RequestParam(defaultValue = "1") int pageNum, @RequestParam(defaultValue = "10") int pageSize, @RequestParam(required = false) String id, @RequestParam(required = false) String phone, @RequestParam(required = false) Integer status) {
|
|
|
+ log.info("StoreInfoController.getStoreUserList?pageNum={},pageSize={},id={},phone={},status={}", pageNum, pageSize, id, phone, status);
|
|
|
+ R<IPage<StoreUserVo>> storeUserVoR = storeBusinessService.getStoreUserList(pageNum, pageSize, id, phone, status);
|
|
|
+ return storeUserVoR;
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 校验商户端账号是否禁用
|
|
|
+ *
|
|
|
+ * @param accountId
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ @ApiOperation("获取经营类型标签信息")
|
|
|
+ @ApiOperationSupport(order = 1)
|
|
|
+ @ApiImplicitParams({@ApiImplicitParam(name = "accountId", value = "账号id", dataType = "Integer", paramType = "query", required = true)})
|
|
|
+ @GetMapping("/checkAccount")
|
|
|
+ private R<StoreUserVo> checkAccount(Integer accountId) {
|
|
|
+ return storeUserMapper.selectById(accountId).getStatus() != 1 ? R.success("账号正常") : R.fail("账号禁用");
|
|
|
+ }
|
|
|
+
|
|
|
+ @ApiOperation("获取标签经营类型关系")
|
|
|
+ @ApiOperationSupport(order = 6)
|
|
|
+ @ApiImplicitParams({@ApiImplicitParam(name = "phone", value = "手机号", dataType = "String", paramType = "query", required = true), @ApiImplicitParam(name = "type", value = "修改类型 (pass:密码状态改为1, face:人脸状态改为2)", dataType = "String", paramType = "query", required = true)})
|
|
|
+ @GetMapping("/updateUserStatus")
|
|
|
+ public R<StoreUser> updateUserStatus(String phone, String type) {
|
|
|
+ log.info("StoreUserController.updateUserStatus?phone={}&type={}", phone, type);
|
|
|
+ if (storeBusinessService.updateUserStatus(phone, type)) {
|
|
|
+ return R.success("修改成功");
|
|
|
+ }
|
|
|
+ return R.fail("修改失败");
|
|
|
+ }
|
|
|
+
|
|
|
}
|