Browse Source

011调试代码

zhangshenjie 4 months ago
parent
commit
40f3c9fadd

+ 108 - 0
BusinessCommon/src/main/java/com/develop/common/tuya_bean/CategoryBean.java

@@ -0,0 +1,108 @@
+package com.develop.common.tuya_bean;
+
+import java.util.List;
+
+public class CategoryBean {
+    private Long gmtCreate;
+    private Long gmtModified;
+    private Integer id;
+    private String imageUrl;
+    private Integer isFoodChannel;
+    private List<LangInfoBean> langInfo;
+    private Integer level;
+    private String name;
+    private Integer parentId;
+
+    public Long getGmtCreate() {
+        return gmtCreate;
+    }
+
+    public void setGmtCreate(Long gmtCreate) {
+        this.gmtCreate = gmtCreate;
+    }
+
+    public Long getGmtModified() {
+        return gmtModified;
+    }
+
+    public void setGmtModified(Long gmtModified) {
+        this.gmtModified = gmtModified;
+    }
+
+    public Integer getId() {
+        return id;
+    }
+
+    public void setId(Integer id) {
+        this.id = id;
+    }
+
+    public String getImageUrl() {
+        return imageUrl;
+    }
+
+    public void setImageUrl(String imageUrl) {
+        this.imageUrl = imageUrl;
+    }
+
+    public Integer getIsFoodChannel() {
+        return isFoodChannel;
+    }
+
+    public void setIsFoodChannel(Integer isFoodChannel) {
+        this.isFoodChannel = isFoodChannel;
+    }
+
+    public List<LangInfoBean> getLangInfo() {
+        return langInfo;
+    }
+
+    public void setLangInfo(List<LangInfoBean> langInfo) {
+        this.langInfo = langInfo;
+    }
+
+    public Integer getLevel() {
+        return level;
+    }
+
+    public void setLevel(Integer level) {
+        this.level = level;
+    }
+
+    public String getName() {
+        return name;
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    public Integer getParentId() {
+        return parentId;
+    }
+
+    public void setParentId(Integer parentId) {
+        this.parentId = parentId;
+    }
+
+    public static class LangInfoBean {
+        private String lang;
+        private String name;
+
+        public String getLang() {
+            return lang;
+        }
+
+        public void setLang(String lang) {
+            this.lang = lang;
+        }
+
+        public String getName() {
+            return name;
+        }
+
+        public void setName(String name) {
+            this.name = name;
+        }
+    }
+}

+ 798 - 0
BusinessCommon/src/main/java/com/develop/common/tuya_bean/RecipesBean.java

@@ -0,0 +1,798 @@
+package com.develop.common.tuya_bean;
+
+import java.util.List;
+
+public class RecipesBean {
+    private List<?> allergens;
+    private String author;
+    private List<?> cookStepInfoVOList;
+    private Integer cookTime;
+    private Integer cookType;
+    private String desc;
+    private String easyLevel;
+    private String easyLevelDesc;
+    private Integer eatCount;
+    private String extInfo;
+    private String foodCategory;
+    private List<FoodInfoVOListBean> foodInfoVOList;
+    private String foodType;
+    private String foods;
+    private Long gmtCreate;
+    private Long gmtModified;
+    private Integer id;
+    private String information;
+    private Integer isControl;
+    private Integer isFoodChannel;
+    private Integer isMainShow;
+    private Integer isShowControl;
+    private Boolean isStar;
+    private Integer lang;
+    private String langDesc;
+    private String mainImg;
+    private List<String> mainImgs;
+    private List<MenuStepInfoVOListBean> menuStepInfoVOList;
+    private String name;
+    private String preVideo;
+    private String preVideoCover;
+    private String productGroupId;
+    private List<String> productIds;
+    private Integer pv;
+    private Integer sourceType;
+    private String stepVideo;
+    private String stepVideoCover;
+    private String taste;
+    private Integer useFoodLib;
+    private String xyxk;
+
+    public List<?> getAllergens() {
+        return allergens;
+    }
+
+    public void setAllergens(List<?> allergens) {
+        this.allergens = allergens;
+    }
+
+    public String getAuthor() {
+        return author;
+    }
+
+    public void setAuthor(String author) {
+        this.author = author;
+    }
+
+    public List<?> getCookStepInfoVOList() {
+        return cookStepInfoVOList;
+    }
+
+    public void setCookStepInfoVOList(List<?> cookStepInfoVOList) {
+        this.cookStepInfoVOList = cookStepInfoVOList;
+    }
+
+    public Integer getCookTime() {
+        return cookTime;
+    }
+
+    public void setCookTime(Integer cookTime) {
+        this.cookTime = cookTime;
+    }
+
+    public Integer getCookType() {
+        return cookType;
+    }
+
+    public void setCookType(Integer cookType) {
+        this.cookType = cookType;
+    }
+
+    public String getDesc() {
+        return desc;
+    }
+
+    public void setDesc(String desc) {
+        this.desc = desc;
+    }
+
+    public String getEasyLevel() {
+        return easyLevel;
+    }
+
+    public void setEasyLevel(String easyLevel) {
+        this.easyLevel = easyLevel;
+    }
+
+    public String getEasyLevelDesc() {
+        return easyLevelDesc;
+    }
+
+    public void setEasyLevelDesc(String easyLevelDesc) {
+        this.easyLevelDesc = easyLevelDesc;
+    }
+
+    public Integer getEatCount() {
+        return eatCount;
+    }
+
+    public void setEatCount(Integer eatCount) {
+        this.eatCount = eatCount;
+    }
+
+    public String getExtInfo() {
+        return extInfo;
+    }
+
+    public void setExtInfo(String extInfo) {
+        this.extInfo = extInfo;
+    }
+
+    public String getFoodCategory() {
+        return foodCategory;
+    }
+
+    public void setFoodCategory(String foodCategory) {
+        this.foodCategory = foodCategory;
+    }
+
+    public List<FoodInfoVOListBean> getFoodInfoVOList() {
+        return foodInfoVOList;
+    }
+
+    public void setFoodInfoVOList(List<FoodInfoVOListBean> foodInfoVOList) {
+        this.foodInfoVOList = foodInfoVOList;
+    }
+
+    public String getFoodType() {
+        return foodType;
+    }
+
+    public void setFoodType(String foodType) {
+        this.foodType = foodType;
+    }
+
+    public String getFoods() {
+        return foods;
+    }
+
+    public void setFoods(String foods) {
+        this.foods = foods;
+    }
+
+    public Long getGmtCreate() {
+        return gmtCreate;
+    }
+
+    public void setGmtCreate(Long gmtCreate) {
+        this.gmtCreate = gmtCreate;
+    }
+
+    public Long getGmtModified() {
+        return gmtModified;
+    }
+
+    public void setGmtModified(Long gmtModified) {
+        this.gmtModified = gmtModified;
+    }
+
+    public Integer getId() {
+        return id;
+    }
+
+    public void setId(Integer id) {
+        this.id = id;
+    }
+
+    public String getInformation() {
+        return information;
+    }
+
+    public void setInformation(String information) {
+        this.information = information;
+    }
+
+    public Integer getIsControl() {
+        return isControl;
+    }
+
+    public void setIsControl(Integer isControl) {
+        this.isControl = isControl;
+    }
+
+    public Integer getIsFoodChannel() {
+        return isFoodChannel;
+    }
+
+    public void setIsFoodChannel(Integer isFoodChannel) {
+        this.isFoodChannel = isFoodChannel;
+    }
+
+    public Integer getIsMainShow() {
+        return isMainShow;
+    }
+
+    public void setIsMainShow(Integer isMainShow) {
+        this.isMainShow = isMainShow;
+    }
+
+    public Integer getIsShowControl() {
+        return isShowControl;
+    }
+
+    public void setIsShowControl(Integer isShowControl) {
+        this.isShowControl = isShowControl;
+    }
+
+    public Boolean getIsStar() {
+        return isStar;
+    }
+
+    public void setIsStar(Boolean isStar) {
+        this.isStar = isStar;
+    }
+
+    public Integer getLang() {
+        return lang;
+    }
+
+    public void setLang(Integer lang) {
+        this.lang = lang;
+    }
+
+    public String getLangDesc() {
+        return langDesc;
+    }
+
+    public void setLangDesc(String langDesc) {
+        this.langDesc = langDesc;
+    }
+
+    public String getMainImg() {
+        return mainImg;
+    }
+
+    public void setMainImg(String mainImg) {
+        this.mainImg = mainImg;
+    }
+
+    public List<String> getMainImgs() {
+        return mainImgs;
+    }
+
+    public void setMainImgs(List<String> mainImgs) {
+        this.mainImgs = mainImgs;
+    }
+
+    public List<MenuStepInfoVOListBean> getMenuStepInfoVOList() {
+        return menuStepInfoVOList;
+    }
+
+    public void setMenuStepInfoVOList(List<MenuStepInfoVOListBean> menuStepInfoVOList) {
+        this.menuStepInfoVOList = menuStepInfoVOList;
+    }
+
+    public String getName() {
+        return name;
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    public String getPreVideo() {
+        return preVideo;
+    }
+
+    public void setPreVideo(String preVideo) {
+        this.preVideo = preVideo;
+    }
+
+    public String getPreVideoCover() {
+        return preVideoCover;
+    }
+
+    public void setPreVideoCover(String preVideoCover) {
+        this.preVideoCover = preVideoCover;
+    }
+
+    public String getProductGroupId() {
+        return productGroupId;
+    }
+
+    public void setProductGroupId(String productGroupId) {
+        this.productGroupId = productGroupId;
+    }
+
+    public List<String> getProductIds() {
+        return productIds;
+    }
+
+    public void setProductIds(List<String> productIds) {
+        this.productIds = productIds;
+    }
+
+    public Integer getPv() {
+        return pv;
+    }
+
+    public void setPv(Integer pv) {
+        this.pv = pv;
+    }
+
+    public Integer getSourceType() {
+        return sourceType;
+    }
+
+    public void setSourceType(Integer sourceType) {
+        this.sourceType = sourceType;
+    }
+
+    public String getStepVideo() {
+        return stepVideo;
+    }
+
+    public void setStepVideo(String stepVideo) {
+        this.stepVideo = stepVideo;
+    }
+
+    public String getStepVideoCover() {
+        return stepVideoCover;
+    }
+
+    public void setStepVideoCover(String stepVideoCover) {
+        this.stepVideoCover = stepVideoCover;
+    }
+
+    public String getTaste() {
+        return taste;
+    }
+
+    public void setTaste(String taste) {
+        this.taste = taste;
+    }
+
+    public Integer getUseFoodLib() {
+        return useFoodLib;
+    }
+
+    public void setUseFoodLib(Integer useFoodLib) {
+        this.useFoodLib = useFoodLib;
+    }
+
+    public String getXyxk() {
+        return xyxk;
+    }
+
+    public void setXyxk(String xyxk) {
+        this.xyxk = xyxk;
+    }
+
+    public static class FoodInfoVOListBean {
+        private List<FoodLangInfoVOListBean> foodLangInfoVOList;
+        private List<FoodNutritionVOListBean> foodNutritionVOList;
+        private Long gmtCreate;
+        private Long gmtModified;
+        private Integer id;
+        private String image;
+        private MenuFoodRelationVOBean menuFoodRelationVO;
+        private String name;
+        private Integer status;
+
+        public List<FoodLangInfoVOListBean> getFoodLangInfoVOList() {
+            return foodLangInfoVOList;
+        }
+
+        public void setFoodLangInfoVOList(List<FoodLangInfoVOListBean> foodLangInfoVOList) {
+            this.foodLangInfoVOList = foodLangInfoVOList;
+        }
+
+        public List<FoodNutritionVOListBean> getFoodNutritionVOList() {
+            return foodNutritionVOList;
+        }
+
+        public void setFoodNutritionVOList(List<FoodNutritionVOListBean> foodNutritionVOList) {
+            this.foodNutritionVOList = foodNutritionVOList;
+        }
+
+        public Long getGmtCreate() {
+            return gmtCreate;
+        }
+
+        public void setGmtCreate(Long gmtCreate) {
+            this.gmtCreate = gmtCreate;
+        }
+
+        public Long getGmtModified() {
+            return gmtModified;
+        }
+
+        public void setGmtModified(Long gmtModified) {
+            this.gmtModified = gmtModified;
+        }
+
+        public Integer getId() {
+            return id;
+        }
+
+        public void setId(Integer id) {
+            this.id = id;
+        }
+
+        public String getImage() {
+            return image;
+        }
+
+        public void setImage(String image) {
+            this.image = image;
+        }
+
+        public MenuFoodRelationVOBean getMenuFoodRelationVO() {
+            return menuFoodRelationVO;
+        }
+
+        public void setMenuFoodRelationVO(MenuFoodRelationVOBean menuFoodRelationVO) {
+            this.menuFoodRelationVO = menuFoodRelationVO;
+        }
+
+        public String getName() {
+            return name;
+        }
+
+        public void setName(String name) {
+            this.name = name;
+        }
+
+        public Integer getStatus() {
+            return status;
+        }
+
+        public void setStatus(Integer status) {
+            this.status = status;
+        }
+
+        public static class MenuFoodRelationVOBean {
+            private String amount;
+            private Integer back;
+            private Integer foodId;
+            private Integer foodOrder;
+            private Long gmtCreate;
+            private Long gmtModified;
+            private Integer groupId;
+            private Integer id;
+            private Integer menuId;
+            private String secAmount;
+            private String secUnit;
+            private Integer status;
+            private Integer tagId;
+            private String tagName;
+            private Integer tagOrder;
+
+            public String getAmount() {
+                return amount;
+            }
+
+            public void setAmount(String amount) {
+                this.amount = amount;
+            }
+
+            public Integer getBack() {
+                return back;
+            }
+
+            public void setBack(Integer back) {
+                this.back = back;
+            }
+
+            public Integer getFoodId() {
+                return foodId;
+            }
+
+            public void setFoodId(Integer foodId) {
+                this.foodId = foodId;
+            }
+
+            public Integer getFoodOrder() {
+                return foodOrder;
+            }
+
+            public void setFoodOrder(Integer foodOrder) {
+                this.foodOrder = foodOrder;
+            }
+
+            public Long getGmtCreate() {
+                return gmtCreate;
+            }
+
+            public void setGmtCreate(Long gmtCreate) {
+                this.gmtCreate = gmtCreate;
+            }
+
+            public Long getGmtModified() {
+                return gmtModified;
+            }
+
+            public void setGmtModified(Long gmtModified) {
+                this.gmtModified = gmtModified;
+            }
+
+            public Integer getGroupId() {
+                return groupId;
+            }
+
+            public void setGroupId(Integer groupId) {
+                this.groupId = groupId;
+            }
+
+            public Integer getId() {
+                return id;
+            }
+
+            public void setId(Integer id) {
+                this.id = id;
+            }
+
+            public Integer getMenuId() {
+                return menuId;
+            }
+
+            public void setMenuId(Integer menuId) {
+                this.menuId = menuId;
+            }
+
+            public String getSecAmount() {
+                return secAmount;
+            }
+
+            public void setSecAmount(String secAmount) {
+                this.secAmount = secAmount;
+            }
+
+            public String getSecUnit() {
+                return secUnit;
+            }
+
+            public void setSecUnit(String secUnit) {
+                this.secUnit = secUnit;
+            }
+
+            public Integer getStatus() {
+                return status;
+            }
+
+            public void setStatus(Integer status) {
+                this.status = status;
+            }
+
+            public Integer getTagId() {
+                return tagId;
+            }
+
+            public void setTagId(Integer tagId) {
+                this.tagId = tagId;
+            }
+
+            public String getTagName() {
+                return tagName;
+            }
+
+            public void setTagName(String tagName) {
+                this.tagName = tagName;
+            }
+
+            public Integer getTagOrder() {
+                return tagOrder;
+            }
+
+            public void setTagOrder(Integer tagOrder) {
+                this.tagOrder = tagOrder;
+            }
+        }
+
+        public static class FoodLangInfoVOListBean {
+            private Integer capability;
+            private Integer foodId;
+            private Integer id;
+            private String lang;
+            private String name;
+
+            public Integer getCapability() {
+                return capability;
+            }
+
+            public void setCapability(Integer capability) {
+                this.capability = capability;
+            }
+
+            public Integer getFoodId() {
+                return foodId;
+            }
+
+            public void setFoodId(Integer foodId) {
+                this.foodId = foodId;
+            }
+
+            public Integer getId() {
+                return id;
+            }
+
+            public void setId(Integer id) {
+                this.id = id;
+            }
+
+            public String getLang() {
+                return lang;
+            }
+
+            public void setLang(String lang) {
+                this.lang = lang;
+            }
+
+            public String getName() {
+                return name;
+            }
+
+            public void setName(String name) {
+                this.name = name;
+            }
+        }
+
+        public static class FoodNutritionVOListBean {
+            private Integer foodId;
+            private Integer id;
+            private String nutritionCode;
+            private Integer nutritionId;
+            private Integer status;
+            private String value;
+
+            public Integer getFoodId() {
+                return foodId;
+            }
+
+            public void setFoodId(Integer foodId) {
+                this.foodId = foodId;
+            }
+
+            public Integer getId() {
+                return id;
+            }
+
+            public void setId(Integer id) {
+                this.id = id;
+            }
+
+            public String getNutritionCode() {
+                return nutritionCode;
+            }
+
+            public void setNutritionCode(String nutritionCode) {
+                this.nutritionCode = nutritionCode;
+            }
+
+            public Integer getNutritionId() {
+                return nutritionId;
+            }
+
+            public void setNutritionId(Integer nutritionId) {
+                this.nutritionId = nutritionId;
+            }
+
+            public Integer getStatus() {
+                return status;
+            }
+
+            public void setStatus(Integer status) {
+                this.status = status;
+            }
+
+            public String getValue() {
+                return value;
+            }
+
+            public void setValue(String value) {
+                this.value = value;
+            }
+        }
+    }
+
+    public static class MenuStepInfoVOListBean {
+        private Long gmtCreate;
+        private Long gmtModified;
+        private Integer id;
+        private List<LangInfosBean> langInfos;
+        private Integer menuId;
+        private Integer step;
+
+        public Long getGmtCreate() {
+            return gmtCreate;
+        }
+
+        public void setGmtCreate(Long gmtCreate) {
+            this.gmtCreate = gmtCreate;
+        }
+
+        public Long getGmtModified() {
+            return gmtModified;
+        }
+
+        public void setGmtModified(Long gmtModified) {
+            this.gmtModified = gmtModified;
+        }
+
+        public Integer getId() {
+            return id;
+        }
+
+        public void setId(Integer id) {
+            this.id = id;
+        }
+
+        public List<LangInfosBean> getLangInfos() {
+            return langInfos;
+        }
+
+        public void setLangInfos(List<LangInfosBean> langInfos) {
+            this.langInfos = langInfos;
+        }
+
+        public Integer getMenuId() {
+            return menuId;
+        }
+
+        public void setMenuId(Integer menuId) {
+            this.menuId = menuId;
+        }
+
+        public Integer getStep() {
+            return step;
+        }
+
+        public void setStep(Integer step) {
+            this.step = step;
+        }
+
+        public static class LangInfosBean {
+            private String desc;
+            private String lang;
+            private String stepImg;
+            private String stepVideo;
+            private String stepVideoCover;
+
+            public String getDesc() {
+                return desc;
+            }
+
+            public void setDesc(String desc) {
+                this.desc = desc;
+            }
+
+            public String getLang() {
+                return lang;
+            }
+
+            public void setLang(String lang) {
+                this.lang = lang;
+            }
+
+            public String getStepImg() {
+                return stepImg;
+            }
+
+            public void setStepImg(String stepImg) {
+                this.stepImg = stepImg;
+            }
+
+            public String getStepVideo() {
+                return stepVideo;
+            }
+
+            public void setStepVideo(String stepVideo) {
+                this.stepVideo = stepVideo;
+            }
+
+            public String getStepVideoCover() {
+                return stepVideoCover;
+            }
+
+            public void setStepVideoCover(String stepVideoCover) {
+                this.stepVideoCover = stepVideoCover;
+            }
+        }
+    }
+}

+ 334 - 0
BusinessCommon/src/main/java/com/develop/common/tuya_bean/RecipesListBean.java

@@ -0,0 +1,334 @@
+package com.develop.common.tuya_bean;
+
+import java.util.List;
+
+public class RecipesListBean {
+
+    private List<DataBean> data;
+    private Boolean hasNext;
+    private Integer pageNo;
+    private Integer pageSize;
+    private Integer totalCount;
+
+    public List<DataBean> getData() {
+        return data;
+    }
+
+    public void setData(List<DataBean> data) {
+        this.data = data;
+    }
+
+    public Boolean getHasNext() {
+        return hasNext;
+    }
+
+    public void setHasNext(Boolean hasNext) {
+        this.hasNext = hasNext;
+    }
+
+    public Integer getPageNo() {
+        return pageNo;
+    }
+
+    public void setPageNo(Integer pageNo) {
+        this.pageNo = pageNo;
+    }
+
+    public Integer getPageSize() {
+        return pageSize;
+    }
+
+    public void setPageSize(Integer pageSize) {
+        this.pageSize = pageSize;
+    }
+
+    public Integer getTotalCount() {
+        return totalCount;
+    }
+
+    public void setTotalCount(Integer totalCount) {
+        this.totalCount = totalCount;
+    }
+
+    public static class DataBean {
+        private List<?> allergens;
+        private String author;
+        private Integer cookTime;
+        private Integer cookType;
+        private String desc;
+        private String easyLevel;
+        private String easyLevelDesc;
+        private Integer eatCount;
+        private String extInfo;
+        private String foodCategory;
+        private String foodType;
+        private String foods;
+        private Long gmtCreate;
+        private Long gmtModified;
+        private Integer id;
+        private Integer isControl;
+        private Integer isFoodChannel;
+        private Integer isMainShow;
+        private Integer isShowControl;
+        private Boolean isStar;
+        private Integer lang;
+        private String langDesc;
+        private String mainImg;
+        private List<String> mainImgs;
+        private String name;
+        private String preVideo;
+        private List<String> productIds;
+        private Integer sourceType;
+        private String stepVideo;
+        private String taste;
+        private Integer useFoodLib;
+
+        public List<?> getAllergens() {
+            return allergens;
+        }
+
+        public void setAllergens(List<?> allergens) {
+            this.allergens = allergens;
+        }
+
+        public String getAuthor() {
+            return author;
+        }
+
+        public void setAuthor(String author) {
+            this.author = author;
+        }
+
+        public Integer getCookTime() {
+            return cookTime;
+        }
+
+        public void setCookTime(Integer cookTime) {
+            this.cookTime = cookTime;
+        }
+
+        public Integer getCookType() {
+            return cookType;
+        }
+
+        public void setCookType(Integer cookType) {
+            this.cookType = cookType;
+        }
+
+        public String getDesc() {
+            return desc;
+        }
+
+        public void setDesc(String desc) {
+            this.desc = desc;
+        }
+
+        public String getEasyLevel() {
+            return easyLevel;
+        }
+
+        public void setEasyLevel(String easyLevel) {
+            this.easyLevel = easyLevel;
+        }
+
+        public String getEasyLevelDesc() {
+            return easyLevelDesc;
+        }
+
+        public void setEasyLevelDesc(String easyLevelDesc) {
+            this.easyLevelDesc = easyLevelDesc;
+        }
+
+        public Integer getEatCount() {
+            return eatCount;
+        }
+
+        public void setEatCount(Integer eatCount) {
+            this.eatCount = eatCount;
+        }
+
+        public String getExtInfo() {
+            return extInfo;
+        }
+
+        public void setExtInfo(String extInfo) {
+            this.extInfo = extInfo;
+        }
+
+        public String getFoodCategory() {
+            return foodCategory;
+        }
+
+        public void setFoodCategory(String foodCategory) {
+            this.foodCategory = foodCategory;
+        }
+
+        public String getFoodType() {
+            return foodType;
+        }
+
+        public void setFoodType(String foodType) {
+            this.foodType = foodType;
+        }
+
+        public String getFoods() {
+            return foods;
+        }
+
+        public void setFoods(String foods) {
+            this.foods = foods;
+        }
+
+        public Long getGmtCreate() {
+            return gmtCreate;
+        }
+
+        public void setGmtCreate(Long gmtCreate) {
+            this.gmtCreate = gmtCreate;
+        }
+
+        public Long getGmtModified() {
+            return gmtModified;
+        }
+
+        public void setGmtModified(Long gmtModified) {
+            this.gmtModified = gmtModified;
+        }
+
+        public Integer getId() {
+            return id;
+        }
+
+        public void setId(Integer id) {
+            this.id = id;
+        }
+
+        public Integer getIsControl() {
+            return isControl;
+        }
+
+        public void setIsControl(Integer isControl) {
+            this.isControl = isControl;
+        }
+
+        public Integer getIsFoodChannel() {
+            return isFoodChannel;
+        }
+
+        public void setIsFoodChannel(Integer isFoodChannel) {
+            this.isFoodChannel = isFoodChannel;
+        }
+
+        public Integer getIsMainShow() {
+            return isMainShow;
+        }
+
+        public void setIsMainShow(Integer isMainShow) {
+            this.isMainShow = isMainShow;
+        }
+
+        public Integer getIsShowControl() {
+            return isShowControl;
+        }
+
+        public void setIsShowControl(Integer isShowControl) {
+            this.isShowControl = isShowControl;
+        }
+
+        public Boolean getIsStar() {
+            return isStar;
+        }
+
+        public void setIsStar(Boolean isStar) {
+            this.isStar = isStar;
+        }
+
+        public Integer getLang() {
+            return lang;
+        }
+
+        public void setLang(Integer lang) {
+            this.lang = lang;
+        }
+
+        public String getLangDesc() {
+            return langDesc;
+        }
+
+        public void setLangDesc(String langDesc) {
+            this.langDesc = langDesc;
+        }
+
+        public String getMainImg() {
+            return mainImg;
+        }
+
+        public void setMainImg(String mainImg) {
+            this.mainImg = mainImg;
+        }
+
+        public List<String> getMainImgs() {
+            return mainImgs;
+        }
+
+        public void setMainImgs(List<String> mainImgs) {
+            this.mainImgs = mainImgs;
+        }
+
+        public String getName() {
+            return name;
+        }
+
+        public void setName(String name) {
+            this.name = name;
+        }
+
+        public String getPreVideo() {
+            return preVideo;
+        }
+
+        public void setPreVideo(String preVideo) {
+            this.preVideo = preVideo;
+        }
+
+        public List<String> getProductIds() {
+            return productIds;
+        }
+
+        public void setProductIds(List<String> productIds) {
+            this.productIds = productIds;
+        }
+
+        public Integer getSourceType() {
+            return sourceType;
+        }
+
+        public void setSourceType(Integer sourceType) {
+            this.sourceType = sourceType;
+        }
+
+        public String getStepVideo() {
+            return stepVideo;
+        }
+
+        public void setStepVideo(String stepVideo) {
+            this.stepVideo = stepVideo;
+        }
+
+        public String getTaste() {
+            return taste;
+        }
+
+        public void setTaste(String taste) {
+            this.taste = taste;
+        }
+
+        public Integer getUseFoodLib() {
+            return useFoodLib;
+        }
+
+        public void setUseFoodLib(Integer useFoodLib) {
+            this.useFoodLib = useFoodLib;
+        }
+    }
+}

+ 38 - 12
BusinessCommon/src/main/java/com/develop/common/utils/CommonUtils.kt

@@ -1,18 +1,14 @@
 package com.develop.common.utils
 
 import android.os.Bundle
-import android.util.Log
-import com.blankj.utilcode.util.ToastUtils
 import com.develop.base.ext.appGlobalScope
 import com.develop.base.ext.navigateTo
 import com.develop.base.util.AppActivityManager
-import com.develop.base.util.MMkvUtils
 import com.develop.base.util.TopResumedAtyHolder
 import com.develop.base.util.TuyaEventEntity
 import com.develop.common.data_repo.FoodDataProvider
 import com.develop.common.food_sdk.FloatWindowManager
 import com.develop.common.router.Screens
-import com.develop.common.tag.CURRENT_LANGUAGE
 import com.develop.common.tag.MODE_TYPE
 import com.develop.common.tag.NUMBER_TAG
 import com.develop.common.tag.SOURCE_TAG
@@ -143,23 +139,53 @@ object CommonUtils {
         return false
     }
 
-     inline fun  <reified T: Any>getApplog(url: String, apiVersion: String, json: String): T? {
-        var any: T? = null
+    fun <T> getTuyaBean(
+        url: String,
+        apiVersion: String,
+        json: String,
+        t: Class<T>,
+        tuyaHttp: TuyaHttp<T>
+    ) {
         appGlobalScope.launch(Dispatchers.IO) {
             var httpResponse = TuyaUtils.ioTSDKManager.httpRequest(url, apiVersion, json)
             var str = ""
-            if (httpResponse.errorCode==0){
-                str  = httpResponse.result
-            }else{
-                return@launch
+            if (httpResponse.errorCode == 0) {
+                str = httpResponse.result
+            }
+            withContext(Dispatchers.Main){
+                tuyaHttp.bean(GsonUtils.GsonToBean(str,t))
+            }
+
+        }
+
+    }
+
+    fun <T> getTuyaList(
+        url: String,
+        apiVersion: String,
+        json: String,
+        t: Class<T>,
+        tuyaHttpList: TuyaHttpList<T>
+    ) {
+        appGlobalScope.launch(Dispatchers.IO) {
+            var httpResponse = TuyaUtils.ioTSDKManager.httpRequest(url, apiVersion, json)
+            var str = ""
+            if (httpResponse.errorCode == 0) {
+                str = httpResponse.result
             }
             withContext(Dispatchers.Main) {
-               any = gson.fromJson(str,T::class.java)
+                tuyaHttpList.bean(GsonUtils.jsonToList(str, t))
             }
         }
-         return  any
+    }
+
 
+    interface TuyaHttpList<T> {
+        fun bean(t: MutableList<T>)
     }
 
+    interface TuyaHttp<T> {
+        fun bean(t: T)
+    }
 
 }

+ 1 - 6
BusinessCommon/src/main/java/com/develop/common/widget/FoodContentView.kt

@@ -260,13 +260,8 @@ class FoodContentView : ConstraintLayout {
             if (foodSn.startsWith("011")){
                 binding.easyLayout.visibility = View.VISIBLE
                 content.level.let {
-                    var  difficultyLevel = if (it.isEmpty()){
-                        "easy"
-                    }else{
-                        it
-                    }
 
-                    binding.tvEasy.text = resources.getString(resources.getIdentifier(difficultyLevel, "string",context.packageName))
+                    binding.tvEasy.text = it
                 }
             }
 

+ 51 - 21
BusinessMain/src/main/java/com/develop/main/ui/ModeEntranceActivity.kt

@@ -1,29 +1,24 @@
 package com.develop.main.ui
 
-import android.content.Intent
 import android.graphics.Color
 import android.os.Bundle
-import android.util.DisplayMetrics
+import android.util.Log
 import android.view.LayoutInflater
 import android.view.View
 import android.view.ViewGroup.LayoutParams
-import android.view.ViewGroup.VIEW_LOG_TAG
 import android.widget.ImageView
 import android.widget.RelativeLayout
 import androidx.appcompat.widget.AppCompatTextView
 import androidx.lifecycle.MutableLiveData
 import androidx.recyclerview.widget.RecyclerView
-import androidx.room.Update
 import com.alibaba.android.arouter.facade.annotation.Route
 import com.blankj.utilcode.util.NetworkUtils
+import com.develop.base.ext.appGlobalScope
 import com.develop.base.ext.dimenRes
 import com.develop.base.ext.getGoneLogin
 import com.develop.base.ext.getModelNum
 import com.develop.base.ext.getSN
-import com.develop.base.ext.globalApp
-import com.develop.base.ext.isBrand011A
 import com.develop.base.ext.isBrand036I
-import com.develop.base.ext.isFrLanguage
 import com.develop.base.ext.isNightTheme
 import com.develop.base.ext.load
 import com.develop.base.ext.navigateTo
@@ -34,18 +29,16 @@ import com.develop.base.util.GlobalToast
 import com.develop.common.data_repo.FoodDataProvider
 import com.develop.base.util.MMkvUtils
 import com.develop.base.util.SerialportUtils
-import com.develop.base.util.SettingKeyBoardUtils
-import com.develop.base.util.TopResumedAtyHolder
 import com.develop.common.data_repo.db.DataFactory
-import com.develop.common.data_repo.db.RecipesType
 import com.develop.common.data_repo.db.entity.UserInfo
 import com.develop.common.dialog.LoadingDialog
 import com.develop.common.router.Screens
 import com.develop.common.tag.*
+import com.develop.common.tuya_bean.CategoryBean
 import com.develop.common.ui.CommonBindingActivity
 import com.develop.common.utils.AppVersionUtil
-import com.develop.common.utils.StringUtils
-import com.develop.common.utils.UpdateUtil
+import com.develop.common.utils.CommonUtils
+import com.develop.common.utils.TuyaUtils
 import com.develop.common.widget.EntranceData
 import com.develop.common.widget.EntranceItemView
 import com.develop.common.widget.EntranceType
@@ -53,22 +46,21 @@ import com.develop.main.R
 import com.develop.main.databinding.ActivityModeEntranceBinding
 import com.drake.brv.annotaion.DividerOrientation
 import com.drake.brv.utils.divider
-import com.drake.brv.utils.dividerSpace
 import com.drake.brv.utils.grid
 import com.drake.brv.utils.linear
 import com.drake.brv.utils.models
 import com.drake.brv.utils.setup
+import com.google.gson.Gson
 import com.kuyuntech.cofarcooking.device.sdk.constant.core.CommonEventTypes
 import com.kuyuntech.cofarcooking.device.sdk.constant.core.DevModes
 import com.kuyuntech.cofarcooking.device.sdk.constant.core.WorkModes
 import com.kuyuntech.cofarcooking.device.sdk.eventbus.event.DevCommonEvent
-import com.kuyuntech.cofarcooking.device.sdk.eventbus.event.DevPromptEvent
 import com.kuyuntech.cofarcooking.device.sdk.eventbus.event.DevStatusEvent
 import com.kuyuntech.cofarcooking.device.sdk.util.core.CofarSDK
 import com.smarx.notchlib.utils.ScreenUtil
-import com.tuya.smartai.iot_sdk.Log
-import org.alee.component.skin.service.ThemeSkinService
-import org.greenrobot.eventbus.EventBus
+import kotlinx.coroutines.Dispatchers
+import kotlinx.coroutines.launch
+import kotlinx.coroutines.withContext
 import org.greenrobot.eventbus.Subscribe
 import org.greenrobot.eventbus.ThreadMode
 
@@ -232,7 +224,7 @@ class ModeEntranceActivity : CommonBindingActivity<ActivityModeEntranceBinding>(
                     }
                 }.models =
                     if (sn.startsWith("045")) DataFactory.get045AEntranceData() else DataFactory.get053AEntranceData()
-            } else if (sn.startsWith("077")||sn.startsWith("025")) {
+            } else if (sn.startsWith("077") || sn.startsWith("025")) {
                 binding.contentView.setBackgroundColor(resources.getColor(com.develop.common.R.color.white))
                 binding.ivTab.setImageResource(com.develop.common.R.drawable.ic_tab_000)
                 binding.entranceRecycle.apply {
@@ -331,7 +323,8 @@ class ModeEntranceActivity : CommonBindingActivity<ActivityModeEntranceBinding>(
                             }
                         }
                     }
-                }.models = if (sn.startsWith("077"))DataFactory.get077AEntranceData()else DataFactory.get025NightEntranceData()
+                }.models =
+                    if (sn.startsWith("077")) DataFactory.get077AEntranceData() else DataFactory.get025NightEntranceData()
             } else {
                 binding.entranceRecycle.apply {
                     linear(RecyclerView.HORIZONTAL)
@@ -955,8 +948,9 @@ class ModeEntranceActivity : CommonBindingActivity<ActivityModeEntranceBinding>(
         }
 
         binding.helpLayout.setOnClickListener {
-            navigateTo(Screens.Setting.HELP)
-            binding.contentView.closeDrawers()
+            getappLog()
+//            navigateTo(Screens.Setting.HELP)
+//            binding.contentView.closeDrawers()
         }
 
         binding.ivAvatar.setOnClickListener {
@@ -1174,4 +1168,40 @@ class ModeEntranceActivity : CommonBindingActivity<ActivityModeEntranceBinding>(
 
 
     }
+
+    fun getappLog() {
+        var map = HashMap<String, Any>()
+        map["lang"] = "en"
+//        map["categoryIds"] = ""
+        map["menuId"] = 3690112
+//        map["pageSize"] = 30
+
+
+        var gson = Gson()
+        var json = gson.toJson(map)
+
+        appGlobalScope.launch (Dispatchers.IO){
+            var httpResponse =  TuyaUtils.ioTSDKManager.httpRequest("tuya.device.menu.get","1.0",json)
+            var str = httpResponse.result
+            withContext(Dispatchers.Main){
+                Log.d("TAG", "json:$str")
+            }
+
+        }
+
+//        CommonUtils.getTuyaList<CategoryBean>("tuya.device.menu.category.list", "2.0",
+//            json, CategoryBean::class.java, object : CommonUtils.TuyaHttpList<CategoryBean> {
+//                override fun bean(t: List<CategoryBean>) {
+//
+//                    t.forEach {
+//                        Log.e("TAG ASD","it name "+it.name)
+//                    }
+//
+//                }
+//
+//            })
+
+
+    }
+
 }

+ 222 - 112
BusinessMain/src/main/java/com/develop/main/viewmodel/HomeViewModel.kt

@@ -19,6 +19,10 @@ import com.develop.common.data_repo.net.Api
 import com.develop.common.data_repo.net.model.response.*
 import com.develop.common.tag.CURRENT_LANGUAGE
 import com.develop.common.tag.CURRENT_USER_ID
+import com.develop.common.tuya_bean.CategoryBean
+import com.develop.common.tuya_bean.RecipesListBean
+import com.develop.common.utils.CommonUtils
+import com.develop.common.utils.GsonUtils
 import com.develop.common.widget.HomeOrBack
 import com.drake.net.Get
 import com.drake.net.utils.scope
@@ -103,35 +107,79 @@ class HomeViewModel : BaseViewModel() {
     @SuppressLint("SuspiciousIndentation")
     @RequiresApi(Build.VERSION_CODES.N)
     fun queryRecipesCategory() {
-        var allSize = 0
-        scope(Dispatchers.IO) {
-            val result = FoodDataProvider.getDatabase().recipeDao().queryCategory().toMutableList()
-
-            categorySizeList.clear()
-            result.forEach {
-                val size = FoodDataProvider.getDatabase().recipeDao().queryRecipesByCategory(it.number ?: "").size
-                categorySizeList[it.number ?: ""] = if (size.toString() == "null") {
-                    "0"
-                } else {
-                    size.toString()
-                }
-            }
+        if (snModel.startsWith("099")) {
+            var lang = MMkvUtils.getString(CURRENT_LANGUAGE) ?: "en"
+            var map = HashMap<String, Any>()
+            map["lang"] = lang
+            var json = GsonUtils.GsonString(map)
+            CommonUtils.getTuyaList<CategoryBean>("tuya.device.menu.category.list", "2.0",
+                json, CategoryBean::class.java, object : CommonUtils.TuyaHttpList<CategoryBean> {
+                    override fun bean(t: MutableList<CategoryBean>) {
+                        /**
+                         * val code: String,
+                         *     val number: String?,
+                         *     val name: String?,
+                         *     val lang: String?,
+                         *     val updateTime: Long?,
+                         *     val createTime: Long?
+                         *     */
+                        var devRecipeCategoryList = mutableListOf<DevRecipeCategory>()
+                        devRecipeCategoryList.add(
+                            DevRecipeCategory(
+                                "",
+                                "",
+                                globalApp().getString(com.develop.common.R.string.all),
+                                lang,
+                                0,
+                                0
+                            )
+                        )
+                        t.forEach {
+                            var devRecipeCategory = DevRecipeCategory(
+                                it.id.toString(),
+                                "0",
+                                it.name,
+                                lang,
+                                it.gmtCreate,
+                                it.gmtModified
+                            )
+                            devRecipeCategoryList.add(devRecipeCategory)
+                        }
+                        localCategoryLiveData.postValue(devRecipeCategoryList)
+                    }
 
+                })
 
+        } else {
+            var allSize = 0
+            scope(Dispatchers.IO) {
+                val result =
+                    FoodDataProvider.getDatabase().recipeDao().queryCategory().toMutableList()
+                categorySizeList.clear()
+                result.forEach {
+                    val size = FoodDataProvider.getDatabase().recipeDao()
+                        .queryRecipesByCategory(it.number ?: "").size
+                    categorySizeList[it.number ?: ""] = if (size.toString() == "null") {
+                        "0"
+                    } else {
+                        size.toString()
+                    }
+                }
 
-            /** 由于之前是循环分类的数量导致
-             * 011 英语没有分类,导致ALL 是0 故在这做 优化处理
-             * 直接查询所有 有多少数量
-             * */
 
-            allSize =
-                FoodDataProvider.getDatabase().recipeDao().queryAllRecipe().toMutableList().size
-            categorySizeList[globalApp().getString(com.develop.common.R.string.all)] = allSize.toString()
+                /** 由于之前是循环分类的数量导致
+                 * 011 英语没有分类,导致ALL 是0 故在这做 优化处理
+                 * 直接查询所有 有多少数量
+                 * */
 
+                allSize =
+                    FoodDataProvider.getDatabase().recipeDao().queryAllRecipe().toMutableList().size
+                categorySizeList[globalApp().getString(com.develop.common.R.string.all)] =
+                    allSize.toString()
 
 
-            //由于011分类有0 需要单独处理分类为0的不显示
-            var resultNew = mutableListOf<DevRecipeCategory>()
+                //由于011分类有0 需要单独处理分类为0的不显示
+                var resultNew = mutableListOf<DevRecipeCategory>()
 
 //            //下面的判断,会导致错乱
 //            result.forEach {
@@ -155,9 +203,9 @@ class HomeViewModel : BaseViewModel() {
                     }
                 }
 
-            resultNew.sortBy {
-                it.name
-            }
+                resultNew.sortBy {
+                    it.name
+                }
 
 
 
@@ -165,119 +213,181 @@ class HomeViewModel : BaseViewModel() {
                 localCategoryLiveData.postValue(resultNew)
 
 
+            }
         }
+
+
     }
 
     /**查询本地对应菜谱分类下的菜谱列表信息*/
     fun queryLocalRecipes(categoryNum: String) {
-        scope(Dispatchers.IO) {
-            startSize = 0
-            endSize = 12
-            localFavoriteRecipesList =
-                FoodDataProvider.getUserDatabase().userInfoDao().queryFavoriteRecipes(userId)
-                    .toMutableList()
-
-            /**
-             * 2023.11.20新需求 A-Z排序 在食谱列表页面分类项所有项加上A-Z排序这一栏
-             * */
-
-
-            //获取所有的分类
-            totalLocalRecipes =
-                if (categoryNum == globalApp().getString(com.develop.common.R.string.all)) FoodDataProvider.getDatabase()
-                    .recipeDao()
-                    .queryAllRecipeStartLetter(letter).toMutableList() else {
-                    //获取当前分类
-                    FoodDataProvider.getDatabase().recipeDao()
-                        .queryRecipesByCategoryStartLetter(categoryNum, letter)
+        if (snModel.startsWith("099")) {
+            var lang = MMkvUtils.getString(CURRENT_LANGUAGE) ?: "en"
+
+            var titleMap = HashMap<String, Any>()
+            var map = HashMap<String, Any>()
+            map["lang"] = lang
+            map["categoryIds"] = categoryNum
+            map["pageNo"] = 0
+            map["pageSize"] = 30
+
+            titleMap["queryJson"] = map
+
+            var gson = Gson()
+            var json = gson.toJson(titleMap)
+
+
+            CommonUtils.getTuyaBean<RecipesListBean>("tuya.device.menu.lang.list", "1.0",
+                json, RecipesListBean::class.java, object : CommonUtils.TuyaHttp<RecipesListBean> {
+                    override fun bean(t: RecipesListBean) {
+                        var foodContentList = mutableListOf<FoodContentModel>()
+                        /**
+                         *  val cover: Any,
+                         *     val foodName: String,
+                         *     val starCount: Int,
+                         *     val time: String,
+                         *     val level: String,
+                         *     val isNetRecipes: Boolean = false,
+                         *     val hasDownloaded: Boolean = false,
+                         *     val isLike: Boolean = false,
+                         *     val foodId: String = "1",
+                         *     val recipesEdition: String? = "1.0",
+                         *     val useNum: Int = 0
+                         * */
+                        t.data.forEach {
+                            foodContentList.add(
+                                FoodContentModel(
+                                    it.mainImg,
+                                    it.name,
+                                    5,
+                                    it.gmtModified.toString(),
+                                    it.easyLevelDesc,
+                                    true,
+                                    false,
+                                    !it.isStar,
+                                    it.id.toString(),
+                                    it.eatCount.toString(),
+                                    0
+                                )
+                            )
+                        }
+
+
+                    }
+
+                })
+        } else {
+            scope(Dispatchers.IO) {
+                startSize = 0
+                endSize = 12
+                localFavoriteRecipesList =
+                    FoodDataProvider.getUserDatabase().userInfoDao().queryFavoriteRecipes(userId)
                         .toMutableList()
-                }
-            //如果首字母没有的情况下,再获取包含  --- 011客户不需要包含
-            if (totalLocalRecipes.isEmpty() && !snModel.startsWith("011")) {
+
+                /**
+                 * 2023.11.20新需求 A-Z排序 在食谱列表页面分类项所有项加上A-Z排序这一栏
+                 * */
+
+
+                //获取所有的分类
                 totalLocalRecipes =
                     if (categoryNum == globalApp().getString(com.develop.common.R.string.all)) FoodDataProvider.getDatabase()
                         .recipeDao()
-                        .queryAllRecipeLetter(letter).toMutableList() else {
+                        .queryAllRecipeStartLetter(letter).toMutableList() else {
                         //获取当前分类
                         FoodDataProvider.getDatabase().recipeDao()
-                            .queryRecipesByCategoryLetter(categoryNum, letter)
+                            .queryRecipesByCategoryStartLetter(categoryNum, letter)
                             .toMutableList()
                     }
-            }
-
-            //不知道为什么,排序最新时间,之前写的sortWith没有排序,估我在这自己写
-            //(snModel.startsWith("011")||snModel.startsWith("033"))
-            if (sortedType == SortedType.Newest){
-                totalLocalRecipes.sortWith(compareByDescending { it.updateTime })
-            }else{
-                totalLocalRecipes.sortWith(Comparator { t, t2 ->
-                    when (sortedType) {
-                        SortedType.Popular -> {
-                            if ((t.useNum ?: 0) > (t2.useNum ?: 0)) {
-                                return@Comparator -1
-                            } else if ((t.useNum ?: 0) == (t2.useNum ?: 0)) {
-                                return@Comparator 0
-                            } else {
-                                return@Comparator 1
-                            }
+                //如果首字母没有的情况下,再获取包含  --- 011客户不需要包含
+                if (totalLocalRecipes.isEmpty() && !snModel.startsWith("011")) {
+                    totalLocalRecipes =
+                        if (categoryNum == globalApp().getString(com.develop.common.R.string.all)) FoodDataProvider.getDatabase()
+                            .recipeDao()
+                            .queryAllRecipeLetter(letter).toMutableList() else {
+                            //获取当前分类
+                            FoodDataProvider.getDatabase().recipeDao()
+                                .queryRecipesByCategoryLetter(categoryNum, letter)
+                                .toMutableList()
                         }
+                }
 
-                        SortedType.Newest -> {
-                            if ((t.updateTime ?: 0L) > (t2.updateTime ?: 0L)) {
-                                return@Comparator 1
-                            } else if ((t.updateTime ?: 0L) == (t2.updateTime
-                                    ?: 0L)
-                            ) return@Comparator 0
-                            else {
-                                return@Comparator -1
+                //不知道为什么,排序最新时间,之前写的sortWith没有排序,估我在这自己写
+                //(snModel.startsWith("011")||snModel.startsWith("033"))
+                if (sortedType == SortedType.Newest) {
+                    totalLocalRecipes.sortWith(compareByDescending { it.updateTime })
+                } else {
+                    totalLocalRecipes.sortWith(Comparator { t, t2 ->
+                        when (sortedType) {
+                            SortedType.Popular -> {
+                                if ((t.useNum ?: 0) > (t2.useNum ?: 0)) {
+                                    return@Comparator -1
+                                } else if ((t.useNum ?: 0) == (t2.useNum ?: 0)) {
+                                    return@Comparator 0
+                                } else {
+                                    return@Comparator 1
+                                }
                             }
 
-                        }
+                            SortedType.Newest -> {
+                                if ((t.updateTime ?: 0L) > (t2.updateTime ?: 0L)) {
+                                    return@Comparator 1
+                                } else if ((t.updateTime ?: 0L) == (t2.updateTime
+                                        ?: 0L)
+                                ) return@Comparator 0
+                                else {
+                                    return@Comparator -1
+                                }
 
-                        SortedType.Score -> {
-                            val score1 = t.score?.toInt() ?: 0
-                            val score2 = t2.score?.toInt() ?: 0
-                            if (score1 > score2) {
-                                return@Comparator -1
-                            } else if (score1 == score2) {
-                                return@Comparator 0
-                            } else {
-                                return@Comparator 1
                             }
-                        }
 
-                        SortedType.A2Z -> {
-                            val score1 = t.name?.compareTo(t2.name ?: "") ?: 0
-                            if (score1 > 0) {
-                                return@Comparator 1
-                            } else if (score1 == 0) {
-                                return@Comparator 0
-                            } else {
-                                return@Comparator -1
+                            SortedType.Score -> {
+                                val score1 = t.score?.toInt() ?: 0
+                                val score2 = t2.score?.toInt() ?: 0
+                                if (score1 > score2) {
+                                    return@Comparator -1
+                                } else if (score1 == score2) {
+                                    return@Comparator 0
+                                } else {
+                                    return@Comparator 1
+                                }
+                            }
+
+                            SortedType.A2Z -> {
+                                val score1 = t.name?.compareTo(t2.name ?: "") ?: 0
+                                if (score1 > 0) {
+                                    return@Comparator 1
+                                } else if (score1 == 0) {
+                                    return@Comparator 0
+                                } else {
+                                    return@Comparator -1
+                                }
                             }
                         }
-                    }
-                })
+                    })
 
-            }
+                }
 
-            totalLocalSize = totalLocalRecipes.size
-            val localRecipeList = if (totalLocalSize < 12) {
-                hasMoreLocal = false
-                totalLocalRecipes
-            } else {
-                hasMoreLocal = true
-                totalLocalRecipes.subList(0, 12)
+                totalLocalSize = totalLocalRecipes.size
+                val localRecipeList = if (totalLocalSize < 12) {
+                    hasMoreLocal = false
+                    totalLocalRecipes
+                } else {
+                    hasMoreLocal = true
+                    totalLocalRecipes.subList(0, 12)
+                }
+                lastLocalRecipeList.clear()
+                lastLocalRecipeList.addAll(localRecipeList)
+                lastLocalRecipesShowList = DataFactory.genLocalRecipes(
+                    currCategoryName, localRecipeList, localFavoriteRecipesList, sortedType
+                )
+                localRecipesLiveData.postValue(
+                    lastLocalRecipesShowList
+                )
             }
-            lastLocalRecipeList.clear()
-            lastLocalRecipeList.addAll(localRecipeList)
-            lastLocalRecipesShowList = DataFactory.genLocalRecipes(
-                currCategoryName, localRecipeList, localFavoriteRecipesList, sortedType
-            )
-            localRecipesLiveData.postValue(
-                lastLocalRecipesShowList
-            )
         }
+
+
     }
 
     /**

+ 1 - 17
BusinessSetting/src/main/java/com/develop/setting/ui/AboutActivity.kt

@@ -42,6 +42,7 @@ import com.develop.common.dialog.CommonDialog
 import com.develop.common.dialog.RecipeUpdateDialog
 import com.develop.common.food_sdk.GlobalDevEvent
 import com.develop.common.router.Screens
+import com.develop.common.tuya_bean.CategoryBean
 import com.develop.common.ui.CommonBVMActivity
 import com.develop.common.utils.AppVersionUtil
 import com.develop.common.utils.CommonUtils
@@ -455,7 +456,6 @@ class AboutActivity : CommonBVMActivity<ActivityAboutBinding, AboutViewModel>()
         }
 
         binding.tvAppVersion.setOnClickListener {
-//            getappLog()
             adbCount++
             if (adbCount >= 7) {
                 adbCount = 0
@@ -538,23 +538,7 @@ class AboutActivity : CommonBVMActivity<ActivityAboutBinding, AboutViewModel>()
 
     }
 
-    fun getappLog(){
-        var map = HashMap<String,Any>()
-        map["lang"] = "es"
-        var gson = Gson()
-        var json = gson.toJson(map)
-        appGlobalScope.launch (Dispatchers.IO){
-            var httpResponse =  TuyaUtils.ioTSDKManager.httpRequest("tuya.device.menu.category.lists","1.0",json)
-            var str = httpResponse.result
-            withContext(Dispatchers.Main){
-                Log.d("TAG", "json:$str")
-            }
-
-        }
 
-//      var tuya =   CommonUtils.getApplog<TuyaEvent>("tuya.device.menu.category.list","1.0",json)
-
-    }
 
     fun installPackage(context: Context, apk: File) {
         try {

+ 5 - 6
BusinessSetting/src/main/java/com/develop/setting/ui/SettingMainActivity.kt

@@ -116,8 +116,8 @@ class SettingMainActivity : CommonBindingActivity<ActivitySettingMainBinding>()
         } else if (sn.startsWith("032D")  || sn.startsWith("010F") || sn.startsWith("033")) {
             DataFactory.genSetting032DModesList(resources)
         } else if (sn.startsWith("011")) {
-            DataFactory.genSetting011AModesList(resources)
-//            DataFactory.genSetting030AModesList(resources)
+//            DataFactory.genSetting011AModesList(resources)
+            DataFactory.genSetting030AModesList(resources)
         } else if (sn.startsWith("030A")||sn.startsWith("032E")) {
             DataFactory.genSetting030AModesList(resources)
         } else if (sn.startsWith("036I")|| sn.startsWith("058A") || sn.startsWith("058B")) {
@@ -506,9 +506,8 @@ class SettingMainActivity : CommonBindingActivity<ActivitySettingMainBinding>()
         } else if (sn.startsWith("032D") || sn.startsWith("010F") || sn.startsWith("033")) {
             DataFactory.genSetting032DModesList(resources)
         } else if (sn.startsWith("011")) {
-//            DataFactory.genSetting030AModesList(resources)
-            DataFactory.genSetting011AModesList(resources)
-
+//            DataFactory.genSetting011AModesList(resources)
+            DataFactory.genSetting030AModesList(resources)
         } else if (sn.startsWith("030A")||sn.startsWith("032E")) {
             DataFactory.genSetting030AModesList(resources)
         } else if (sn.startsWith("036I")|| sn.startsWith("058A") || sn.startsWith("058B")) {
@@ -541,7 +540,7 @@ class SettingMainActivity : CommonBindingActivity<ActivitySettingMainBinding>()
          * getGoneTuYa  是否需要涂鸦功能
          * **/
         if (onIsResume && !isTuya && !getGoneTuYa()) {
-            getDevTuya()
+//            getDevTuya()
         }
     }
 

+ 122 - 53
BusinessStep/src/main/java/com/develop/step/viewmodel/CookDetailViewModel.kt

@@ -1,5 +1,6 @@
 package com.develop.step.viewmodel
 
+import android.util.Log
 import androidx.lifecycle.LiveData
 import androidx.lifecycle.MutableLiveData
 import androidx.lifecycle.scopeNetLife
@@ -7,14 +8,18 @@ import com.blankj.utilcode.util.FileUtils
 import com.blankj.utilcode.util.GsonUtils
 import com.blankj.utilcode.util.ToastUtils
 import com.blankj.utilcode.util.ZipUtils
+import com.develop.base.ext.appGlobalScope
 import com.develop.base.ext.fromJson
+import com.develop.base.ext.getSN
 import com.develop.base.ext.globalApp
 import com.develop.base.mvvm.BaseViewModel
 import com.develop.base.util.FileKit
 import com.develop.base.util.MMkvUtils
 import com.develop.base.util.ThreadUtils
 import com.develop.common.data_repo.FoodDataProvider
+import com.develop.common.data_repo.db.FoodContentModel
 import com.develop.common.data_repo.db.entity.DevAccessory
+import com.develop.common.data_repo.db.entity.DevRecipe
 import com.develop.common.data_repo.db.entity.DevRecipeCategory
 import com.develop.common.data_repo.db.entity.DevRecipePortionSize
 import com.develop.common.data_repo.db.entity.UserOnLineRecipes
@@ -24,16 +29,25 @@ import com.develop.common.data_repo.net.model.response.RecipeDataConfig
 import com.develop.common.data_repo.net.model.response.RecipeDetailResult
 import com.develop.common.tag.CURRENT_LANGUAGE
 import com.develop.common.tag.CURRENT_USER_ID
+import com.develop.common.tuya_bean.RecipesBean
+import com.develop.common.tuya_bean.RecipesListBean
+import com.develop.common.utils.CommonUtils
 import com.develop.common.utils.Resource
+import com.develop.common.utils.TuyaUtils
 import com.develop.step.ui.recipes_detail.model.CookDetailInfo
 import com.drake.net.Get
 import com.drake.net.component.Progress
 import com.drake.net.interfaces.ProgressListener
+import com.google.gson.Gson
+import kotlinx.coroutines.Dispatchers
+import kotlinx.coroutines.launch
+import kotlinx.coroutines.withContext
 import kotlinx.serialization.decodeFromString
 import kotlinx.serialization.json.Json
 import java.io.File
 
 class CookDetailViewModel : BaseViewModel() {
+    var sn = getSN()
     var recipeLiveData = MutableLiveData<CookDetailInfo>()
     private val errorLiveData = MutableLiveData<Int>()
     val starCountLiveData = MutableLiveData<Int>()
@@ -56,64 +70,120 @@ class CookDetailViewModel : BaseViewModel() {
      *          [DevRecipePortionSize] 食谱原料用量
      */
     fun queryRecipe(number: String, remote: Boolean, recipesEdition: String) {
-        isRemote = remote
-        this.recipeNumber = number
-        if (remote) {
-            scopeNetLife {
-                Get<RecipeDetailResult>(Api.GET_RECIPES_DETAIL) {
-                    addQuery("recipeNumber", number)
+        if (sn.startsWith("099")) {
+            var lang = MMkvUtils.getString(CURRENT_LANGUAGE) ?: "en"
+
+            var map = HashMap<String, Any>()
+            map["lang"] = lang
+            map["menuId"] = number
+
+
+            var gson = Gson()
+            var json = gson.toJson(map)
+
+            CommonUtils.getTuyaBean<RecipesBean>("tuya.device.menu.lang.list", "1.0",
+                json, RecipesBean::class.java, object : CommonUtils.TuyaHttp<RecipesBean> {
+                    override fun bean(t: RecipesBean) {
+
+                        /**
+                         *      val code: String,
+                         *     val number: String?,
+                         *     val edition: String?,
+                         *     val lang: String?,
+                         *     val photo: String?,
+                         *     val photoPath: String?,
+                         *     val prepareHours: Int?,
+                         *     val prepareMinutes: Int?,
+                         *     val makeHours: Int?,
+                         *     val makeMinutes: Int?,
+                         *     val restHours: Int?,
+                         *     val restMinutes: Int?,
+                         *     val recipeCategoryNumber: String?,
+                         *     val difficultyLevel: String?,
+                         *     val compatibleVersion: String?,
+                         *     val name: String?,
+                         *     val introduction: String?,
+                         *     val score: Double?,
+                         *     val useNum: Long?,
+                         *     val updateTime: Long?,
+                         *     val createTime: Long?,
+                         *     val foodDescription: String?,
+                         *     val chefRec: String?
+                         * */
+
+                        var prepareHours = 0
+                        var prepareMinutes = 0
+
+
+
+
+//                        var devRecipe = DevRecipe(t.id.toString(),t.id.toString(),"1.0",lang,"",t.mainImg,)
+
+                    }
+
+                })
+
+        } else {
+            isRemote = remote
+            this.recipeNumber = number
+            if (remote) {
+                scopeNetLife {
+                    Get<RecipeDetailResult>(Api.GET_RECIPES_DETAIL) {
+                        addQuery("recipeNumber", number)
 //                    addQuery("recipeEditon", recipesEdition)
-                    addQuery("lang", MMkvUtils.getString(CURRENT_LANGUAGE) ?: "EN")
-                }.await().apply {
-                    mRecipeUrl = recipeUrl
-                    val detailInfo = CookDetailInfo(
-                        devRecipe,
-                        devAccessorys,
-                        devRecipeFoods,
-                        devRecipeNutritions,
-                        devRecipePortionSizes
-                    )
-                    portionSizeLiveData.postValue(detailInfo.portionSize.firstOrNull())
-                    recipeLiveData.postValue(detailInfo)
+                        addQuery("lang", MMkvUtils.getString(CURRENT_LANGUAGE) ?: "EN")
+                    }.await().apply {
+                        mRecipeUrl = recipeUrl
+                        val detailInfo = CookDetailInfo(
+                            devRecipe,
+                            devAccessorys,
+                            devRecipeFoods,
+                            devRecipeNutritions,
+                            devRecipePortionSizes
+                        )
+                        portionSizeLiveData.postValue(detailInfo.portionSize.firstOrNull())
+                        recipeLiveData.postValue(detailInfo)
+                    }
+                }.catch {
+                    ToastUtils.showShort(it.message)
                 }
-            }.catch {
-                ToastUtils.showShort(it.message)
-            }
 
-            if (FoodDataProvider.isResourceDownload(number)) {
-                downloadResource.value = Resource(100, Resource.Status.SUCCESS)
-            }
-        } else {
-            FoodDataProvider.getDatabase().runInTransaction {
-                val recipeDao = FoodDataProvider.getDatabase().recipeDao()
-                val recipeBean = recipeDao.queryRecipe(number)
-                if (recipeBean == null) {
-                    // show toast
-                    errorLiveData.postValue(ERR_NO_RECIPE_MATCH)
-                    return@runInTransaction
+                if (FoodDataProvider.isResourceDownload(number)) {
+                    downloadResource.value = Resource(100, Resource.Status.SUCCESS)
                 }
-                val includeAccessory = mutableListOf<DevAccessory>()
-                val accessoryIds = recipeDao.queryAccessoryIds(number)
-                for (accessoryId in accessoryIds) {
-                    val accessory = recipeDao.queryAccessory(accessoryId.accessoryNumber ?: "")
-                    if (accessory != null) {
-                        includeAccessory.add(accessory)
+            } else {
+                FoodDataProvider.getDatabase().runInTransaction {
+                    val recipeDao = FoodDataProvider.getDatabase().recipeDao()
+                    val recipeBean = recipeDao.queryRecipe(number)
+                    if (recipeBean == null) {
+                        // show toast
+                        errorLiveData.postValue(ERR_NO_RECIPE_MATCH)
+                        return@runInTransaction
                     }
+                    val includeAccessory = mutableListOf<DevAccessory>()
+                    val accessoryIds = recipeDao.queryAccessoryIds(number)
+                    for (accessoryId in accessoryIds) {
+                        val accessory = recipeDao.queryAccessory(accessoryId.accessoryNumber ?: "")
+                        if (accessory != null) {
+                            includeAccessory.add(accessory)
+                        }
+                    }
+                    val includeMaterial = recipeDao.queryFood(number)
+                    val includeNutrition = recipeDao.queryNutrition(number)
+                    val includePortionSize = recipeDao.queryPortionSize(number)
+                    val detailInfo = CookDetailInfo(
+                        recipeBean,
+                        includeAccessory,
+                        includeMaterial,
+                        includeNutrition,
+                        includePortionSize
+                    )
+                    portionSizeLiveData.postValue(detailInfo.portionSize.firstOrNull())
+                    recipeLiveData.postValue(detailInfo)
                 }
-                val includeMaterial = recipeDao.queryFood(number)
-                val includeNutrition = recipeDao.queryNutrition(number)
-                val includePortionSize = recipeDao.queryPortionSize(number)
-                val detailInfo = CookDetailInfo(
-                    recipeBean,
-                    includeAccessory,
-                    includeMaterial,
-                    includeNutrition,
-                    includePortionSize
-                )
-                portionSizeLiveData.postValue(detailInfo.portionSize.firstOrNull())
-                recipeLiveData.postValue(detailInfo)
             }
         }
+
     }
 
     fun getRecipeLiveData(): LiveData<CookDetailInfo> {
@@ -227,8 +297,8 @@ class CookDetailViewModel : BaseViewModel() {
                      * **/
                     contentData.devRecipes.forEach {
                         var number = it.number ?: ""
-                        var lang = it.lang ?:"EN"
-                        deleteNumAndLangRecipe(number,lang)
+                        var lang = it.lang ?: "EN"
+                        deleteNumAndLangRecipe(number, lang)
                     }
                     //删除步骤 和其他一些
                     recipeNumber?.let {
@@ -241,7 +311,6 @@ class CookDetailViewModel : BaseViewModel() {
                     }
 
 
-
 //                    deleteRecipe(recipeNumber)
                     insertDevAccessorys(contentData.devAccessorys)
                     insertHotTags(contentData.devHotTags)

+ 2 - 1
app/proguard-rules.pro

@@ -19,5 +19,6 @@
 # If you keep the line number information, uncomment this to
 # hide the original source file name.
 #-renamesourcefileattribute SourceFile
+-keepattributes Signature
 -keep class com.tuya.smartai.iot_sdk.** {*;}
--keep class com.tencent.mars.** {*;}
+-keep class com.tencent.mars.** {*;}

+ 3 - 3
app/src/main/java/com/develop/foodcooking/MainActivity.kt

@@ -100,9 +100,9 @@ class MainActivity : CommonBindingActivity<ActivityMainBinding>() {
 //            getAppTuya(true)
 //        }
 
-//        getAppTuya(true)
-
-        getDevInfo()
+        getAppTuya(true)
+//
+//        getDevInfo()
 
     }
 

BIN
libThirdPart/libs/cofar-cooking-device-sdk-0.0.1-SNAPSHOT.jar