Commit 7f4a0f1a by 吴迪

【新增】修改配置文件

parent 7ba6d932
package io.office.modules.manage.controller;
import java.util.Arrays;
import java.util.Map;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import io.office.modules.app.annotation.Login;
import io.office.modules.manage.entity.NewsEntity;
import io.office.modules.manage.entity.dto.NewsParams;
import io.office.modules.manage.vo.request.RetailEntityVo;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import io.office.modules.manage.entity.RetailEntity;
import io.office.modules.manage.service.RetailService;
import io.office.common.utils.PageUtils;
import io.office.common.utils.R;
/**
* ${comments}
*
* @author wudi
* @email
* @date 2021-12-21 22:43:34
*/
@RestController
@RequestMapping("/retail")
public class RetailController {
@Autowired
private RetailService retailService;
/**
* 列表
*/
@RequestMapping("/list")
// @RequiresPermissions("manage:retail:list")
public R list(@RequestParam Map<String, Object> params){
PageUtils page = retailService.queryPage(params);
return R.ok().put("page", page);
}
/**
* 信息
*/
@RequestMapping("/info/{id}")
// @RequiresPermissions("manage:retail:info")
public R info(@PathVariable("id") Integer id){
RetailEntity retail = retailService.getById(id);
return R.ok().put("retail", retail);
}
/**
* 保存
*/
@RequestMapping("/save")
// @RequiresPermissions("manage:retail:save")
public R save(@RequestBody RetailEntity retail){
retailService.save(retail);
return R.ok();
}
/**
* 修改
*/
@RequestMapping("/update")
// @RequiresPermissions("manage:retail:update")
public R update(@RequestBody RetailEntity retail){
retailService.updateById(retail);
return R.ok();
}
/**
* 删除
*/
@RequestMapping("/delete")
// @RequiresPermissions("manage:retail:delete")
public R delete(@RequestBody Integer[] ids){
retailService.removeByIds(Arrays.asList(ids));
return R.ok();
}
/**
* 应用指南列表
* @param retailEntityVo
* @return
*/
/* @Login
@PostMapping("/api/guideList")
public R guideList(@RequestBody RetailEntityVo retailEntityVo) {
*//* Page<RetailEntity> page = this.retailService.queryPage(retailEntityVo,
new Page(newsParams.getPage(), newsParams.getLimit()));
PageUtils pageUtils = new PageUtils(page);
return R.ok().put("data", pageUtils);*//*
}*/
}
package io.office.modules.manage.dao;
import io.office.modules.manage.entity.RetailEntity;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
/**
* ${comments}
*
* @author wudi
* @email
* @date 2021-12-21 22:43:34
*/
@Mapper
public interface RetailDao extends BaseMapper<RetailEntity> {
}
package io.office.modules.manage.entity;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;
/**
* ${comments}
*
* @author wudi
* @email
* @date 2021-12-21 22:43:34
*/
@Data
@TableName("retail")
public class RetailEntity implements Serializable {
private static final long serialVersionUID = 1L;
/**
* $column.comments
*/
@TableId
private Integer id;
/**
* $column.comments
*/
private Integer columnid;
/**
* $column.comments
*/
private String title;
/**
* $column.comments
*/
private String titleOld;
/**
* $column.comments
*/
private String keyword;
/**
* $column.comments
*/
private String brief;
/**
* $column.comments
*/
private Date releasedate;
/**
* $column.comments
*/
private Date updatedate;
/**
* $column.comments
*/
private String author;
/**
* $column.comments
*/
private String source;
/**
* $column.comments
*/
private Integer levels;
/**
* $column.comments
*/
private String directpath;
/**
* $column.comments
*/
private String pic;
/**
* $column.comments
*/
private String content;
/**
* $column.comments
*/
private Integer hits;
/**
* $column.comments
*/
private String editor;
/**
* $column.comments
*/
private String lasteditor;
/**
* $column.comments
*/
private Integer classid;
/**
* $column.comments
*/
private Date publicdate;
/**
* $column.comments
*/
private Date startdate;
/**
* $column.comments
*/
private String ishead;
/**
* $column.comments
*/
private Integer status;
/**
* $column.comments
*/
private String auditor;
/**
* $column.comments
*/
private String showtime;
/**
* $column.comments
*/
private Date checkdate;
}
package io.office.modules.manage.service;
import com.baomidou.mybatisplus.extension.service.IService;
import io.office.common.utils.PageUtils;
import io.office.modules.manage.entity.RetailEntity;
import io.office.modules.manage.vo.request.RetailEntityVo;
import java.util.Map;
/**
* ${comments}
*
* @author wudi
* @email
* @date 2021-12-21 22:43:34
*/
public interface RetailService extends IService<RetailEntity> {
PageUtils queryPage(Map<String, Object> params);
PageUtils queryPageList(Map<String, Object> params);
}
......@@ -8,6 +8,7 @@ import io.office.modules.manage.utils.CheckAICodeUtil;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
import java.util.List;
......@@ -19,7 +20,8 @@ public class BarcodeGenerationServiceImpl implements BarcodeGenerationService {
private final Log logger = LogFactory.getLog(getClass());
public static final String SEPERATOR = "ñ";
public static final String prefix_host="http://81.68.189.225:9091/office/";
@Value("${prefix_host}")
public String prefix_host;
public static final String prefix_url= "barcodegeneration/api/gensvg?type=";
@Override
......
package io.office.modules.manage.service.impl;
import io.office.modules.manage.vo.request.RetailEntityVo;
import org.springframework.stereotype.Service;
import java.util.Map;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import io.office.common.utils.PageUtils;
import io.office.common.utils.Query;
import io.office.modules.manage.dao.RetailDao;
import io.office.modules.manage.entity.RetailEntity;
import io.office.modules.manage.service.RetailService;
@Service("retailService")
public class RetailServiceImpl extends ServiceImpl<RetailDao, RetailEntity> implements RetailService {
@Override
public PageUtils queryPage(Map<String, Object> params) {
IPage<RetailEntity> page = this.page(
new Query<RetailEntity>().getPage(params),
new QueryWrapper<RetailEntity>()
);
return new PageUtils(page);
}
@Override
public PageUtils queryPageList(Map<String, Object> params) {
QueryWrapper<RetailEntity> retailEntityQueryWrapper = new QueryWrapper<>();
retailEntityQueryWrapper.eq("classid","1");
retailEntityQueryWrapper.gt("levels","0");
retailEntityQueryWrapper.eq("status","1");
retailEntityQueryWrapper.orderByAsc("levels");
retailEntityQueryWrapper.orderByAsc("id");
IPage <RetailEntity> page = this.page(
new Query<RetailEntity>().getPage(params),
retailEntityQueryWrapper
);
return null;
}
}
\ No newline at end of file
package io.office.modules.manage.vo.request;
import com.baomidou.mybatisplus.annotation.TableId;
import io.office.modules.manage.entity.page.PageParams;
import lombok.Data;
import java.util.Date;
/**
*
* 
 @description:
*
* @author wudi
* @date 17:58 2021/12/22
*/
@Data
public class RetailEntityVo extends PageParams {
private static final long serialVersionUID = 1L;
/**
* $column.comments
*/
@TableId
private Integer id;
/**
* $column.comments
*/
private Integer columnid;
/**
* $column.comments
*/
private String title;
/**
* $column.comments
*/
private String titleOld;
/**
* $column.comments
*/
private String keyword;
/**
* $column.comments
*/
private String brief;
/**
* $column.comments
*/
private Date releasedate;
/**
* $column.comments
*/
private Date updatedate;
/**
* $column.comments
*/
private String author;
/**
* $column.comments
*/
private String source;
/**
* $column.comments
*/
private Integer levels;
/**
* $column.comments
*/
private String directpath;
/**
* $column.comments
*/
private String pic;
/**
* $column.comments
*/
private String content;
/**
* $column.comments
*/
private Integer hits;
/**
* $column.comments
*/
private String editor;
/**
* $column.comments
*/
private String lasteditor;
/**
* $column.comments
*/
private Integer classid;
/**
* $column.comments
*/
private Date publicdate;
/**
* $column.comments
*/
private Date startdate;
/**
* $column.comments
*/
private String ishead;
/**
* $column.comments
*/
private Integer status;
/**
* $column.comments
*/
private String auditor;
/**
* $column.comments
*/
private String showtime;
/**
* $column.comments
*/
private Date checkdate;
}
......@@ -60,4 +60,5 @@ file:
request:
prefix: http://81.68.189.225:9091/office/uploadFileResource/
ueditorSavePath: /uploadFileResource/
\ No newline at end of file
ueditorSavePath: /uploadFileResource/
prefix_host: http://81.68.189.225:9091/office/
\ 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">
<mapper namespace="io.office.modules.manage.dao.RetailDao">
<!-- 可根据自己的需求,是否要使用 -->
<resultMap type="io.office.modules.manage.entity.RetailEntity" id="retailMap">
<result property="id" column="id"/>
<result property="columnid" column="columnid"/>
<result property="title" column="title"/>
<result property="titleOld" column="title_old"/>
<result property="keyword" column="keyword"/>
<result property="brief" column="brief"/>
<result property="releasedate" column="releasedate"/>
<result property="updatedate" column="updatedate"/>
<result property="author" column="author"/>
<result property="source" column="source"/>
<result property="levels" column="levels"/>
<result property="directpath" column="directpath"/>
<result property="pic" column="pic"/>
<result property="content" column="content"/>
<result property="hits" column="hits"/>
<result property="editor" column="editor"/>
<result property="lasteditor" column="lasteditor"/>
<result property="classid" column="classid"/>
<result property="publicdate" column="publicdate"/>
<result property="startdate" column="startdate"/>
<result property="ishead" column="ishead"/>
<result property="status" column="status"/>
<result property="auditor" column="auditor"/>
<result property="showtime" column="showtime"/>
<result property="checkdate" column="checkdate"/>
</resultMap>
</mapper>
\ 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