mirror of
https://gitee.com/youlaitech/youlai-mall.git
synced 2025-01-03 17:42:20 +08:00
wip: 商品重构临时提交
This commit is contained in:
parent
3aca0f3b31
commit
3af68bcc7e
@ -68,9 +68,9 @@ youlai-mall
|
||||
├── sql # SQL脚本
|
||||
├── mysql5 # MySQL5脚本
|
||||
├── mysql8 # MySQL8脚本
|
||||
├── mall-marketing # 营销服务(Sales Management Service)
|
||||
├── mall-sales # 营销服务(Sales Management Service)
|
||||
├── sms-api # 营销服务-Feign客户端
|
||||
├── sms-boot # 营销服务-启动应用
|
||||
├── sales-boot # 营销服务-启动应用
|
||||
├── mall-product # 商品服务(Product Management Service)
|
||||
├── product-api # 商品服务-Feign客户端
|
||||
├── product-boot # 商品服务-启动应用
|
||||
|
@ -52,7 +52,16 @@ public class AttributeController {
|
||||
return Result.judge(result);
|
||||
}
|
||||
|
||||
@ApiOperationSupport(order = 3)
|
||||
@ApiOperationSupport(order = 2)
|
||||
@Operation(summary = "获取属性组表单")
|
||||
@GetMapping("/group/form")
|
||||
public Result saveAttributeGroup(@RequestBody @Valid AttrGroupForm formData) {
|
||||
boolean result = attrGroupService.saveAttributeGroup(formData);
|
||||
return Result.judge(result);
|
||||
}
|
||||
|
||||
|
||||
@ApiOperationSupport(order = 4)
|
||||
@Operation(summary = "修改属性组")
|
||||
@PutMapping(value = "/group/{id}")
|
||||
public Result updateAttributeGroup(@Parameter(description = "属性组ID") @PathVariable Long id,
|
||||
@ -61,7 +70,7 @@ public class AttributeController {
|
||||
return Result.judge(result);
|
||||
}
|
||||
|
||||
@ApiOperationSupport(order = 4)
|
||||
@ApiOperationSupport(order = 5)
|
||||
@Operation(summary = "删除属性组")
|
||||
@DeleteMapping("/group/{ids}")
|
||||
public Result deleteAttributeGroups(
|
||||
@ -71,7 +80,7 @@ public class AttributeController {
|
||||
return Result.success();
|
||||
}
|
||||
|
||||
@ApiOperationSupport(order = 5)
|
||||
@ApiOperationSupport(order = 6)
|
||||
@Operation(summary = "新增属性")
|
||||
@PostMapping
|
||||
public Result saveAttribute(@RequestBody @Valid AttrForm formData) {
|
||||
@ -79,7 +88,7 @@ public class AttributeController {
|
||||
return Result.judge(result);
|
||||
}
|
||||
|
||||
@ApiOperationSupport(order = 6)
|
||||
@ApiOperationSupport(order = 7)
|
||||
@Operation(summary = "属性表单数据")
|
||||
@GetMapping("/{id}/form")
|
||||
public Result<AttrForm> getAttributeForm(
|
||||
@ -89,7 +98,7 @@ public class AttributeController {
|
||||
return Result.success(formData);
|
||||
}
|
||||
|
||||
@ApiOperationSupport(order = 7)
|
||||
@ApiOperationSupport(order = )
|
||||
@Operation(summary = "修改属性")
|
||||
@PutMapping(value = "/{id}")
|
||||
public Result updateAttribute(@Parameter(description = "属性ID") @PathVariable Long id,
|
||||
@ -98,7 +107,7 @@ public class AttributeController {
|
||||
return Result.judge(result);
|
||||
}
|
||||
|
||||
@ApiOperationSupport(order = 8)
|
||||
@ApiOperationSupport(order = 9)
|
||||
@Operation(summary = "删除属性")
|
||||
@DeleteMapping("/{ids}")
|
||||
public Result deleteAttributes(
|
||||
|
@ -11,7 +11,7 @@ import com.youlai.mall.product.model.bo.SpecBO;
|
||||
import org.mapstruct.Mapping;
|
||||
|
||||
/**
|
||||
* 转换器
|
||||
* 规格转换器
|
||||
*
|
||||
* @author Ray Hao
|
||||
* @since 2024-06-13
|
||||
@ -20,7 +20,7 @@ import org.mapstruct.Mapping;
|
||||
public interface SpecConverter {
|
||||
|
||||
@Mapping(target = "inputTypeLabel",
|
||||
expression = "java(bo.getInputType()!=null ? bo.getInputType().getLabel(): Strings.EMPTY)"
|
||||
expression = "java(bo.getInputType()!=null ? bo.getInputType().getLabel(): \"\")"
|
||||
)
|
||||
SpecPageVO toPageVo(SpecBO bo);
|
||||
|
||||
@ -28,6 +28,5 @@ public interface SpecConverter {
|
||||
|
||||
SpecForm toForm(Spec entity);
|
||||
|
||||
@InheritInverseConfiguration(name = "toForm")
|
||||
Spec toEntity(SpecForm entity);
|
||||
Spec toEntity(SpecForm formData);
|
||||
}
|
@ -9,12 +9,12 @@
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<artifactId>mall-marketing</artifactId>
|
||||
<artifactId>mall-sales</artifactId>
|
||||
|
||||
<packaging>pom</packaging>
|
||||
<modules>
|
||||
<module>marketing-api</module>
|
||||
<module>marketing-boot</module>
|
||||
<module>sales-api</module>
|
||||
<module>sales-boot</module>
|
||||
</modules>
|
||||
|
||||
</project>
|
@ -3,13 +3,13 @@
|
||||
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>mall-marketing</artifactId>
|
||||
<artifactId>mall-sales</artifactId>
|
||||
<groupId>com.youlai</groupId>
|
||||
<version>3.2.1</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<artifactId>marketing-api</artifactId>
|
||||
<artifactId>sales-api</artifactId>
|
||||
|
||||
<dependencies>
|
||||
|
@ -13,7 +13,7 @@ import org.springframework.web.bind.annotation.RequestParam;
|
||||
* @author huawei
|
||||
* @since 2021/3/17
|
||||
*/
|
||||
@FeignClient(value = "mall-marketing")
|
||||
@FeignClient(value = "mall-sales")
|
||||
public interface CouponRecordFeignClient {
|
||||
|
||||
@GetMapping("/api.app/v1/coupon_record/list")
|
@ -14,7 +14,7 @@ RUN echo "https://mirrors.ustc.edu.cn/alpine/v3.7/main/" > /etc/apk/repositories
|
||||
VOLUME /tmp
|
||||
|
||||
# 复制主机文件至镜像内,复制的目录需放置在 Dockerfile 文件同级目录下
|
||||
ADD target/sms-boot.jar app.jar
|
||||
ADD target/sales-boot.jar app.jar
|
||||
|
||||
# 容器启动执行命令
|
||||
CMD java \
|
@ -3,13 +3,13 @@
|
||||
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>mall-marketing</artifactId>
|
||||
<artifactId>mall-sales</artifactId>
|
||||
<groupId>com.youlai</groupId>
|
||||
<version>3.2.1</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<artifactId>marketing-boot</artifactId>
|
||||
<artifactId>sales-boot</artifactId>
|
||||
<properties>
|
||||
|
||||
<service.port>8804</service.port>
|
||||
@ -55,7 +55,7 @@
|
||||
|
||||
<dependency>
|
||||
<groupId>com.youlai</groupId>
|
||||
<artifactId>marketing-api</artifactId>
|
||||
<artifactId>sales-api</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
@ -16,9 +16,9 @@ import org.springframework.scheduling.annotation.EnableScheduling;
|
||||
@EnableDiscoveryClient
|
||||
@EnableFeignClients
|
||||
@EnableScheduling
|
||||
public class MarketingApplication {
|
||||
public class SalesApplication {
|
||||
|
||||
public static void main(String[] args) {
|
||||
SpringApplication.run(MarketingApplication.class, args);
|
||||
SpringApplication.run(SalesApplication.class, args);
|
||||
}
|
||||
}
|
@ -1,6 +1,6 @@
|
||||
spring:
|
||||
application:
|
||||
name: mall-marketing
|
||||
name: mall-sales
|
||||
profiles:
|
||||
active: dev
|
||||
|
@ -9,7 +9,7 @@ import org.springframework.boot.test.context.SpringBootTest;
|
||||
* @since 2021/7/3
|
||||
*/
|
||||
@SpringBootTest
|
||||
public class MarketingApplicationTest {
|
||||
public class SalesApplicationTest {
|
||||
|
||||
@Test
|
||||
public void contestLoad(){
|
4
pom.xml
4
pom.xml
@ -17,7 +17,7 @@
|
||||
<module>youlai-auth</module>
|
||||
|
||||
<!-- 商城模块 -->
|
||||
<module>mall-marketing</module>
|
||||
<module>mall-sales</module>
|
||||
<module>mall-member</module>
|
||||
<module>mall-product</module>
|
||||
<module>mall-order</module>
|
||||
@ -244,7 +244,7 @@
|
||||
|
||||
<dependency>
|
||||
<groupId>com.youlai</groupId>
|
||||
<artifactId>marketing-api</artifactId>
|
||||
<artifactId>sales-api</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user