Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
05a4fa37fd
|
|
@ -7,6 +7,7 @@ import com.ghy.common.core.page.TableDataInfo;
|
||||||
import com.ghy.common.enums.BusinessType;
|
import com.ghy.common.enums.BusinessType;
|
||||||
import com.ghy.common.utils.ExceptionUtil;
|
import com.ghy.common.utils.ExceptionUtil;
|
||||||
import com.ghy.common.utils.ShiroUtils;
|
import com.ghy.common.utils.ShiroUtils;
|
||||||
|
import com.ghy.common.utils.StringUtils;
|
||||||
import com.ghy.common.utils.poi.ExcelUtil;
|
import com.ghy.common.utils.poi.ExcelUtil;
|
||||||
import com.ghy.goods.domain.*;
|
import com.ghy.goods.domain.*;
|
||||||
import com.ghy.goods.service.*;
|
import com.ghy.goods.service.*;
|
||||||
|
|
@ -164,6 +165,11 @@ public class GoodsController extends BaseController {
|
||||||
|
|
||||||
// 补全商品类别
|
// 补全商品类别
|
||||||
List<GoodsStandard> goodsStandards = goodsStandardService.selectByGoodsId(result.getGoodsId());
|
List<GoodsStandard> goodsStandards = goodsStandardService.selectByGoodsId(result.getGoodsId());
|
||||||
|
goodsStandards.stream().forEach(goodsStandard -> {
|
||||||
|
if (StringUtils.isEmpty(goodsStandard.getGoodsUnit())) {
|
||||||
|
goodsStandard.setGoodsUnit(result.getGoodsUnit());
|
||||||
|
}
|
||||||
|
});
|
||||||
result.setGoodsStandardList(goodsStandards);
|
result.setGoodsStandardList(goodsStandards);
|
||||||
|
|
||||||
return AjaxResult.success(result);
|
return AjaxResult.success(result);
|
||||||
|
|
|
||||||
|
|
@ -88,7 +88,7 @@ public class OrderMasterController extends BaseController {
|
||||||
@PostMapping("/app/list")
|
@PostMapping("/app/list")
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
public TableDataInfo appList(@RequestBody OrderMaster orderMaster) {
|
public TableDataInfo appList(@RequestBody OrderMaster orderMaster) {
|
||||||
TableDataInfo rspData = new TableDataInfo();
|
// TableDataInfo rspData = new TableDataInfo();
|
||||||
startPage();
|
startPage();
|
||||||
List<OrderListResponse> orderListResponses = new ArrayList<>();
|
List<OrderListResponse> orderListResponses = new ArrayList<>();
|
||||||
List<OrderMaster> list = orderMasterService.selectOrderMasterList(orderMaster);
|
List<OrderMaster> list = orderMasterService.selectOrderMasterList(orderMaster);
|
||||||
|
|
@ -150,19 +150,19 @@ public class OrderMasterController extends BaseController {
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
PageDomain pageDomain = TableSupport.buildPageRequest();
|
// PageDomain pageDomain = TableSupport.buildPageRequest();
|
||||||
if (null == pageDomain.getPageNum() || null == pageDomain.getPageSize()) {
|
// if (null == pageDomain.getPageNum() || null == pageDomain.getPageSize()) {
|
||||||
rspData.setRows(orderListResponses);
|
// rspData.setRows(orderListResponses);
|
||||||
rspData.setTotal(orderListResponses.size());
|
// rspData.setTotal(orderListResponses.size());
|
||||||
return rspData;
|
// return rspData;
|
||||||
}
|
// }
|
||||||
Integer pageSize = pageDomain.getPageNum();
|
// Integer pageSize = pageDomain.getPageNum();
|
||||||
if (pageSize > orderListResponses.size()) {
|
// if (pageSize > orderListResponses.size()) {
|
||||||
pageSize = orderListResponses.size();
|
// pageSize = orderListResponses.size();
|
||||||
}
|
// }
|
||||||
rspData.setRows(orderListResponses.subList(0, pageSize));
|
// rspData.setRows(orderListResponses.subList(0, pageSize));
|
||||||
rspData.setTotal(orderListResponses.size());
|
// rspData.setTotal(orderListResponses.size());
|
||||||
return rspData;
|
return voDataTable(orderListResponses, list);
|
||||||
}
|
}
|
||||||
|
|
||||||
@PostMapping("/app/detail")
|
@PostMapping("/app/detail")
|
||||||
|
|
|
||||||
|
|
@ -32,6 +32,8 @@ public class Goods extends BaseEntity {
|
||||||
|
|
||||||
private String goodsDesc;
|
private String goodsDesc;
|
||||||
|
|
||||||
|
private String goodsUnit;
|
||||||
|
|
||||||
@Excel(name = "商品排序", cellType = Excel.ColumnType.NUMERIC)
|
@Excel(name = "商品排序", cellType = Excel.ColumnType.NUMERIC)
|
||||||
private Integer goodsSort;
|
private Integer goodsSort;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -9,6 +9,7 @@
|
||||||
<result property="deptId" column="dept_id" />
|
<result property="deptId" column="dept_id" />
|
||||||
<result property="goodsName" column="goods_name" />
|
<result property="goodsName" column="goods_name" />
|
||||||
<result property="goodsDesc" column="goods_desc" />
|
<result property="goodsDesc" column="goods_desc" />
|
||||||
|
<result property="goodsUnit" column="goods_unit" />
|
||||||
<result property="goodsSort" column="goods_sort"/>
|
<result property="goodsSort" column="goods_sort"/>
|
||||||
<result property="workerId" column="worker_id"/>
|
<result property="workerId" column="worker_id"/>
|
||||||
<result property="deptGoodsCategoryId" column="dept_goods_category_id"/>
|
<result property="deptGoodsCategoryId" column="dept_goods_category_id"/>
|
||||||
|
|
@ -23,7 +24,7 @@
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
<sql id="selectGoods">
|
<sql id="selectGoods">
|
||||||
SELECT goods_id, goods_code, dept_id, goods_name, goods_desc, goods_sort, worker_id,
|
SELECT goods_id, goods_code, dept_id, goods_name, goods_desc, goods_unit, goods_sort, worker_id,
|
||||||
dept_goods_category_id, goods_img_url, goods_video_url, status, create_by, create_time, remark
|
dept_goods_category_id, goods_img_url, goods_video_url, status, create_by, create_time, remark
|
||||||
FROM goods
|
FROM goods
|
||||||
</sql>
|
</sql>
|
||||||
|
|
@ -62,6 +63,7 @@
|
||||||
<if test="deptId != null and deptId != ''">dept_id,</if>
|
<if test="deptId != null and deptId != ''">dept_id,</if>
|
||||||
<if test="goodsName != null and goodsName != ''">goods_name,</if>
|
<if test="goodsName != null and goodsName != ''">goods_name,</if>
|
||||||
<if test="goodsDesc != null and goodsDesc != ''">goods_desc,</if>
|
<if test="goodsDesc != null and goodsDesc != ''">goods_desc,</if>
|
||||||
|
<if test="goodsUnit != null and goodsUnit != ''">goods_unit,</if>
|
||||||
<if test="goodsSort != null and goodsSort != ''">goods_sort,</if>
|
<if test="goodsSort != null and goodsSort != ''">goods_sort,</if>
|
||||||
<if test="workerId != null and workerId != ''">worker_id,</if>
|
<if test="workerId != null and workerId != ''">worker_id,</if>
|
||||||
<if test="deptGoodsCategoryId != null and deptGoodsCategoryId != 0">dept_goods_category_id,</if>
|
<if test="deptGoodsCategoryId != null and deptGoodsCategoryId != 0">dept_goods_category_id,</if>
|
||||||
|
|
@ -76,6 +78,7 @@
|
||||||
<if test="deptId != null and deptId != ''">#{deptId},</if>
|
<if test="deptId != null and deptId != ''">#{deptId},</if>
|
||||||
<if test="goodsName != null and goodsName != ''">#{goodsName},</if>
|
<if test="goodsName != null and goodsName != ''">#{goodsName},</if>
|
||||||
<if test="goodsDesc != null and goodsDesc != ''">#{goodsDesc},</if>
|
<if test="goodsDesc != null and goodsDesc != ''">#{goodsDesc},</if>
|
||||||
|
<if test="goodsUnit != null and goodsUnit != ''">#{goodsUnit},</if>
|
||||||
<if test="goodsSort != null and goodsSort != ''">#{goodsSort},</if>
|
<if test="goodsSort != null and goodsSort != ''">#{goodsSort},</if>
|
||||||
<if test="workerId != null and workerId != ''">#{workerId},</if>
|
<if test="workerId != null and workerId != ''">#{workerId},</if>
|
||||||
<if test="deptGoodsCategoryId != null and deptGoodsCategoryId != 0">#{deptGoodsCategoryId},</if>
|
<if test="deptGoodsCategoryId != null and deptGoodsCategoryId != 0">#{deptGoodsCategoryId},</if>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue