Commit 4c60d249 authored by 周健威's avatar 周健威

添加接口

parent 05b311c2
package com.upyuns.platform.rs.datacenter.entity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import javax.persistence.Table;
@Data
@Table(name = "rscp_resolution")
@ApiModel(description = "")
public class RscpResolution implements java.io.Serializable {
/** 版本号 */
private static final long serialVersionUID = 8892280943401444470L;
/* This code was generated by TableGo tools, mark 1 begin. */
/** id */
@ApiModelProperty(value = "")
private String id;
/** resolutionName */
@ApiModelProperty(value = "")
private String resolutionName;
/** sensorName */
@ApiModelProperty(value = "")
private String sensorName;
/** status */
@ApiModelProperty(value = "")
private Integer status;
/** sort */
@ApiModelProperty(value = "")
private Integer sort;
/** 首页排序 */
@ApiModelProperty(value = "首页排序")
private Integer indexSort;
/** 是否要首页显示:0否,1是 */
@ApiModelProperty(value = "是否要首页显示:0否,1是")
private Integer isIndex;
/** 是否已删除 0--未删除;1--已删除 */
@ApiModelProperty(value = "是否已删除 0--未删除;1--已删除")
private Integer isDel;
/* This code was generated by TableGo tools, mark 1 end. */
/* This code was generated by TableGo tools, mark 2 begin. */
}
\ No newline at end of file
package com.upyuns.platform.rs.datacenter.biz;
import com.github.wxiaoqi.security.common.biz.BaseBiz;
import com.upyuns.platform.rs.datacenter.entity.RscpImagePrice;
import com.upyuns.platform.rs.datacenter.entity.RscpResolution;
import com.upyuns.platform.rs.datacenter.mapper.RscpImagePriceMapper;
import com.upyuns.platform.rs.datacenter.mapper.RscpResolutionMapper;
import org.springframework.stereotype.Service;
@Service
public class RscpResolutionBiz extends BaseBiz<RscpResolutionMapper, RscpResolution> {
}
package com.upyuns.platform.rs.datacenter.mapper;
import com.upyuns.platform.rs.datacenter.entity.RscpImagePrice;
import com.upyuns.platform.rs.datacenter.entity.RscpResolution;
import tk.mybatis.mapper.common.Mapper;
public interface RscpResolutionMapper extends Mapper<RscpResolution> {
}
\ No newline at end of file
package com.upyuns.platform.rs.datacenter.rest;
import cn.hutool.core.collection.CollUtil;
import com.github.wxiaoqi.security.common.msg.ObjectRestResponse;
import com.github.wxiaoqi.security.common.rest.BaseController;
import com.upyuns.platform.rs.datacenter.biz.RscpImagePriceBiz;
import com.upyuns.platform.rs.datacenter.biz.RscpResolutionBiz;
import com.upyuns.platform.rs.datacenter.entity.RscpImagePrice;
import com.upyuns.platform.rs.datacenter.entity.RscpResolution;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;
import java.util.List;
import java.util.stream.Collectors;
import static com.github.wxiaoqi.security.common.constant.CommonConstants.SYS_FALSE;
import static com.github.wxiaoqi.security.common.constant.CommonConstants.SYS_TRUE;
@RestController
@RequestMapping("resolution")
public class RscpResolutionController extends BaseController<RscpResolutionBiz, RscpResolution> {
@RequestMapping(value = "/app/unauth/all", method = RequestMethod.GET)
public ObjectRestResponse unauthQuery() {
List<RscpResolution> list = baseBiz.selectByWeekend(w -> {
w.andEqualTo(RscpResolution::getStatus, SYS_TRUE);
w.andEqualTo(RscpResolution::getIsDel, SYS_FALSE);
return w;
}, " sort asc");
return ObjectRestResponse.succ(list);
}
}
\ No newline at end of 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">
<!-- rscp_resolution -->
<mapper namespace="com.upyuns.platform.rs.datacenter.mapper.RscpResolutionMapper">
<!-- This code was generated by TableGo tools, mark 1 begin. -->
<!-- 字段映射 -->
<resultMap id="rscpResolutionMap" type="com.upyuns.platform.rs.datacenter.entity.RscpResolution">
<id column="id" property="id" jdbcType="VARCHAR" />
<result column="resolution_name" property="resolutionName" jdbcType="VARCHAR" />
<result column="sensor_name" property="sensorName" jdbcType="VARCHAR" />
<result column="status" property="status" jdbcType="INTEGER" />
<result column="sort" property="sort" jdbcType="INTEGER" />
<result column="index_sort" property="indexSort" jdbcType="INTEGER" />
<result column="is_index" property="isIndex" jdbcType="INTEGER" />
</resultMap>
<!-- This code was generated by TableGo tools, mark 1 end. -->
<!-- This code was generated by TableGo tools, mark 2 begin. -->
<!-- 表查询字段 -->
<sql id="allColumns">
rr.id, rr.resolution_name, rr.sensor_name, rr.status, rr.sort, rr.index_sort, rr.is_index
</sql>
<!-- This code was generated by TableGo tools, mark 2 end. -->
</mapper>
\ No newline at end of file
......@@ -51,7 +51,14 @@ public class WebConfiguration implements WebMvcConfigurer {
private ArrayList<String> getIncludePathPatterns() {
ArrayList<String> list = new ArrayList<>();
String[] urls = {
"/banner/**",
"/imageImgStorage/**",
"/imageInfoRelation/**",
"/imageInformation/**",
"/industryApplicationInfo/**",
"/industryApplicationType/**",
"/newsInfo/**",
"/newsType/**"
};
Collections.addAll(list, urls);
return list;
......
package com.upyuns.platform.rs.website.controller.web;
import com.github.wxiaoqi.security.common.msg.ObjectRestResponse;
import com.github.wxiaoqi.security.common.rest.BaseController;
import com.upyuns.platform.rs.website.biz.CustomFormBiz;
import com.upyuns.platform.rs.website.entity.CustomForm;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;
@RestController
@RequestMapping("customForm/web")
public class CustomFormWebController extends BaseController<CustomFormBiz,CustomForm> {
@RequestMapping(value = "customIndustry",method = RequestMethod.POST)
public ObjectRestResponse customIndustry(CustomForm entity) {
baseBiz.insertSelective(entity);
return ObjectRestResponse.succ();
}
@RequestMapping(value = "customImgStorage",method = RequestMethod.POST)
public ObjectRestResponse customImgStorage(CustomForm entity) {
baseBiz.insertSelective(entity);
return ObjectRestResponse.succ();
}
@RequestMapping(value = "customImageData",method = RequestMethod.POST)
public ObjectRestResponse customImageData(CustomForm entity) {
baseBiz.insertSelective(entity);
return ObjectRestResponse.succ();
}
}
\ No newline at end of file
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