1.4.3版本,后台图标更新、新增加用户账单流水,后台模块重新拆分,物流快递单独管理,导出最新sql
This commit is contained in:
@ -58,10 +58,11 @@ yshop基于当前流行技术组合的前后端分离商城系统: SpringBoot2
|
|||||||
- yshop-api 公众号(H5)API模块
|
- yshop-api 公众号(H5)API模块
|
||||||
- yshop-mp 微信相关模块
|
- yshop-mp 微信相关模块
|
||||||
- yshop-common 公共模块
|
- yshop-common 公共模块
|
||||||
- yshop-system 商城系统模块
|
- yshop-system 后台模块
|
||||||
- yshop-logging 日志模块
|
- yshop-logging 日志模块
|
||||||
- yshop-tools 第三方工具模块
|
- yshop-tools 第三方工具模块
|
||||||
- yshop-generator 代码生成模块
|
- yshop-generator 代码生成模块
|
||||||
|
- yshop-shop 商城模块
|
||||||
|
|
||||||
#### 系统预览
|
#### 系统预览
|
||||||
<table>
|
<table>
|
||||||
@ -84,7 +85,7 @@ yshop基于当前流行技术组合的前后端分离商城系统: SpringBoot2
|
|||||||
</table>
|
</table>
|
||||||
<table>
|
<table>
|
||||||
<tr>
|
<tr>
|
||||||
<td><img src="https://images.gitee.com/uploads/images/2019/1130/114819_99540fd3_477893.jpeg"/></td>
|
<td><img src="https://images.gitee.com/uploads/images/2019/1211/161553_20c039ff_477893.jpeg"/></td>
|
||||||
<td><img src="https://images.gitee.com/uploads/images/2019/1129/234538_62ba99b7_477893.jpeg"/></td>
|
<td><img src="https://images.gitee.com/uploads/images/2019/1129/234538_62ba99b7_477893.jpeg"/></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
@ -144,6 +145,7 @@ yshop基于当前流行技术组合的前后端分离商城系统: SpringBoot2
|
|||||||
- yshop1.4.2 发布更新如下:
|
- yshop1.4.2 发布更新如下:
|
||||||
-1.商品新增多图评价
|
-1.商品新增多图评价
|
||||||
-2.订单新增快递查询
|
-2.订单新增快递查询
|
||||||
|
-1.4.3版本,后台图标更新,后台模块重新拆分,物流快递单独管理,导出最新sql
|
||||||
|
|
||||||
|
|
||||||
#### 反馈交流
|
#### 反馈交流
|
||||||
|
1
pom.xml
1
pom.xml
@ -17,6 +17,7 @@
|
|||||||
<module>yshop-generator</module>
|
<module>yshop-generator</module>
|
||||||
<module>yshop-api</module>
|
<module>yshop-api</module>
|
||||||
<module>yshop-mp</module>
|
<module>yshop-mp</module>
|
||||||
|
<module>yshop-shop</module>
|
||||||
</modules>
|
</modules>
|
||||||
|
|
||||||
<name>YSHOP商城管理系统</name>
|
<name>YSHOP商城管理系统</name>
|
||||||
|
747
sql/yxshop.sql
747
sql/yxshop.sql
File diff suppressed because one or more lines are too long
33
yshop-shop/pom.xml
Normal file
33
yshop-shop/pom.xml
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||||
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
|
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||||
|
<parent>
|
||||||
|
<artifactId>yshop</artifactId>
|
||||||
|
<groupId>co.yixiang</groupId>
|
||||||
|
<version>1.4</version>
|
||||||
|
</parent>
|
||||||
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
<artifactId>yshop-shop</artifactId>
|
||||||
|
<name>商城模块</name>
|
||||||
|
|
||||||
|
<properties>
|
||||||
|
<jjwt.version>0.9.1</jjwt.version>
|
||||||
|
</properties>
|
||||||
|
|
||||||
|
<dependencies>
|
||||||
|
<dependency>
|
||||||
|
<groupId>co.yixiang</groupId>
|
||||||
|
<artifactId>yshop-logging</artifactId>
|
||||||
|
<version>1.4</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>co.yixiang</groupId>
|
||||||
|
<artifactId>yshop-mp</artifactId>
|
||||||
|
<version>1.4</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
</dependencies>
|
||||||
|
|
||||||
|
</project>
|
@ -0,0 +1,48 @@
|
|||||||
|
package co.yixiang.modules.shop.domain;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
import cn.hutool.core.bean.BeanUtil;
|
||||||
|
import cn.hutool.core.bean.copier.CopyOptions;
|
||||||
|
import javax.persistence.*;
|
||||||
|
import javax.validation.constraints.NotBlank;
|
||||||
|
import javax.validation.constraints.NotNull;
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author hupeng
|
||||||
|
* @date 2019-12-12
|
||||||
|
*/
|
||||||
|
@Entity
|
||||||
|
@Data
|
||||||
|
@Table(name="yx_express")
|
||||||
|
public class YxExpress implements Serializable {
|
||||||
|
|
||||||
|
// 快递公司id
|
||||||
|
@Id
|
||||||
|
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||||
|
@Column(name = "id")
|
||||||
|
private Integer id;
|
||||||
|
|
||||||
|
// 快递公司简称
|
||||||
|
@Column(name = "code",unique = true,nullable = false)
|
||||||
|
@NotBlank(message = "快递公司编号不能为空")
|
||||||
|
private String code;
|
||||||
|
|
||||||
|
// 快递公司全称
|
||||||
|
@Column(name = "name",nullable = false)
|
||||||
|
@NotBlank(message = "快递公司名称不能为空")
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
// 排序
|
||||||
|
@Column(name = "sort",nullable = false)
|
||||||
|
@NotNull(message = "排序必填")
|
||||||
|
private Integer sort;
|
||||||
|
|
||||||
|
// 是否显示
|
||||||
|
@Column(name = "is_show",insertable = false)
|
||||||
|
private Integer isShow;
|
||||||
|
|
||||||
|
public void copy(YxExpress source){
|
||||||
|
BeanUtil.copyProperties(source,this, CopyOptions.create().setIgnoreNullValue(true));
|
||||||
|
}
|
||||||
|
}
|
@ -4,6 +4,7 @@ import lombok.Data;
|
|||||||
import cn.hutool.core.bean.BeanUtil;
|
import cn.hutool.core.bean.BeanUtil;
|
||||||
import cn.hutool.core.bean.copier.CopyOptions;
|
import cn.hutool.core.bean.copier.CopyOptions;
|
||||||
import javax.persistence.*;
|
import javax.persistence.*;
|
||||||
|
import javax.validation.constraints.NotBlank;
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
|
|
||||||
@ -132,6 +133,7 @@ public class YxStoreOrder implements Serializable {
|
|||||||
|
|
||||||
// 快递名称/送货人姓名
|
// 快递名称/送货人姓名
|
||||||
@Column(name = "delivery_name")
|
@Column(name = "delivery_name")
|
||||||
|
@NotBlank(message = "请选择快递公司")
|
||||||
private String deliveryName;
|
private String deliveryName;
|
||||||
|
|
||||||
@Column(name = "delivery_sn")
|
@Column(name = "delivery_sn")
|
||||||
@ -144,6 +146,7 @@ public class YxStoreOrder implements Serializable {
|
|||||||
|
|
||||||
// 快递单号/手机号
|
// 快递单号/手机号
|
||||||
@Column(name = "delivery_id")
|
@Column(name = "delivery_id")
|
||||||
|
@NotBlank(message = "快递单号不能为空")
|
||||||
private String deliveryId;
|
private String deliveryId;
|
||||||
|
|
||||||
// 消费赚取积分
|
// 消费赚取积分
|
@ -22,10 +22,12 @@ public class YxUserBill implements Serializable {
|
|||||||
@Column(name = "id")
|
@Column(name = "id")
|
||||||
private Integer id;
|
private Integer id;
|
||||||
|
|
||||||
// 用户uid
|
//用户uid
|
||||||
@Column(name = "uid",nullable = false)
|
@Column(name = "uid",nullable = false)
|
||||||
private Integer uid;
|
private Integer uid;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// 关联id
|
// 关联id
|
||||||
@Column(name = "link_id",nullable = false)
|
@Column(name = "link_id",nullable = false)
|
||||||
private String linkId;
|
private String linkId;
|
@ -0,0 +1,19 @@
|
|||||||
|
package co.yixiang.modules.shop.repository;
|
||||||
|
|
||||||
|
import co.yixiang.modules.shop.domain.YxExpress;
|
||||||
|
import org.springframework.data.jpa.repository.JpaRepository;
|
||||||
|
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author hupeng
|
||||||
|
* @date 2019-12-12
|
||||||
|
*/
|
||||||
|
public interface YxExpressRepository extends JpaRepository<YxExpress, Integer>, JpaSpecificationExecutor {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* findByCode
|
||||||
|
* @param code
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
YxExpress findByCode(String code);
|
||||||
|
}
|
@ -0,0 +1,29 @@
|
|||||||
|
package co.yixiang.modules.shop.repository;
|
||||||
|
|
||||||
|
import co.yixiang.modules.shop.domain.YxUserBill;
|
||||||
|
import co.yixiang.modules.shop.service.dto.UserBillDTO;
|
||||||
|
import org.springframework.data.domain.Page;
|
||||||
|
import org.springframework.data.domain.Pageable;
|
||||||
|
import org.springframework.data.jpa.repository.JpaRepository;
|
||||||
|
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
|
||||||
|
import org.springframework.data.jpa.repository.Query;
|
||||||
|
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author hupeng
|
||||||
|
* @date 2019-11-06
|
||||||
|
*/
|
||||||
|
public interface YxUserBillRepository extends JpaRepository<YxUserBill, Integer>, JpaSpecificationExecutor {
|
||||||
|
@Query(nativeQuery = true,
|
||||||
|
value = "select b.title,b.pm,b.category,b.type,b.number,b.add_time as addTime," +
|
||||||
|
"u.nickname from yx_user_bill b left join yx_user u on u.uid=b.uid " +
|
||||||
|
" where if(?1 !='',b.category=?1,1=1) and if(?2 !='',b.type=?2,1=1) " +
|
||||||
|
"and if(?3 !='',u.nickname LIKE CONCAT('%',?3,'%'),1=1)",
|
||||||
|
countQuery = "select count(*) from yx_user_bill b left join yx_user u on u.uid=b.uid" +
|
||||||
|
" where if(?1 !='',b.category=?1,1=1) and if(?2 !='',b.type=?2,1=1) " +
|
||||||
|
"and if(?3 !='',u.nickname LIKE CONCAT('%',?3,'%'),1=1)")
|
||||||
|
Page<Map> findAllByPageable(String category, String type, String nickname,
|
||||||
|
Pageable pageable);
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,66 @@
|
|||||||
|
package co.yixiang.modules.shop.rest;
|
||||||
|
|
||||||
|
import cn.hutool.core.util.StrUtil;
|
||||||
|
import co.yixiang.aop.log.Log;
|
||||||
|
import co.yixiang.exception.BadRequestException;
|
||||||
|
import co.yixiang.modules.shop.domain.YxExpress;
|
||||||
|
import co.yixiang.modules.shop.service.YxExpressService;
|
||||||
|
import co.yixiang.modules.shop.service.dto.YxExpressQueryCriteria;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.data.domain.Pageable;
|
||||||
|
import org.springframework.http.HttpStatus;
|
||||||
|
import org.springframework.http.ResponseEntity;
|
||||||
|
import org.springframework.security.access.prepost.PreAuthorize;
|
||||||
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
import io.swagger.annotations.*;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author hupeng
|
||||||
|
* @date 2019-12-12
|
||||||
|
*/
|
||||||
|
@Api(tags = "YxExpress管理")
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("api")
|
||||||
|
public class YxExpressController {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private YxExpressService yxExpressService;
|
||||||
|
|
||||||
|
@Log("查询YxExpress")
|
||||||
|
@ApiOperation(value = "查询YxExpress")
|
||||||
|
@GetMapping(value = "/yxExpress")
|
||||||
|
@PreAuthorize("hasAnyRole('ADMIN','YXEXPRESS_ALL','YXEXPRESS_SELECT')")
|
||||||
|
public ResponseEntity getYxExpresss(YxExpressQueryCriteria criteria, Pageable pageable){
|
||||||
|
return new ResponseEntity(yxExpressService.queryAll(criteria,pageable),HttpStatus.OK);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Log("新增YxExpress")
|
||||||
|
@ApiOperation(value = "新增YxExpress")
|
||||||
|
@PostMapping(value = "/yxExpress")
|
||||||
|
@PreAuthorize("hasAnyRole('ADMIN','YXEXPRESS_ALL','YXEXPRESS_CREATE')")
|
||||||
|
public ResponseEntity create(@Validated @RequestBody YxExpress resources){
|
||||||
|
//if(StrUtil.isNotEmpty("22")) throw new BadRequestException("演示环境禁止操作");
|
||||||
|
return new ResponseEntity(yxExpressService.create(resources),HttpStatus.CREATED);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Log("修改YxExpress")
|
||||||
|
@ApiOperation(value = "修改YxExpress")
|
||||||
|
@PutMapping(value = "/yxExpress")
|
||||||
|
@PreAuthorize("hasAnyRole('ADMIN','YXEXPRESS_ALL','YXEXPRESS_EDIT')")
|
||||||
|
public ResponseEntity update(@Validated @RequestBody YxExpress resources){
|
||||||
|
//if(StrUtil.isNotEmpty("22")) throw new BadRequestException("演示环境禁止操作");
|
||||||
|
yxExpressService.update(resources);
|
||||||
|
return new ResponseEntity(HttpStatus.NO_CONTENT);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Log("删除YxExpress")
|
||||||
|
@ApiOperation(value = "删除YxExpress")
|
||||||
|
@DeleteMapping(value = "/yxExpress/{id}")
|
||||||
|
@PreAuthorize("hasAnyRole('ADMIN','YXEXPRESS_ALL','YXEXPRESS_DELETE')")
|
||||||
|
public ResponseEntity delete(@PathVariable Integer id){
|
||||||
|
//if(StrUtil.isNotEmpty("22")) throw new BadRequestException("演示环境禁止操作");
|
||||||
|
yxExpressService.delete(id);
|
||||||
|
return new ResponseEntity(HttpStatus.OK);
|
||||||
|
}
|
||||||
|
}
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user