| | |
| | | |
| | | /** |
| | | * 企业花名册修改 |
| | | * @param id |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "标准化模版置顶") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(paramType = "query", name = "id", dataType = "int", required = true, value = "数据id"), |
| | | }) |
| | | @GetMapping("/standardizedTemplate/top") |
| | | public CommonResult topCompanyIndustryTemplate(Integer id){ |
| | | return standardizedTemplateService.topStandardizedTemplate(id); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 企业花名册修改 |
| | | * @param standardizedTemplate |
| | | * @return |
| | | */ |
| | |
| | | @TableField(exist = false) |
| | | private Integer sort; |
| | | |
| | | @TableField("top_time") |
| | | private LocalDateTime topTime; |
| | | |
| | | } |
| | |
| | | @TableField("credit_code") |
| | | private String creditCode; |
| | | |
| | | @NotBlank(message = "负责人不能为空") |
| | | @ApiModelProperty(value = "负责人",required = true) |
| | | // @NotBlank(message = "负责人不能为空") |
| | | // @ApiModelProperty(value = "负责人",required = true) |
| | | @TableField("major") |
| | | private String major; |
| | | |
| | | @NotBlank(message = "联系电话不能为空") |
| | | @Length(min = 11, max = 11, message = "手机号只能为11位") |
| | | @Pattern(regexp = "^[1][3,4,5,6,7,8,9][0-9]{9}$",message = "手机号码有误!") |
| | | @ApiModelProperty(value = "联系电话",required = true) |
| | | // @NotBlank(message = "联系电话不能为空") |
| | | // @Length(min = 11, max = 11, message = "手机号只能为11位") |
| | | // @Pattern(regexp = "^[1][3,4,5,6,7,8,9][0-9]{9}$",message = "手机号码有误!") |
| | | // @ApiModelProperty(value = "联系电话",required = true) |
| | | @TableField("phone") |
| | | private String phone; |
| | | |
| | |
| | | CommonResult deletedStandardizedQuality(Integer id); |
| | | |
| | | CommonResult getStandardizedQualityByCompanyId(Integer id); |
| | | |
| | | CommonResult topStandardizedTemplate(Integer id); |
| | | } |
| | |
| | | } |
| | | return CommonResult.success(map); |
| | | } |
| | | |
| | | @Override |
| | | public CommonResult topStandardizedTemplate(Integer id) { |
| | | StandardizedTemplate standardizedTemplate = new StandardizedTemplate(); |
| | | standardizedTemplate.setId(id); |
| | | standardizedTemplate.setTopTime(LocalDateTime.now()); |
| | | standardizedTemplateMapper.updateById(standardizedTemplate); |
| | | return CommonResult.success(); |
| | | } |
| | | } |
| | |
| | | </if> |
| | | <if test="sort!=null and sort==1"> |
| | | ORDER BY |
| | | st.top_time desc, |
| | | st.template_name asc |
| | | </if> |
| | | <if test="sort!=null and sort==2"> |
| | | ORDER BY |
| | | st.top_time desc, |
| | | st.template_name desc |
| | | </if> |
| | | <if test="sort ==null or sort== '' or sort == 0"> |
| | | ORDER BY |
| | | st.top_time desc, |
| | | st.create_time desc |
| | | </if> |
| | | |
| | |
| | | </if> |
| | | <if test="sort!=null and sort==1"> |
| | | ORDER BY |
| | | st.top_time desc, |
| | | st.template_name asc |
| | | </if> |
| | | <if test="sort!=null and sort==2"> |
| | | ORDER BY |
| | | st.top_time desc, |
| | | st.template_name desc |
| | | </if> |
| | | <if test="sort ==null or sort== '' or sort == 0"> |
| | | ORDER BY |
| | | st.top_time desc, |
| | | st.create_time desc |
| | | </if> |
| | | </select> |