package com.changhong.epc.tenant.controller.system;
|
|
import com.changhong.epc.bean.admin.InitCompany;
|
import com.changhong.epc.bean.admin.TenantInfo;
|
import com.changhong.epc.bean.tenant.system.EpcShowColumn;
|
import com.changhong.epc.config.tool.MybatisTool;
|
import com.changhong.epc.constter.base.BaseConst;
|
import com.changhong.epc.constter.base.Context;
|
import com.changhong.epc.constter.tenant.TenantUrlConst;
|
import com.changhong.epc.tenant.service.system.TenantInfoService;
|
import com.changhong.epc.tenant.service.system.budget.BudgetConfigService;
|
import com.iemsoft.framework.cloud.core.thread.ThreadData;
|
import org.springframework.web.bind.annotation.*;
|
|
import javax.annotation.Resource;
|
|
@RestController
|
public class TenantInfoController implements TenantUrlConst ,BaseConst {
|
|
@Resource(name="tenantInfoServiceImpl")
|
private TenantInfoService tenantInfoService;
|
|
@Resource
|
private BudgetConfigService budgetConfigService;
|
|
@PostMapping(REST_TENANT_SELECTTENANTINFO)
|
public TenantInfo getTenantInfo(@RequestBody TenantInfo tenantInfo){
|
tenantInfo.setOpenId(ThreadData.get(OPEN_ID));
|
// return tenantInfoService.getTenantInfo(tenantInfo);
|
return tenantInfo;
|
}
|
|
@PostMapping(REST_TENANT_UPDATETENANTINFO)
|
public int updateTenantInfo(@RequestBody TenantInfo tenantInfo){
|
// return tenantInfoService.updateTenantInfo(tenantInfo);
|
return 0;
|
}
|
|
@PostMapping(REST_TENANT_INIT_INFO)
|
public int tenantInitInfo(@RequestBody InitCompany initCompany){
|
MybatisTool.initDataSource(initCompany);
|
return tenantInfoService.initTenantInfo(initCompany);
|
}
|
|
@PostMapping("/synOrg")
|
public int synOrg(){
|
return budgetConfigService.synOrg();
|
}
|
|
/**
|
* 更新按鈕
|
* @param epc
|
* @return
|
*/
|
@PostMapping(REST_TENANT_PERSION_UPDATE)
|
public int updateShowColumn(@RequestBody EpcShowColumn epc){
|
return tenantInfoService.updateShowColumnById(epc,Context.getOpenId());
|
}
|
|
/**
|
* 查詢按鈕
|
* @param epc
|
* @return
|
*/
|
@PostMapping(REST_TENANT_PERSION_SELECT)
|
public EpcShowColumn selectShowColumn(@RequestBody EpcShowColumn epc){
|
return tenantInfoService.selectShowColumnById(epc,Context.getOpenId());
|
}
|
/**
|
* 删除
|
* @param epc
|
* @return
|
*/
|
@PostMapping(REST_TENANT_PERSION_DELETE)
|
public void deleteShowColumn(@RequestBody EpcShowColumn epc){
|
tenantInfoService.deleteShowColumnById(epc,Context.getOpenId());
|
}
|
/**
|
* 增加
|
* @param epc
|
* @return
|
*/
|
@PostMapping(REST_TENANT_PERSION_INSERT)
|
public void insertShowColumn(@RequestBody EpcShowColumn epc){
|
tenantInfoService.insertShowColumn(epc,Context.getOpenId());
|
}
|
}
|