1 文件已重命名
33个文件已添加
11个文件已修改
| | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.ruoyi.common.core.domain.R; |
| | | import com.ruoyi.common.exception.ServiceException; |
| | | import com.ruoyi.system.domain.Banner; |
| | | import com.ruoyi.system.pojo.dto.AddBannerDTO; |
| | | import com.ruoyi.system.pojo.dto.EditBannerDTO; |
| | |
| | | */ |
| | | @PostMapping("/add") |
| | | @ApiOperation(value = "banner添加") |
| | | public R<Void> add(@RequestBody AddBannerDTO dto) { |
| | | public R<Void> add(@RequestBody @Valid AddBannerDTO dto) { |
| | | bannerService.add(dto); |
| | | return R.ok(); |
| | | } |
| | |
| | | @ApiOperation(value = "根据id查看") |
| | | public R<Banner> getBannerById(@PathVariable("id")Integer id) { |
| | | Banner banner = bannerService.getById(id); |
| | | if (null == banner||banner.getDelFlag()!=0){ |
| | | throw new ServiceException("banner不存在"); |
| | | } |
| | | return R.ok(banner); |
| | | } |
| | | /** |
New file |
| | |
| | | package com.ruoyi.web.controller.system; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.ruoyi.common.core.domain.R; |
| | | import com.ruoyi.common.exception.ServiceException; |
| | | import com.ruoyi.system.domain.CompanyType; |
| | | import com.ruoyi.system.pojo.dto.AddCompanyTypeDTO; |
| | | import com.ruoyi.system.pojo.vo.CompanyTypePageVO; |
| | | import com.ruoyi.system.pojo.dto.EditCompanyTypeDTO; |
| | | import com.ruoyi.system.service.CompanyTypeService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.annotation.Resource; |
| | | import javax.validation.Valid; |
| | | |
| | | @Slf4j |
| | | @RestController |
| | | @RequestMapping("/system/companyType") |
| | | @Api( tags = "后台-系统设置-公司类型管理") |
| | | public class CompanyTypeController { |
| | | @Resource |
| | | private CompanyTypeService companyTypeService; |
| | | |
| | | /** |
| | | * 公司类型分页 |
| | | */ |
| | | @GetMapping("/getCompanyTypePage") |
| | | @ApiOperation(value = "公司类型分页") |
| | | public R<IPage<CompanyTypePageVO>> getCompanyTypePage( |
| | | @RequestParam(value = "pageNum",defaultValue = "1") Integer pageNum, |
| | | @RequestParam(value = "pageSize",defaultValue = "10") Integer pageSize, |
| | | @RequestParam(value = "name",required = false) String name) { |
| | | return R.ok(companyTypeService.getCompanyTypePage(pageNum,pageSize,name)); |
| | | } |
| | | |
| | | /** |
| | | * 新增 |
| | | */ |
| | | @PostMapping("/add") |
| | | @ApiOperation(value = "公司类型添加") |
| | | public R<Void> add(@RequestBody AddCompanyTypeDTO dto) { |
| | | companyTypeService.add(dto); |
| | | return R.ok(); |
| | | } |
| | | /** |
| | | * 查看详情 |
| | | */ |
| | | @GetMapping("/getCompanyTypeById/{id}") |
| | | @ApiOperation(value = "根据id查看详情") |
| | | public R<CompanyType> getCompanyTypeById(@PathVariable("id")Integer id) { |
| | | CompanyType companyType = companyTypeService.getById(id); |
| | | if (null == companyType||companyType.getDelFlag()!=0){ |
| | | throw new ServiceException("该类型不存在"); |
| | | } |
| | | return R.ok(companyType); |
| | | } |
| | | |
| | | /** |
| | | * 修改 |
| | | */ |
| | | @PutMapping("/edit") |
| | | @ApiOperation(value = "公司类型编辑") |
| | | public R<Void> edit(@RequestBody @Valid EditCompanyTypeDTO dto) { |
| | | companyTypeService.edit(dto); |
| | | return R.ok(); |
| | | } |
| | | /** |
| | | * 删除 |
| | | */ |
| | | @DeleteMapping("/delete/{id}") |
| | | @ApiOperation(value = "公司类型删除") |
| | | public R<Void> delete(@PathVariable("id")Integer id) { |
| | | companyTypeService.delete(id); |
| | | return R.ok(); |
| | | } |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.ruoyi.web.controller.system; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.ruoyi.common.core.domain.R; |
| | | import com.ruoyi.common.exception.ServiceException; |
| | | import com.ruoyi.system.domain.Industry; |
| | | import com.ruoyi.system.pojo.dto.AddIndustryDTO; |
| | | import com.ruoyi.system.pojo.dto.EditIndustryDTO; |
| | | import com.ruoyi.system.pojo.vo.IndustryPageVO; |
| | | import com.ruoyi.system.service.IndustryService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.annotation.Resource; |
| | | import javax.validation.Valid; |
| | | |
| | | @Slf4j |
| | | @RestController |
| | | @RequestMapping("/system/industry") |
| | | @Api( tags = "后台-系统设置-所属行业管理") |
| | | public class IndustryController { |
| | | @Resource |
| | | private IndustryService industryService; |
| | | |
| | | /** |
| | | * 所属行业分页 |
| | | */ |
| | | @GetMapping("/getIndustryPage") |
| | | @ApiOperation(value = "所属行业分页") |
| | | public R<IPage<IndustryPageVO>> getIndustryPage( |
| | | @RequestParam(value = "pageNum",defaultValue = "1") Integer pageNum, |
| | | @RequestParam(value = "pageSize",defaultValue = "10") Integer pageSize, |
| | | @RequestParam(value = "name",required = false) String name) { |
| | | return R.ok(industryService.getIndustryPage(pageNum,pageSize,name)); |
| | | } |
| | | |
| | | /** |
| | | * 新增 |
| | | */ |
| | | @PostMapping("/add") |
| | | @ApiOperation(value = "所属行业添加") |
| | | public R<Void> add(@RequestBody @Valid AddIndustryDTO dto) { |
| | | industryService.add(dto); |
| | | return R.ok(); |
| | | } |
| | | /** |
| | | * 查看详情 |
| | | */ |
| | | @GetMapping("/getIndustryById/{id}") |
| | | @ApiOperation(value = "根据id查看详情") |
| | | public R<Industry> getIndustryById(@PathVariable("id")Integer id) { |
| | | Industry industry = industryService.getById(id); |
| | | if (null == industry||industry.getDelFlag()!=0){ |
| | | throw new ServiceException("该行业不存在"); |
| | | } |
| | | return R.ok(industry); |
| | | } |
| | | |
| | | /** |
| | | * 修改 |
| | | */ |
| | | @PutMapping("/edit") |
| | | @ApiOperation(value = "所属行业编辑") |
| | | public R<Void> edit(@RequestBody @Valid EditIndustryDTO dto) { |
| | | industryService.edit(dto); |
| | | return R.ok(); |
| | | } |
| | | /** |
| | | * 删除 |
| | | */ |
| | | @DeleteMapping("/delete/{id}") |
| | | @ApiOperation(value = "所属行业删除") |
| | | public R<Void> delete(@PathVariable("id")Integer id) { |
| | | industryService.delete(id); |
| | | return R.ok(); |
| | | } |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.ruoyi.web.controller.system; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.ruoyi.common.core.domain.R; |
| | | import com.ruoyi.common.exception.ServiceException; |
| | | import com.ruoyi.common.utils.bean.BeanUtils; |
| | | import com.ruoyi.system.domain.Industry; |
| | | import com.ruoyi.system.domain.Licence; |
| | | import com.ruoyi.system.pojo.dto.AddIndustryDTO; |
| | | import com.ruoyi.system.pojo.dto.AddLicenceDTO; |
| | | import com.ruoyi.system.pojo.dto.EditIndustryDTO; |
| | | import com.ruoyi.system.pojo.dto.EditLicenceDTO; |
| | | import com.ruoyi.system.pojo.vo.IndustryPageVO; |
| | | import com.ruoyi.system.pojo.vo.LicencePageVO; |
| | | import com.ruoyi.system.pojo.vo.LicenceVO; |
| | | import com.ruoyi.system.service.IndustryService; |
| | | import com.ruoyi.system.service.LicenceService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.annotation.Resource; |
| | | import javax.validation.Valid; |
| | | import java.util.Arrays; |
| | | import java.util.List; |
| | | |
| | | @Slf4j |
| | | @RestController |
| | | @RequestMapping("/system/licence") |
| | | @Api( tags = "后台-系统设置-许可证管理") |
| | | public class LicenceController { |
| | | @Resource |
| | | private LicenceService licenceService; |
| | | |
| | | /** |
| | | * 所属行业分页 |
| | | */ |
| | | @GetMapping("/getLicencePage") |
| | | @ApiOperation(value = "许可证分页") |
| | | public R<IPage<LicencePageVO>> getLicencePage( |
| | | @RequestParam(value = "pageNum",defaultValue = "1") Integer pageNum, |
| | | @RequestParam(value = "pageSize",defaultValue = "10") Integer pageSize, |
| | | @RequestParam(value = "name",required = false) String name) { |
| | | return R.ok(licenceService.getLicencePage(pageNum,pageSize,name)); |
| | | } |
| | | |
| | | /** |
| | | * 新增 |
| | | */ |
| | | @PostMapping("/add") |
| | | @ApiOperation(value = "许可证添加") |
| | | public R<Void> add(@RequestBody @Valid AddLicenceDTO dto) { |
| | | licenceService.add(dto); |
| | | return R.ok(); |
| | | } |
| | | /** |
| | | * 查看详情 |
| | | */ |
| | | @GetMapping("/getLicenceById/{id}") |
| | | @ApiOperation(value = "根据id查看详情") |
| | | public R<Licence> getLicenceById(@PathVariable("id")Integer id) { |
| | | Licence licence = licenceService.getById(id); |
| | | if (null == licence||licence.getDelFlag()!=0){ |
| | | throw new ServiceException("该许可证不存在"); |
| | | } |
| | | LicenceVO licenceVO = new LicenceVO(); |
| | | BeanUtils.copyProperties(licence,licenceVO); |
| | | List<String> list = Arrays.asList(licence.getGradeName().split(";")); |
| | | licenceVO.setGrandNameList(list); |
| | | return R.ok(licence); |
| | | } |
| | | |
| | | /** |
| | | * 修改 |
| | | */ |
| | | @PutMapping("/edit") |
| | | @ApiOperation(value = "许可证编辑") |
| | | public R<Void> edit(@RequestBody @Valid EditLicenceDTO dto) { |
| | | licenceService.edit(dto); |
| | | return R.ok(); |
| | | } |
| | | /** |
| | | * 删除 |
| | | */ |
| | | @DeleteMapping("/delete/{id}") |
| | | @ApiOperation(value = "许可证删除") |
| | | public R<Void> delete(@PathVariable("id")Integer id) { |
| | | licenceService.delete(id); |
| | | return R.ok(); |
| | | } |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.ruoyi.web.controller.system; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.ruoyi.common.core.domain.R; |
| | | import com.ruoyi.common.exception.ServiceException; |
| | | import com.ruoyi.system.domain.Banner; |
| | | import com.ruoyi.system.domain.Question; |
| | | import com.ruoyi.system.pojo.dto.AddBannerDTO; |
| | | import com.ruoyi.system.pojo.dto.AddQuestionDTO; |
| | | import com.ruoyi.system.pojo.dto.EditBannerDTO; |
| | | import com.ruoyi.system.pojo.dto.EditQuestionDTO; |
| | | import com.ruoyi.system.pojo.vo.BannerPageVO; |
| | | import com.ruoyi.system.pojo.vo.QuestionPageVO; |
| | | import com.ruoyi.system.pojo.vo.SystemConfigVO; |
| | | import com.ruoyi.system.service.QuestionService; |
| | | import com.ruoyi.system.service.SystemConfigService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.annotation.Resource; |
| | | import javax.validation.Valid; |
| | | |
| | | @Slf4j |
| | | @RestController |
| | | @RequestMapping("/system/question") |
| | | @Api( tags = "后台-系统设置-常见问题管理") |
| | | public class QuestionController { |
| | | @Resource |
| | | private QuestionService questionService; |
| | | |
| | | /** |
| | | * 常见问题分页 |
| | | */ |
| | | @GetMapping("/getQuestionPage") |
| | | @ApiOperation(value = "常见问题分页") |
| | | public R<IPage<QuestionPageVO>> getQuestionPage( |
| | | @RequestParam(value = "pageNum",defaultValue = "1") Integer pageNum, |
| | | @RequestParam(value = "pageSize",defaultValue = "10") Integer pageSize, |
| | | @RequestParam(value = "name",required = false) String name) { |
| | | return R.ok(questionService.getQuestionPage(pageNum,pageSize,name)); |
| | | } |
| | | |
| | | /** |
| | | * 新增 |
| | | */ |
| | | @PostMapping("/add") |
| | | @ApiOperation(value = "常见问题添加") |
| | | public R<Void> add(@RequestBody AddQuestionDTO dto) { |
| | | questionService.add(dto); |
| | | return R.ok(); |
| | | } |
| | | /** |
| | | * 查看详情 |
| | | */ |
| | | @GetMapping("/getQuestionById/{id}") |
| | | @ApiOperation(value = "根据id查看详情") |
| | | public R<Question> getQuestionById(@PathVariable("id")Integer id) { |
| | | Question question = questionService.getById(id); |
| | | if (null == question||question.getDelFlag()!=0){ |
| | | throw new ServiceException("该问题不存在"); |
| | | } |
| | | return R.ok(question); |
| | | } |
| | | |
| | | /** |
| | | * 修改 |
| | | */ |
| | | @PutMapping("/edit") |
| | | @ApiOperation(value = "常见问题编辑") |
| | | public R<Void> edit(@RequestBody @Valid EditQuestionDTO dto) { |
| | | questionService.edit(dto); |
| | | return R.ok(); |
| | | } |
| | | /** |
| | | * 删除 |
| | | */ |
| | | @DeleteMapping("/delete/{id}") |
| | | @ApiOperation(value = "常见问题删除") |
| | | public R<Void> delete(@PathVariable("id")Integer id) { |
| | | questionService.delete(id); |
| | | return R.ok(); |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | import com.ruoyi.common.core.domain.R; |
| | | import com.ruoyi.system.domain.Agreement; |
| | | import com.ruoyi.system.pojo.dto.AddSystemConfigDTO; |
| | | import com.ruoyi.system.pojo.vo.AddAgreementDTO; |
| | | import com.ruoyi.system.pojo.dto.AddAgreementDTO; |
| | | import com.ruoyi.system.pojo.vo.SystemConfigVO; |
| | | import com.ruoyi.system.service.AgreementService; |
| | | import com.ruoyi.system.service.SystemConfigService; |
| | |
| | | # 开发环境配置 |
| | | server: |
| | | # 服务器的HTTP端口,默认为8080 |
| | | port: 8080 |
| | | port: 8081 |
| | | servlet: |
| | | # 应用的访问路径 |
| | | context-path: / |
| | |
| | | requests.antMatchers("/login", "/register", "/captchaImage").permitAll() |
| | | // 静态资源,可匿名访问 |
| | | .antMatchers(HttpMethod.GET, "/", "/*.html", "/**/*.html", "/**/*.css", "/**/*.js", "/profile/**").permitAll() |
| | | .antMatchers("/system/banner/**","/system/config/**").permitAll()//先放行所有的 |
| | | .antMatchers("/system/banner/**","/system/config/**","/system/systemConfig/**").permitAll()//先放行所有的 |
| | | .antMatchers("/swagger-ui.html", "/swagger-resources/**", "/webjars/**", "/*/api-docs", "/druid/**").permitAll() |
| | | // 除上面外的所有请求全部需要鉴权认证 |
| | | .anyRequest().authenticated(); |
| | |
| | | @TableField("order_num") |
| | | @ApiModelProperty(value = "显示顺序(默认0)") |
| | | private Integer orderNum; |
| | | |
| | | |
| | | @TableField("del_flag") |
| | | @ApiModelProperty("删除标志(0-未删除,1-已删除)") |
| | | private Integer delFlag; |
| | | } |
| | |
| | | @TableField("order_num") |
| | | @ApiModelProperty(value = "显示顺序(默认0)") |
| | | private Integer orderNum; |
| | | |
| | | @TableField("del_flag") |
| | | @ApiModelProperty("删除标志(0-未删除,1-已删除)") |
| | | private Integer delFlag; |
| | | } |
| | |
| | | @TableField("grade_name") |
| | | @ApiModelProperty(value = "许可证等级(多个用分号分隔)") |
| | | private String gradeName; |
| | | |
| | | @TableField("del_flag") |
| | | @ApiModelProperty("删除标志(0-未删除,1-已删除)") |
| | | private Integer delFlag; |
| | | } |
| | |
| | | @TableField("order_num") |
| | | @ApiModelProperty("显示顺序(默认0)") |
| | | private Integer orderNum; |
| | | |
| | | @TableField("del_flag") |
| | | @ApiModelProperty("删除标志(0-未删除,1-已删除)") |
| | | private Integer delFlag; |
| | | } |
New file |
| | |
| | | package com.ruoyi.system.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.ruoyi.system.domain.Agreement; |
| | | import com.ruoyi.system.domain.CompanyType; |
| | | import com.ruoyi.system.pojo.vo.BannerPageVO; |
| | | import com.ruoyi.system.pojo.vo.CompanyTypePageVO; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | @Mapper |
| | | public interface CompanyTypeMapper extends BaseMapper<CompanyType> { |
| | | IPage<CompanyTypePageVO> getCompanyTypePage(@Param("page") IPage<CompanyTypePageVO> page,@Param("name") String name); |
| | | } |
New file |
| | |
| | | package com.ruoyi.system.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.ruoyi.system.domain.Agreement; |
| | | import com.ruoyi.system.domain.Industry; |
| | | import com.ruoyi.system.pojo.vo.IndustryPageVO; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | @Mapper |
| | | public interface IndustryMapper extends BaseMapper<Industry> { |
| | | IPage<IndustryPageVO> getIndustryPage(@Param("page") IPage<IndustryPageVO> page, @Param("name")String name); |
| | | } |
New file |
| | |
| | | package com.ruoyi.system.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.ruoyi.system.domain.Industry; |
| | | import com.ruoyi.system.domain.Licence; |
| | | import com.ruoyi.system.pojo.vo.IndustryPageVO; |
| | | import com.ruoyi.system.pojo.vo.LicencePageVO; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | @Mapper |
| | | public interface LicenceMapper extends BaseMapper<Licence> { |
| | | |
| | | IPage<LicencePageVO> getIndustryPage(@Param("page") IPage<LicencePageVO> page,@Param("name") String name); |
| | | } |
New file |
| | |
| | | package com.ruoyi.system.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.ruoyi.system.domain.Banner; |
| | | import com.ruoyi.system.domain.Question; |
| | | import com.ruoyi.system.pojo.vo.BannerPageVO; |
| | | import com.ruoyi.system.pojo.vo.QuestionPageVO; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | @Mapper |
| | | public interface QuestionMapper extends BaseMapper<Question> { |
| | | |
| | | IPage<QuestionPageVO> getQuestionPage(@Param("page")IPage<BannerPageVO> page,@Param("name") String name); |
| | | } |
File was renamed from ruoyi-system/src/main/java/com/ruoyi/system/pojo/vo/AddAgreementDTO.java |
| | |
| | | package com.ruoyi.system.pojo.vo; |
| | | package com.ruoyi.system.pojo.dto; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
New file |
| | |
| | | package com.ruoyi.system.pojo.dto; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import javax.validation.constraints.NotEmpty; |
| | | import javax.validation.constraints.NotNull; |
| | | |
| | | @Data |
| | | @ApiModel("公司类型添加") |
| | | public class AddCompanyTypeDTO { |
| | | @ApiModelProperty(value = "类型名称") |
| | | @NotEmpty(message = "类型名称必填") |
| | | private String name; |
| | | |
| | | @ApiModelProperty(value = "显示顺序(默认0)") |
| | | private Integer orderNum; |
| | | } |
New file |
| | |
| | | package com.ruoyi.system.pojo.dto; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import javax.validation.constraints.NotEmpty; |
| | | |
| | | @Data |
| | | @ApiModel("所属行业添加") |
| | | public class AddIndustryDTO { |
| | | |
| | | @ApiModelProperty(value = "行业名称") |
| | | @NotEmpty(message = "行业名称不能为空") |
| | | private String name; |
| | | |
| | | |
| | | @ApiModelProperty(value = "显示顺序(默认0)") |
| | | private Integer orderNum; |
| | | } |
New file |
| | |
| | | package com.ruoyi.system.pojo.dto; |
| | | |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import javax.validation.constraints.NotEmpty; |
| | | import java.util.List; |
| | | |
| | | @Data |
| | | @ApiModel("许可证添加") |
| | | public class AddLicenceDTO { |
| | | @ApiModelProperty(value = "许可证名称") |
| | | @NotEmpty(message = "许可证不能为空") |
| | | private String name; |
| | | |
| | | @ApiModelProperty(value = "许可证等级集合") |
| | | @NotEmpty(message = "许可等级不能为空") |
| | | private List<String> grandNameList; |
| | | |
| | | @ApiModelProperty(value = "显示顺序(默认0)") |
| | | private Integer orderNum; |
| | | |
| | | } |
New file |
| | |
| | | package com.ruoyi.system.pojo.dto; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | @ApiModel("添加常见问题") |
| | | public class AddQuestionDTO { |
| | | |
| | | @ApiModelProperty(value = "问题标题") |
| | | private String title; |
| | | |
| | | @ApiModelProperty(value = "问题回答(富文本)") |
| | | private String answer; |
| | | |
| | | @ApiModelProperty("显示顺序") |
| | | private Integer orderNum; |
| | | |
| | | } |
New file |
| | |
| | | package com.ruoyi.system.pojo.dto; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Getter; |
| | | import lombok.Setter; |
| | | |
| | | @Getter |
| | | @Setter |
| | | @ApiModel("编辑banner") |
| | | public class EditCompanyTypeDTO extends AddCompanyTypeDTO { |
| | | @ApiModelProperty("主键ID") |
| | | private Integer id; |
| | | } |
New file |
| | |
| | | package com.ruoyi.system.pojo.dto; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Getter; |
| | | import lombok.Setter; |
| | | |
| | | @Getter |
| | | @Setter |
| | | @ApiModel("编辑所属行业") |
| | | public class EditIndustryDTO extends AddIndustryDTO{ |
| | | @ApiModelProperty("主键ID") |
| | | private Integer id; |
| | | } |
New file |
| | |
| | | package com.ruoyi.system.pojo.dto; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Getter; |
| | | import lombok.Setter; |
| | | |
| | | @Getter |
| | | @Setter |
| | | @ApiModel("许可证编辑") |
| | | public class EditLicenceDTO extends AddLicenceDTO { |
| | | @ApiModelProperty("主键ID") |
| | | private Integer id; |
| | | } |
New file |
| | |
| | | package com.ruoyi.system.pojo.dto; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Getter; |
| | | import lombok.Setter; |
| | | |
| | | @Getter |
| | | @Setter |
| | | @ApiModel("编辑常见问题") |
| | | public class EditQuestionDTO extends AddQuestionDTO { |
| | | @ApiModelProperty("主键ID") |
| | | private Integer id; |
| | | } |
New file |
| | |
| | | package com.ruoyi.system.pojo.vo; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | @ApiModel("公司类型分页VO") |
| | | public class CompanyTypePageVO { |
| | | @ApiModelProperty(value = "主键ID") |
| | | private Integer id; |
| | | @ApiModelProperty("类型名称") |
| | | private String name; |
| | | @TableField("order_num") |
| | | @ApiModelProperty(value = "排序") |
| | | private Integer orderNum; |
| | | } |
New file |
| | |
| | | package com.ruoyi.system.pojo.vo; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | @ApiModel("所属行业分页VO") |
| | | public class IndustryPageVO { |
| | | |
| | | @ApiModelProperty(value = "主键ID") |
| | | private Integer id; |
| | | |
| | | |
| | | @ApiModelProperty(value = "行业名称") |
| | | private String name; |
| | | |
| | | @ApiModelProperty(value = "显示顺序(默认0)") |
| | | private Integer orderNum; |
| | | } |
New file |
| | |
| | | package com.ruoyi.system.pojo.vo; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | |
| | | public class LicencePageVO { |
| | | |
| | | @ApiModelProperty(value = "主键ID") |
| | | private Integer id; |
| | | |
| | | @ApiModelProperty(value = "行业名称") |
| | | private String name; |
| | | |
| | | @ApiModelProperty(value = "显示顺序(默认0)") |
| | | private Integer orderNum; |
| | | } |
New file |
| | |
| | | package com.ruoyi.system.pojo.vo; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import javax.validation.constraints.NotEmpty; |
| | | import java.util.List; |
| | | |
| | | @Data |
| | | @ApiModel("许可证VO") |
| | | public class LicenceVO { |
| | | |
| | | @ApiModelProperty(value = "主键ID") |
| | | private Integer id; |
| | | |
| | | |
| | | @ApiModelProperty(value = "许可证名称") |
| | | private String name; |
| | | |
| | | @ApiModelProperty(value = "显示顺序(默认0)") |
| | | private Integer orderNum; |
| | | |
| | | @ApiModelProperty(value = "许可证等级(多个用分号分隔)") |
| | | private String gradeName; |
| | | |
| | | @ApiModelProperty(value = "许可证等级集合") |
| | | private List<String> grandNameList; |
| | | |
| | | } |
New file |
| | |
| | | package com.ruoyi.system.pojo.vo; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | @ApiModel("常见问题分页VO") |
| | | public class QuestionPageVO { |
| | | @ApiModelProperty("主键ID") |
| | | private Integer id; |
| | | @ApiModelProperty("问题标题") |
| | | private String name; |
| | | @ApiModelProperty("排序") |
| | | private Integer orderNum; |
| | | |
| | | } |
| | |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.ruoyi.system.domain.Agreement; |
| | | import com.ruoyi.system.pojo.vo.AddAgreementDTO; |
| | | import com.ruoyi.system.pojo.dto.AddAgreementDTO; |
| | | |
| | | |
| | | |
New file |
| | |
| | | package com.ruoyi.system.service; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.ruoyi.system.domain.CompanyType; |
| | | import com.ruoyi.system.pojo.dto.AddCompanyTypeDTO; |
| | | import com.ruoyi.system.pojo.vo.CompanyTypePageVO; |
| | | import com.ruoyi.system.pojo.dto.EditCompanyTypeDTO; |
| | | |
| | | |
| | | public interface CompanyTypeService extends IService<CompanyType> { |
| | | |
| | | IPage<CompanyTypePageVO> getCompanyTypePage(Integer pageNum, Integer pageSize, String name); |
| | | |
| | | void add(AddCompanyTypeDTO dto); |
| | | |
| | | void edit( EditCompanyTypeDTO dto); |
| | | |
| | | void delete(Integer id); |
| | | } |
New file |
| | |
| | | package com.ruoyi.system.service; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.ruoyi.system.domain.Industry; |
| | | import com.ruoyi.system.pojo.dto.AddIndustryDTO; |
| | | import com.ruoyi.system.pojo.dto.EditIndustryDTO; |
| | | import com.ruoyi.system.pojo.vo.IndustryPageVO; |
| | | |
| | | |
| | | public interface IndustryService extends IService<Industry> { |
| | | |
| | | IPage<IndustryPageVO> getIndustryPage(Integer pageNum, Integer pageSize, String name); |
| | | |
| | | void add(AddIndustryDTO dto); |
| | | |
| | | void edit( EditIndustryDTO dto); |
| | | |
| | | void delete(Integer id); |
| | | } |
New file |
| | |
| | | package com.ruoyi.system.service; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.ruoyi.system.domain.Industry; |
| | | import com.ruoyi.system.domain.Licence; |
| | | import com.ruoyi.system.pojo.dto.AddIndustryDTO; |
| | | import com.ruoyi.system.pojo.dto.AddLicenceDTO; |
| | | import com.ruoyi.system.pojo.dto.EditIndustryDTO; |
| | | import com.ruoyi.system.pojo.dto.EditLicenceDTO; |
| | | import com.ruoyi.system.pojo.vo.IndustryPageVO; |
| | | import com.ruoyi.system.pojo.vo.LicencePageVO; |
| | | |
| | | import javax.validation.Valid; |
| | | |
| | | |
| | | public interface LicenceService extends IService<Licence> { |
| | | |
| | | IPage<LicencePageVO> getLicencePage(Integer pageNum, Integer pageSize, String name); |
| | | |
| | | void add( AddLicenceDTO dto); |
| | | |
| | | void edit( EditLicenceDTO dto); |
| | | |
| | | void delete(Integer id); |
| | | } |
New file |
| | |
| | | package com.ruoyi.system.service; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.ruoyi.system.domain.Banner; |
| | | import com.ruoyi.system.domain.Question; |
| | | import com.ruoyi.system.pojo.dto.AddBannerDTO; |
| | | import com.ruoyi.system.pojo.dto.AddQuestionDTO; |
| | | import com.ruoyi.system.pojo.dto.EditBannerDTO; |
| | | import com.ruoyi.system.pojo.dto.EditQuestionDTO; |
| | | import com.ruoyi.system.pojo.vo.BannerPageVO; |
| | | import com.ruoyi.system.pojo.vo.QuestionPageVO; |
| | | |
| | | import javax.validation.Valid; |
| | | |
| | | |
| | | public interface QuestionService extends IService<Question> { |
| | | IPage<QuestionPageVO> getQuestionPage(Integer pageNum, Integer pageSize, String name); |
| | | |
| | | void add(AddQuestionDTO dto); |
| | | |
| | | void edit( EditQuestionDTO dto); |
| | | |
| | | void delete(Integer id); |
| | | } |
| | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.system.mapper.AgreementMapper; |
| | | import com.ruoyi.system.domain.Agreement; |
| | | import com.ruoyi.system.pojo.vo.AddAgreementDTO; |
| | | import com.ruoyi.system.pojo.dto.AddAgreementDTO; |
| | | import com.ruoyi.system.service.AgreementService; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.stereotype.Service; |
| | |
| | | @Override |
| | | public void edit(EditBannerDTO dto) { |
| | | Banner banner = this.getById(dto.getId()); |
| | | if (banner == null) { |
| | | if (null == banner || banner.getDelFlag() != 0 ) { |
| | | throw new ServiceException("banner不存在"); |
| | | } |
| | | BeanUtils.copyProperties(dto, banner); |
| | |
| | | @Override |
| | | public void delete(Integer id) { |
| | | Banner banner = this.baseMapper.selectById(id); |
| | | if (banner == null) { |
| | | if (null == banner || banner.getDelFlag() != 0 ) { |
| | | throw new ServiceException("banner不存在"); |
| | | } |
| | | banner.setDelFlag(1); |
New file |
| | |
| | | package com.ruoyi.system.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.common.exception.ServiceException; |
| | | import com.ruoyi.system.domain.CompanyType; |
| | | import com.ruoyi.system.mapper.CompanyTypeMapper; |
| | | import com.ruoyi.system.pojo.dto.AddCompanyTypeDTO; |
| | | import com.ruoyi.system.pojo.vo.CompanyTypePageVO; |
| | | import com.ruoyi.system.pojo.dto.EditCompanyTypeDTO; |
| | | import com.ruoyi.system.service.CompanyTypeService; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | @Service |
| | | public class CompanyTypeServiceImpl extends ServiceImpl<CompanyTypeMapper, CompanyType> implements CompanyTypeService { |
| | | |
| | | @Override |
| | | public IPage<CompanyTypePageVO> getCompanyTypePage(Integer pageNum, Integer pageSize, String name) { |
| | | IPage<CompanyTypePageVO> page=new Page<>(pageNum, pageSize); |
| | | return this.baseMapper.getCompanyTypePage(page,name); |
| | | } |
| | | |
| | | @Override |
| | | public void add(AddCompanyTypeDTO dto) { |
| | | //根据名称查看是否已存在 |
| | | CompanyType companyType = this.baseMapper.selectOne(new LambdaQueryWrapper<CompanyType>().eq(CompanyType::getName, dto.getName()).eq(CompanyType::getDelFlag, 0)); |
| | | if(null !=companyType){ |
| | | throw new ServiceException("该类型已存在"); |
| | | } |
| | | CompanyType companyType1 = new CompanyType(); |
| | | BeanUtils.copyProperties(dto,companyType1); |
| | | this.baseMapper.insert(companyType1); |
| | | } |
| | | |
| | | @Override |
| | | public void edit(EditCompanyTypeDTO dto) { |
| | | CompanyType companyType = this.getById(dto.getId()); |
| | | if(null == companyType || companyType.getDelFlag() != 0){ |
| | | throw new ServiceException("该类型不存在"); |
| | | } |
| | | if (!dto.getName().equals(companyType.getName())) { |
| | | //修改了名称 |
| | | //查看名称是否存在 |
| | | CompanyType byName = this.baseMapper.selectOne(new LambdaQueryWrapper<CompanyType>().eq(CompanyType::getName, dto.getName()).eq(CompanyType::getDelFlag, 0)); |
| | | if(null != byName){ |
| | | throw new ServiceException("该类型已存在"); |
| | | } |
| | | } |
| | | BeanUtils.copyProperties(dto, companyType); |
| | | this.baseMapper.updateById(companyType); |
| | | |
| | | } |
| | | |
| | | @Override |
| | | public void delete(Integer id) { |
| | | CompanyType companyType = this.getById(id); |
| | | if(null == companyType || companyType.getDelFlag() != 0){ |
| | | throw new ServiceException("该类型不存在"); |
| | | } |
| | | companyType.setDelFlag(1); |
| | | this.baseMapper.updateById(companyType); |
| | | } |
| | | } |
New file |
| | |
| | | package com.ruoyi.system.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.common.exception.ServiceException; |
| | | import com.ruoyi.system.domain.Industry; |
| | | import com.ruoyi.system.mapper.IndustryMapper; |
| | | import com.ruoyi.system.pojo.dto.AddIndustryDTO; |
| | | import com.ruoyi.system.pojo.dto.EditIndustryDTO; |
| | | import com.ruoyi.system.pojo.vo.IndustryPageVO; |
| | | import com.ruoyi.system.service.IndustryService; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | @Service |
| | | public class IndustryServiceImpl extends ServiceImpl<IndustryMapper, Industry> implements IndustryService { |
| | | |
| | | @Override |
| | | public IPage<IndustryPageVO> getIndustryPage(Integer pageNum, Integer pageSize, String name) { |
| | | IPage<IndustryPageVO> page=new Page<>(pageNum, pageSize); |
| | | return this.baseMapper.getIndustryPage(page,name); |
| | | } |
| | | |
| | | @Override |
| | | public void add(AddIndustryDTO dto) { |
| | | //根据名称查看是否已存在 |
| | | Industry industry = this.baseMapper.selectOne(new LambdaQueryWrapper<Industry>().eq(Industry::getName, dto.getName()).eq(Industry::getDelFlag, 0)); |
| | | if(null !=industry && industry.getDelFlag() == 0){ |
| | | throw new ServiceException("该行业已存在"); |
| | | } |
| | | Industry industry1 = new Industry(); |
| | | BeanUtils.copyProperties(dto, industry1); |
| | | this.baseMapper.insert(industry1); |
| | | } |
| | | |
| | | @Override |
| | | public void edit(EditIndustryDTO dto) { |
| | | Industry industry = this.getById(dto.getId()); |
| | | if (null ==industry || industry.getDelFlag() != 0){ |
| | | throw new ServiceException("该行业不存在"); |
| | | } |
| | | if (industry.getName().equals(dto.getName())) { |
| | | //修改名称 |
| | | Industry byName = this.baseMapper.selectOne(new LambdaQueryWrapper<Industry>().eq(Industry::getName, dto.getName()).eq(Industry::getDelFlag, 0)); |
| | | if(null != byName){ |
| | | throw new ServiceException("该所属行业名称重复"); |
| | | } |
| | | } |
| | | BeanUtils.copyProperties(dto, industry); |
| | | this.baseMapper.updateById(industry); |
| | | } |
| | | |
| | | @Override |
| | | public void delete(Integer id) { |
| | | Industry industry = this.getById(id); |
| | | if (null == industry || industry.getDelFlag() != 0){ |
| | | throw new ServiceException("该行业不存在"); |
| | | } |
| | | industry.setDelFlag(1); |
| | | this.baseMapper.updateById(industry); |
| | | } |
| | | } |
New file |
| | |
| | | package com.ruoyi.system.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.common.exception.ServiceException; |
| | | import com.ruoyi.system.domain.Licence; |
| | | import com.ruoyi.system.mapper.LicenceMapper; |
| | | import com.ruoyi.system.pojo.dto.AddLicenceDTO; |
| | | import com.ruoyi.system.pojo.dto.EditLicenceDTO; |
| | | import com.ruoyi.system.pojo.vo.LicencePageVO; |
| | | import com.ruoyi.system.service.LicenceService; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | @Service |
| | | public class LicenceServiceImpl extends ServiceImpl<LicenceMapper, Licence> implements LicenceService { |
| | | |
| | | @Override |
| | | public IPage<LicencePageVO> getLicencePage(Integer pageNum, Integer pageSize, String name) { |
| | | IPage<LicencePageVO> page=new Page<>(pageNum, pageSize); |
| | | return this.baseMapper.getIndustryPage(page,name); |
| | | } |
| | | |
| | | @Override |
| | | public void add(AddLicenceDTO dto) { |
| | | //判断是否存在 |
| | | Licence licence = this.baseMapper.selectOne(new LambdaQueryWrapper<Licence>().eq(Licence::getName, dto.getName()).eq(Licence::getDelFlag, 0)); |
| | | if (null == licence) { |
| | | throw new ServiceException("许可证名称重复"); |
| | | } |
| | | |
| | | BeanUtils.copyProperties(dto, licence); |
| | | String grand = String.join(";", dto.getGrandNameList());//多个以分号相隔 |
| | | licence.setGradeName(grand); |
| | | this.baseMapper.insert(licence); |
| | | } |
| | | |
| | | |
| | | @Override |
| | | public void edit(EditLicenceDTO dto) { |
| | | Licence licence = this.baseMapper.selectById(dto.getId()); |
| | | if (null == licence || licence.getDelFlag() != 0) { |
| | | throw new ServiceException("该许可证不存在"); |
| | | } |
| | | if (!licence.getName().equals(dto.getName())) { |
| | | Licence licence1 = this.baseMapper.selectOne(new LambdaQueryWrapper<Licence>().eq(Licence::getName, dto.getName()).eq(Licence::getDelFlag, 0)); |
| | | if (null != licence1) { |
| | | throw new ServiceException("修改的许可证名称重复"); |
| | | } |
| | | } |
| | | BeanUtils.copyProperties(dto, licence); |
| | | String grand = String.join(";", dto.getGrandNameList());//多个以分号相隔 |
| | | licence.setGradeName(grand); |
| | | this.baseMapper.updateById(licence); |
| | | } |
| | | |
| | | @Override |
| | | public void delete(Integer id) { |
| | | Licence licence = this.baseMapper.selectById(id); |
| | | if (null == licence || licence.getDelFlag() != 0) { |
| | | throw new ServiceException("该许可证不存在"); |
| | | } |
| | | licence.setDelFlag(1); |
| | | this.baseMapper.updateById(licence); |
| | | } |
| | | } |
New file |
| | |
| | | package com.ruoyi.system.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.common.exception.ServiceException; |
| | | import com.ruoyi.system.domain.Question; |
| | | import com.ruoyi.system.mapper.QuestionMapper; |
| | | import com.ruoyi.system.pojo.dto.AddQuestionDTO; |
| | | import com.ruoyi.system.pojo.dto.EditQuestionDTO; |
| | | import com.ruoyi.system.pojo.vo.BannerPageVO; |
| | | import com.ruoyi.system.pojo.vo.QuestionPageVO; |
| | | import com.ruoyi.system.service.QuestionService; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | |
| | | @Service |
| | | public class QuestionServiceImpl extends ServiceImpl<QuestionMapper, Question> implements QuestionService { |
| | | |
| | | |
| | | @Override |
| | | public IPage<QuestionPageVO> getQuestionPage(Integer pageNum, Integer pageSize, String name) { |
| | | IPage<BannerPageVO> page=new Page<>(pageNum, pageSize); |
| | | return this.baseMapper.getQuestionPage(page,name); |
| | | } |
| | | |
| | | @Override |
| | | public void add(AddQuestionDTO dto) { |
| | | Question question = new Question(); |
| | | BeanUtils.copyProperties(dto, question); |
| | | this.baseMapper.insert(question); |
| | | } |
| | | |
| | | @Override |
| | | public void edit(EditQuestionDTO dto) { |
| | | Question question = this.getById(dto.getId()); |
| | | if (null == question || question.getDelFlag() != 0 ) { |
| | | throw new ServiceException("该问题不存在"); |
| | | } |
| | | BeanUtils.copyProperties(dto, question); |
| | | this.baseMapper.updateById(question); |
| | | } |
| | | |
| | | @Override |
| | | public void delete(Integer id) { |
| | | Question question = this.getById(id); |
| | | if (null == question || question.getDelFlag() != 0 ) { |
| | | throw new ServiceException("该问题不存在"); |
| | | } |
| | | question.setDelFlag(1); |
| | | this.baseMapper.updateById(question); |
| | | } |
| | | } |
New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.ruoyi.system.mapper.CompanyTypeMapper"> |
| | | |
| | | |
| | | <select id="getCompanyTypePage" resultType="com.ruoyi.system.pojo.vo.CompanyTypePageVO"> |
| | | select |
| | | id,name,order_num |
| | | from tb_company_type |
| | | where |
| | | del_flag = 0 |
| | | <if test="null!=name and ''!=name"> |
| | | and name like concat('%',#{name},'%') |
| | | </if> |
| | | </select> |
| | | </mapper> |
New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.ruoyi.system.mapper.IndustryMapper"> |
| | | |
| | | |
| | | <select id="getIndustryPage" resultType="com.ruoyi.system.pojo.vo.IndustryPageVO"> |
| | | select id ,name,order_num |
| | | from tb_industry |
| | | where del_flag=0 |
| | | <if test="null!=name and ''!=name"> |
| | | and name like concat('%',#{name},'%') |
| | | </if> |
| | | </select> |
| | | </mapper> |
New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.ruoyi.system.mapper.LicenceMapper"> |
| | | |
| | | |
| | | <select id="getIndustryPage" resultType="com.ruoyi.system.pojo.vo.LicencePageVO"> |
| | | select id,name,order_num from tb_licence where del_flag = 0 |
| | | <if test=" null !=name and '' != name"> |
| | | and name like concat('%',#{name},'%') |
| | | </if> |
| | | </select> |
| | | </mapper> |
New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.ruoyi.system.mapper.QuestionMapper"> |
| | | |
| | | |
| | | <select id="getQuestionPage" resultType="com.ruoyi.system.pojo.vo.QuestionPageVO"> |
| | | select id,name ,order_num |
| | | from tb_question |
| | | where |
| | | del_flg=0 |
| | | <if test="null != name and '' != name"> |
| | | and name like concat('%',#{name},'%') |
| | | </if> |
| | | |
| | | </select> |
| | | </mapper> |