多店铺需求
This commit is contained in:
parent
2eec2f4303
commit
c357185dff
|
|
@ -1,8 +1,11 @@
|
||||||
package com.czg.controller.admin;
|
package com.czg.controller.admin;
|
||||||
|
|
||||||
import com.czg.account.dto.ShopBranchDTO;
|
import com.czg.account.dto.ShopBranchDTO;
|
||||||
|
import com.czg.account.entity.ShopConfig;
|
||||||
|
import com.czg.account.enums.BranchDataSyncMethodEnum;
|
||||||
import com.czg.account.param.ShopBranchParam;
|
import com.czg.account.param.ShopBranchParam;
|
||||||
import com.czg.account.service.ShopBranchService;
|
import com.czg.account.service.ShopBranchService;
|
||||||
|
import com.czg.account.service.ShopConfigService;
|
||||||
import com.czg.log.annotation.OperationLog;
|
import com.czg.log.annotation.OperationLog;
|
||||||
import com.czg.resp.CzgResult;
|
import com.czg.resp.CzgResult;
|
||||||
import com.czg.sa.StpKit;
|
import com.czg.sa.StpKit;
|
||||||
|
|
@ -22,6 +25,8 @@ public class ShopBranchController {
|
||||||
|
|
||||||
@Resource
|
@Resource
|
||||||
private ShopBranchService shopBranchService;
|
private ShopBranchService shopBranchService;
|
||||||
|
@Resource
|
||||||
|
private ShopConfigService shopConfigService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 分店列表
|
* 分店列表
|
||||||
|
|
@ -86,4 +91,16 @@ public class ShopBranchController {
|
||||||
shopBranchService.accountDisable(branchShopId);
|
shopBranchService.accountDisable(branchShopId);
|
||||||
return CzgResult.success();
|
return CzgResult.success();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取数据同步方式
|
||||||
|
* @return 数据同步方式 auto-实时自动同步 manual-手动同步
|
||||||
|
*/
|
||||||
|
@GetMapping("/get/dataSyncMethod")
|
||||||
|
@OperationLog("分店管理-获取数据同步方式")
|
||||||
|
public CzgResult<String> getDataSyncMethod() {
|
||||||
|
Long shopId = StpKit.USER.getShopId(0L);
|
||||||
|
ShopConfig shopConfig = shopConfigService.getById(shopId);
|
||||||
|
return CzgResult.success(shopConfig == null? BranchDataSyncMethodEnum.AUTO.getValue() : shopConfig.getBranchDataSyncMethod());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue