fangyuan
2022-11-28 a50928cc8fe098a9e1d484bd5e69e9d14938da12
店铺列表查询接口修改
8个文件已修改
27 ■■■■ 已修改文件
ycl-platform/src/main/java/com/ycl/controller/store/StoreInfoController.java 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ycl-platform/src/main/java/com/ycl/dto/store/UmsStoreInfoParam.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ycl-platform/src/main/java/com/ycl/entity/video/VideoPoint.java 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ycl-platform/src/main/java/com/ycl/mapper/store/StoreInfoMapper.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
ycl-platform/src/main/java/com/ycl/service/store/StoreInfoService.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
ycl-platform/src/main/java/com/ycl/service/store/impl/StoreInfoServiceImpl.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ycl-platform/src/main/java/com/ycl/vo/store/StoreInfoVO.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ycl-platform/src/main/resources/mapper/store/UmsStoreInfoMapper.xml 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ycl-platform/src/main/java/com/ycl/controller/store/StoreInfoController.java
@@ -51,8 +51,10 @@
    @LogSave(operationType = "门店管理", contain = "查询门店")
    public CommonResult<CommonPage<StoreInfoVO>> list(@RequestParam(value = "keyword", required = false) String keyword,
                                                      @RequestParam(value = "pageSize", defaultValue = "5") Integer pageSize,
                                                      @RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum) {
        Page<StoreInfoVO> storeInfoPage = storeInfoService.list(keyword, pageSize, pageNum);
                                                      @RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum,
                                                      @RequestParam(value = "status", required = false) String status
    ) {
        Page<StoreInfoVO> storeInfoPage = storeInfoService.list(keyword, pageSize, pageNum,status);
        return CommonResult.success(CommonPage.restPage(storeInfoPage));
    }
ycl-platform/src/main/java/com/ycl/dto/store/UmsStoreInfoParam.java
@@ -53,4 +53,8 @@
    @ApiModelProperty("摄像头")
    @TableField("video_id")
    private String videoId;
    @ApiModelProperty("店铺状态")
    @TableField("status")
    private String status;
}
ycl-platform/src/main/java/com/ycl/entity/video/VideoPoint.java
@@ -12,6 +12,7 @@
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
/**
 * <p>
@@ -24,6 +25,7 @@
@Data
@EqualsAndHashCode(callSuper = false)
@TableName("ums_video_point")
@NoArgsConstructor
public class VideoPoint implements Serializable {
    private static final long serialVersionUID = 1L;
ycl-platform/src/main/java/com/ycl/mapper/store/StoreInfoMapper.java
@@ -15,5 +15,5 @@
 */
public interface StoreInfoMapper extends BaseMapper<StoreInfo> {
    Page<StoreInfoVO> selectStorePage(Page<StoreInfo> storeInfoPage, String keyword);
    Page<StoreInfoVO> selectStorePage(Page<StoreInfo> storeInfoPage, String keyword,String status);
}
ycl-platform/src/main/java/com/ycl/service/store/StoreInfoService.java
@@ -22,7 +22,7 @@
     * @param pageNum 页码
     * @return 分页实体
     */
    Page<StoreInfoVO> list(String keyword, Integer pageSize, Integer pageNum);
    Page<StoreInfoVO> list(String keyword, Integer pageSize, Integer pageNum,String status);
    /**
     * 读取excel文件动态加载文件
ycl-platform/src/main/java/com/ycl/service/store/impl/StoreInfoServiceImpl.java
@@ -44,11 +44,11 @@
    @Override
    public Page<StoreInfoVO> list(String keyword, Integer pageSize, Integer pageNum) {
    public Page<StoreInfoVO> list(String keyword, Integer pageSize, Integer pageNum,String status) {
        Page<StoreInfo> storeInfoPage = new Page<>();
        storeInfoPage.setSize(pageSize);
        storeInfoPage.setCurrent(pageNum);
        Page<StoreInfoVO> page = storeInfoMapper.selectStorePage(storeInfoPage, keyword);
        Page<StoreInfoVO> page = storeInfoMapper.selectStorePage(storeInfoPage, keyword,status);
        page.getRecords().forEach(x->x.setVideoPoint(videoPointMapper.selectById(x.getVideoId())));
        return page;
    }
ycl-platform/src/main/java/com/ycl/vo/store/StoreInfoVO.java
@@ -69,9 +69,9 @@
    @TableField("store_score")
    private BigDecimal storeScore;
    @ApiModelProperty("门店积分")
    @ApiModelProperty("视频点位")
    @TableField(" relation_video")
    private BigDecimal relationVideo;
    private String relationVideo;
    @ApiModelProperty("门店类型")
    @TableField("type")
ycl-platform/src/main/resources/mapper/store/UmsStoreInfoMapper.xml
@@ -25,6 +25,9 @@
            <if test="keyword!=null and keyword!=''">
                t1.store_name LIKE  CONCAT('%', #{keyword}, '%')
            </if>
            <if test="status!=null and status!='' and status!='0' ">
                t1.status = #{status}
            </if>
        </where>
        order by t1.id desc
    </select>