🎨 产品管理维护功能完善
This commit is contained in:
parent
b3805555fb
commit
823ef3d1c4
@ -53,6 +53,7 @@ public class ProductServiceImpl extends AbstractService<Product> implements Prod
|
||||
if (FileDataType.BASE64.equals(product.getProductImgType())) {
|
||||
String headImgUrl = UploadController.uploadBase64File(product.getProductImgUrl(), FilePath.PRODUCT);
|
||||
product.setProductImgUrl(headImgUrl);
|
||||
product.setProductImgType(FileDataType.URL);
|
||||
}
|
||||
Product newProduct;
|
||||
if (isUpdate) {
|
||||
@ -60,7 +61,9 @@ public class ProductServiceImpl extends AbstractService<Product> implements Prod
|
||||
newProduct.setProductImgUrl(product.getProductImgUrl());
|
||||
newProduct.setProductTitle(product.getProductTitle());
|
||||
newProduct.setProductPrice(product.getProductPrice());
|
||||
newProduct.setTags(product.getTags());
|
||||
newProduct.setProductDescription(product.getProductDescription());
|
||||
newProduct.setUpdatedTime(new Date());
|
||||
productMapper.updateByPrimaryKeySelective(newProduct);
|
||||
// 更新产品详情
|
||||
productMapper.updateProductContent(newProduct.getIdProduct(), product.getProductContent(), product.getProductContentHtml());
|
||||
|
@ -37,7 +37,7 @@
|
||||
where id_product = #{idProduct}
|
||||
</update>
|
||||
<select id="selectProducts" resultMap="DTOResultMap">
|
||||
select id, product_title, product_img_url, tags, product_description, product_price, weights, status
|
||||
select id, product_title, product_img_url, tags, product_description, product_price, weights, status, created_time
|
||||
from forest_product
|
||||
order by weights
|
||||
</select>
|
||||
@ -57,7 +57,7 @@
|
||||
<select id="selectOnlineProducts" resultMap="DTOResultMap">
|
||||
select id, product_title, product_img_url, product_description, product_price
|
||||
from forest_product
|
||||
where status = 1
|
||||
where status = 0
|
||||
order by weights
|
||||
</select>
|
||||
</mapper>
|
||||
|
Loading…
Reference in New Issue
Block a user