Commit 03d622f4 by 陶光胜

二维码

parent e325b64f
......@@ -17,6 +17,8 @@ public interface CustomStoreApiService {
ServiceResponse<Integer> closeCustomStore(Integer enterpriseId, String appid);
ServiceResponse<Integer> closeCustomStore(Integer customStoreId);
ServiceResponse<CustomStoreDTO> getCustomStore(Integer enterpriseId, String appid);
ServiceResponse<Void> customSettingHasCommpleted(Integer enterpriseId);
......
......@@ -16,5 +16,7 @@ public interface CustomStoreService {
int openCustomStore(Integer customStoreId);
int closeCustomStore(Integer customStoreId);
TabCustomStore getCustomStore(Integer enterpriseId, String appid);
}
......@@ -58,6 +58,15 @@ public class CustomStoreServiceImpl implements CustomStoreService {
}
@Override
public int closeCustomStore(Integer customStoreId) {
TabCustomStore store = new TabCustomStore();
store.setCustomStoreId(customStoreId);
store.setStatus(2);
return this.tabCustomStoreMapper.updateByPrimaryKeySelective(store);
}
@Override
public TabCustomStore getCustomStore(Integer enterpriseId, String appid) {
List<TabCustomStore> list = this.tabCustomStoreMapper.getCustomStore(enterpriseId, appid);
if(CollectionUtils.isNotEmpty(list)){
......
......@@ -71,6 +71,12 @@ public class CustomStoreApiServiceImpl implements CustomStoreApiService {
}
@Override
public ServiceResponse<Integer> closeCustomStore(Integer customStoreId) {
int i = this.customStoreService.closeCustomStore(customStoreId);
return ServiceResponse.success(i);
}
@Override
public ServiceResponse<CustomStoreDTO> getCustomStore(Integer enterpriseId, String appid) {
TabCustomStore customStore = this.customStoreService.getCustomStore(enterpriseId, appid);
return ServiceResponse.success(EntityUtil.changeEntityByJSON(CustomStoreDTO.class, customStore));
......
......@@ -91,4 +91,10 @@ public class CustomStoreController {
this.customStoreApiService.openCustomStore(UserDetailUtils.getUserDetail().getEnterpriseId(), appId, customStoreId);
return RestResponse.success();
}
@RequestMapping("close-custom-store")
public RestResponse updateCustomStoreStatus(Integer customStoreId){
this.customStoreApiService.closeCustomStore(customStoreId);
return RestResponse.success();
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment