Skip to content

Commit

Permalink
Merge pull request #26 from Jzow/master
Browse files Browse the repository at this point in the history
Fix Load Array Node Bug
  • Loading branch information
JackMacArthur authored Sep 3, 2023
2 parents 6bbc2b1 + 6184015 commit 07ca974
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ public BaseResponseInfo findById(@RequestParam("id") Long id, HttpServletRequest
*/
@RequestMapping(value = "/getMaterialCategoryTree")
@ApiOperation(value = "获取商品类别树数据")
public JSONArray getMaterialCategoryTree(@RequestParam("id") Long id) throws Exception{
public JSONArray getMaterialCategoryTree(@RequestParam(value = "id", required = false) Long id) throws Exception{
JSONArray arr=new JSONArray();
List<TreeNode> materialCategoryTree = materialCategoryService.getMaterialCategoryTree(id);
if(materialCategoryTree!=null&& !materialCategoryTree.isEmpty()){
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,9 @@ public BaseResponseInfo findById(@RequestParam("id") Long id, HttpServletRequest
*/
@RequestMapping(value = "/getOrganizationTree")
@ApiOperation(value = "获取机构树数据")
public JSONArray getOrganizationTree(@RequestParam("id") Long id) throws Exception{
public JSONArray getOrganizationTree(@RequestParam(value = "id", required = false) Long id) throws Exception{
JSONArray arr=new JSONArray();
List<TreeNode> organizationTree= organizationService.getOrganizationTree(id);
List<TreeNode> organizationTree = organizationService.getOrganizationTree(id);
if(organizationTree!=null&& !organizationTree.isEmpty()){
for(TreeNode node:organizationTree){
String str=JSON.toJSONString(node);
Expand Down
2 changes: 1 addition & 1 deletion dao/src/main/resources/mapper_xml/MaterialMapperEx.xml
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@
</foreach>
</if>
and ifnull(m.delete_flag,'0') !='1'
group by m.id
GROUP BY m.id, u.name, mc.name, me.bar_code, me.purchase_decimal, me.commodity_decimal, me.wholesale_decimal, me.low_decimal, me.sku
order by m.id desc
<if test="offset != null and rows != null">
limit #{offset},#{rows}
Expand Down

0 comments on commit 07ca974

Please sign in to comment.