6 changed files with 144 additions and 0 deletions
@ -0,0 +1,32 @@
|
||||
package com.logpm.basicdata.entity; |
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField; |
||||
import com.baomidou.mybatisplus.annotation.TableName; |
||||
import com.fasterxml.jackson.annotation.JsonFormat; |
||||
import io.swagger.annotations.ApiModel; |
||||
import io.swagger.annotations.ApiModelProperty; |
||||
import lombok.Data; |
||||
import lombok.EqualsAndHashCode; |
||||
import org.springblade.core.tenant.mp.TenantEntity; |
||||
|
||||
import java.util.Date; |
||||
|
||||
@Data |
||||
@TableName("logpm_basicdata_main") |
||||
@ApiModel(value = "客户基础信息结算主题", description = "客户基础信息结算主题") |
||||
@EqualsAndHashCode(callSuper = true) |
||||
public class BasicdataMainEntity extends TenantEntity { |
||||
|
||||
/** |
||||
* 结算对象名称 |
||||
*/ |
||||
@ApiModelProperty(value = "结算对象名称") |
||||
private String name; |
||||
|
||||
/** |
||||
* 描述 |
||||
*/ |
||||
@ApiModelProperty(value = "描述") |
||||
private String descripts; |
||||
|
||||
} |
@ -0,0 +1,59 @@
|
||||
package com.logpm.basicdata.controller; |
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage; |
||||
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; |
||||
import com.logpm.basicdata.entity.BasicdataGoodsAreaEntity; |
||||
import com.logpm.basicdata.entity.BasicdataMainEntity; |
||||
import com.logpm.basicdata.entity.BasicdataWarehouseEntity; |
||||
import com.logpm.basicdata.service.IBasicdataMainService; |
||||
import com.logpm.basicdata.vo.BasicdataGoodsAreaVO; |
||||
import io.swagger.annotations.Api; |
||||
import io.swagger.annotations.ApiOperation; |
||||
import lombok.AllArgsConstructor; |
||||
import org.springblade.core.mp.support.Condition; |
||||
import org.springblade.core.mp.support.Query; |
||||
import org.springblade.core.tool.api.R; |
||||
import org.springframework.web.bind.annotation.*; |
||||
|
||||
import javax.validation.Valid; |
||||
import java.util.Objects; |
||||
|
||||
@RestController |
||||
@AllArgsConstructor |
||||
@RequestMapping("/basicdataMain") |
||||
@Api(value = "结算对象主题", tags = "结算对象主题") |
||||
public class BasicdataMainController { |
||||
|
||||
private IBasicdataMainService basicdataMainService; |
||||
|
||||
|
||||
/** |
||||
* 结算对象主题 新增 |
||||
*/ |
||||
@PostMapping("/save") |
||||
@ApiOperationSupport(order = 4) |
||||
@ApiOperation(value = "新增", notes = "basicdataMainEntity") |
||||
public R save(@Valid @RequestBody BasicdataMainEntity basicdataMainEntity) { |
||||
return R.status(basicdataMainService.save(basicdataMainEntity)); |
||||
} |
||||
|
||||
/** |
||||
* 结算对象主题 新增 |
||||
*/ |
||||
@PostMapping("/update") |
||||
@ApiOperationSupport(order = 4) |
||||
@ApiOperation(value = "新增", notes = "basicdataMainEntity") |
||||
public R update(@Valid @RequestBody BasicdataMainEntity basicdataMainEntity) { |
||||
return R.status(basicdataMainService.updateById(basicdataMainEntity)); |
||||
} |
||||
|
||||
|
||||
@GetMapping("/page") |
||||
@ApiOperationSupport(order = 3) |
||||
@ApiOperation(value = "分页", notes = "传入warehouseGoodsArea") |
||||
public R<IPage<BasicdataMainEntity>> page(BasicdataMainEntity basicdataMainEntity, Query query) { |
||||
IPage<BasicdataMainEntity> pages = basicdataMainService.selectBasicdataMainEntityPage(Condition.getPage(query), basicdataMainEntity); |
||||
return R.data(pages); |
||||
} |
||||
|
||||
} |
@ -0,0 +1,13 @@
|
||||
package com.logpm.basicdata.mapper; |
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
||||
import com.baomidou.mybatisplus.core.metadata.IPage; |
||||
import com.logpm.basicdata.entity.BasicdataMainEntity; |
||||
import org.apache.ibatis.annotations.Mapper; |
||||
|
||||
import java.util.List; |
||||
|
||||
@Mapper |
||||
public interface BasicdataMainMapper extends BaseMapper<BasicdataMainEntity> { |
||||
List<BasicdataMainEntity> selectBasicdataMainEntityPage(IPage<BasicdataMainEntity> page, BasicdataMainEntity basicdataMainEntity); |
||||
} |
@ -0,0 +1,9 @@
|
||||
<?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.logpm.basicdata.mapper.BasicdataMainMapper"> |
||||
|
||||
|
||||
<select id="selectBasicdataMainEntityPage" > |
||||
select * from logpm_basicdata_main where is_deleted = 0 |
||||
</select> |
||||
</mapper> |
@ -0,0 +1,13 @@
|
||||
package com.logpm.basicdata.service; |
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage; |
||||
import com.logpm.basicdata.entity.BasicdataHistoricalContractEntity; |
||||
import com.logpm.basicdata.entity.BasicdataMainEntity; |
||||
import org.springblade.core.mp.base.BaseService; |
||||
|
||||
/** |
||||
* 结算主体表 服务类 |
||||
*/ |
||||
public interface IBasicdataMainService extends BaseService<BasicdataMainEntity> { |
||||
IPage<BasicdataMainEntity> selectBasicdataMainEntityPage(IPage<BasicdataMainEntity> page, BasicdataMainEntity basicdataMainEntity); |
||||
} |
@ -0,0 +1,18 @@
|
||||
package com.logpm.basicdata.service.impl; |
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage; |
||||
import com.logpm.basicdata.entity.BasicdataMainEntity; |
||||
import com.logpm.basicdata.mapper.BasicdataMainMapper; |
||||
import com.logpm.basicdata.service.IBasicdataMainService; |
||||
import org.springblade.core.mp.base.BaseServiceImpl; |
||||
import org.springframework.stereotype.Service; |
||||
|
||||
@Service |
||||
public class BasicdataMainServiceImpl extends BaseServiceImpl<BasicdataMainMapper, BasicdataMainEntity> implements IBasicdataMainService { |
||||
@Override |
||||
public IPage<BasicdataMainEntity> selectBasicdataMainEntityPage(IPage<BasicdataMainEntity> page, BasicdataMainEntity basicdataMainEntity) { |
||||
|
||||
|
||||
return page.setRecords(baseMapper.selectBasicdataMainEntityPage(page, basicdataMainEntity)); |
||||
} |
||||
} |
Loading…
Reference in new issue