no message
This commit is contained in:
parent
7f959107da
commit
f9f36c16d9
|
|
@ -1,6 +1,7 @@
|
||||||
package com.ghy.web.controller.customer;
|
package com.ghy.web.controller.customer;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Objects;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
import com.ghy.common.exception.base.BaseException;
|
import com.ghy.common.exception.base.BaseException;
|
||||||
|
|
@ -152,12 +153,13 @@ public class CustomerSelectionController extends BaseController
|
||||||
hisParam.setSelectionType(customerSelection.getSelectionType());
|
hisParam.setSelectionType(customerSelection.getSelectionType());
|
||||||
List<CustomerSelection> hisList = customerSelectionService.selectCustomerSelectionList(hisParam);
|
List<CustomerSelection> hisList = customerSelectionService.selectCustomerSelectionList(hisParam);
|
||||||
if(!CollectionUtils.isEmpty(hisList)){
|
if(!CollectionUtils.isEmpty(hisList)){
|
||||||
List<String> hisIds = hisList.stream().map(CustomerSelection::getId).collect(Collectors.toList());
|
List<String> hisIds = hisList.stream()
|
||||||
|
.filter(customerSelection1 -> Objects.equals(customerSelection1.getType(), customerSelection.getType())).map(CustomerSelection::getId).collect(Collectors.toList());
|
||||||
StringBuilder ids = new StringBuilder();
|
StringBuilder ids = new StringBuilder();
|
||||||
hisIds.forEach(model->{
|
hisIds.forEach(model->{
|
||||||
ids.append(model.trim()).append(",");
|
ids.append(model.trim()).append(",");
|
||||||
});
|
});
|
||||||
if(!StringUtil.isEmpty(ids)){
|
if(!StringUtil.isEmpty(ids)&&ids.length()>0){
|
||||||
String idString = ids.substring(0, ids.length()-1);
|
String idString = ids.substring(0, ids.length()-1);
|
||||||
customerSelectionService.deleteCustomerSelectionByIds(idString);
|
customerSelectionService.deleteCustomerSelectionByIds(idString);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -545,7 +545,7 @@ public class OrderController extends BaseController {
|
||||||
logger.info("当前商品是配件商品,需要获取对应的服务商品");
|
logger.info("当前商品是配件商品,需要获取对应的服务商品");
|
||||||
|
|
||||||
// 通过商品的类目ID获取类目信息
|
// 通过商品的类目ID获取类目信息
|
||||||
DeptGoodsCategory deptGoodsCategory = deptGoodsCategoryService.get(goods.getDeptGoodsCategoryId());
|
DeptGoodsCategory deptGoodsCategory = deptGoodsCategoryService.selectOneByGoodsCategoryId(goods.getDeptGoodsCategoryId());
|
||||||
if (deptGoodsCategory != null && deptGoodsCategory.getServiceCategoryId() != null) {
|
if (deptGoodsCategory != null && deptGoodsCategory.getServiceCategoryId() != null) {
|
||||||
logger.info("配件商品的服务类目ID: {}", deptGoodsCategory.getServiceCategoryId());
|
logger.info("配件商品的服务类目ID: {}", deptGoodsCategory.getServiceCategoryId());
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -114,6 +114,13 @@ public class Goods extends BaseEntity {
|
||||||
@Excel(name = "到店服务")
|
@Excel(name = "到店服务")
|
||||||
private Integer storeService;
|
private Integer storeService;
|
||||||
|
|
||||||
|
/** 安装服务 1-包安装 2-不包安装 3-自费安装 */
|
||||||
|
@Excel(name = "安装服务", readConverterExp = "1=包安装,2=不包安装,3=自费安装")
|
||||||
|
private Integer installService;
|
||||||
|
|
||||||
|
/** 配送服务 1-包邮 2-同城包送 3-邮费自付 4-自提 */
|
||||||
|
@Excel(name = "配送服务", readConverterExp = "1=包邮,2=同城包送,3=邮费自付,4=自提")
|
||||||
|
private Integer deliveryService;
|
||||||
|
|
||||||
private Shop shop;
|
private Shop shop;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -68,4 +68,7 @@ public class GoodsStandard extends BaseEntity {
|
||||||
@Excel(name = "截留金额", cellType = Excel.ColumnType.STRING)
|
@Excel(name = "截留金额", cellType = Excel.ColumnType.STRING)
|
||||||
private BigDecimal retainMoney;
|
private BigDecimal retainMoney;
|
||||||
|
|
||||||
|
@Excel(name = "图片地址")
|
||||||
|
private String imageUrl;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -30,17 +30,19 @@
|
||||||
<result property="keyword" column="keyword" />
|
<result property="keyword" column="keyword" />
|
||||||
<result property="type" column="type" />
|
<result property="type" column="type" />
|
||||||
<result property="storeService" column="store_service" />
|
<result property="storeService" column="store_service" />
|
||||||
|
<result property="installService" column="install_service" />
|
||||||
|
<result property="deliveryService" column="delivery_service" />
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
<sql id="selectGoods">
|
<sql id="selectGoods">
|
||||||
SELECT goods_id, goods_code, dept_id, shop_id, shop_name, goods_name, goods_desc, warranty_period, serv_activity, goods_unit, expect_duration, goods_sort, worker_id,
|
SELECT goods_id, goods_code, dept_id, shop_id, shop_name, goods_name, goods_desc, warranty_period, serv_activity, goods_unit, expect_duration, goods_sort, worker_id,
|
||||||
dept_goods_category_id, goods_img_url, goods_video_url, status, create_by, create_time, remark, area_desc, keyword,type,store_service
|
dept_goods_category_id, goods_img_url, goods_video_url, status, create_by, create_time, remark, area_desc, keyword,type,store_service,install_service,delivery_service
|
||||||
FROM goods
|
FROM goods
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
<sql id="selectGoodsWithArea">
|
<sql id="selectGoodsWithArea">
|
||||||
SELECT DISTINCT g.goods_id, goods_code, dept_id, shop_id, shop_name, goods_name, goods_desc, goods_sort, worker_id, goods_unit, warranty_period, serv_activity, expect_duration,
|
SELECT DISTINCT g.goods_id, goods_code, dept_id, shop_id, shop_name, goods_name, goods_desc, goods_sort, worker_id, goods_unit, warranty_period, serv_activity, expect_duration,
|
||||||
dept_goods_category_id, goods_img_url, goods_video_url, status, g.create_by, g.create_time, g.remark, g.area_desc, g.keyword,g.type,g.store_service
|
dept_goods_category_id, goods_img_url, goods_video_url, status, g.create_by, g.create_time, g.remark, g.area_desc, g.keyword,g.type,g.store_service,g.install_service,g.delivery_service
|
||||||
FROM goods g
|
FROM goods g
|
||||||
LEFT JOIN goods_area ga ON g.goods_id = ga.goods_id
|
LEFT JOIN goods_area ga ON g.goods_id = ga.goods_id
|
||||||
</sql>
|
</sql>
|
||||||
|
|
@ -64,6 +66,8 @@
|
||||||
<if test="areaDesc != null and areaDesc != ''">area_desc = #{areaDesc},</if>
|
<if test="areaDesc != null and areaDesc != ''">area_desc = #{areaDesc},</if>
|
||||||
<if test="type != null">type = #{type},</if>
|
<if test="type != null">type = #{type},</if>
|
||||||
<if test="storeService != null">store_service = #{storeService},</if>
|
<if test="storeService != null">store_service = #{storeService},</if>
|
||||||
|
<if test="installService != null">install_service = #{installService},</if>
|
||||||
|
<if test="deliveryService != null">delivery_service = #{deliveryService},</if>
|
||||||
<if test="shopId != null">shop_id = #{shopId},</if>
|
<if test="shopId != null">shop_id = #{shopId},</if>
|
||||||
<if test="shopName != null and shopName != ''">shop_name = #{shopName},</if>
|
<if test="shopName != null and shopName != ''">shop_name = #{shopName},</if>
|
||||||
update_time = sysdate()
|
update_time = sysdate()
|
||||||
|
|
@ -100,6 +104,8 @@
|
||||||
<if test="createBy != null and createBy != ''">create_by,</if>
|
<if test="createBy != null and createBy != ''">create_by,</if>
|
||||||
<if test="type != null">type,</if>
|
<if test="type != null">type,</if>
|
||||||
<if test="storeService != null">store_service,</if>
|
<if test="storeService != null">store_service,</if>
|
||||||
|
<if test="installService != null">install_service,</if>
|
||||||
|
<if test="deliveryService != null">delivery_service,</if>
|
||||||
create_time
|
create_time
|
||||||
)values(
|
)values(
|
||||||
<if test="goodsCode != null and goodsCode != ''">#{goodsCode},</if>
|
<if test="goodsCode != null and goodsCode != ''">#{goodsCode},</if>
|
||||||
|
|
@ -123,6 +129,8 @@
|
||||||
<if test="createBy != null and createBy != ''">#{createBy},</if>
|
<if test="createBy != null and createBy != ''">#{createBy},</if>
|
||||||
<if test="type != null">#{type},</if>
|
<if test="type != null">#{type},</if>
|
||||||
<if test="storeService != null">#{storeService},</if>
|
<if test="storeService != null">#{storeService},</if>
|
||||||
|
<if test="installService != null">#{installService},</if>
|
||||||
|
<if test="deliveryService != null">#{deliveryService},</if>
|
||||||
sysdate()
|
sysdate()
|
||||||
)
|
)
|
||||||
</insert>
|
</insert>
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,7 @@
|
||||||
<result property="updateBy" column="update_by"/>
|
<result property="updateBy" column="update_by"/>
|
||||||
<result property="updateTime" column="update_time"/>
|
<result property="updateTime" column="update_time"/>
|
||||||
<result property="remark" column="remark"/>
|
<result property="remark" column="remark"/>
|
||||||
|
<result property="imageUrl" column="image_url"/>
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
<sql id="selectGoodsStandard">
|
<sql id="selectGoodsStandard">
|
||||||
|
|
@ -40,7 +40,8 @@
|
||||||
status,
|
status,
|
||||||
update_by,
|
update_by,
|
||||||
update_time,
|
update_time,
|
||||||
remark
|
remark,
|
||||||
|
image_url
|
||||||
FROM goods_standard
|
FROM goods_standard
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
|
|
@ -92,6 +93,7 @@
|
||||||
<if test="goodsNum != null and goodsNum != ''">goods_num,</if>
|
<if test="goodsNum != null and goodsNum != ''">goods_num,</if>
|
||||||
<if test="status != null and status != ''">status,</if>
|
<if test="status != null and status != ''">status,</if>
|
||||||
<if test="remark != null and remark != ''">remark,</if>
|
<if test="remark != null and remark != ''">remark,</if>
|
||||||
|
<if test="imageUrl != null and imageUrl != ''">image_url,</if>
|
||||||
<if test="createBy != null and createBy != ''">create_by,</if>
|
<if test="createBy != null and createBy != ''">create_by,</if>
|
||||||
create_time
|
create_time
|
||||||
)values(
|
)values(
|
||||||
|
|
@ -106,6 +108,7 @@
|
||||||
<if test="goodsNum != null and goodsNum != ''">#{goodsNum},</if>
|
<if test="goodsNum != null and goodsNum != ''">#{goodsNum},</if>
|
||||||
<if test="status != null and status != ''">#{status},</if>
|
<if test="status != null and status != ''">#{status},</if>
|
||||||
<if test="remark != null and remark != ''">#{remark},</if>
|
<if test="remark != null and remark != ''">#{remark},</if>
|
||||||
|
<if test="imageUrl != null and imageUrl != ''">#{imageUrl},</if>
|
||||||
<if test="createBy != null and createBy != ''">#{createBy},</if>
|
<if test="createBy != null and createBy != ''">#{createBy},</if>
|
||||||
sysdate()
|
sysdate()
|
||||||
)
|
)
|
||||||
|
|
@ -114,12 +117,12 @@
|
||||||
<insert id="batchInsert" parameterType="list">
|
<insert id="batchInsert" parameterType="list">
|
||||||
INSERT INTO goods_standard (
|
INSERT INTO goods_standard (
|
||||||
goods_standard_name, goods_id, dept_goods_category_id, goods_price, ext_money, discount_price, group_price, goods_unit, goods_num,
|
goods_standard_name, goods_id, dept_goods_category_id, goods_price, ext_money, discount_price, group_price, goods_unit, goods_num,
|
||||||
sale_num, status, remark, create_by, create_time )
|
sale_num, status, remark, image_url, create_by, create_time )
|
||||||
VALUES
|
VALUES
|
||||||
<foreach collection="goodsStandards" separator="," item="goodsStandard">
|
<foreach collection="goodsStandards" separator="," item="goodsStandard">
|
||||||
(
|
(
|
||||||
#{goodsStandard.goodsStandardName}, #{goodsStandard.goodsId}, #{goodsStandard.deptGoodsCategoryId}, #{goodsStandard.goodsPrice}, #{goodsStandard.extMoney}, #{goodsStandard.discountPrice},
|
#{goodsStandard.goodsStandardName}, #{goodsStandard.goodsId}, #{goodsStandard.deptGoodsCategoryId}, #{goodsStandard.goodsPrice}, #{goodsStandard.extMoney}, #{goodsStandard.discountPrice},
|
||||||
#{goodsStandard.groupPrice}, #{goodsStandard.goodsUnit}, #{goodsStandard.goodsNum}, 0, #{goodsStandard.status}, #{goodsStandard.remark}, #{goodsStandard.createBy}, sysdate()
|
#{goodsStandard.groupPrice}, #{goodsStandard.goodsUnit}, #{goodsStandard.goodsNum}, 0, #{goodsStandard.status}, #{goodsStandard.remark}, #{goodsStandard.imageUrl}, #{goodsStandard.createBy}, sysdate()
|
||||||
)
|
)
|
||||||
</foreach>
|
</foreach>
|
||||||
</insert>
|
</insert>
|
||||||
|
|
@ -158,6 +161,7 @@
|
||||||
<if test="goodsNum != null">goods_num = #{goodsNum},</if>
|
<if test="goodsNum != null">goods_num = #{goodsNum},</if>
|
||||||
<if test="status != null">`status` = #{status},</if>
|
<if test="status != null">`status` = #{status},</if>
|
||||||
<if test="remark != null">remark = #{remark},</if>
|
<if test="remark != null">remark = #{remark},</if>
|
||||||
|
<if test="imageUrl != null">image_url = #{imageUrl},</if>
|
||||||
update_time = sysdate()
|
update_time = sysdate()
|
||||||
</set>
|
</set>
|
||||||
WHERE goods_standard_id = #{goodsStandardId}
|
WHERE goods_standard_id = #{goodsStandardId}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue