小程序后台各种取值
This commit is contained in:
parent
e32a57baf7
commit
d1cac03848
|
|
@ -237,6 +237,8 @@ public class OrderController extends BaseController {
|
|||
orderMaster.setPayType(0);
|
||||
orderMaster.setOrderMode(request.getOrderMode());
|
||||
orderMaster.setPayMode(request.getPayMode());
|
||||
orderMaster.setGoodsBrand(request.getGoodsBrand());
|
||||
orderMaster.setGoodsSpecification(request.getGoodsSpecification());
|
||||
// 存在登陆用户的情况下
|
||||
if(getSysUser() != null){
|
||||
orderMaster.setCreateBy(getSysUser().getUserId().toString());
|
||||
|
|
@ -1150,6 +1152,8 @@ public class OrderController extends BaseController {
|
|||
}
|
||||
|
||||
// 编辑返回属性
|
||||
orderListResponse.setGoodsBrand(master.getGoodsBrand());
|
||||
orderListResponse.setGoodsSpecification(master.getGoodsSpecification());
|
||||
orderListResponse.setOrderMasterId(master.getId());
|
||||
orderListResponse.setGoodsName(goods.getGoodsName());
|
||||
orderListResponse.setGoodsLogoUrl(goods.getGoodsImgUrl());
|
||||
|
|
@ -1275,6 +1279,8 @@ public class OrderController extends BaseController {
|
|||
|
||||
|
||||
// 编辑返回属性
|
||||
orderListResponse.setGoodsBrand(orderMaster.getGoodsBrand());
|
||||
orderListResponse.setGoodsSpecification(orderMaster.getGoodsSpecification());
|
||||
orderListResponse.setOrderDetailId(detail.getId());
|
||||
orderListResponse.setOrderDetailCode(detail.getCode());
|
||||
orderListResponse.setOrderMasterId(detail.getOrderMasterId());
|
||||
|
|
@ -1385,6 +1391,8 @@ public class OrderController extends BaseController {
|
|||
}
|
||||
|
||||
// 编辑返回属性
|
||||
orderListResponse.setGoodsBrand(master.getGoodsBrand());
|
||||
orderListResponse.setGoodsSpecification(master.getGoodsSpecification());
|
||||
orderListResponse.setOrderMasterId(master.getId());
|
||||
orderListResponse.setGoodsName(goods.getGoodsName());
|
||||
orderListResponse.setGoodsLogoUrl(goods.getGoodsImgUrl());
|
||||
|
|
@ -1483,6 +1491,8 @@ public class OrderController extends BaseController {
|
|||
// List<AfterServiceRecord> afterServiceRecordList =afterServiceRecordService.selectAfterServiceRecordList(afterServiceRecord);
|
||||
|
||||
// 编辑返回属性
|
||||
orderListResponse.setGoodsBrand(orderMaster.getGoodsBrand());
|
||||
orderListResponse.setGoodsSpecification(orderMaster.getGoodsSpecification());
|
||||
orderListResponse.setOrderDetailId(detail.getId());
|
||||
orderListResponse.setOrderDetailCode(detail.getCode());
|
||||
orderListResponse.setOrderMasterId(detail.getOrderMasterId());
|
||||
|
|
|
|||
|
|
@ -306,6 +306,26 @@ public class OrderDetailController extends BaseController {
|
|||
GoodsStandard goodsStandard = goodsStandardService.selectById(orderStandardList.get(0).getGoodsStandardId());
|
||||
|
||||
Goods goods = goodsService.selectById(goodsStandard.getGoodsId());
|
||||
if (goods != null) {
|
||||
// 填充商品三级类目
|
||||
if(goods.getDeptGoodsCategoryId() != null){
|
||||
DeptGoodsCategory deptGoodsCategory = deptGoodsCategoryService.get(goods.getDeptGoodsCategoryId());
|
||||
if(deptGoodsCategory != null){
|
||||
GoodsCategory one = goodsCategoryService.selectById(deptGoodsCategory.getGoodsCategoryId());
|
||||
if(one != null && one.getParentCategoryId() != null){
|
||||
GoodsCategory two = goodsCategoryService.selectById(one.getParentCategoryId());
|
||||
if(two != null && two.getParentCategoryId() != null){
|
||||
GoodsCategory three = goodsCategoryService.selectById(two.getParentCategoryId());
|
||||
if(three != null){
|
||||
orderListResponse.setTotalName(three.getGoodsCategoryName()
|
||||
+ "-" + two.getGoodsCategoryName()
|
||||
+ "-" + one.getGoodsCategoryName());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 财务信息
|
||||
FinancialDetail financialDetail = financialDetailService.selectByOrderDetailId(detail.getId());
|
||||
|
|
@ -552,6 +572,8 @@ public class OrderDetailController extends BaseController {
|
|||
// List<AfterServiceRecord> afterServiceRecordList =afterServiceRecordService.selectAfterServiceRecordList(afterServiceRecord);
|
||||
|
||||
// 编辑返回属性
|
||||
orderListResponse.setGoodsBrand(orderMaster.getGoodsBrand());
|
||||
orderListResponse.setGoodsSpecification(orderMaster.getGoodsSpecification());
|
||||
orderListResponse.setOrderDetailId(detail.getId());
|
||||
orderListResponse.setOrderDetailCode(detail.getCode());
|
||||
orderListResponse.setOrderMasterId(detail.getOrderMasterId());
|
||||
|
|
|
|||
|
|
@ -294,6 +294,8 @@ public class OrderMasterController extends BaseController {
|
|||
}
|
||||
|
||||
// 编辑返回属性
|
||||
orderListResponse.setGoodsBrand(master.getGoodsBrand());
|
||||
orderListResponse.setGoodsSpecification(master.getGoodsSpecification());
|
||||
orderListResponse.setOrderMasterId(master.getId());
|
||||
orderListResponse.setGoodsName(goods.getGoodsName());
|
||||
orderListResponse.setGoodsLogoUrl(goods.getGoodsImgUrl());
|
||||
|
|
@ -638,6 +640,26 @@ public class OrderMasterController extends BaseController {
|
|||
GoodsStandard goodsStandard = goodsStandardService.selectById(orderStandardList.get(0).getGoodsStandardId());
|
||||
|
||||
Goods goods = goodsService.selectById(goodsStandard.getGoodsId());
|
||||
if (goods != null) {
|
||||
// 填充商品三级类目
|
||||
if(goods.getDeptGoodsCategoryId() != null){
|
||||
DeptGoodsCategory deptGoodsCategory = deptGoodsCategoryService.get(goods.getDeptGoodsCategoryId());
|
||||
if(deptGoodsCategory != null){
|
||||
GoodsCategory one = goodsCategoryService.selectById(deptGoodsCategory.getGoodsCategoryId());
|
||||
if(one != null && one.getParentCategoryId() != null){
|
||||
GoodsCategory two = goodsCategoryService.selectById(one.getParentCategoryId());
|
||||
if(two != null && two.getParentCategoryId() != null){
|
||||
GoodsCategory three = goodsCategoryService.selectById(two.getParentCategoryId());
|
||||
if(three != null){
|
||||
orderListResponse.setTotalName(three.getGoodsCategoryName()
|
||||
+ "-" + two.getGoodsCategoryName()
|
||||
+ "-" + one.getGoodsCategoryName());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
// 补全商品服务区域
|
||||
List<GoodsArea> goodsAreas = goodsAreaService.selectByGoodsId(goods.getGoodsId());
|
||||
goods.setGoodsAreaList(goodsAreas);
|
||||
|
|
|
|||
|
|
@ -16,6 +16,13 @@ import java.util.List;
|
|||
@Data
|
||||
public class OrderListResponse {
|
||||
|
||||
// 商品品牌 -- 后台发单才有
|
||||
private String goodsBrand;
|
||||
// 商品规格 -- 后台发单才有
|
||||
private String goodsSpecification;
|
||||
|
||||
private String totalName;
|
||||
|
||||
private String isCall;
|
||||
|
||||
private Long orderMasterId;
|
||||
|
|
|
|||
|
|
@ -189,4 +189,10 @@ public class OrderMaster extends BaseEntity {
|
|||
private List<Long> addressIds;
|
||||
|
||||
private List<Long> orderMasterIdList;
|
||||
|
||||
// 商品品牌 -- 后台发单才有
|
||||
private String goodsBrand;
|
||||
// 商品规格 -- 后台发单才有
|
||||
private String goodsSpecification;
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -29,6 +29,8 @@
|
|||
<result property="updateTime" column="update_time"/>
|
||||
<result property="remark" column="remark"/>
|
||||
<result property="goodsId" column="goods_id"/>
|
||||
<result property="goodsBrand" column="goods_brand"/>
|
||||
<result property="goodsSpecification" column="goods_specification"/>
|
||||
<result property="allSelfAssigned" column="all_self_assigned"/>
|
||||
<result property="hasDispatchedAll" column="has_dispatched_all"/>
|
||||
<result property="timeout" column="timeout_"/>
|
||||
|
|
@ -65,7 +67,9 @@
|
|||
timeout_,
|
||||
timeout_fine_times,
|
||||
is_call,
|
||||
order_mode
|
||||
order_mode,
|
||||
goods_brand,
|
||||
goods_specification
|
||||
FROM order_master
|
||||
</sql>
|
||||
<sql id="selectOrderMasterMoreInfo">
|
||||
|
|
@ -96,7 +100,9 @@
|
|||
om.timeout_,
|
||||
om.timeout_fine_times,
|
||||
om.is_call,
|
||||
fm.server_money
|
||||
fm.server_money,
|
||||
om.goods_brand,
|
||||
om.goods_specification
|
||||
FROM order_master om
|
||||
LEFT JOIN customer_address ca ON ca.customer_address_id = om.address_id
|
||||
LEFT JOIN goods g ON g.goods_id = om.goods_id
|
||||
|
|
@ -385,6 +391,8 @@
|
|||
<if test="payTime != null">pay_time,</if>
|
||||
<if test="revTime != null">rev_time,</if>
|
||||
<if test="remark != null">remark,</if>
|
||||
<if test="goodsBrand != null and goodsBrand != ''">goods_brand,</if>
|
||||
<if test="goodsSpecification != null and goodsSpecification != ''">goods_specification,</if>
|
||||
<if test="expectTimeStart != null">expect_time_start,</if>
|
||||
<if test="expectTimeEnd != null">expect_time_end,</if>
|
||||
<if test="createBy != null and createBy != ''">create_by,</if>
|
||||
|
|
@ -405,6 +413,8 @@
|
|||
<if test="payTime != null">#{payTime},</if>
|
||||
<if test="revTime != null">#{revTime},</if>
|
||||
<if test="remark != null">#{remark},</if>
|
||||
<if test="goodsBrand != null and goodsBrand != ''">#{goodsBrand},</if>
|
||||
<if test="goodsSpecification != null and goodsSpecification != ''">#{goodsSpecification},</if>
|
||||
<if test="expectTimeStart != null">#{expectTimeStart},</if>
|
||||
<if test="expectTimeEnd != null">#{expectTimeEnd},</if>
|
||||
<if test="createBy != null and createBy != ''">#{createBy},</if>
|
||||
|
|
|
|||
Loading…
Reference in New Issue