ソースを参照

Merge branch 'master' of http://git.izouma.com/xiongzhu/raex_back into dev-meta

sunkean 3 年 前
コミット
4d7a61871d

+ 76 - 0
pom.xml

@@ -52,6 +52,82 @@
                     </excludes>
                 </configuration>
             </plugin>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-install-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <id>install1</id>
+                        <phase>initialize</phase>
+                        <goals>
+                            <goal>install-file</goal>
+                        </goals>
+                        <configuration>
+                            <file>lib/mozjpeg4j-1.1.jar</file>
+                            <groupId>org.libjpegturbo</groupId>
+                            <artifactId>mozjpeg4j</artifactId>
+                            <version>1.1</version>
+                            <packaging>jar</packaging>
+                        </configuration>
+                    </execution>
+                    <execution>
+                        <id>install2</id>
+                        <phase>initialize</phase>
+                        <goals>
+                            <goal>install-file</goal>
+                        </goals>
+                        <configuration>
+                            <file>lib/pngquant4j-1.0.1.jar</file>
+                            <groupId>org.pngquant</groupId>
+                            <artifactId>pngquant4j</artifactId>
+                            <version>1.0.1</version>
+                            <packaging>jar</packaging>
+                        </configuration>
+                    </execution>
+                    <execution>
+                        <id>install3</id>
+                        <phase>initialize</phase>
+                        <goals>
+                            <goal>install-file</goal>
+                        </goals>
+                        <configuration>
+                            <file>lib/mychain-rest-client-0.10.2.11-with-dependencies.jar</file>
+                            <groupId>com.antfinancial.baas</groupId>
+                            <artifactId>mychain-rest-lib</artifactId>
+                            <version>0.10.2.11</version>
+                            <packaging>jar</packaging>
+                        </configuration>
+                    </execution>
+                    <execution>
+                        <id>install4</id>
+                        <phase>initialize</phase>
+                        <goals>
+                            <goal>install-file</goal>
+                        </goals>
+                        <configuration>
+                            <file>lib/mychainx-java-sdk-0.10.2.9-with-dependencies.jar</file>
+                            <groupId>com.alipay.mychainx</groupId>
+                            <artifactId>mychainx-sdk</artifactId>
+                            <version>0.10.2.9</version>
+                            <packaging>jar</packaging>
+                        </configuration>
+                    </execution>
+                    <execution>
+                        <id>install5</id>
+                        <phase>initialize</phase>
+                        <goals>
+                            <goal>install-file</goal>
+                        </goals>
+                        <configuration>
+                            <file>lib/5upay-sdk-core-1.0.0.jar</file>
+                            <groupId>com.upay</groupId>
+                            <artifactId>sdk</artifactId>
+                            <version>1.0.0</version>
+                            <packaging>jar</packaging>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
         </plugins>
     </build>
 

+ 1 - 1
src/main/java/com/izouma/nineth/domain/Asset.java

@@ -331,7 +331,7 @@ public class Asset extends CollectionBaseEntity {
                 .oldHoldDays(1)
                 .source(AssetSource.OFFICIAL)
                 .companyId(1L)
-                .chainFlag(3)
+                .chainFlag(2)
                 .build();
     }
 }

+ 5 - 0
src/main/java/com/izouma/nineth/domain/PhotoAsset.java

@@ -22,6 +22,10 @@ public class PhotoAsset extends BaseEntity {
     private String           destroyAssetName;
     @ApiModelProperty("销毁藏品编号")
     private String           destroyAssetNumber;
+    @ApiModelProperty("销毁藏品图片")
+    @Column(columnDefinition = "TEXT")
+    @Convert(converter = FileObjectConverter.class)
+    private FileObject       destroyAssetPicture;
     @ApiModelProperty("用户名")
     private String           userName;
     @ApiModelProperty("用户头像")
@@ -29,6 +33,7 @@ public class PhotoAsset extends BaseEntity {
     @ApiModelProperty("图片名称")
     private String           picName;
     @ApiModelProperty("图片描述")
+    @Column(columnDefinition = "TEXT")
     private String           picDesc;
     @ApiModelProperty("图片")
     @Column(columnDefinition = "TEXT")

+ 7 - 3
src/main/java/com/izouma/nineth/service/PhotoAssetService.java

@@ -59,6 +59,9 @@ public class PhotoAssetService {
         if (asset.getNumber() != null) {
             record.setDestroyAssetNumber(asset.getNumber().toString());
         }
+        if (asset.getPic() != null) {
+            record.setDestroyAssetPicture(asset.getPic().get(0));
+        }
         return photoAssetRepo.save(record);
     }
 
@@ -78,9 +81,10 @@ public class PhotoAssetService {
         PhotoAsset photoAsset = photoAssetRepo.findById(id).orElseThrow(new BusinessException("无记录"));
         photoAsset.setStatus(CollectionStatus.FAIL);
 
-        Asset asset = assetRepo.findById(photoAsset.getDestroyAssetId()).orElseThrow(new BusinessException("无藏品记录"));
-        asset.setStatus(AssetStatus.NORMAL);
-        assetRepo.saveAndFlush(asset);
+//        Asset asset = assetRepo.findById(photoAsset.getDestroyAssetId()).orElseThrow(new BusinessException("无藏品记录"));
+//        asset.setStatus(AssetStatus.NORMAL);
+//        assetRepo.saveAndFlush(asset);
+        assetService.destroyWithoutTradecode(photoAsset.getDestroyAssetId(), photoAsset.getUserId());
         photoAssetRepo.save(photoAsset);
     }
 

+ 19 - 0
src/main/vue/src/views/PhotoAssetList.vue

@@ -37,10 +37,29 @@
             <el-table-column prop="userName" label="用户名"
             >
             </el-table-column>
+            <el-table-column prop="destroyAssetName" label="销毁藏品"
+                             show-overflow-tooltip
+            >
+            </el-table-column>
+            <el-table-column prop="destroyAssetNumber" label="藏品编号"
+            >
+            </el-table-column>
+            <el-table-column prop="destroyAssetPic" label="销毁藏品图片" width="90" align="center">
+                <template slot-scope="{ row }">
+                    <el-image
+                        style="width: 30px; height: 30px"
+                        :src="row.destroyAssetPicture.thumb || row.destroyAssetPicture.url"
+                        fit="cover"
+                        :preview-src-list="[row.destroyAssetPicture.thumb || row.destroyAssetPicture.url]"
+                    ></el-image>
+                </template>
+            </el-table-column>
             <el-table-column prop="picName" label="图片名称"
+                             show-overflow-tooltip
             >
             </el-table-column>
             <el-table-column prop="picDesc" label="图片描述"
+                             show-overflow-tooltip
             >
             </el-table-column>
             <el-table-column prop="pic" label="作品内容" width="90" align="center">