1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495 |
- package com.simuwang.manage.api.contact;
- import com.simuwang.base.common.support.MybatisPage;
- import com.simuwang.base.pojo.dto.query.CompanyContactQuery;
- import com.simuwang.base.pojo.dto.query.ContactQuery;
- import com.simuwang.base.pojo.vo.CompanyContactInfoPageVO;
- import com.simuwang.base.pojo.vo.CompanyContactInfoVO;
- import com.simuwang.base.pojo.vo.ContactInformationVO;
- import com.simuwang.logging.SystemLog;
- import com.simuwang.manage.service.CompanyContactService;
- import com.simuwang.manage.service.ContactInformationService;
- import com.smppw.common.pojo.ResultVo;
- import com.smppw.common.pojo.enums.status.ResultCode;
- import org.slf4j.Logger;
- import org.slf4j.LoggerFactory;
- import org.springframework.beans.factory.annotation.Autowired;
- import org.springframework.web.bind.annotation.RequestBody;
- import org.springframework.web.bind.annotation.RequestMapping;
- import org.springframework.web.bind.annotation.RestController;
- @SystemLog("公司管理")
- @RestController
- @RequestMapping("/v1/contact")
- public class CompanyContactController {
- @Autowired
- private CompanyContactService companyContactService;
- @Autowired
- private ContactInformationService contactInformationService;
- private static final Logger logger = LoggerFactory.getLogger(CompanyContactController.class);
- /**
- * 保存对接信息
- * @param companyContactInfoVO
- * @return
- */
- @SystemLog(value = "保存公司对接信息", type = SystemLog.Type.INSERT)
- @RequestMapping("save-company-contact")
- public ResultVo saveCompanyContactInfo(@RequestBody CompanyContactInfoVO companyContactInfoVO){
- ResultVo vo = new ResultVo(ResultCode.SAVE_SUCCESS.getCode());
- try{
- vo = companyContactService.saveCompanyContactInfo(companyContactInfoVO);
- }catch (Exception e){
- logger.error(e.getMessage(),e);
- vo.setData(false);
- vo.setCode(ResultCode.SAVE_FAILED.getCode());
- }
- return vo;
- }
- /**
- * 保存联系人信息
- * @param contactInformationVO
- * @return
- */
- @SystemLog(value = "保存联系人信息", type = SystemLog.Type.INSERT)
- @RequestMapping("save-contact-info")
- public ResultVo saveContactInformation(@RequestBody ContactInformationVO contactInformationVO){
- ResultVo vo = new ResultVo(ResultCode.SAVE_SUCCESS.getCode());
- try{
- vo = contactInformationService.saveContactInformation(contactInformationVO);
- }catch (Exception e){
- logger.error(e.getMessage(),e);
- vo.setData(false);
- vo.setCode(ResultCode.SAVE_FAILED.getCode());
- }
- return vo;
- }
- /**
- * 查询公司联系人信息
- * @param contactQuery
- * @return
- */
- @SystemLog(value = "查询公司联系人信息", type = SystemLog.Type.INSERT)
- @RequestMapping("select-contact-info")
- public MybatisPage<ContactInformationVO> selectContactInformationList(ContactQuery contactQuery){
- MybatisPage<ContactInformationVO> result = contactInformationService.selectContactInformationList(contactQuery);
- return result;
- }
- /**
- * 查询公司对接信息
- * @param companyContactQuery
- * @return
- */
- @SystemLog(value = "查询公司对接信息", type = SystemLog.Type.INSERT)
- @RequestMapping("select-company-contact")
- public MybatisPage<CompanyContactInfoPageVO> selectCompanyContactInfoList(CompanyContactQuery companyContactQuery){
- MybatisPage<CompanyContactInfoPageVO> result = companyContactService.selectCompanyContactInfoList(companyContactQuery);
- return result;
- }
- }
|