-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
haiji.yang
committed
Apr 4, 2020
1 parent
e886d24
commit 522982a
Showing
7 changed files
with
442 additions
and
2 deletions.
There are no files selected for viewing
88 changes: 88 additions & 0 deletions
88
...demo-api/src/main/java/com/javayh/api/syslogistics/controller/SysLogisticsController.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,88 @@ | ||
/** | ||
* 版权所属: Java有货 | ||
* 作者:杨海吉 | ||
* 版本:V1.0 | ||
* 创建日期:2020-04-05 | ||
* 修改日期:2020-04-05 | ||
*/ | ||
package com.javayh.api.syslogistics.controller; | ||
|
||
import com.javayh.common.result.ResultData; | ||
import com.javayh.common.page.PageQuery; | ||
import io.swagger.annotations.Api; | ||
import io.swagger.annotations.ApiOperation; | ||
import org.springframework.web.bind.annotation.DeleteMapping; | ||
import org.springframework.web.bind.annotation.GetMapping; | ||
import org.springframework.web.bind.annotation.PostMapping; | ||
import org.springframework.web.bind.annotation.PutMapping; | ||
import org.springframework.web.bind.annotation.RequestMapping; | ||
import org.springframework.web.bind.annotation.RequestBody; | ||
import org.springframework.web.bind.annotation.RestController; | ||
import org.springframework.beans.factory.annotation.Autowired; | ||
import com.javayh.api.syslogistics.pojo.SysLogistics; | ||
import com.javayh.api.syslogistics.pojo.dto.SysLogisticsDTO; | ||
import com.javayh.api.syslogistics.service.ISysLogisticsService; | ||
|
||
/** | ||
* <p> * Controller | ||
* </p> * @author:Dylan | ||
* @version:V1.0 | ||
* @since:2020-04-05 | ||
*/ | ||
@RestController | ||
@Api(tags = "") | ||
@RequestMapping("/sys/logistics") | ||
public class SysLogisticsController { | ||
|
||
@Autowired | ||
private ISysLogisticsService sysLogisticsServiceImpl; | ||
|
||
/** | ||
* 根据条件查找-分页 | ||
*/ | ||
@ApiOperation(value = "根据条件查找-分页") | ||
@PostMapping(value = "/findByPage") | ||
public ResultData<PageQuery> findByPage (@RequestBody SysLogisticsDTO sysLogisticsDTO){ | ||
return ResultData.success(sysLogisticsServiceImpl.findByPage(sysLogisticsDTO)); | ||
} | ||
|
||
/** | ||
* 根据id查询 | ||
*/ | ||
@ApiOperation(value = "根据id查询") | ||
@GetMapping(value = "/findById") | ||
public ResultData<SysLogistics> findById(Integer id){ | ||
return ResultData.success(sysLogisticsServiceImpl.findById(id)); | ||
} | ||
|
||
/** | ||
* 添加数据 | ||
*/ | ||
@ApiOperation(value = "添加数据") | ||
@PostMapping(value = "/insert") | ||
public ResultData<Integer> insert(@RequestBody SysLogistics sysLogistics){ | ||
sysLogisticsServiceImpl.insert(sysLogistics); | ||
return ResultData.success(); | ||
} | ||
|
||
/** | ||
* 修改数据 | ||
*/ | ||
@ApiOperation(value = "修改数据") | ||
@PutMapping(value = "/update") | ||
public ResultData<Integer> update(@RequestBody SysLogistics sysLogistics){ | ||
sysLogisticsServiceImpl.update(sysLogistics); | ||
return ResultData.success(); | ||
} | ||
|
||
/** | ||
* 根据id删除 | ||
*/ | ||
@ApiOperation(value = "根据id删除") | ||
@DeleteMapping(value = "/deleteById") | ||
public ResultData<Integer> deleteById(Integer id){ | ||
sysLogisticsServiceImpl.deleteById(id); | ||
return ResultData.success(); | ||
} | ||
|
||
} |
50 changes: 50 additions & 0 deletions
50
...emo/javayh-demo-api/src/main/java/com/javayh/api/syslogistics/dao/SysLogisticsMapper.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
/** | ||
* 版权所属: Java有货 | ||
* 作者:杨海吉 | ||
* 版本:V1.0 | ||
* 创建日期:2020-04-05 | ||
* 修改日期:2020-04-05 | ||
*/ | ||
package com.javayh.api.syslogistics.dao; | ||
|
||
import com.javayh.api.syslogistics.pojo.SysLogistics; | ||
import com.javayh.api.syslogistics.pojo.dto.SysLogisticsDTO; | ||
import org.apache.ibatis.annotations.Param; | ||
import org.apache.ibatis.annotations.Mapper; | ||
import java.util.List; | ||
|
||
/** | ||
* <p> * iMapper | ||
* </p> * @author:Dylan | ||
* @version:V1.0 | ||
* @since:2020-04-05 | ||
*/ | ||
@Mapper | ||
public interface SysLogisticsMapper{ | ||
|
||
/** | ||
* 分页查询 | ||
*/ | ||
List<SysLogistics> findByPage( SysLogisticsDTO sysLogisticsDTO); | ||
|
||
|
||
/** | ||
* 根据id查找 | ||
*/ | ||
SysLogistics findById(@Param("id") Integer id); | ||
|
||
/** | ||
* 新增 | ||
*/ | ||
int insert(SysLogistics sysLogistics); | ||
|
||
/** | ||
* 修改 | ||
*/ | ||
int update(SysLogistics sysLogistics); | ||
|
||
/** | ||
* 根据id删除 | ||
*/ | ||
int deleteById(@Param("id") Integer id); | ||
} |
89 changes: 89 additions & 0 deletions
89
javayh-demo/javayh-demo-api/src/main/java/com/javayh/api/syslogistics/pojo/SysLogistics.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,89 @@ | ||
/** | ||
* 版权所属: Java有货 | ||
* 作者:杨海吉 | ||
* 版本:V1.0 | ||
* 创建日期:2020-04-05 | ||
* 修改日期:2020-04-05 | ||
*/ | ||
package com.javayh.api.syslogistics.pojo; | ||
|
||
import lombok.*; | ||
|
||
import io.swagger.annotations.ApiModelProperty; | ||
import java.util.Date; | ||
/** | ||
* <p> * Bean | ||
* </p> * @author:Dylan | ||
* @version:V1.0 | ||
* @since:2020-04-05 | ||
*/ | ||
@SuppressWarnings("serial") | ||
@Data | ||
@NoArgsConstructor | ||
@AllArgsConstructor | ||
@Builder | ||
@ToString | ||
public class SysLogistics implements java.io.Serializable{ | ||
|
||
/** | ||
* | ||
*/ | ||
@ApiModelProperty(hidden = true) | ||
private Integer id; | ||
/** | ||
* 收件人 | ||
*/ | ||
@ApiModelProperty(value = "收件人") | ||
private String addresseeName; | ||
/** | ||
* 收件人地址 | ||
*/ | ||
@ApiModelProperty(value = "收件人地址") | ||
private String addressee; | ||
/** | ||
* | ||
*/ | ||
@ApiModelProperty(hidden = true) | ||
private Integer addresseePhone; | ||
/** | ||
* 寄件人 | ||
*/ | ||
@ApiModelProperty(value = "寄件人") | ||
private String senderName; | ||
/** | ||
* 寄件人地址 | ||
*/ | ||
@ApiModelProperty(value = "寄件人地址") | ||
private String senderAdd; | ||
/** | ||
* 0,已接单,1,已发货,2,已签收 | ||
*/ | ||
@ApiModelProperty(value = "0,已接单,1,已发货,2,已签收") | ||
private Integer emsStatus; | ||
/** | ||
* 0,为退货,1,退货中,2,已退货 | ||
*/ | ||
@ApiModelProperty(value = "0,为退货,1,退货中,2,已退货") | ||
private Integer retreatStatus; | ||
/** | ||
* 退货原因 | ||
*/ | ||
@ApiModelProperty(value = "退货原因") | ||
private String retreatInfo; | ||
/** | ||
* 创建时间 | ||
*/ | ||
@ApiModelProperty(value = "创建时间") | ||
private Date createDate; | ||
/** | ||
* | ||
*/ | ||
@ApiModelProperty(hidden = true) | ||
private Date updateDate; | ||
/** | ||
* 操作人 | ||
*/ | ||
@ApiModelProperty(value = "操作人") | ||
private String createBy; | ||
|
||
} |
90 changes: 90 additions & 0 deletions
90
...o/javayh-demo-api/src/main/java/com/javayh/api/syslogistics/pojo/dto/SysLogisticsDTO.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,90 @@ | ||
/** | ||
* 版权所属: Java有货 | ||
* 作者:杨海吉 | ||
* 版本:V1.0 | ||
* 创建日期:2020-04-05 | ||
* 修改日期:2020-04-05 | ||
*/ | ||
package com.javayh.api.syslogistics.pojo.dto; | ||
|
||
import lombok.*; | ||
import com.javayh.common.page.PageEntity; | ||
|
||
import io.swagger.annotations.ApiModelProperty; | ||
import java.util.Date; | ||
/** | ||
* <p> * Bean | ||
* </p> * @author:Dylan | ||
* @version:V1.0 | ||
* @since:2020-04-05 | ||
*/ | ||
@SuppressWarnings("serial") | ||
@Data | ||
@NoArgsConstructor | ||
@AllArgsConstructor | ||
@Builder | ||
@ToString | ||
public class SysLogisticsDTO extends PageEntity implements java.io.Serializable{ | ||
|
||
/** | ||
* | ||
*/ | ||
@ApiModelProperty(hidden = true) | ||
private Integer id; | ||
/** | ||
* 收件人 | ||
*/ | ||
@ApiModelProperty(value = "收件人") | ||
private String addresseeName; | ||
/** | ||
* 收件人地址 | ||
*/ | ||
@ApiModelProperty(value = "收件人地址") | ||
private String addressee; | ||
/** | ||
* | ||
*/ | ||
@ApiModelProperty(hidden = true) | ||
private Integer addresseePhone; | ||
/** | ||
* 寄件人 | ||
*/ | ||
@ApiModelProperty(value = "寄件人") | ||
private String senderName; | ||
/** | ||
* 寄件人地址 | ||
*/ | ||
@ApiModelProperty(value = "寄件人地址") | ||
private String senderAdd; | ||
/** | ||
* 0,已接单,1,已发货,2,已签收 | ||
*/ | ||
@ApiModelProperty(value = "0,已接单,1,已发货,2,已签收") | ||
private Integer emsStatus; | ||
/** | ||
* 0,为退货,1,退货中,2,已退货 | ||
*/ | ||
@ApiModelProperty(value = "0,为退货,1,退货中,2,已退货") | ||
private Integer retreatStatus; | ||
/** | ||
* 退货原因 | ||
*/ | ||
@ApiModelProperty(value = "退货原因") | ||
private String retreatInfo; | ||
/** | ||
* 创建时间 | ||
*/ | ||
@ApiModelProperty(value = "创建时间") | ||
private Date createDate; | ||
/** | ||
* | ||
*/ | ||
@ApiModelProperty(hidden = true) | ||
private Date updateDate; | ||
/** | ||
* 操作人 | ||
*/ | ||
@ApiModelProperty(value = "操作人") | ||
private String createBy; | ||
|
||
} |
47 changes: 47 additions & 0 deletions
47
...vayh-demo-api/src/main/java/com/javayh/api/syslogistics/service/ISysLogisticsService.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
/** | ||
* 版权所属: Java有货 | ||
* 作者:杨海吉 | ||
* 版本:V1.0 | ||
* 创建日期:2020-04-05 | ||
* 修改日期:2020-04-05 | ||
*/ | ||
package com.javayh.api.syslogistics.service; | ||
|
||
import com.javayh.api.syslogistics.pojo.SysLogistics; | ||
import com.javayh.api.syslogistics.pojo.dto.SysLogisticsDTO; | ||
import com.javayh.common.page.PageQuery; | ||
|
||
/** | ||
* <p> * iService | ||
* </p> * @author:Dylan | ||
* @version:V1.0 | ||
* @since:2020-04-05 | ||
*/ | ||
public interface ISysLogisticsService { | ||
/** | ||
* 根据条件查找-分页 | ||
*/ | ||
PageQuery<SysLogistics> findByPage (SysLogisticsDTO sysLogisticsDTO); | ||
|
||
/** | ||
* 根据id查询 | ||
*/ | ||
SysLogistics findById(Integer id); | ||
|
||
|
||
/** | ||
* 添加数据 | ||
*/ | ||
int insert(SysLogistics sysLogistics); | ||
|
||
/** | ||
* 修改数据 | ||
*/ | ||
int update(SysLogistics sysLogistics); | ||
|
||
/** | ||
* 根据id删除 | ||
*/ | ||
int deleteById(Integer id); | ||
|
||
} |
Oops, something went wrong.