| New file |
| | |
| | | /* |
| | | * Copyright (c) 2018-2028, Chill Zhuang All rights reserved. |
| | | * |
| | | * Redistribution and use in source and binary forms, with or without |
| | | * modification, are permitted provided that the following conditions are met: |
| | | * |
| | | * Redistributions of source code must retain the above copyright notice, |
| | | * this list of conditions and the following disclaimer. |
| | | * Redistributions in binary form must reproduce the above copyright |
| | | * notice, this list of conditions and the following disclaimer in the |
| | | * documentation and/or other materials provided with the distribution. |
| | | * Neither the name of the dreamlu.net developer nor the names of its |
| | | * contributors may be used to endorse or promote products derived from |
| | | * this software without specific prior written permission. |
| | | * Author: Chill 庄骞 (smallchill@163.com) |
| | | */ |
| | | package org.springblade.modules.lang.controller; |
| | | |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import io.swagger.annotations.ApiParam; |
| | | import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; |
| | | import lombok.AllArgsConstructor; |
| | | import javax.validation.Valid; |
| | | |
| | | import org.springblade.core.mp.support.Condition; |
| | | import org.springblade.core.mp.support.Query; |
| | | import org.springblade.core.tool.api.R; |
| | | import org.springblade.core.tool.utils.Func; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import org.springframework.web.bind.annotation.RequestParam; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import org.springblade.modules.lang.entity.Land; |
| | | import org.springblade.modules.lang.vo.LandVO; |
| | | import org.springblade.modules.lang.service.ILandService; |
| | | import org.springblade.core.boot.ctrl.BladeController; |
| | | |
| | | /** |
| | | * 地块表 控制器 |
| | | * |
| | | * @author BladeX |
| | | * @since 2022-05-10 |
| | | */ |
| | | @RestController |
| | | @AllArgsConstructor |
| | | @RequestMapping("/land/land") |
| | | @Api(value = "地块表", tags = "地块表接口") |
| | | public class LandController extends BladeController { |
| | | |
| | | private final ILandService landService; |
| | | |
| | | /** |
| | | * 详情 |
| | | */ |
| | | @GetMapping("/detail") |
| | | @ApiOperationSupport(order = 1) |
| | | @ApiOperation(value = "详情", notes = "传入land") |
| | | public R<Land> detail(Land land) { |
| | | Land detail = landService.getOne(Condition.getQueryWrapper(land)); |
| | | return R.data(detail); |
| | | } |
| | | |
| | | /** |
| | | * 分页 地块表 |
| | | */ |
| | | @GetMapping("/list") |
| | | @ApiOperationSupport(order = 2) |
| | | @ApiOperation(value = "分页", notes = "传入land") |
| | | public R<IPage<Land>> list(Land land, Query query) { |
| | | IPage<Land> pages = landService.page(Condition.getPage(query), Condition.getQueryWrapper(land)); |
| | | return R.data(pages); |
| | | } |
| | | |
| | | /** |
| | | * 自定义分页 地块表 |
| | | */ |
| | | @GetMapping("/page") |
| | | @ApiOperationSupport(order = 3) |
| | | @ApiOperation(value = "分页", notes = "传入land") |
| | | public R<IPage<LandVO>> page(LandVO land, Query query) { |
| | | IPage<LandVO> pages = landService.selectLandPage(Condition.getPage(query), land); |
| | | return R.data(pages); |
| | | } |
| | | |
| | | /** |
| | | * 新增 地块表 |
| | | */ |
| | | @PostMapping("/save") |
| | | @ApiOperationSupport(order = 4) |
| | | @ApiOperation(value = "新增", notes = "传入land") |
| | | public R save(@Valid @RequestBody Land land) { |
| | | return R.status(landService.save(land)); |
| | | } |
| | | |
| | | /** |
| | | * 修改 地块表 |
| | | */ |
| | | @PostMapping("/update") |
| | | @ApiOperationSupport(order = 5) |
| | | @ApiOperation(value = "修改", notes = "传入land") |
| | | public R update(@Valid @RequestBody Land land) { |
| | | return R.status(landService.updateById(land)); |
| | | } |
| | | |
| | | /** |
| | | * 新增或修改 地块表 |
| | | */ |
| | | @PostMapping("/submit") |
| | | @ApiOperationSupport(order = 6) |
| | | @ApiOperation(value = "新增或修改", notes = "传入land") |
| | | public R submit(@Valid @RequestBody Land land) { |
| | | return R.status(landService.saveOrUpdate(land)); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 删除 地块表 |
| | | */ |
| | | @PostMapping("/remove") |
| | | @ApiOperationSupport(order = 7) |
| | | @ApiOperation(value = "逻辑删除", notes = "传入ids") |
| | | public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) { |
| | | return R.status(landService.deleteLogic(Func.toLongList(ids))); |
| | | } |
| | | |
| | | |
| | | } |
| New file |
| | |
| | | /* |
| | | * Copyright (c) 2018-2028, Chill Zhuang All rights reserved. |
| | | * |
| | | * Redistribution and use in source and binary forms, with or without |
| | | * modification, are permitted provided that the following conditions are met: |
| | | * |
| | | * Redistributions of source code must retain the above copyright notice, |
| | | * this list of conditions and the following disclaimer. |
| | | * Redistributions in binary form must reproduce the above copyright |
| | | * notice, this list of conditions and the following disclaimer in the |
| | | * documentation and/or other materials provided with the distribution. |
| | | * Neither the name of the dreamlu.net developer nor the names of its |
| | | * contributors may be used to endorse or promote products derived from |
| | | * this software without specific prior written permission. |
| | | * Author: Chill 庄骞 (smallchill@163.com) |
| | | */ |
| | | package org.springblade.modules.lang.dto; |
| | | |
| | | import org.springblade.modules.lang.entity.Land; |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | |
| | | /** |
| | | * 地块表数据传输对象实体类 |
| | | * |
| | | * @author BladeX |
| | | * @since 2022-05-10 |
| | | */ |
| | | @Data |
| | | @EqualsAndHashCode(callSuper = true) |
| | | public class LandDTO extends Land { |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | } |
| New file |
| | |
| | | /* |
| | | * Copyright (c) 2018-2028, Chill Zhuang All rights reserved. |
| | | * |
| | | * Redistribution and use in source and binary forms, with or without |
| | | * modification, are permitted provided that the following conditions are met: |
| | | * |
| | | * Redistributions of source code must retain the above copyright notice, |
| | | * this list of conditions and the following disclaimer. |
| | | * Redistributions in binary form must reproduce the above copyright |
| | | * notice, this list of conditions and the following disclaimer in the |
| | | * documentation and/or other materials provided with the distribution. |
| | | * Neither the name of the dreamlu.net developer nor the names of its |
| | | * contributors may be used to endorse or promote products derived from |
| | | * this software without specific prior written permission. |
| | | * Author: Chill 庄骞 (smallchill@163.com) |
| | | */ |
| | | package org.springblade.modules.lang.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import java.io.Serializable; |
| | | import org.springblade.core.mp.base.BaseEntity; |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | import org.springblade.core.tenant.mp.TenantEntity; |
| | | |
| | | /** |
| | | * 地块表实体类 |
| | | * |
| | | * @author BladeX |
| | | * @since 2022-05-10 |
| | | */ |
| | | @Data |
| | | @TableName("sys_land") |
| | | @EqualsAndHashCode(callSuper = true) |
| | | public class Land extends TenantEntity { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /** |
| | | * 用户id |
| | | */ |
| | | private String userId; |
| | | /** |
| | | * 地块名称 |
| | | */ |
| | | private String landName; |
| | | /** |
| | | * 地块类型(0:大田 1:大棚 2:果园 3:鱼塘 4:山地 5:养殖区) |
| | | */ |
| | | private Integer landType; |
| | | /** |
| | | * 地块面积 |
| | | */ |
| | | private String landArea; |
| | | /** |
| | | * 地块范围 |
| | | */ |
| | | private String landRange; |
| | | /** |
| | | * 状态 (0:已耕种 1:未耕种) |
| | | */ |
| | | private Integer type; |
| | | /** |
| | | * 面积单位(0: 亩 1:分 2:平方米) |
| | | */ |
| | | private Integer landUnit; |
| | | |
| | | |
| | | } |
| New file |
| | |
| | | /* |
| | | * Copyright (c) 2018-2028, Chill Zhuang All rights reserved. |
| | | * |
| | | * Redistribution and use in source and binary forms, with or without |
| | | * modification, are permitted provided that the following conditions are met: |
| | | * |
| | | * Redistributions of source code must retain the above copyright notice, |
| | | * this list of conditions and the following disclaimer. |
| | | * Redistributions in binary form must reproduce the above copyright |
| | | * notice, this list of conditions and the following disclaimer in the |
| | | * documentation and/or other materials provided with the distribution. |
| | | * Neither the name of the dreamlu.net developer nor the names of its |
| | | * contributors may be used to endorse or promote products derived from |
| | | * this software without specific prior written permission. |
| | | * Author: Chill 庄骞 (smallchill@163.com) |
| | | */ |
| | | package org.springblade.modules.lang.mapper; |
| | | |
| | | import org.springblade.modules.lang.entity.Land; |
| | | import org.springblade.modules.lang.vo.LandVO; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 地块表 Mapper 接口 |
| | | * |
| | | * @author BladeX |
| | | * @since 2022-05-10 |
| | | */ |
| | | public interface LandMapper extends BaseMapper<Land> { |
| | | |
| | | /** |
| | | * 自定义分页 |
| | | * |
| | | * @param page |
| | | * @param land |
| | | * @return |
| | | */ |
| | | List<LandVO> selectLandPage(IPage page, LandVO land); |
| | | |
| | | } |
| New 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="org.springblade.modules.lang.mapper.LandMapper"> |
| | | |
| | | <!-- 通用查询映射结果 --> |
| | | <resultMap id="landResultMap" type="org.springblade.modules.lang.entity.Land"> |
| | | <result column="id" property="id"/> |
| | | <result column="user_id" property="userId"/> |
| | | <result column="land_name" property="landName"/> |
| | | <result column="land_type" property="landType"/> |
| | | <result column="land_area" property="landArea"/> |
| | | <result column="land_range" property="landRange"/> |
| | | <result column="type" property="type"/> |
| | | <result column="land_unit" property="landUnit"/> |
| | | </resultMap> |
| | | |
| | | |
| | | <select id="selectLandPage" resultMap="landResultMap"> |
| | | select * from sys_land where is_deleted = 0 |
| | | </select> |
| | | |
| | | </mapper> |
| New file |
| | |
| | | /* |
| | | * Copyright (c) 2018-2028, Chill Zhuang All rights reserved. |
| | | * |
| | | * Redistribution and use in source and binary forms, with or without |
| | | * modification, are permitted provided that the following conditions are met: |
| | | * |
| | | * Redistributions of source code must retain the above copyright notice, |
| | | * this list of conditions and the following disclaimer. |
| | | * Redistributions in binary form must reproduce the above copyright |
| | | * notice, this list of conditions and the following disclaimer in the |
| | | * documentation and/or other materials provided with the distribution. |
| | | * Neither the name of the dreamlu.net developer nor the names of its |
| | | * contributors may be used to endorse or promote products derived from |
| | | * this software without specific prior written permission. |
| | | * Author: Chill 庄骞 (smallchill@163.com) |
| | | */ |
| | | package org.springblade.modules.lang.service; |
| | | |
| | | import org.springblade.modules.lang.entity.Land; |
| | | import org.springblade.modules.lang.vo.LandVO; |
| | | import org.springblade.core.mp.base.BaseService; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | |
| | | /** |
| | | * 地块表 服务类 |
| | | * |
| | | * @author BladeX |
| | | * @since 2022-05-10 |
| | | */ |
| | | public interface ILandService extends BaseService<Land> { |
| | | |
| | | /** |
| | | * 自定义分页 |
| | | * |
| | | * @param page |
| | | * @param land |
| | | * @return |
| | | */ |
| | | IPage<LandVO> selectLandPage(IPage<LandVO> page, LandVO land); |
| | | |
| | | } |
| New file |
| | |
| | | /* |
| | | * Copyright (c) 2018-2028, Chill Zhuang All rights reserved. |
| | | * |
| | | * Redistribution and use in source and binary forms, with or without |
| | | * modification, are permitted provided that the following conditions are met: |
| | | * |
| | | * Redistributions of source code must retain the above copyright notice, |
| | | * this list of conditions and the following disclaimer. |
| | | * Redistributions in binary form must reproduce the above copyright |
| | | * notice, this list of conditions and the following disclaimer in the |
| | | * documentation and/or other materials provided with the distribution. |
| | | * Neither the name of the dreamlu.net developer nor the names of its |
| | | * contributors may be used to endorse or promote products derived from |
| | | * this software without specific prior written permission. |
| | | * Author: Chill 庄骞 (smallchill@163.com) |
| | | */ |
| | | package org.springblade.modules.lang.service.impl; |
| | | |
| | | import org.springblade.modules.lang.entity.Land; |
| | | import org.springblade.modules.lang.vo.LandVO; |
| | | import org.springblade.modules.lang.mapper.LandMapper; |
| | | import org.springblade.modules.lang.service.ILandService; |
| | | import org.springblade.core.mp.base.BaseServiceImpl; |
| | | import org.springframework.stereotype.Service; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | |
| | | /** |
| | | * 地块表 服务实现类 |
| | | * |
| | | * @author BladeX |
| | | * @since 2022-05-10 |
| | | */ |
| | | @Service |
| | | public class LandServiceImpl extends BaseServiceImpl<LandMapper, Land> implements ILandService { |
| | | |
| | | @Override |
| | | public IPage<LandVO> selectLandPage(IPage<LandVO> page, LandVO land) { |
| | | return page.setRecords(baseMapper.selectLandPage(page, land)); |
| | | } |
| | | |
| | | } |
| New file |
| | |
| | | /* |
| | | * Copyright (c) 2018-2028, Chill Zhuang All rights reserved. |
| | | * |
| | | * Redistribution and use in source and binary forms, with or without |
| | | * modification, are permitted provided that the following conditions are met: |
| | | * |
| | | * Redistributions of source code must retain the above copyright notice, |
| | | * this list of conditions and the following disclaimer. |
| | | * Redistributions in binary form must reproduce the above copyright |
| | | * notice, this list of conditions and the following disclaimer in the |
| | | * documentation and/or other materials provided with the distribution. |
| | | * Neither the name of the dreamlu.net developer nor the names of its |
| | | * contributors may be used to endorse or promote products derived from |
| | | * this software without specific prior written permission. |
| | | * Author: Chill 庄骞 (smallchill@163.com) |
| | | */ |
| | | package org.springblade.modules.lang.vo; |
| | | |
| | | import org.springblade.modules.lang.entity.Land; |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | |
| | | /** |
| | | * 地块表视图实体类 |
| | | * |
| | | * @author BladeX |
| | | * @since 2022-05-10 |
| | | */ |
| | | @Data |
| | | @EqualsAndHashCode(callSuper = true) |
| | | public class LandVO extends Land { |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | } |
| New file |
| | |
| | | /* |
| | | * Copyright (c) 2018-2028, Chill Zhuang All rights reserved. |
| | | * |
| | | * Redistribution and use in source and binary forms, with or without |
| | | * modification, are permitted provided that the following conditions are met: |
| | | * |
| | | * Redistributions of source code must retain the above copyright notice, |
| | | * this list of conditions and the following disclaimer. |
| | | * Redistributions in binary form must reproduce the above copyright |
| | | * notice, this list of conditions and the following disclaimer in the |
| | | * documentation and/or other materials provided with the distribution. |
| | | * Neither the name of the dreamlu.net developer nor the names of its |
| | | * contributors may be used to endorse or promote products derived from |
| | | * this software without specific prior written permission. |
| | | * Author: Chill 庄骞 (smallchill@163.com) |
| | | */ |
| | | package org.springblade.modules.stock.controller; |
| | | |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import io.swagger.annotations.ApiParam; |
| | | import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; |
| | | import lombok.AllArgsConstructor; |
| | | import javax.validation.Valid; |
| | | |
| | | import org.springblade.core.mp.support.Condition; |
| | | import org.springblade.core.mp.support.Query; |
| | | import org.springblade.core.tool.api.R; |
| | | import org.springblade.core.tool.utils.Func; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import org.springframework.web.bind.annotation.RequestParam; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import org.springblade.modules.stock.entity.Stock; |
| | | import org.springblade.modules.stock.vo.StockVO; |
| | | import org.springblade.modules.stock.service.IStockService; |
| | | import org.springblade.core.boot.ctrl.BladeController; |
| | | |
| | | /** |
| | | * 农资库存表 控制器 |
| | | * |
| | | * @author BladeX |
| | | * @since 2022-05-11 |
| | | */ |
| | | @RestController |
| | | @AllArgsConstructor |
| | | @RequestMapping("/stock/stock") |
| | | @Api(value = "农资库存表", tags = "农资库存表接口") |
| | | public class StockController extends BladeController { |
| | | |
| | | private final IStockService stockService; |
| | | |
| | | /** |
| | | * 详情 |
| | | */ |
| | | @GetMapping("/detail") |
| | | @ApiOperationSupport(order = 1) |
| | | @ApiOperation(value = "详情", notes = "传入stock") |
| | | public R<Stock> detail(Stock stock) { |
| | | Stock detail = stockService.getOne(Condition.getQueryWrapper(stock)); |
| | | return R.data(detail); |
| | | } |
| | | |
| | | /** |
| | | * 分页 农资库存表 |
| | | */ |
| | | @GetMapping("/list") |
| | | @ApiOperationSupport(order = 2) |
| | | @ApiOperation(value = "分页", notes = "传入stock") |
| | | public R<IPage<Stock>> list(Stock stock, Query query) { |
| | | IPage<Stock> pages = stockService.page(Condition.getPage(query), Condition.getQueryWrapper(stock)); |
| | | return R.data(pages); |
| | | } |
| | | |
| | | /** |
| | | * 自定义分页 农资库存表 |
| | | */ |
| | | @GetMapping("/page") |
| | | @ApiOperationSupport(order = 3) |
| | | @ApiOperation(value = "分页", notes = "传入stock") |
| | | public R<IPage<StockVO>> page(StockVO stock, Query query) { |
| | | IPage<StockVO> pages = stockService.selectStockPage(Condition.getPage(query), stock); |
| | | return R.data(pages); |
| | | } |
| | | |
| | | /** |
| | | * 新增 农资库存表 |
| | | */ |
| | | @PostMapping("/save") |
| | | @ApiOperationSupport(order = 4) |
| | | @ApiOperation(value = "新增", notes = "传入stock") |
| | | public R save(@Valid @RequestBody Stock stock) { |
| | | return R.status(stockService.save(stock)); |
| | | } |
| | | |
| | | /** |
| | | * 修改 农资库存表 |
| | | */ |
| | | @PostMapping("/update") |
| | | @ApiOperationSupport(order = 5) |
| | | @ApiOperation(value = "修改", notes = "传入stock") |
| | | public R update(@Valid @RequestBody Stock stock) { |
| | | return R.status(stockService.updateById(stock)); |
| | | } |
| | | |
| | | /** |
| | | * 新增或修改 农资库存表 |
| | | */ |
| | | @PostMapping("/submit") |
| | | @ApiOperationSupport(order = 6) |
| | | @ApiOperation(value = "新增或修改", notes = "传入stock") |
| | | public R submit(@Valid @RequestBody Stock stock) { |
| | | return R.status(stockService.saveOrUpdate(stock)); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 删除 农资库存表 |
| | | */ |
| | | @PostMapping("/remove") |
| | | @ApiOperationSupport(order = 7) |
| | | @ApiOperation(value = "逻辑删除", notes = "传入ids") |
| | | public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) { |
| | | return R.status(stockService.deleteLogic(Func.toLongList(ids))); |
| | | } |
| | | |
| | | |
| | | } |
| New file |
| | |
| | | /* |
| | | * Copyright (c) 2018-2028, Chill Zhuang All rights reserved. |
| | | * |
| | | * Redistribution and use in source and binary forms, with or without |
| | | * modification, are permitted provided that the following conditions are met: |
| | | * |
| | | * Redistributions of source code must retain the above copyright notice, |
| | | * this list of conditions and the following disclaimer. |
| | | * Redistributions in binary form must reproduce the above copyright |
| | | * notice, this list of conditions and the following disclaimer in the |
| | | * documentation and/or other materials provided with the distribution. |
| | | * Neither the name of the dreamlu.net developer nor the names of its |
| | | * contributors may be used to endorse or promote products derived from |
| | | * this software without specific prior written permission. |
| | | * Author: Chill 庄骞 (smallchill@163.com) |
| | | */ |
| | | package org.springblade.modules.stock.dto; |
| | | |
| | | import org.springblade.modules.stock.entity.Stock; |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | |
| | | /** |
| | | * 农资库存表数据传输对象实体类 |
| | | * |
| | | * @author BladeX |
| | | * @since 2022-05-11 |
| | | */ |
| | | @Data |
| | | @EqualsAndHashCode(callSuper = true) |
| | | public class StockDTO extends Stock { |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | } |
| New file |
| | |
| | | /* |
| | | * Copyright (c) 2018-2028, Chill Zhuang All rights reserved. |
| | | * |
| | | * Redistribution and use in source and binary forms, with or without |
| | | * modification, are permitted provided that the following conditions are met: |
| | | * |
| | | * Redistributions of source code must retain the above copyright notice, |
| | | * this list of conditions and the following disclaimer. |
| | | * Redistributions in binary form must reproduce the above copyright |
| | | * notice, this list of conditions and the following disclaimer in the |
| | | * documentation and/or other materials provided with the distribution. |
| | | * Neither the name of the dreamlu.net developer nor the names of its |
| | | * contributors may be used to endorse or promote products derived from |
| | | * this software without specific prior written permission. |
| | | * Author: Chill 庄骞 (smallchill@163.com) |
| | | */ |
| | | package org.springblade.modules.stock.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import java.io.Serializable; |
| | | import java.time.LocalDateTime; |
| | | import org.springblade.core.mp.base.BaseEntity; |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | |
| | | /** |
| | | * 农资库存表实体类 |
| | | * |
| | | * @author BladeX |
| | | * @since 2022-05-11 |
| | | */ |
| | | @Data |
| | | @TableName("sys_stock") |
| | | @EqualsAndHashCode(callSuper = true) |
| | | public class Stock extends BaseEntity { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /** |
| | | * 农资ID |
| | | */ |
| | | private String stockId; |
| | | /** |
| | | * 规格 |
| | | */ |
| | | private Double specs; |
| | | /** |
| | | * 规格值(0:克 1:斤 2:公斤 3:吨 4:毫升 5:升 ) |
| | | */ |
| | | private Integer specsValue1; |
| | | /** |
| | | * 规格值2( 0:袋 1:包 2:瓶 3:盒 4:箱 5:桶 6:支) |
| | | */ |
| | | private Integer specsValue2; |
| | | /** |
| | | * 入库数量 |
| | | */ |
| | | private Integer amount; |
| | | /** |
| | | * 类型 (0:采购入库 1:调拨入库) |
| | | */ |
| | | private String type; |
| | | /** |
| | | * 入库时间 |
| | | */ |
| | | private LocalDateTime time; |
| | | /** |
| | | * 图片 |
| | | */ |
| | | private String picture; |
| | | /** |
| | | * 备注 |
| | | */ |
| | | private String remarks; |
| | | /** |
| | | * 状态 (0:有库存 1:没有库存) |
| | | */ |
| | | private String state; |
| | | |
| | | |
| | | } |
| New file |
| | |
| | | /* |
| | | * Copyright (c) 2018-2028, Chill Zhuang All rights reserved. |
| | | * |
| | | * Redistribution and use in source and binary forms, with or without |
| | | * modification, are permitted provided that the following conditions are met: |
| | | * |
| | | * Redistributions of source code must retain the above copyright notice, |
| | | * this list of conditions and the following disclaimer. |
| | | * Redistributions in binary form must reproduce the above copyright |
| | | * notice, this list of conditions and the following disclaimer in the |
| | | * documentation and/or other materials provided with the distribution. |
| | | * Neither the name of the dreamlu.net developer nor the names of its |
| | | * contributors may be used to endorse or promote products derived from |
| | | * this software without specific prior written permission. |
| | | * Author: Chill 庄骞 (smallchill@163.com) |
| | | */ |
| | | package org.springblade.modules.stock.mapper; |
| | | |
| | | import org.springblade.modules.stock.entity.Stock; |
| | | import org.springblade.modules.stock.vo.StockVO; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 农资库存表 Mapper 接口 |
| | | * |
| | | * @author BladeX |
| | | * @since 2022-05-11 |
| | | */ |
| | | public interface StockMapper extends BaseMapper<Stock> { |
| | | |
| | | /** |
| | | * 自定义分页 |
| | | * |
| | | * @param page |
| | | * @param stock |
| | | * @return |
| | | */ |
| | | List<StockVO> selectStockPage(IPage page, StockVO stock); |
| | | |
| | | } |
| New 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="org.springblade.modules.stock.mapper.StockMapper"> |
| | | |
| | | <!-- 通用查询映射结果 --> |
| | | <resultMap id="stockResultMap" type="org.springblade.modules.stock.entity.Stock"> |
| | | <result column="id" property="id"/> |
| | | <result column="create_user" property="createUser"/> |
| | | <result column="create_dept" property="createDept"/> |
| | | <result column="create_time" property="createTime"/> |
| | | <result column="update_user" property="updateUser"/> |
| | | <result column="update_time" property="updateTime"/> |
| | | <result column="status" property="status"/> |
| | | <result column="is_deleted" property="isDeleted"/> |
| | | <result column="stock_id" property="stockId"/> |
| | | <result column="specs" property="specs"/> |
| | | <result column="specs_value1" property="specsValue1"/> |
| | | <result column="specs_value2" property="specsValue2"/> |
| | | <result column="amount" property="amount"/> |
| | | <result column="type" property="type"/> |
| | | <result column="time" property="time"/> |
| | | <result column="picture" property="picture"/> |
| | | <result column="remarks" property="remarks"/> |
| | | <result column="state" property="state"/> |
| | | </resultMap> |
| | | |
| | | |
| | | <select id="selectStockPage" resultMap="stockResultMap"> |
| | | select * from sys_stock where is_deleted = 0 |
| | | </select> |
| | | |
| | | </mapper> |
| New file |
| | |
| | | /* |
| | | * Copyright (c) 2018-2028, Chill Zhuang All rights reserved. |
| | | * |
| | | * Redistribution and use in source and binary forms, with or without |
| | | * modification, are permitted provided that the following conditions are met: |
| | | * |
| | | * Redistributions of source code must retain the above copyright notice, |
| | | * this list of conditions and the following disclaimer. |
| | | * Redistributions in binary form must reproduce the above copyright |
| | | * notice, this list of conditions and the following disclaimer in the |
| | | * documentation and/or other materials provided with the distribution. |
| | | * Neither the name of the dreamlu.net developer nor the names of its |
| | | * contributors may be used to endorse or promote products derived from |
| | | * this software without specific prior written permission. |
| | | * Author: Chill 庄骞 (smallchill@163.com) |
| | | */ |
| | | package org.springblade.modules.stock.service; |
| | | |
| | | import org.springblade.modules.stock.entity.Stock; |
| | | import org.springblade.modules.stock.vo.StockVO; |
| | | import org.springblade.core.mp.base.BaseService; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | |
| | | /** |
| | | * 农资库存表 服务类 |
| | | * |
| | | * @author BladeX |
| | | * @since 2022-05-11 |
| | | */ |
| | | public interface IStockService extends BaseService<Stock> { |
| | | |
| | | /** |
| | | * 自定义分页 |
| | | * |
| | | * @param page |
| | | * @param stock |
| | | * @return |
| | | */ |
| | | IPage<StockVO> selectStockPage(IPage<StockVO> page, StockVO stock); |
| | | |
| | | } |
| New file |
| | |
| | | /* |
| | | * Copyright (c) 2018-2028, Chill Zhuang All rights reserved. |
| | | * |
| | | * Redistribution and use in source and binary forms, with or without |
| | | * modification, are permitted provided that the following conditions are met: |
| | | * |
| | | * Redistributions of source code must retain the above copyright notice, |
| | | * this list of conditions and the following disclaimer. |
| | | * Redistributions in binary form must reproduce the above copyright |
| | | * notice, this list of conditions and the following disclaimer in the |
| | | * documentation and/or other materials provided with the distribution. |
| | | * Neither the name of the dreamlu.net developer nor the names of its |
| | | * contributors may be used to endorse or promote products derived from |
| | | * this software without specific prior written permission. |
| | | * Author: Chill 庄骞 (smallchill@163.com) |
| | | */ |
| | | package org.springblade.modules.stock.service.impl; |
| | | |
| | | import org.springblade.modules.stock.entity.Stock; |
| | | import org.springblade.modules.stock.vo.StockVO; |
| | | import org.springblade.modules.stock.mapper.StockMapper; |
| | | import org.springblade.modules.stock.service.IStockService; |
| | | import org.springblade.core.mp.base.BaseServiceImpl; |
| | | import org.springframework.stereotype.Service; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | |
| | | /** |
| | | * 农资库存表 服务实现类 |
| | | * |
| | | * @author BladeX |
| | | * @since 2022-05-11 |
| | | */ |
| | | @Service |
| | | public class StockServiceImpl extends BaseServiceImpl<StockMapper, Stock> implements IStockService { |
| | | |
| | | @Override |
| | | public IPage<StockVO> selectStockPage(IPage<StockVO> page, StockVO stock) { |
| | | return page.setRecords(baseMapper.selectStockPage(page, stock)); |
| | | } |
| | | |
| | | } |
| New file |
| | |
| | | /* |
| | | * Copyright (c) 2018-2028, Chill Zhuang All rights reserved. |
| | | * |
| | | * Redistribution and use in source and binary forms, with or without |
| | | * modification, are permitted provided that the following conditions are met: |
| | | * |
| | | * Redistributions of source code must retain the above copyright notice, |
| | | * this list of conditions and the following disclaimer. |
| | | * Redistributions in binary form must reproduce the above copyright |
| | | * notice, this list of conditions and the following disclaimer in the |
| | | * documentation and/or other materials provided with the distribution. |
| | | * Neither the name of the dreamlu.net developer nor the names of its |
| | | * contributors may be used to endorse or promote products derived from |
| | | * this software without specific prior written permission. |
| | | * Author: Chill 庄骞 (smallchill@163.com) |
| | | */ |
| | | package org.springblade.modules.stock.vo; |
| | | |
| | | import org.springblade.modules.stock.entity.Stock; |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | |
| | | /** |
| | | * 农资库存表视图实体类 |
| | | * |
| | | * @author BladeX |
| | | * @since 2022-05-11 |
| | | */ |
| | | @Data |
| | | @EqualsAndHashCode(callSuper = true) |
| | | public class StockVO extends Stock { |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | } |
| New file |
| | |
| | | /* |
| | | * Copyright (c) 2018-2028, Chill Zhuang All rights reserved. |
| | | * |
| | | * Redistribution and use in source and binary forms, with or without |
| | | * modification, are permitted provided that the following conditions are met: |
| | | * |
| | | * Redistributions of source code must retain the above copyright notice, |
| | | * this list of conditions and the following disclaimer. |
| | | * Redistributions in binary form must reproduce the above copyright |
| | | * notice, this list of conditions and the following disclaimer in the |
| | | * documentation and/or other materials provided with the distribution. |
| | | * Neither the name of the dreamlu.net developer nor the names of its |
| | | * contributors may be used to endorse or promote products derived from |
| | | * this software without specific prior written permission. |
| | | * Author: Chill 庄骞 (smallchill@163.com) |
| | | */ |
| | | package org.springblade.modules.stockfactory.controller; |
| | | |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import io.swagger.annotations.ApiParam; |
| | | import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; |
| | | import lombok.AllArgsConstructor; |
| | | import javax.validation.Valid; |
| | | |
| | | import org.springblade.core.mp.support.Condition; |
| | | import org.springblade.core.mp.support.Query; |
| | | import org.springblade.core.tool.api.R; |
| | | import org.springblade.core.tool.utils.Func; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import org.springframework.web.bind.annotation.RequestParam; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import org.springblade.modules.stockfactory.entity.Stockfactory; |
| | | import org.springblade.modules.stockfactory.vo.StockfactoryVO; |
| | | import org.springblade.modules.stockfactory.service.IStockfactoryService; |
| | | import org.springblade.core.boot.ctrl.BladeController; |
| | | |
| | | /** |
| | | * 农资厂家表 控制器 |
| | | * |
| | | * @author BladeX |
| | | * @since 2022-05-11 |
| | | */ |
| | | @RestController |
| | | @AllArgsConstructor |
| | | @RequestMapping("/stockfactory/stockfactory") |
| | | @Api(value = "农资厂家表", tags = "农资厂家表接口") |
| | | public class StockfactoryController extends BladeController { |
| | | |
| | | private final IStockfactoryService stockfactoryService; |
| | | |
| | | /** |
| | | * 详情 |
| | | */ |
| | | @GetMapping("/detail") |
| | | @ApiOperationSupport(order = 1) |
| | | @ApiOperation(value = "详情", notes = "传入stockfactory") |
| | | public R<Stockfactory> detail(Stockfactory stockfactory) { |
| | | Stockfactory detail = stockfactoryService.getOne(Condition.getQueryWrapper(stockfactory)); |
| | | return R.data(detail); |
| | | } |
| | | |
| | | /** |
| | | * 分页 农资厂家表 |
| | | */ |
| | | @GetMapping("/list") |
| | | @ApiOperationSupport(order = 2) |
| | | @ApiOperation(value = "分页", notes = "传入stockfactory") |
| | | public R<IPage<Stockfactory>> list(Stockfactory stockfactory, Query query) { |
| | | IPage<Stockfactory> pages = stockfactoryService.page(Condition.getPage(query), Condition.getQueryWrapper(stockfactory)); |
| | | return R.data(pages); |
| | | } |
| | | |
| | | /** |
| | | * 自定义分页 农资厂家表 |
| | | */ |
| | | @GetMapping("/page") |
| | | @ApiOperationSupport(order = 3) |
| | | @ApiOperation(value = "分页", notes = "传入stockfactory") |
| | | public R<IPage<StockfactoryVO>> page(StockfactoryVO stockfactory, Query query) { |
| | | IPage<StockfactoryVO> pages = stockfactoryService.selectStockfactoryPage(Condition.getPage(query), stockfactory); |
| | | return R.data(pages); |
| | | } |
| | | |
| | | /** |
| | | * 新增 农资厂家表 |
| | | */ |
| | | @PostMapping("/save") |
| | | @ApiOperationSupport(order = 4) |
| | | @ApiOperation(value = "新增", notes = "传入stockfactory") |
| | | public R save(@Valid @RequestBody Stockfactory stockfactory) { |
| | | return R.status(stockfactoryService.save(stockfactory)); |
| | | } |
| | | |
| | | /** |
| | | * 修改 农资厂家表 |
| | | */ |
| | | @PostMapping("/update") |
| | | @ApiOperationSupport(order = 5) |
| | | @ApiOperation(value = "修改", notes = "传入stockfactory") |
| | | public R update(@Valid @RequestBody Stockfactory stockfactory) { |
| | | return R.status(stockfactoryService.updateById(stockfactory)); |
| | | } |
| | | |
| | | /** |
| | | * 新增或修改 农资厂家表 |
| | | */ |
| | | @PostMapping("/submit") |
| | | @ApiOperationSupport(order = 6) |
| | | @ApiOperation(value = "新增或修改", notes = "传入stockfactory") |
| | | public R submit(@Valid @RequestBody Stockfactory stockfactory) { |
| | | return R.status(stockfactoryService.saveOrUpdate(stockfactory)); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 删除 农资厂家表 |
| | | */ |
| | | @PostMapping("/remove") |
| | | @ApiOperationSupport(order = 7) |
| | | @ApiOperation(value = "逻辑删除", notes = "传入ids") |
| | | public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) { |
| | | return R.status(stockfactoryService.deleteLogic(Func.toLongList(ids))); |
| | | } |
| | | |
| | | |
| | | } |
| New file |
| | |
| | | /* |
| | | * Copyright (c) 2018-2028, Chill Zhuang All rights reserved. |
| | | * |
| | | * Redistribution and use in source and binary forms, with or without |
| | | * modification, are permitted provided that the following conditions are met: |
| | | * |
| | | * Redistributions of source code must retain the above copyright notice, |
| | | * this list of conditions and the following disclaimer. |
| | | * Redistributions in binary form must reproduce the above copyright |
| | | * notice, this list of conditions and the following disclaimer in the |
| | | * documentation and/or other materials provided with the distribution. |
| | | * Neither the name of the dreamlu.net developer nor the names of its |
| | | * contributors may be used to endorse or promote products derived from |
| | | * this software without specific prior written permission. |
| | | * Author: Chill 庄骞 (smallchill@163.com) |
| | | */ |
| | | package org.springblade.modules.stockfactory.dto; |
| | | |
| | | import org.springblade.modules.stockfactory.entity.Stockfactory; |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | |
| | | /** |
| | | * 农资厂家表数据传输对象实体类 |
| | | * |
| | | * @author BladeX |
| | | * @since 2022-05-11 |
| | | */ |
| | | @Data |
| | | @EqualsAndHashCode(callSuper = true) |
| | | public class StockfactoryDTO extends Stockfactory { |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | } |
| New file |
| | |
| | | /* |
| | | * Copyright (c) 2018-2028, Chill Zhuang All rights reserved. |
| | | * |
| | | * Redistribution and use in source and binary forms, with or without |
| | | * modification, are permitted provided that the following conditions are met: |
| | | * |
| | | * Redistributions of source code must retain the above copyright notice, |
| | | * this list of conditions and the following disclaimer. |
| | | * Redistributions in binary form must reproduce the above copyright |
| | | * notice, this list of conditions and the following disclaimer in the |
| | | * documentation and/or other materials provided with the distribution. |
| | | * Neither the name of the dreamlu.net developer nor the names of its |
| | | * contributors may be used to endorse or promote products derived from |
| | | * this software without specific prior written permission. |
| | | * Author: Chill 庄骞 (smallchill@163.com) |
| | | */ |
| | | package org.springblade.modules.stockfactory.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import java.io.Serializable; |
| | | import org.springblade.core.mp.base.BaseEntity; |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | |
| | | /** |
| | | * 农资厂家表实体类 |
| | | * |
| | | * @author BladeX |
| | | * @since 2022-05-11 |
| | | */ |
| | | @Data |
| | | @TableName("sys_stockfactory") |
| | | @EqualsAndHashCode(callSuper = true) |
| | | public class Stockfactory extends BaseEntity { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /** |
| | | * 农资名称 |
| | | */ |
| | | private String agriculturalName; |
| | | /** |
| | | * 登记证号 |
| | | */ |
| | | private String registerNumber; |
| | | /** |
| | | * 分类(0:化肥 1:有机肥 2:杀虫剂 等) |
| | | */ |
| | | private String type; |
| | | /** |
| | | * 厂家名称 |
| | | */ |
| | | private String factoryName; |
| | | |
| | | |
| | | } |
| New file |
| | |
| | | /* |
| | | * Copyright (c) 2018-2028, Chill Zhuang All rights reserved. |
| | | * |
| | | * Redistribution and use in source and binary forms, with or without |
| | | * modification, are permitted provided that the following conditions are met: |
| | | * |
| | | * Redistributions of source code must retain the above copyright notice, |
| | | * this list of conditions and the following disclaimer. |
| | | * Redistributions in binary form must reproduce the above copyright |
| | | * notice, this list of conditions and the following disclaimer in the |
| | | * documentation and/or other materials provided with the distribution. |
| | | * Neither the name of the dreamlu.net developer nor the names of its |
| | | * contributors may be used to endorse or promote products derived from |
| | | * this software without specific prior written permission. |
| | | * Author: Chill 庄骞 (smallchill@163.com) |
| | | */ |
| | | package org.springblade.modules.stockfactory.mapper; |
| | | |
| | | import org.springblade.modules.stockfactory.entity.Stockfactory; |
| | | import org.springblade.modules.stockfactory.vo.StockfactoryVO; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 农资厂家表 Mapper 接口 |
| | | * |
| | | * @author BladeX |
| | | * @since 2022-05-11 |
| | | */ |
| | | public interface StockfactoryMapper extends BaseMapper<Stockfactory> { |
| | | |
| | | /** |
| | | * 自定义分页 |
| | | * |
| | | * @param page |
| | | * @param stockfactory |
| | | * @return |
| | | */ |
| | | List<StockfactoryVO> selectStockfactoryPage(IPage page, StockfactoryVO stockfactory); |
| | | |
| | | } |
| New 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="org.springblade.modules.stockfactory.mapper.StockfactoryMapper"> |
| | | |
| | | <!-- 通用查询映射结果 --> |
| | | <resultMap id="stockfactoryResultMap" type="org.springblade.modules.stockfactory.entity.Stockfactory"> |
| | | <result column="id" property="id"/> |
| | | <result column="create_user" property="createUser"/> |
| | | <result column="create_dept" property="createDept"/> |
| | | <result column="create_time" property="createTime"/> |
| | | <result column="update_user" property="updateUser"/> |
| | | <result column="update_time" property="updateTime"/> |
| | | <result column="status" property="status"/> |
| | | <result column="is_deleted" property="isDeleted"/> |
| | | <result column="agricultural_name" property="agriculturalName"/> |
| | | <result column="register_number" property="registerNumber"/> |
| | | <result column="type" property="type"/> |
| | | <result column="factory_name" property="factoryName"/> |
| | | </resultMap> |
| | | |
| | | |
| | | <select id="selectStockfactoryPage" resultMap="stockfactoryResultMap"> |
| | | select * from sys_stockfactory where is_deleted = 0 |
| | | </select> |
| | | |
| | | </mapper> |
| New file |
| | |
| | | /* |
| | | * Copyright (c) 2018-2028, Chill Zhuang All rights reserved. |
| | | * |
| | | * Redistribution and use in source and binary forms, with or without |
| | | * modification, are permitted provided that the following conditions are met: |
| | | * |
| | | * Redistributions of source code must retain the above copyright notice, |
| | | * this list of conditions and the following disclaimer. |
| | | * Redistributions in binary form must reproduce the above copyright |
| | | * notice, this list of conditions and the following disclaimer in the |
| | | * documentation and/or other materials provided with the distribution. |
| | | * Neither the name of the dreamlu.net developer nor the names of its |
| | | * contributors may be used to endorse or promote products derived from |
| | | * this software without specific prior written permission. |
| | | * Author: Chill 庄骞 (smallchill@163.com) |
| | | */ |
| | | package org.springblade.modules.stockfactory.service; |
| | | |
| | | import org.springblade.modules.stockfactory.entity.Stockfactory; |
| | | import org.springblade.modules.stockfactory.vo.StockfactoryVO; |
| | | import org.springblade.core.mp.base.BaseService; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | |
| | | /** |
| | | * 农资厂家表 服务类 |
| | | * |
| | | * @author BladeX |
| | | * @since 2022-05-11 |
| | | */ |
| | | public interface IStockfactoryService extends BaseService<Stockfactory> { |
| | | |
| | | /** |
| | | * 自定义分页 |
| | | * |
| | | * @param page |
| | | * @param stockfactory |
| | | * @return |
| | | */ |
| | | IPage<StockfactoryVO> selectStockfactoryPage(IPage<StockfactoryVO> page, StockfactoryVO stockfactory); |
| | | |
| | | } |
| New file |
| | |
| | | /* |
| | | * Copyright (c) 2018-2028, Chill Zhuang All rights reserved. |
| | | * |
| | | * Redistribution and use in source and binary forms, with or without |
| | | * modification, are permitted provided that the following conditions are met: |
| | | * |
| | | * Redistributions of source code must retain the above copyright notice, |
| | | * this list of conditions and the following disclaimer. |
| | | * Redistributions in binary form must reproduce the above copyright |
| | | * notice, this list of conditions and the following disclaimer in the |
| | | * documentation and/or other materials provided with the distribution. |
| | | * Neither the name of the dreamlu.net developer nor the names of its |
| | | * contributors may be used to endorse or promote products derived from |
| | | * this software without specific prior written permission. |
| | | * Author: Chill 庄骞 (smallchill@163.com) |
| | | */ |
| | | package org.springblade.modules.stockfactory.service.impl; |
| | | |
| | | import org.springblade.modules.stockfactory.entity.Stockfactory; |
| | | import org.springblade.modules.stockfactory.vo.StockfactoryVO; |
| | | import org.springblade.modules.stockfactory.mapper.StockfactoryMapper; |
| | | import org.springblade.modules.stockfactory.service.IStockfactoryService; |
| | | import org.springblade.core.mp.base.BaseServiceImpl; |
| | | import org.springframework.stereotype.Service; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | |
| | | /** |
| | | * 农资厂家表 服务实现类 |
| | | * |
| | | * @author BladeX |
| | | * @since 2022-05-11 |
| | | */ |
| | | @Service |
| | | public class StockfactoryServiceImpl extends BaseServiceImpl<StockfactoryMapper, Stockfactory> implements IStockfactoryService { |
| | | |
| | | @Override |
| | | public IPage<StockfactoryVO> selectStockfactoryPage(IPage<StockfactoryVO> page, StockfactoryVO stockfactory) { |
| | | return page.setRecords(baseMapper.selectStockfactoryPage(page, stockfactory)); |
| | | } |
| | | |
| | | } |
| New file |
| | |
| | | /* |
| | | * Copyright (c) 2018-2028, Chill Zhuang All rights reserved. |
| | | * |
| | | * Redistribution and use in source and binary forms, with or without |
| | | * modification, are permitted provided that the following conditions are met: |
| | | * |
| | | * Redistributions of source code must retain the above copyright notice, |
| | | * this list of conditions and the following disclaimer. |
| | | * Redistributions in binary form must reproduce the above copyright |
| | | * notice, this list of conditions and the following disclaimer in the |
| | | * documentation and/or other materials provided with the distribution. |
| | | * Neither the name of the dreamlu.net developer nor the names of its |
| | | * contributors may be used to endorse or promote products derived from |
| | | * this software without specific prior written permission. |
| | | * Author: Chill 庄骞 (smallchill@163.com) |
| | | */ |
| | | package org.springblade.modules.stockfactory.vo; |
| | | |
| | | import org.springblade.modules.stockfactory.entity.Stockfactory; |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | |
| | | /** |
| | | * 农资厂家表视图实体类 |
| | | * |
| | | * @author BladeX |
| | | * @since 2022-05-11 |
| | | */ |
| | | @Data |
| | | @EqualsAndHashCode(callSuper = true) |
| | | public class StockfactoryVO extends Stockfactory { |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | } |
| New file |
| | |
| | | INSERT INTO `blade_menu`(`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`) |
| | | VALUES ('1523917491628187649', 1123598815738675201, 'land', '地块管理', 'menu', '/land/land', NULL, 1, 1, 0, 1, NULL, 0); |
| | | INSERT INTO `blade_menu`(`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`) |
| | | VALUES ('1523917491628187650', '1523917491628187649', 'land_add', '新增', 'add', '/land/land/add', 'plus', 1, 2, 1, 1, NULL, 0); |
| | | INSERT INTO `blade_menu`(`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`) |
| | | VALUES ('1523917491628187651', '1523917491628187649', 'land_edit', '修改', 'edit', '/land/land/edit', 'form', 2, 2, 2, 1, NULL, 0); |
| | | INSERT INTO `blade_menu`(`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`) |
| | | VALUES ('1523917491628187652', '1523917491628187649', 'land_delete', '删除', 'delete', '/api/land/land/remove', 'delete', 3, 2, 3, 1, NULL, 0); |
| | | INSERT INTO `blade_menu`(`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`) |
| | | VALUES ('1523917491628187653', '1523917491628187649', 'land_view', '查看', 'view', '/land/land/view', 'file-text', 4, 2, 2, 1, NULL, 0); |
| New file |
| | |
| | | INSERT INTO `blade_menu`(`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`) |
| | | VALUES ('1524224258866266114', 1123598815738675201, 'stock', '农资入库', 'menu', '/stock/stock', NULL, 1, 1, 0, 1, NULL, 0); |
| | | INSERT INTO `blade_menu`(`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`) |
| | | VALUES ('1524224258866266115', '1524224258866266114', 'stock_add', '新增', 'add', '/stock/stock/add', 'plus', 1, 2, 1, 1, NULL, 0); |
| | | INSERT INTO `blade_menu`(`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`) |
| | | VALUES ('1524224258866266116', '1524224258866266114', 'stock_edit', '修改', 'edit', '/stock/stock/edit', 'form', 2, 2, 2, 1, NULL, 0); |
| | | INSERT INTO `blade_menu`(`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`) |
| | | VALUES ('1524224258866266117', '1524224258866266114', 'stock_delete', '删除', 'delete', '/api/stock/stock/remove', 'delete', 3, 2, 3, 1, NULL, 0); |
| | | INSERT INTO `blade_menu`(`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`) |
| | | VALUES ('1524224258866266118', '1524224258866266114', 'stock_view', '查看', 'view', '/stock/stock/view', 'file-text', 4, 2, 2, 1, NULL, 0); |
| New file |
| | |
| | | INSERT INTO `blade_menu`(`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`) |
| | | VALUES ('1524197224932732929', 1123598815738675201, 'stockfactory', '农资管理', 'menu', '/stockfactory/stockfactory', NULL, 1, 1, 0, 1, NULL, 0); |
| | | INSERT INTO `blade_menu`(`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`) |
| | | VALUES ('1524197224932732930', '1524197224932732929', 'stockfactory_add', '新增', 'add', '/stockfactory/stockfactory/add', 'plus', 1, 2, 1, 1, NULL, 0); |
| | | INSERT INTO `blade_menu`(`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`) |
| | | VALUES ('1524197224932732931', '1524197224932732929', 'stockfactory_edit', '修改', 'edit', '/stockfactory/stockfactory/edit', 'form', 2, 2, 2, 1, NULL, 0); |
| | | INSERT INTO `blade_menu`(`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`) |
| | | VALUES ('1524197224932732932', '1524197224932732929', 'stockfactory_delete', '删除', 'delete', '/api/stockfactory/stockfactory/remove', 'delete', 3, 2, 3, 1, NULL, 0); |
| | | INSERT INTO `blade_menu`(`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`) |
| | | VALUES ('1524197224932732933', '1524197224932732929', 'stockfactory_view', '查看', 'view', '/stockfactory/stockfactory/view', 'file-text', 4, 2, 2, 1, NULL, 0); |