大屏接口修改
parent
c71d67f9c6
commit
e1c8b415ec
@ -0,0 +1,17 @@
|
||||
package com.glxp.api.dao.stat;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.glxp.api.entity.stat.StatCorpInvEntity;
|
||||
import com.glxp.api.entity.stat.StatProductCategoryMonitorEntity;
|
||||
import com.glxp.api.req.stat.StatCorpInvRequest;
|
||||
import com.glxp.api.util.page.ListPageRequest;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Mapper
|
||||
public interface StatCorpInvMapper extends BaseMapper<StatCorpInvEntity> {
|
||||
|
||||
List<StatCorpInvEntity> filterList(StatCorpInvRequest statCorpInvRequest);
|
||||
|
||||
}
|
@ -0,0 +1,15 @@
|
||||
package com.glxp.api.dao.stat;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.glxp.api.entity.stat.StatProductCategoryMonitorEntity;
|
||||
import com.glxp.api.util.page.ListPageRequest;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Mapper
|
||||
public interface StatProductCategoryMonitorMapper extends BaseMapper<StatProductCategoryMonitorEntity> {
|
||||
|
||||
List<StatProductCategoryMonitorEntity> filterList(ListPageRequest listPageRequest);
|
||||
|
||||
}
|
@ -0,0 +1,59 @@
|
||||
package com.glxp.api.entity.stat;
|
||||
|
||||
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 java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
@Data
|
||||
@Builder
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@TableName(value = "stat_corp_inv")
|
||||
public class StatCorpInvEntity implements Serializable {
|
||||
@TableId(value = "id", type = IdType.INPUT)
|
||||
private Integer id;
|
||||
|
||||
@TableField(value = "corpName")
|
||||
private String corpName;
|
||||
|
||||
@TableField(value = "corpId")
|
||||
private Long corpId;
|
||||
|
||||
@TableField(value = "tyshxydm")
|
||||
private String tyshxydm;
|
||||
|
||||
@TableField(value = "productType")
|
||||
private String productType;
|
||||
|
||||
@TableField(value = "productName")
|
||||
private String productName;
|
||||
|
||||
@TableField(value = "statCount")
|
||||
private Integer statCount;
|
||||
|
||||
/**
|
||||
* 汇总日期
|
||||
*/
|
||||
@TableField(value = "invDate")
|
||||
private String invDate;
|
||||
|
||||
@TableField(value = "updateTime")
|
||||
private Date updateTime;
|
||||
@TableField(value = "uploadFlag")
|
||||
private Integer uploadFlag;
|
||||
@TableField(value = "lastUploadTime")
|
||||
private Date lastUploadTime;
|
||||
@TableField(value = "bussinessName")
|
||||
private String bussinessName;
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
}
|
@ -0,0 +1,35 @@
|
||||
package com.glxp.api.entity.stat;
|
||||
|
||||
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 java.io.Serializable;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
@Data
|
||||
@Builder
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@TableName(value = "stat_product_category_monitor")
|
||||
public class StatProductCategoryMonitorEntity implements Serializable {
|
||||
@TableId(value = "id", type = IdType.INPUT)
|
||||
private Integer id;
|
||||
|
||||
@TableField(value = "flbm")
|
||||
private String flbm;
|
||||
|
||||
@TableField(value = "flmc")
|
||||
private String flmc;
|
||||
|
||||
@TableField(value = "`count`")
|
||||
private Integer count;
|
||||
|
||||
@TableField(value = "remark")
|
||||
private String remark;
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
}
|
@ -0,0 +1,37 @@
|
||||
package com.glxp.api.req.stat;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.glxp.api.util.page.ListPageRequest;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
@Data
|
||||
public class StatCorpInvRequest extends ListPageRequest {
|
||||
|
||||
|
||||
private Integer id;
|
||||
|
||||
private String corpName;
|
||||
|
||||
private Long corpId;
|
||||
|
||||
private String tyshxydm;
|
||||
|
||||
private String productType;
|
||||
|
||||
private String productName;
|
||||
|
||||
private Integer statCount;
|
||||
|
||||
/**
|
||||
* 汇总日期
|
||||
*/
|
||||
private String invDate;
|
||||
|
||||
private Date updateTime;
|
||||
private Integer uploadFlag;
|
||||
private Date lastUploadTime;
|
||||
}
|
@ -0,0 +1,30 @@
|
||||
package com.glxp.api.service.stat;
|
||||
|
||||
import com.github.pagehelper.PageHelper;
|
||||
import com.glxp.api.dao.stat.StatProductCategoryMonitorMapper;
|
||||
import com.glxp.api.entity.stat.StatProductCategoryMonitorEntity;
|
||||
import com.glxp.api.req.stat.StatCorpInvRequest;
|
||||
import com.glxp.api.util.page.ListPageRequest;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.glxp.api.dao.stat.StatCorpInvMapper;
|
||||
import com.glxp.api.entity.stat.StatCorpInvEntity;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
@Service
|
||||
public class StatCorpInvService extends ServiceImpl<StatCorpInvMapper, StatCorpInvEntity> {
|
||||
@Resource
|
||||
StatCorpInvMapper statCorpInvMapper;
|
||||
|
||||
public List<StatCorpInvEntity> filterList(StatCorpInvRequest statCorpInvRequest) {
|
||||
if (statCorpInvRequest == null) {
|
||||
return Collections.emptyList();
|
||||
}
|
||||
int offset = (statCorpInvRequest.getPage() - 1) * statCorpInvRequest.getLimit();
|
||||
PageHelper.offsetPage(offset, statCorpInvRequest.getLimit());
|
||||
return statCorpInvMapper.filterList(statCorpInvRequest);
|
||||
}
|
||||
}
|
@ -0,0 +1,31 @@
|
||||
package com.glxp.api.service.stat;
|
||||
|
||||
import com.github.pagehelper.PageHelper;
|
||||
import com.glxp.api.entity.purchase.CustomerContactEntity;
|
||||
import com.glxp.api.req.purchase.CustomerContactFilterRequest;
|
||||
import com.glxp.api.util.page.ListPageRequest;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.glxp.api.entity.stat.StatProductCategoryMonitorEntity;
|
||||
import com.glxp.api.dao.stat.StatProductCategoryMonitorMapper;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
@Service
|
||||
public class StatProductCategoryMonitorService extends ServiceImpl<StatProductCategoryMonitorMapper, StatProductCategoryMonitorEntity> {
|
||||
|
||||
@Resource
|
||||
StatProductCategoryMonitorMapper statProductCategoryMonitorMapper;
|
||||
|
||||
public List<StatProductCategoryMonitorEntity> filterList(ListPageRequest listPageRequest) {
|
||||
if (listPageRequest == null) {
|
||||
return Collections.emptyList();
|
||||
}
|
||||
int offset = (listPageRequest.getPage() - 1) * listPageRequest.getLimit();
|
||||
PageHelper.offsetPage(offset, listPageRequest.getLimit());
|
||||
return statProductCategoryMonitorMapper.filterList(listPageRequest);
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,33 @@
|
||||
<?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.glxp.api.dao.stat.StatCorpInvMapper">
|
||||
<resultMap id="BaseResultMap" type="com.glxp.api.entity.stat.StatCorpInvEntity">
|
||||
<!--@mbg.generated-->
|
||||
<!--@Table stat_corp_inv-->
|
||||
<id column="id" jdbcType="INTEGER" property="id"/>
|
||||
<result column="corpName" jdbcType="VARCHAR" property="corpName"/>
|
||||
<result column="corpId" jdbcType="BIGINT" property="corpId"/>
|
||||
<result column="tyshxydm" jdbcType="VARCHAR" property="tyshxydm"/>
|
||||
<result column="productType" jdbcType="VARCHAR" property="productType"/>
|
||||
<result column="productName" jdbcType="VARCHAR" property="productName"/>
|
||||
<result column="statCount" jdbcType="INTEGER" property="statCount"/>
|
||||
<result column="invDate" jdbcType="VARCHAR" property="invDate"/>
|
||||
<result column="updateTime" jdbcType="TIMESTAMP" property="updateTime"/>
|
||||
</resultMap>
|
||||
<sql id="Base_Column_List">
|
||||
<!--@mbg.generated-->
|
||||
id, corpName, corpId, tyshxydm, productType, productName, statCount, invDate, updateTime
|
||||
</sql>
|
||||
|
||||
<select id="filterList"
|
||||
resultType="com.glxp.api.entity.stat.StatCorpInvEntity">
|
||||
SELECT *
|
||||
FROM stat_corp_inv
|
||||
|
||||
<where>
|
||||
<if test="uploadFlag != null">
|
||||
AND uploadFlag = #{uploadFlag}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
</mapper>
|
@ -0,0 +1,24 @@
|
||||
<?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.glxp.api.dao.stat.StatProductCategoryMonitorMapper">
|
||||
<resultMap id="BaseResultMap" type="com.glxp.api.entity.stat.StatProductCategoryMonitorEntity">
|
||||
<!--@mbg.generated-->
|
||||
<!--@Table stat_product_category_monitor-->
|
||||
<id column="id" jdbcType="INTEGER" property="id"/>
|
||||
<result column="flbm" jdbcType="VARCHAR" property="flbm"/>
|
||||
<result column="flmc" jdbcType="VARCHAR" property="flmc"/>
|
||||
<result column="count" jdbcType="INTEGER" property="count"/>
|
||||
<result column="remark" jdbcType="VARCHAR" property="remark"/>
|
||||
</resultMap>
|
||||
<sql id="Base_Column_List">
|
||||
<!--@mbg.generated-->
|
||||
id, flbm, flmc, `count`, remark
|
||||
</sql>
|
||||
|
||||
|
||||
<select id="filterList"
|
||||
resultType="com.glxp.api.entity.stat.StatProductCategoryMonitorEntity">
|
||||
SELECT *
|
||||
FROM stat_product_category_monitor
|
||||
</select>
|
||||
</mapper>
|
Loading…
Reference in New Issue