From cb642724c54d7d850aec5e5ee27fcc7186f352d7 Mon Sep 17 00:00:00 2001 From: luqingyang <lqy5492@163.com> Date: 星期二, 24 十月 2023 17:28:18 +0800 Subject: [PATCH] 物品管理和机构 相关代码 --- consum-model-pojo/src/main/java/com/consum/model/po/BaseGoodsTemplate_mapper.java | 38 consum-model-pojo/src/main/java/com/consum/model/vo/BaseGoodsTemplateVo.java | 22 deploy-jar-single/src/main/java/com/consum/test/CodeGeneratorServiceTest.java | 18 consum-model-pojo/src/main/java/com/consum/model/po/FinSysTenantUser_mapper.java | 582 +++++++ consum-base/src/main/java/com/consum/base/pojo/BaseGoodsTemplateParam.java | 102 + consum-base/src/main/java/com/consum/base/pojo/FinSysTenantParam.java | 79 consum-base/src/main/java/com/consum/base/FinOrgCacheProvider.java | 23 consum-base/src/main/java/com/consum/base/FinSysTenantUserCacheProvider.java | 26 consum-model-pojo/src/main/java/com/consum/model/po/BaseGoodsModels_mapper.java | 32 consum-model-pojo/src/main/java/com/consum/model/po/FinSysOrg_mapper.java | 413 +++++ consum-model-pojo/src/main/java/com/consum/model/po/FinSysOrg.java | 377 ++++ consum-base/src/main/java/com/consum/base/controller/BaseGoodsTemplateController.java | 103 + consum-model-pojo/src/main/java/com/consum/model/po/FinSysTenant_mapper.java | 733 ++++++++ consum-base/src/main/java/com/consum/base/controller/BaseCategoryController.java | 8 consum-base/src/main/java/com/consum/base/service/BaseGoodsModelsServiceImpl.java | 14 consum-base/src/main/java/com/consum/base/service/BaseCategoryServiceImpl.java | 4 consum-model-pojo/src/main/java/com/consum/model/po/BaseGoodsModels.java | 44 consum-model-pojo/src/main/java/com/consum/model/po/FinSysTenant.java | 920 +++++++++++ consum-model-pojo/src/main/java/com/consum/model/po/BaseGoodsTemplate.java | 52 consum-base/src/main/java/com/consum/base/Constants.java | 8 consum-base/src/main/java/com/consum/base/controller/FinSysTenantController.java | 107 + consum-base/src/main/java/com/consum/base/pojo/FinSysTenantSearchParam.java | 75 consum-model-pojo/src/main/java/com/consum/model/po/FinSysTenantUser.java | 741 +++++++++ consum-base/src/main/java/com/consum/base/FinSysTenantCacheProvider.java | 44 consum-base/src/main/java/com/consum/base/service/BaseGoodsTemplateServiceImpl.java | 188 ++ consum-base/src/main/java/com/consum/base/core/CodeGeneratorService.java | 5 consum-base/src/main/java/com/consum/base/BaseController.java | 30 consum-base/src/main/java/com/consum/base/service/FinSysTenantServiceImpl.java | 132 + 28 files changed, 4,848 insertions(+), 72 deletions(-) diff --git a/consum-base/src/main/java/com/consum/base/BaseController.java b/consum-base/src/main/java/com/consum/base/BaseController.java index 5dc03e8..b379508 100644 --- a/consum-base/src/main/java/com/consum/base/BaseController.java +++ b/consum-base/src/main/java/com/consum/base/BaseController.java @@ -1,11 +1,41 @@ package com.consum.base; +import com.consum.model.po.FinSysTenantUser; import com.iplatform.base.PlatformAdapterController; +import com.iplatform.base.util.UserUtils; import com.iplatform.core.BeanContextAware; +import com.iplatform.model.po.S_user_core; public abstract class BaseController extends PlatformAdapterController { protected TokenCacheProvider getTokenCache() { return BeanContextAware.getBeanByType(TokenCacheProvider.class); } + + protected FinOrgCacheProvider getFinOrgCache() { + return BeanContextAware.getBeanByType(FinOrgCacheProvider.class); + } + + protected FinSysTenantUserCacheProvider getFinSysTenantUserCache() { + return BeanContextAware.getBeanByType(FinSysTenantUserCacheProvider.class); + } + + protected FinSysTenantCacheProvider getFinSysTenantCache() { + return BeanContextAware.getBeanByType(FinSysTenantCacheProvider.class); + } + + /** + * @Description 鑾峰彇鍚庡彴鐧诲綍鐢ㄦ埛淇℃伅 + * @Author wh + * @Date 2023/7/25 9:59 + */ + protected FinSysTenantUser getSysInfo() { + S_user_core userInfo = UserUtils.getUserInfo(); + FinSysTenantUser finSysTenantUser = new FinSysTenantUser(); + if (userInfo.getId() == null) { + return finSysTenantUser; + } + // 浠庣紦瀛樹腑鍙栧嚭鐢ㄦ埛锛屽鏋滄病鏈夊垯鏂板 + return this.getFinSysTenantUserCache().get(String.valueOf(userInfo.getId())); + } } diff --git a/consum-base/src/main/java/com/consum/base/Constants.java b/consum-base/src/main/java/com/consum/base/Constants.java index 32c7e8c..177ffd2 100644 --- a/consum-base/src/main/java/com/consum/base/Constants.java +++ b/consum-base/src/main/java/com/consum/base/Constants.java @@ -48,9 +48,9 @@ public static final Integer LEVELS_TWO = 2; public static final Integer LEVELS_THREE = 3; - //鐗╁搧鍒嗙被STATES 1=姝e父锛�2=绂佺敤锛�3=宸插垹闄� - public static final Integer CATEGORY_ENABLE = 1; - public static final Integer CATEGORY_DISABLE = 2; - public static final Integer CATEGORY_DELETED = 3; + //STATES 1=姝e父锛�2=绂佺敤锛�3=宸插垹闄� + public static final Integer STATES_ENABLE = 1; + public static final Integer STATES_DISABLE = 2; + public static final Integer STATES_DELETED = 3; } diff --git a/consum-base/src/main/java/com/consum/base/FinOrgCacheProvider.java b/consum-base/src/main/java/com/consum/base/FinOrgCacheProvider.java new file mode 100644 index 0000000..a664d9f --- /dev/null +++ b/consum-base/src/main/java/com/consum/base/FinOrgCacheProvider.java @@ -0,0 +1,23 @@ +package com.consum.base; + +import com.consum.model.po.FinSysOrg; + +/** + * 璐㈡斂鍘呰繍缁寸郴缁熺粍缁囨満鏋勭紦瀛樸�� + * <pre> + * 1) key = 鍚屾杩囨潵鐨勬満鏋刬d锛岄绠楃郴缁熺殑鏈烘瀯ID锛屾垜浠殏鏃舵垚涓�"code" + * 2) value = 缂撳瓨瀵硅薄涓轰粠鏁版嵁搴撹鍑虹殑鏈烘瀯銆� + * </pre> + * @author 鏃跺厠鑻� + * @date 2023-07-05 + */ +public interface FinOrgCacheProvider { + + FinSysOrg get(String orgCode); + + void save(FinSysOrg e); + + void update(FinSysOrg e); + + void remove(String orgCode); +} \ No newline at end of file diff --git a/consum-base/src/main/java/com/consum/base/FinSysTenantCacheProvider.java b/consum-base/src/main/java/com/consum/base/FinSysTenantCacheProvider.java new file mode 100644 index 0000000..c68a2c2 --- /dev/null +++ b/consum-base/src/main/java/com/consum/base/FinSysTenantCacheProvider.java @@ -0,0 +1,44 @@ +package com.consum.base; + + +import com.consum.model.po.FinSysTenant; + +import java.util.List; + + +/** + * 璐㈡斂鍘呰繍缁寸郴缁熺粍缁囨満鏋勭紦瀛樸�� + * <pre> + * 1) key = "code" + * 2) value = 缂撳瓨瀵硅薄涓轰粠鏁版嵁搴撹鍑虹殑鍖哄垝銆� + * </pre> + * @author wyh + * @date 2023-07-05 + * @date 2023-07-26 澧炲姞鏍规嵁ID鑾峰彇缂撳瓨瀵硅薄鏂规硶銆� + */ +public interface FinSysTenantCacheProvider { + + FinSysTenant get(String code); + + void save(FinSysTenant e); + + void update(FinSysTenant e); + + void remove(String code); + + /** + * 鏍规嵁ID锛堜富閿級锛岃幏鍙栧尯鍒掑璞★紝璇ユ柟娉曞湪鑾峰彇涓婄骇鍖哄垝鏃朵娇鐢紝鍘熸湁鏂规硶鏃犳硶瀹炵幇銆� + * @param id + * @return + * @author 鏃跺厠鑻� + * @date 2023-07-26 + */ + FinSysTenant getById(String id); + + /** + * @Description 鑾峰彇鍏ㄩ儴 + * @Author wh + * @Date 2023/9/6 17:31 + */ + List<FinSysTenant> selectAll(); +} \ No newline at end of file diff --git a/consum-base/src/main/java/com/consum/base/FinSysTenantUserCacheProvider.java b/consum-base/src/main/java/com/consum/base/FinSysTenantUserCacheProvider.java new file mode 100644 index 0000000..cdbc8cb --- /dev/null +++ b/consum-base/src/main/java/com/consum/base/FinSysTenantUserCacheProvider.java @@ -0,0 +1,26 @@ +package com.consum.base; + +import com.consum.model.po.FinSysTenantUser; + +/** + * 鍚庡彴鐧诲綍鐢ㄦ埛缂撳瓨 + * @author 鐜嬫兜 + * @date 2023-07-18 + */ +public interface FinSysTenantUserCacheProvider { + + FinSysTenantUser get(String userId); + + void save(FinSysTenantUser e); + + void update(FinSysTenantUser e); + + void remove(String userId); + + /** + * @Description 姝ゅ鍙槸鐢ㄤ簬鏌ヨ瀹㈡湇鏄惁鍦ㄧ嚎鏃跺�欎娇鐢� + * @Author wh + * @Date 2023/9/15 18:00 + */ + FinSysTenantUser getByUserId(String userId); +} \ No newline at end of file diff --git a/consum-base/src/main/java/com/consum/base/controller/BaseCategoryController.java b/consum-base/src/main/java/com/consum/base/controller/BaseCategoryController.java index 6e03ebd..b975c77 100644 --- a/consum-base/src/main/java/com/consum/base/controller/BaseCategoryController.java +++ b/consum-base/src/main/java/com/consum/base/controller/BaseCategoryController.java @@ -101,9 +101,8 @@ /** * 淇敼鐘舵�� - * * @author 鍗㈠簡闃� - * @date 2023/9/27 + * @date 2023/10/23 */ //鍒嗙被涓嬫湁姝e父鐘舵�佺殑鐗╁搧鏃讹紝涓嶅厑璁哥鐢� @PostMapping("/updStatus") @@ -137,10 +136,9 @@ } /** - * 鏍规嵁鑺傜偣id鏌ヨ鑺傜偣璇︽儏 - * + * 鏍规嵁鐗╁搧id鏌ヨ鑺傜偣璇︽儏 * @author 鍗㈠簡闃� - * @date 2023/9/26 + * @Date 2023/10/23 */ @GetMapping("/detail") public ResponseValue getById(Long id) { diff --git a/consum-base/src/main/java/com/consum/base/controller/BaseGoodsTemplateController.java b/consum-base/src/main/java/com/consum/base/controller/BaseGoodsTemplateController.java new file mode 100644 index 0000000..94e042f --- /dev/null +++ b/consum-base/src/main/java/com/consum/base/controller/BaseGoodsTemplateController.java @@ -0,0 +1,103 @@ +package com.consum.base.controller; + +import com.consum.base.BaseController; +import com.consum.base.pojo.BaseCategoryParam; +import com.consum.base.pojo.BaseGoodsTemplateParam; +import com.consum.base.service.BaseCategoryServiceImpl; +import com.consum.base.service.BaseGoodsTemplateServiceImpl; +import com.consum.model.po.BaseCategory; +import com.consum.model.po.BaseGoodsTemplate; +import com.consum.model.vo.BaseGoodsTemplateVo; +import com.iplatform.model.po.S_user_core; +import com.walker.db.page.GenericPager; +import com.walker.infrastructure.utils.StringUtils; +import com.walker.web.ResponseValue; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.util.CollectionUtils; +import org.springframework.web.bind.annotation.*; + +import java.util.List; + +/** + * @Description 鐗╁搧妯℃澘 + * @Author 鍗㈠簡闃� + * @Date 2023/10/24 + */ +@RestController +@RequestMapping("/pc/base/goods/template") +public class BaseGoodsTemplateController extends BaseController { + + @Autowired + private BaseGoodsTemplateServiceImpl baseGoodsTemplateService; + + /** + * @Description 鏂板鐗╁搧妯℃澘 + * @Author 鍗㈠簡闃� + * @Date 2023/10/24 + */ + @PostMapping("/add") + public ResponseValue add(@RequestBody BaseGoodsTemplateParam param) { + if (param.getCategoryId() == null) { + return ResponseValue.error("鍒嗙被涓虹┖"); + } + if (StringUtils.isEmpty(param.getGoodsName())) { + return ResponseValue.error("鐗╁搧鍚嶇О涓虹┖"); + } + //鍒ゆ柇鍚屼竴鍒嗙被涓嬬殑鐗╁搧鍚嶇О鏄惁閲嶅 + BaseGoodsTemplate goodsTemplate = this.baseGoodsTemplateService.getByGoodsNameAndCategoryId(param.getGoodsName(), param.getCategoryId()); + if (goodsTemplate != null) { + return ResponseValue.error("鐗╁搧鍚嶇О宸插瓨鍦�"); + } + + int result = this.baseGoodsTemplateService.add(param, this.getCurrentUser()); + if (result > 0) return ResponseValue.success(1); + return ResponseValue.error("鏂板澶辫触锛�"); + } + + /** + * @Description 鐗╁搧妯℃澘鍒楄〃鏌ヨ + * @Author 鍗㈠簡闃� + * @Date 2023/10/24 + */ + @GetMapping("/list") + public ResponseValue queryList(BaseGoodsTemplateParam param) { + S_user_core currentUser = this.getCurrentUser(); + if (currentUser == null) { + return ResponseValue.error("鐧诲綍鐢ㄦ埛淇℃伅涓嶅瓨鍦�"); + } + GenericPager<BaseGoodsTemplate> pager = this.baseGoodsTemplateService.queryList(param); + return ResponseValue.success(pager); + } + + /** + * 鏍规嵁鐗╁搧id鏌ヨ鐗╁搧璇︽儏 + * @author 鍗㈠簡闃� + * @date 2023/9/26 + */ + @GetMapping("/detail") + public ResponseValue getById(Long id) { + if (id == null) { + return ResponseValue.error("鐗╁搧id涓虹┖"); + } + BaseGoodsTemplateVo vo = this.baseGoodsTemplateService.getById(id); + if (vo == null) return ResponseValue.error("鏌ヨ澶辫触锛�"); + return ResponseValue.success("鏌ヨ鎴愬姛!", vo); + } + + /** + * @Description 缂栬緫 + * @Author 鍗㈠簡闃� + * @Date 2023/10/24 + */ + @PostMapping("/edit") + public ResponseValue edit(@RequestBody BaseGoodsTemplateParam param) { + if (StringUtils.isEmpty(param.getGoodsName())) { + return ResponseValue.error("鐗╁搧鍚嶇О涓虹┖"); + } + + int num = this.baseGoodsTemplateService.updateBaseGoodsTemplate(param); + return num > 0 ? ResponseValue.success(1) : ResponseValue.error("缂栬緫澶辫触锛�"); + } + +} + diff --git a/consum-base/src/main/java/com/consum/base/controller/FinSysTenantController.java b/consum-base/src/main/java/com/consum/base/controller/FinSysTenantController.java new file mode 100644 index 0000000..0eeb8e6 --- /dev/null +++ b/consum-base/src/main/java/com/consum/base/controller/FinSysTenantController.java @@ -0,0 +1,107 @@ +package com.consum.base.controller; + +import com.consum.base.BaseController; +import com.consum.base.pojo.FinSysTenantParam; +import com.consum.base.pojo.FinSysTenantSearchParam; +import com.consum.base.service.FinSysTenantServiceImpl; +import com.consum.model.po.FinSysTenant; +import com.consum.model.po.FinSysTenantUser; +import com.walker.db.page.GenericPager; +import com.walker.infrastructure.utils.StringUtils; +import com.walker.web.ResponseValue; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import java.util.HashMap; + +/** + * @Description 绯荤粺鏈烘瀯 + * @Author 鍗㈠簡闃� + * @Date 2023/10/23 + */ +@RestController +@RequestMapping("/pc/fin/sys/tenant") +public class FinSysTenantController extends BaseController { + + @Autowired + private FinSysTenantServiceImpl finSysTenantService; + + /** + * 娣诲姞鏈烘瀯 + * @author 鍗㈠簡闃� + * @date 2023/10/4 + */ + @PostMapping("/add") + public ResponseValue add(@RequestBody FinSysTenantParam param){ + if (param == null) { + return ResponseValue.error("鍙傛暟涓虹┖"); + } + if (StringUtils.isEmpty(param.getCode())) { + return ResponseValue.error("鏈烘瀯缂栧彿涓虹┖"); + } + if (StringUtils.isEmpty(param.getName())) { + return ResponseValue.error("鏈烘瀯鍚嶇О涓虹┖"); + } + if (param.getParentId() == null) { + return ResponseValue.error("涓婄骇鏈烘瀯涓嶅瓨鍦�"); + } + //鏍规嵁鏈烘瀯id鏌ヨ鏈烘瀯 + FinSysTenant sysTenant = this.finSysTenantService.selectByTenantId(param.getCode()); + if (sysTenant != null) { + return ResponseValue.error("鏈烘瀯缂栧彿宸插瓨鍦�"); + } + String parentIdStr = param.getParentId() + ""; + int lv = parentIdStr.length() / 3 + 1; + if (lv > 4) { + return ResponseValue.error("涓嶈兘鍒涘缓鏀眬浠ヤ笅鏈烘瀯"); + } + + int num = this.finSysTenantService.addSysTenant(param,this.getCurrentUser(),lv); + if(num>0) return ResponseValue.success(1); + return ResponseValue.error("鎻掑叆澶辫触锛�"); + } + + /** + * @Description 鍒嗛〉鍒楄〃鏌ヨ + * @Author 鍗㈠簡闃� + * @Date 2023/10/24 + */ +// @RequestMapping("/select/list") + @RequestMapping("/select/list") + public ResponseValue allocatedList(FinSysTenantSearchParam param) { + FinSysTenantUser sysInfo = getSysInfo(); + if (sysInfo == null) { + return ResponseValue.error("鐧诲綍鐢ㄦ埛淇℃伅涓嶅瓨鍦�"); + } + GenericPager<FinSysTenant> pager = null; + StringBuilder whStr = new StringBuilder("where 1=1 and is_delete = 0 "); + HashMap<String, Object> paramts = new HashMap<>(); + if (param.getTenantId() == null) { + if (sysInfo.getLv() != 1) { + whStr.append(" and parent_id=:parent_id"); + paramts.put("parent_id", sysInfo.getTenantId()); + } + } + if (param.getStatus() != null) { + whStr.append(" and status = :status"); + paramts.put("status", param.getStatus()); + } + if (param.getTenantId() != null && param.getTenantId() != 0) { + whStr.append(" and parent_id=:parent_id"); + paramts.put("parent_id", param.getTenantId()); + } + if (param.getName() != null && !param.getName().equals("")) { + whStr.append(" and name like:name"); + paramts.put("name", "%" + param.getName() + "%"); + } + if (param.getCode() != null && !param.getCode().equals("")) { + whStr.append(" and code=:code"); + paramts.put("code", param.getCode()); + } + whStr.append(" order by code ASC "); + pager = this.finSysTenantService.selectSplit(new FinSysTenant(), whStr.toString(), paramts); + return ResponseValue.success(pager); + } + +} + diff --git a/consum-base/src/main/java/com/consum/base/core/CodeGeneratorService.java b/consum-base/src/main/java/com/consum/base/core/CodeGeneratorService.java index cfce9cc..ef2b354 100644 --- a/consum-base/src/main/java/com/consum/base/core/CodeGeneratorService.java +++ b/consum-base/src/main/java/com/consum/base/core/CodeGeneratorService.java @@ -74,10 +74,9 @@ * 鐢熸垚鐗╁搧缂栫爜 * * @param classify A,B,C - * @param type 1=闆嗛噰锛�2=鑷噰 * @return 鍏�8浣嶏紝 涓�浣嶇墿鍝佸垎绫伙紙A/B/C锛�+涓�浣嶇被鍨嬶紙1涓洪泦閲囷紝2涓鸿嚜閲囷級+6浣嶈繛缁暟瀛楀彿 */ - public synchronized String createGoodsTemplateCode(String classify, int type) { + public synchronized String createGoodsTemplateCode(String classify) { /* 1.SELECT CODE_INDEX from BASE_CODE_INDEXING where CODE_PREFIX=:CODE_PREFIX CODE_PREFIX鏄� prefix @@ -85,7 +84,7 @@ insert BASE_CODE_INDEXING CODE_INDEX=1 CODE_PREFIX鏄�=:prefix where CODE_PREFIX=:CODE_PREFIX; 2.濡傛灉鑳藉鑾峰彇鍒帮紝鍒欏皢CODE_INDEX=CODE_INDEX+1鍚庢洿鏂板埌鏁版嵁搴擄紝琛ュ叏鍓嶉潰鐨�"0"杩斿洖 "000001" */ - String prefix = classify + Integer.valueOf(type).toString(); + String prefix = classify; return createCodeByPrefix(prefix,6); } diff --git a/consum-base/src/main/java/com/consum/base/pojo/BaseGoodsTemplateParam.java b/consum-base/src/main/java/com/consum/base/pojo/BaseGoodsTemplateParam.java new file mode 100644 index 0000000..df1593e --- /dev/null +++ b/consum-base/src/main/java/com/consum/base/pojo/BaseGoodsTemplateParam.java @@ -0,0 +1,102 @@ +package com.consum.base.pojo; + +import com.consum.model.po.BaseGoodsModels; +import com.walker.web.param.ParamRequest; + +import java.util.List; + +public class BaseGoodsTemplateParam extends ParamRequest { + private Long id; + /** + * 鐗╁搧缂栫爜 + */ + private String goodsCode; + /** + * 鍒嗙被id + */ + private Long categoryId; + /** + * 鐗╁搧鍚嶇О + */ + private String goodsName; + /** + * 瑙勬牸鍨嬪彿 + */ + private List<BaseGoodsModels> models; + /** + * 鐘舵�� + */ + private Integer states; + /** + * 绫诲埆 + */ + private String classification; + /** + * 鏈烘瀯缂栧彿 + */ + private Long agencyId; + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public String getGoodsCode() { + return goodsCode; + } + + public void setGoodsCode(String goodsCode) { + this.goodsCode = goodsCode; + } + + public Long getCategoryId() { + return categoryId; + } + + public void setCategoryId(Long categoryId) { + this.categoryId = categoryId; + } + + public String getGoodsName() { + return goodsName; + } + + public void setGoodsName(String goodsName) { + this.goodsName = goodsName; + } + + public List<BaseGoodsModels> getModels() { + return models; + } + + public void setModels(List<BaseGoodsModels> models) { + this.models = models; + } + + public Integer getStates() { + return states; + } + + public void setStates(Integer states) { + this.states = states; + } + + public String getClassification() { + return classification; + } + + public void setClassification(String classification) { + this.classification = classification; + } + + public Long getAgencyId() { + return agencyId; + } + + public void setAgencyId(Long agencyId) { + this.agencyId = agencyId; + } +} diff --git a/consum-base/src/main/java/com/consum/base/pojo/FinSysTenantParam.java b/consum-base/src/main/java/com/consum/base/pojo/FinSysTenantParam.java new file mode 100644 index 0000000..64cbbd7 --- /dev/null +++ b/consum-base/src/main/java/com/consum/base/pojo/FinSysTenantParam.java @@ -0,0 +1,79 @@ +package com.consum.base.pojo; + +import com.walker.web.param.ParamRequest; + +public class FinSysTenantParam extends ParamRequest { + private Long id; + + private String code; + /** + * 涓婄骇id + */ + private Long parentId; + /** + * 鏈烘瀯鍚嶇О + */ + private String name; + private String summary; + private Integer status; + /** + * 椤哄簭鍙� + */ + private Integer orderNum; + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public String getCode() { + return code; + } + + public void setCode(String code) { + this.code = code; + } + + public Long getParentId() { + return parentId; + } + + public void setParentId(Long parentId) { + this.parentId = parentId; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public String getSummary() { + return summary; + } + + public void setSummary(String summary) { + this.summary = summary; + } + + public Integer getStatus() { + return status; + } + + public void setStatus(Integer status) { + this.status = status; + } + + public Integer getOrderNum() { + return orderNum; + } + + public void setOrderNum(Integer orderNum) { + this.orderNum = orderNum; + } +} diff --git a/consum-base/src/main/java/com/consum/base/pojo/FinSysTenantSearchParam.java b/consum-base/src/main/java/com/consum/base/pojo/FinSysTenantSearchParam.java new file mode 100644 index 0000000..c47ce0b --- /dev/null +++ b/consum-base/src/main/java/com/consum/base/pojo/FinSysTenantSearchParam.java @@ -0,0 +1,75 @@ +package com.consum.base.pojo; + +import com.walker.web.param.ParamRequest; + +public class FinSysTenantSearchParam extends ParamRequest { + + // 鐖剁骇id + private Long tenantId; + + private String name; + private String code; + //name鐨勭涓�涓瓧绗︾殑棣栧瓧姣� ,渚嬪ABcD + private String firstZmS; + + private Integer pageSize; + private Integer pageNum; + + private Integer status;// 鐘舵�� ( 0 绂佺敤 1 姝e父) + + public Integer getStatus() { + return status; + } + + public void setStatus(Integer status) { + this.status = status; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public String getCode() { + return code; + } + + public void setCode(String code) { + this.code = code; + } + + public Integer getPageSize() { + return pageSize; + } + + public void setPageSize(Integer pageSize) { + this.pageSize = pageSize; + } + + public Integer getPageNum() { + return pageNum; + } + + public void setPageNum(Integer pageNum) { + this.pageNum = pageNum; + } + + public String getFirstZmS() { + return firstZmS; + } + + public void setFirstZmS(String firstZmS) { + this.firstZmS = firstZmS; + } + + public Long getTenantId() { + return tenantId; + } + + public void setTenantId(Long parentId) { + this.tenantId = parentId; + } +} diff --git a/consum-base/src/main/java/com/consum/base/service/BaseCategoryServiceImpl.java b/consum-base/src/main/java/com/consum/base/service/BaseCategoryServiceImpl.java index 0e79236..f45ac8b 100644 --- a/consum-base/src/main/java/com/consum/base/service/BaseCategoryServiceImpl.java +++ b/consum-base/src/main/java/com/consum/base/service/BaseCategoryServiceImpl.java @@ -125,7 +125,7 @@ * @Date 2023/10/23 */ public int updateById(BaseCategory baseCategory, S_user_core currentUser) { - baseCategory.setStates(Constants.CATEGORY_DELETED); + baseCategory.setStates(Constants.STATES_DELETED); //鍒犻櫎鏃堕棿 baseCategory.setDTime(DateUtils.getDateTimeNumber(System.currentTimeMillis())); //鍒犻櫎浜篿d鍜屽垹闄や汉濮撳悕 @@ -137,7 +137,7 @@ /** * 鏍规嵁鑺傜偣id鏌ヨ鑺傜偣璇︽儏 * @author 鍗㈠簡闃� - * @date 2023/9/26 + * @Date 2023/10/23 */ public BaseCategory getById(Long id) { return this.get(new BaseCategory(id)); diff --git a/consum-base/src/main/java/com/consum/base/service/BaseGoodsModelsServiceImpl.java b/consum-base/src/main/java/com/consum/base/service/BaseGoodsModelsServiceImpl.java new file mode 100644 index 0000000..4212f0d --- /dev/null +++ b/consum-base/src/main/java/com/consum/base/service/BaseGoodsModelsServiceImpl.java @@ -0,0 +1,14 @@ +package com.consum.base.service; + +import com.walker.jdbc.service.BaseServiceImpl; +import org.springframework.stereotype.Service; + +/** + * @Description 鐗╁搧妯℃澘 + * @Author 鍗㈠簡闃� + * @Date 2023/10/23 + */ +@Service +public class BaseGoodsModelsServiceImpl extends BaseServiceImpl { + +} diff --git a/consum-base/src/main/java/com/consum/base/service/BaseGoodsTemplateServiceImpl.java b/consum-base/src/main/java/com/consum/base/service/BaseGoodsTemplateServiceImpl.java index 8b383bc..c5b0200 100644 --- a/consum-base/src/main/java/com/consum/base/service/BaseGoodsTemplateServiceImpl.java +++ b/consum-base/src/main/java/com/consum/base/service/BaseGoodsTemplateServiceImpl.java @@ -1,8 +1,22 @@ package com.consum.base.service; +import com.consum.base.Constants; +import com.consum.base.core.CodeGeneratorService; +import com.consum.base.pojo.BaseGoodsTemplateParam; +import com.consum.base.util.IdUtil; import com.consum.model.po.BaseCategory; +import com.consum.model.po.BaseGoodsModels; +import com.consum.model.po.BaseGoodsTemplate; +import com.consum.model.vo.BaseGoodsTemplateVo; +import com.iplatform.model.po.S_user_core; +import com.walker.db.page.GenericPager; +import com.walker.infrastructure.utils.DateUtils; +import com.walker.infrastructure.utils.StringUtils; import com.walker.jdbc.service.BaseServiceImpl; +import org.springframework.beans.BeanUtils; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; +import org.springframework.util.CollectionUtils; import java.util.HashMap; import java.util.List; @@ -15,11 +29,18 @@ @Service public class BaseGoodsTemplateServiceImpl extends BaseServiceImpl { + @Autowired + private CodeGeneratorService codeGeneratorService; + @Autowired + private BaseCategoryServiceImpl baseCategoryService; + @Autowired + private BaseGoodsModelsServiceImpl baseGoodsModelsService; + /** - * @Description 鏍规嵁鍒嗙被id鍜岀姸鎬佹煡璇㈢墿鍝佹ā鐗� + * @return + * @Description 鏍规嵁鍒嗙被id鍜岀姸鎬佹煡璇㈢墿鍝佹ā鐗� * @Author 鍗㈠簡闃� * @Date 2023/10/23 - * @return */ public List<BaseCategory> getByCategoryId(Long categoryId) { StringBuilder sql = new StringBuilder("SELECT * FROM base_goods_template WHERE 1 = 1 "); @@ -34,4 +55,167 @@ return this.select(sql.toString(), paramts, new BaseCategory()); } + + /** + * @Description 鏂板鐗╁搧妯℃澘 + * @Author 鍗㈠簡闃� + * @Date 2023/10/24 + */ + public int add(BaseGoodsTemplateParam param, S_user_core currentUser) { + //1.鏂板鐗╁搧妯℃澘 + BaseGoodsTemplate baseGoodsTemplate = new BaseGoodsTemplate(); + BeanUtils.copyProperties(param, baseGoodsTemplate); + long goodsTemplatesId = IdUtil.generateId(); + baseGoodsTemplate.setId(goodsTemplatesId); + //NumberGenerator.getLongSequenceNumber() + //鏍规嵁鍒嗙被id鏌ヨ鍒嗙被 + BaseCategory baseCategory = this.baseCategoryService.get(new BaseCategory(param.getCategoryId())); + if (baseCategory != null) { + String classification = baseCategory.getClassification(); + //鐗╁搧缂栫爜 + String goodsCode = codeGeneratorService.createGoodsTemplateCode(classification); + baseGoodsTemplate.setGoodsCode(goodsCode); + //绫诲埆 + baseGoodsTemplate.setClassification(classification); + } + //TODO 涓�绾т簩绾т笁绾ф満鏋勭紪鍙� + //褰撳墠鏈烘瀯鐨勭埗绾ф満鏋勭紪鍙� + //鏈烘瀯灞傜骇 + //鏈烘瀯缂栧彿 + //鏈烘瀯鍚嶇О + //鍒涘缓鏃堕棿 + long createTime = DateUtils.getDateTimeNumber(System.currentTimeMillis()); + baseGoodsTemplate.setCreateDate(createTime); + int flag1 = this.insert(baseGoodsTemplate); + + //2.鏂板瑙勬牸鍨嬪彿 + List<BaseGoodsModels> models = param.getModels(); + int flag2 = 0; + if (!CollectionUtils.isEmpty(models)) { + for (BaseGoodsModels model : models) { + model.setId(IdUtil.generateId()); + model.setStates(Constants.STATES_ENABLE); + model.setGoodsTemplatesId(goodsTemplatesId); + model.setCreateTime(createTime); + } + flag2 = this.baseGoodsModelsService.insert(models); + } + + if (flag1 > 0 && flag2 > 0) { + return 1; + } else { + return 0; + } + } + + /** + * @Description 鐗╁搧妯℃澘鍒楄〃鏌ヨ + * @Author 鍗㈠簡闃� + * @Date 2023/10/24 + */ + public GenericPager<BaseGoodsTemplate> queryList(BaseGoodsTemplateParam param) { + StringBuilder sql = new StringBuilder("SELECT * FROM base_goods_template WHERE 1 = 1 "); + HashMap<String, Object> paramts = new HashMap<>(); + + //鐗╁搧鍚嶇О + if (!StringUtils.isEmpty(param.getGoodsName())) { + sql.append(" and goods_name like:goods_name "); + paramts.put("goods_name", StringUtils.CHAR_PERCENT + param.getGoodsName() + StringUtils.CHAR_PERCENT); + } + //鐗╁搧缂栧彿 + if (!StringUtils.isEmpty(param.getGoodsCode())) { + sql.append(" and goods_code like:goods_code "); + paramts.put("goods_code", StringUtils.CHAR_PERCENT + param.getGoodsCode() + StringUtils.CHAR_PERCENT); + } + //鍒嗙被id + if (param.getCategoryId() != null) { + sql.append(" and category_id =:category_id "); + paramts.put("category_id", param.getCategoryId()); + } + //绫诲埆 + if (!StringUtils.isEmpty(param.getClassification())) { + sql.append(" and classification =:classification "); + paramts.put("classification", param.getClassification()); + } + //鎵�灞炴満鏋� + if (param.getAgencyId() != null) { + sql.append(" and agency_id =:agency_id "); + paramts.put("agency_id", param.getAgencyId()); + } + //鐘舵�� + if (param.getStates() != null) { + sql.append(" and states =:states "); + paramts.put("states", param.getStates()); + } + sql.append(" ORDER BY CREATE_DATE DESC "); + + return selectSplit(sql.toString(), paramts, new BaseGoodsTemplate()); + } + + /** + * 鏍规嵁鐗╁搧id鏌ヨ鐗╁搧璇︽儏 + * @author 鍗㈠簡闃� + * @date 2023/9/26 + */ + public BaseGoodsTemplateVo getById(Long id) { + //1.鏍规嵁鐗╁搧id鏌ヨ鐗╁搧妯℃澘 + BaseGoodsTemplate goodsTemplate = this.get(new BaseGoodsTemplate(id)); + //2.鏍规嵁鐗╁搧id鏌ヨ瑙勬牸鍨嬪彿 + StringBuilder sql = new StringBuilder("SELECT * FROM base_goods_models WHERE 1 = 1 "); + HashMap<String, Object> paramts = new HashMap<>(); + //鎵�灞炵墿鍝佹ā鐗堢紪鍙� + sql.append(" and goods_templates_id =:goods_templates_id "); + paramts.put("goods_templates_id", id); + List<BaseGoodsModels> modelsList = this.select(sql.toString(), paramts, new BaseGoodsModels()); + + //3.灏佽 + BaseGoodsTemplateVo vo = new BaseGoodsTemplateVo(); + if (goodsTemplate != null) { + BeanUtils.copyProperties(goodsTemplate,vo); + } + if (!CollectionUtils.isEmpty(modelsList)) { + vo.setModels(modelsList); + } + return vo; + } + + /** + * @Description 缂栬緫 + * @Author 鍗㈠簡闃� + * @Date 2023/10/24 + */ + public int updateBaseGoodsTemplate(BaseGoodsTemplateParam param) { + //1.淇敼鐗╁搧妯℃澘 + BaseGoodsTemplate baseGoodsTemplate = new BaseGoodsTemplate(); + BeanUtils.copyProperties(param, baseGoodsTemplate); + int flag1 = this.update(baseGoodsTemplate); + //2.淇敼瑙勬牸鍨嬪彿鐨勫崟浣� + List<BaseGoodsModels> modelsList = param.getModels(); + int flag2 = this.update(modelsList); + + if (flag1 > 0 && flag2 > 0) { + return 1; + } else { + return 0; + } + } + + /** + * @Description 鏍规嵁鐗╁搧鍚嶇О鍜屽垎绫籭d鏌ヨ鐗╁搧 + * @Author 鍗㈠簡闃� + * @Date 2023/10/24 + */ + public BaseGoodsTemplate getByGoodsNameAndCategoryId(String goodsName, Long categoryId) { + StringBuilder sql = new StringBuilder("SELECT * FROM base_goods_template WHERE 1 = 1 "); + HashMap<String, Object> paramts = new HashMap<>(); + + //鐗╁搧鍚嶇О + sql.append(" and goods_name =:goods_name "); + paramts.put("goods_name", goodsName); + //鍒嗙被id + sql.append(" and category_id =:category_id "); + paramts.put("category_id", categoryId); + + return this.get(sql.toString(), paramts, new BaseGoodsTemplate()); + } } diff --git a/consum-base/src/main/java/com/consum/base/service/FinSysTenantServiceImpl.java b/consum-base/src/main/java/com/consum/base/service/FinSysTenantServiceImpl.java new file mode 100644 index 0000000..d916f93 --- /dev/null +++ b/consum-base/src/main/java/com/consum/base/service/FinSysTenantServiceImpl.java @@ -0,0 +1,132 @@ +package com.consum.base.service; + +import com.consum.base.pojo.FinSysTenantParam; +import com.consum.model.po.FinSysTenant; +import com.iplatform.model.po.S_user_core; +import com.walker.infrastructure.utils.CollectionUtils; +import com.walker.infrastructure.utils.DateUtils; +import com.walker.infrastructure.utils.StringUtils; +import com.walker.jdbc.service.BaseServiceImpl; +import org.springframework.stereotype.Service; + +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +/** + * @Description 绯荤粺鏈烘瀯 + * @Author 鍗㈠簡闃� + * @Date 2023/10/23 + */ +@Service +public class FinSysTenantServiceImpl extends BaseServiceImpl { + + private static final String QUERY_BY_PARENT_CODE = "SELECT * FROM fin_sys_tenant WHERE CODE = ?"; + + /** + * @Description 鏍规嵁鏈烘瀯id鏌ヨ鏈烘瀯 + * @Author 鍗㈠簡闃� + * @Date 2023/10/23 + */ + public FinSysTenant selectByTenantId(String code) { + List<FinSysTenant> select = this.select(QUERY_BY_PARENT_CODE, new Object[]{code}, new FinSysTenant()); + if (StringUtils.isEmptyList(select)) { + return null; + } else { + return select.get(0); + } + } + + /** + * 娣诲姞鏈烘瀯 + * @author 鍗㈠簡闃� + * @date 2023/10/4 + */ + public int addSysTenant(FinSysTenantParam param, S_user_core currentUser, int lv) { + FinSysTenant sysTenant = new FinSysTenant(); + + //id鍜宼empId + StringBuilder sql = new StringBuilder("SELECT max(id) FROM fin_sys_tenant WHERE 1=1"); + HashMap<String, Object> paramts = new HashMap<>(); + + sql.append(" and parent_id =:parent_id"); + paramts.put("parent_id", param.getParentId()); + + List<Map<String, Object>> list = this.select(sql.toString(), paramts); + long id = 0L; + if (!CollectionUtils.isEmpty(list) && list.get(0).get("max(id)") != null) { + id = (Long) list.get(0).get("max(id)") + 1; + } else { + id = param.getParentId() * 1000 + 1; + } + sysTenant.setTempId(id); + sysTenant.setId(id); + sysTenant.setStatus(param.getStatus()); + + sysTenant.setParentId(param.getParentId()); + sysTenant.setCode(param.getCode()); + sysTenant.setName(param.getName()); + sysTenant.setCreateTime(DateUtils.getDateTimeNumber(System.currentTimeMillis())); + sysTenant.setSummary(param.getSummary()); + sysTenant.setCreateBy(currentUser.getUser_name()); + //璁剧疆鍚勫眰绾d鍙婂悕绉� + sysTenant.setLv(lv); + setLvIdAndName(param, sysTenant, id, lv); + + return this.insert(sysTenant); + } + + /** + * 璁剧疆鍚勫眰绾d鍙婂悕绉� + * + * @author 鍗㈠簡闃� + * @date 2023/10/4 + */ + private void setLvIdAndName(FinSysTenantParam param, FinSysTenant sysTenant, long id, int lv) { + if (lv == 2) { //鏂板甯傜骇鏈烘瀯 + //鏌ヨ涓婁竴绾� - 鐪佺骇 + FinSysTenant finSysTenant1 = this.get(new FinSysTenant(param.getParentId())); + if (finSysTenant1 != null) { + sysTenant.setLv1Id(finSysTenant1.getId()); + sysTenant.setLv1Name(finSysTenant1.getName()); + sysTenant.setLv2Id(id); + sysTenant.setLv2Name(param.getName()); + } + } else if (lv == 3) { //鏂板鍘跨骇鏈烘瀯 + //鏌ヨ涓婁竴绾� - 甯傜骇 + FinSysTenant finSysTenant2 = this.get(new FinSysTenant(param.getParentId())); + if (finSysTenant2 != null) { + //鏌ヨ涓婁竴绾� - 鐪佺骇 + FinSysTenant finSysTenant1 = this.get(new FinSysTenant(finSysTenant2.getParentId())); + + sysTenant.setLv1Id(finSysTenant1.getId()); + sysTenant.setLv1Name(finSysTenant1.getName()); + sysTenant.setLv2Id(finSysTenant2.getId()); + sysTenant.setLv2Name(finSysTenant2.getName()); + sysTenant.setLv3Id(id); + sysTenant.setLv3Name(param.getName()); + } + } else if (lv == 4) { //鏂板鏀眬鏈烘瀯 + //鏌ヨ涓婁竴绾� - 鍘跨骇 + FinSysTenant finSysTenant3 = this.get(new FinSysTenant(param.getParentId())); + if (finSysTenant3 != null) { + //鏌ヨ涓婁竴绾� - 甯傜骇 + FinSysTenant finSysTenant2 = this.get(new FinSysTenant(finSysTenant3.getParentId())); + if (finSysTenant2 != null) { + //鏌ヨ涓婁竴绾� - 鐪佺骇 + FinSysTenant sysTenant1 = this.get(new FinSysTenant(finSysTenant2.getParentId())); + if (sysTenant1 != null) { + sysTenant.setLv1Id(sysTenant1.getId()); + sysTenant.setLv1Name(sysTenant1.getName()); + sysTenant.setLv2Id(finSysTenant2.getId()); + sysTenant.setLv2Name(finSysTenant2.getName()); + sysTenant.setLv3Id(finSysTenant3.getId()); + sysTenant.setLv3Name(finSysTenant3.getName()); + sysTenant.setLv4Id(id); + sysTenant.setLv4Name(param.getName()); + } + } + } + } + } +} diff --git a/consum-model-pojo/src/main/java/com/consum/model/po/BaseGoodsModels.java b/consum-model-pojo/src/main/java/com/consum/model/po/BaseGoodsModels.java index 4a1f3b3..ea8f5bf 100644 --- a/consum-model-pojo/src/main/java/com/consum/model/po/BaseGoodsModels.java +++ b/consum-model-pojo/src/main/java/com/consum/model/po/BaseGoodsModels.java @@ -32,9 +32,17 @@ @JsonIgnore protected boolean isset_goodsTemplatesId = false; + private String unit = null; + @JsonIgnore + protected boolean isset_unit = false; + private Integer orderNumber = null; @JsonIgnore protected boolean isset_orderNumber = false; + + private Long createTime = null; + @JsonIgnore + protected boolean isset_createTime = false; /** * 榛樿鏋勯�犲嚱鏁� @@ -113,6 +121,20 @@ return this.goodsTemplatesId == null; } + public String getUnit() { + return this.unit; + } + + public void setUnit(String unit) { + this.unit = unit; + this.isset_unit = true; + } + + @JsonIgnore + public boolean isEmptyUnit() { + return this.unit == null || this.unit.length() == 0; + } + public Integer getOrderNumber() { return this.orderNumber; } @@ -127,6 +149,20 @@ return this.orderNumber == null; } + public Long getCreateTime() { + return this.createTime; + } + + public void setCreateTime(Long createTime) { + this.createTime = createTime; + this.isset_createTime = true; + } + + @JsonIgnore + public boolean isEmptyCreateTime() { + return this.createTime == null; + } + /** * 閲嶅啓 toString() 鏂规硶 */ @@ -137,7 +173,9 @@ .append("modelName=").append(this.modelName) .append("states=").append(this.states) .append("goodsTemplatesId=").append(this.goodsTemplatesId) + .append("unit=").append(this.unit) .append("orderNumber=").append(this.orderNumber) + .append("createTime=").append(this.createTime) .toString(); } @@ -164,9 +202,15 @@ if (this.isset_goodsTemplatesId) { base_goods_models.setGoodsTemplatesId(this.getGoodsTemplatesId()); } + if (this.isset_unit) { + base_goods_models.setUnit(this.getUnit()); + } if (this.isset_orderNumber) { base_goods_models.setOrderNumber(this.getOrderNumber()); } + if (this.isset_createTime) { + base_goods_models.setCreateTime(this.getCreateTime()); + } return base_goods_models; } } diff --git a/consum-model-pojo/src/main/java/com/consum/model/po/BaseGoodsModels_mapper.java b/consum-model-pojo/src/main/java/com/consum/model/po/BaseGoodsModels_mapper.java index 64977aa..a725d8a 100644 --- a/consum-model-pojo/src/main/java/com/consum/model/po/BaseGoodsModels_mapper.java +++ b/consum-model-pojo/src/main/java/com/consum/model/po/BaseGoodsModels_mapper.java @@ -31,7 +31,9 @@ public static final String ModelName = "model_name"; public static final String States = "states"; public static final String GoodsTemplatesId = "goods_templates_id"; + public static final String Unit = "unit"; public static final String OrderNumber = "order_number"; + public static final String CreateTime = "create_time"; /** * 榛樿鏋勯�犲嚱鏁� @@ -54,8 +56,14 @@ if (baseGoodsModels.isset_goodsTemplatesId) { this.setGoodsTemplatesId(baseGoodsModels.getGoodsTemplatesId()); } + if (baseGoodsModels.isset_unit) { + this.setUnit(baseGoodsModels.getUnit()); + } if (baseGoodsModels.isset_orderNumber) { this.setOrderNumber(baseGoodsModels.getOrderNumber()); + } + if (baseGoodsModels.isset_createTime) { + this.setCreateTime(baseGoodsModels.getCreateTime()); } // 鍘绘帀锛�2022-09-07 // this.setDatabaseName_(base_goods_models.getDatabaseName_()); @@ -103,7 +111,9 @@ ib.set(ModelName, this.getModelName(), this.isset_modelName); ib.set(States, this.getStates(), this.isset_states); ib.set(GoodsTemplatesId, this.getGoodsTemplatesId(), this.isset_goodsTemplatesId); + ib.set(Unit, this.getUnit(), this.isset_unit); ib.set(OrderNumber, this.getOrderNumber(), this.isset_orderNumber); + ib.set(CreateTime, this.getCreateTime(), this.isset_createTime); return ib.genMapSql(); } @@ -116,7 +126,9 @@ ub.set(ModelName, this.getModelName(), this.isset_modelName); ub.set(States, this.getStates(), this.isset_states); ub.set(GoodsTemplatesId, this.getGoodsTemplatesId(), this.isset_goodsTemplatesId); + ub.set(Unit, this.getUnit(), this.isset_unit); ub.set(OrderNumber, this.getOrderNumber(), this.isset_orderNumber); + ub.set(CreateTime, this.getCreateTime(), this.isset_createTime); ub.where(this.getPkName_(), this.getPkValue_()); return ub.genMapSql(); } @@ -130,7 +142,9 @@ ub.set(ModelName, this.getModelName(), this.isset_modelName); ub.set(States, this.getStates(), this.isset_states); ub.set(GoodsTemplatesId, this.getGoodsTemplatesId(), this.isset_goodsTemplatesId); + ub.set(Unit, this.getUnit(), this.isset_unit); ub.set(OrderNumber, this.getOrderNumber(), this.isset_orderNumber); + ub.set(CreateTime, this.getCreateTime(), this.isset_createTime); return ub.genMapSql(where, parameters); } @@ -143,7 +157,9 @@ ub.set(ModelName, this.getModelName(), this.isset_modelName); ub.set(States, this.getStates(), this.isset_states); ub.set(GoodsTemplatesId, this.getGoodsTemplatesId(), this.isset_goodsTemplatesId); + ub.set(Unit, this.getUnit(), this.isset_unit); ub.set(OrderNumber, this.getOrderNumber(), this.isset_orderNumber); + ub.set(CreateTime, this.getCreateTime(), this.isset_createTime); return ub.genArraySql(where, parameters); } @@ -191,7 +207,7 @@ */ @Override public SqlAndParameters<Map<String, Object>> getSelectSql_(String where, Map<String, Object> parameters) { - return new SqlAndParameters<>("select id, model_name, states, goods_templates_id, order_number from " + this.getTableName_() + " " + where, parameters); + return new SqlAndParameters<>("select id, model_name, states, goods_templates_id, unit, order_number, create_time from " + this.getTableName_() + " " + where, parameters); } /** @@ -199,7 +215,7 @@ */ @Override public SqlAndParameters<Object[]> getSelectSql_(String where, Object[] parameters) { - return new SqlAndParameters<>("select id, model_name, states, goods_templates_id, order_number from " + this.getTableName_() + " " + where, parameters); + return new SqlAndParameters<>("select id, model_name, states, goods_templates_id, unit, order_number, create_time from " + this.getTableName_() + " " + where, parameters); } /** @@ -256,6 +272,10 @@ base_goods_models.setGoodsTemplatesId(rs.getLong(columnIndex)); } } + columnIndex = resultSetUtils.findColumn(rs, BaseGoodsModels_mapper.Unit); + if (columnIndex > 0) { + base_goods_models.setUnit(rs.getString(columnIndex)); + } columnIndex = resultSetUtils.findColumn(rs, BaseGoodsModels_mapper.OrderNumber); if (columnIndex > 0) { if (rs.getBigDecimal(columnIndex) == null) { @@ -264,6 +284,14 @@ base_goods_models.setOrderNumber(rs.getInt(columnIndex)); } } + columnIndex = resultSetUtils.findColumn(rs, BaseGoodsModels_mapper.CreateTime); + if (columnIndex > 0) { + if (rs.getBigDecimal(columnIndex) == null) { + base_goods_models.setCreateTime(null); + } else { + base_goods_models.setCreateTime(rs.getLong(columnIndex)); + } + } return base_goods_models; } } diff --git a/consum-model-pojo/src/main/java/com/consum/model/po/BaseGoodsTemplate.java b/consum-model-pojo/src/main/java/com/consum/model/po/BaseGoodsTemplate.java index 1100e5a..f857b66 100644 --- a/consum-model-pojo/src/main/java/com/consum/model/po/BaseGoodsTemplate.java +++ b/consum-model-pojo/src/main/java/com/consum/model/po/BaseGoodsTemplate.java @@ -28,7 +28,7 @@ @JsonIgnore protected boolean isset_goodsName = false; - private Integer classification = null; + private String classification = null; @JsonIgnore protected boolean isset_classification = false; @@ -39,10 +39,6 @@ private Long categoryId = null; @JsonIgnore protected boolean isset_categoryId = false; - - private String unit = null; - @JsonIgnore - protected boolean isset_unit = false; private Long fAgencyId = null; @JsonIgnore @@ -75,6 +71,10 @@ private Long createDate = null; @JsonIgnore protected boolean isset_createDate = false; + + private Integer type = null; + @JsonIgnore + protected boolean isset_type = false; /** * 榛樿鏋勯�犲嚱鏁� @@ -139,18 +139,18 @@ return this.goodsName == null || this.goodsName.length() == 0; } - public Integer getClassification() { + public String getClassification() { return this.classification; } - public void setClassification(Integer classification) { + public void setClassification(String classification) { this.classification = classification; this.isset_classification = true; } @JsonIgnore public boolean isEmptyClassification() { - return this.classification == null; + return this.classification == null || this.classification.length() == 0; } public Integer getStates() { @@ -179,20 +179,6 @@ @JsonIgnore public boolean isEmptyCategoryId() { return this.categoryId == null; - } - - public String getUnit() { - return this.unit; - } - - public void setUnit(String unit) { - this.unit = unit; - this.isset_unit = true; - } - - @JsonIgnore - public boolean isEmptyUnit() { - return this.unit == null || this.unit.length() == 0; } public Long getFAgencyId() { @@ -307,6 +293,20 @@ return this.createDate == null; } + public Integer getType() { + return this.type; + } + + public void setType(Integer type) { + this.type = type; + this.isset_type = true; + } + + @JsonIgnore + public boolean isEmptyType() { + return this.type == null; + } + /** * 閲嶅啓 toString() 鏂规硶 */ @@ -319,7 +319,6 @@ .append("classification=").append(this.classification) .append("states=").append(this.states) .append("categoryId=").append(this.categoryId) - .append("unit=").append(this.unit) .append("fAgencyId=").append(this.fAgencyId) .append("sAgencyId=").append(this.sAgencyId) .append("tAgencyId=").append(this.tAgencyId) @@ -328,6 +327,7 @@ .append("agencyId=").append(this.agencyId) .append("agencyName=").append(this.agencyName) .append("createDate=").append(this.createDate) + .append("type=").append(this.type) .toString(); } @@ -360,9 +360,6 @@ if (this.isset_categoryId) { base_goods_template.setCategoryId(this.getCategoryId()); } - if (this.isset_unit) { - base_goods_template.setUnit(this.getUnit()); - } if (this.isset_fAgencyId) { base_goods_template.setFAgencyId(this.getFAgencyId()); } @@ -387,6 +384,9 @@ if (this.isset_createDate) { base_goods_template.setCreateDate(this.getCreateDate()); } + if (this.isset_type) { + base_goods_template.setType(this.getType()); + } return base_goods_template; } } diff --git a/consum-model-pojo/src/main/java/com/consum/model/po/BaseGoodsTemplate_mapper.java b/consum-model-pojo/src/main/java/com/consum/model/po/BaseGoodsTemplate_mapper.java index d48c679..b20720b 100644 --- a/consum-model-pojo/src/main/java/com/consum/model/po/BaseGoodsTemplate_mapper.java +++ b/consum-model-pojo/src/main/java/com/consum/model/po/BaseGoodsTemplate_mapper.java @@ -33,7 +33,6 @@ public static final String Classification = "classification"; public static final String States = "states"; public static final String CategoryId = "category_id"; - public static final String Unit = "unit"; public static final String FAgencyId = "f_agency_id"; public static final String SAgencyId = "s_agency_id"; public static final String TAgencyId = "t_agency_id"; @@ -42,6 +41,7 @@ public static final String AgencyId = "agency_id"; public static final String AgencyName = "agency_name"; public static final String CreateDate = "create_date"; + public static final String Type = "type"; /** * 榛樿鏋勯�犲嚱鏁� @@ -70,9 +70,6 @@ if (baseGoodsTemplate.isset_categoryId) { this.setCategoryId(baseGoodsTemplate.getCategoryId()); } - if (baseGoodsTemplate.isset_unit) { - this.setUnit(baseGoodsTemplate.getUnit()); - } if (baseGoodsTemplate.isset_fAgencyId) { this.setFAgencyId(baseGoodsTemplate.getFAgencyId()); } @@ -96,6 +93,9 @@ } if (baseGoodsTemplate.isset_createDate) { this.setCreateDate(baseGoodsTemplate.getCreateDate()); + } + if (baseGoodsTemplate.isset_type) { + this.setType(baseGoodsTemplate.getType()); } // 鍘绘帀锛�2022-09-07 // this.setDatabaseName_(base_goods_template.getDatabaseName_()); @@ -145,7 +145,6 @@ ib.set(Classification, this.getClassification(), this.isset_classification); ib.set(States, this.getStates(), this.isset_states); ib.set(CategoryId, this.getCategoryId(), this.isset_categoryId); - ib.set(Unit, this.getUnit(), this.isset_unit); ib.set(FAgencyId, this.getFAgencyId(), this.isset_fAgencyId); ib.set(SAgencyId, this.getSAgencyId(), this.isset_sAgencyId); ib.set(TAgencyId, this.getTAgencyId(), this.isset_tAgencyId); @@ -154,6 +153,7 @@ ib.set(AgencyId, this.getAgencyId(), this.isset_agencyId); ib.set(AgencyName, this.getAgencyName(), this.isset_agencyName); ib.set(CreateDate, this.getCreateDate(), this.isset_createDate); + ib.set(Type, this.getType(), this.isset_type); return ib.genMapSql(); } @@ -168,7 +168,6 @@ ub.set(Classification, this.getClassification(), this.isset_classification); ub.set(States, this.getStates(), this.isset_states); ub.set(CategoryId, this.getCategoryId(), this.isset_categoryId); - ub.set(Unit, this.getUnit(), this.isset_unit); ub.set(FAgencyId, this.getFAgencyId(), this.isset_fAgencyId); ub.set(SAgencyId, this.getSAgencyId(), this.isset_sAgencyId); ub.set(TAgencyId, this.getTAgencyId(), this.isset_tAgencyId); @@ -177,6 +176,7 @@ ub.set(AgencyId, this.getAgencyId(), this.isset_agencyId); ub.set(AgencyName, this.getAgencyName(), this.isset_agencyName); ub.set(CreateDate, this.getCreateDate(), this.isset_createDate); + ub.set(Type, this.getType(), this.isset_type); ub.where(this.getPkName_(), this.getPkValue_()); return ub.genMapSql(); } @@ -192,7 +192,6 @@ ub.set(Classification, this.getClassification(), this.isset_classification); ub.set(States, this.getStates(), this.isset_states); ub.set(CategoryId, this.getCategoryId(), this.isset_categoryId); - ub.set(Unit, this.getUnit(), this.isset_unit); ub.set(FAgencyId, this.getFAgencyId(), this.isset_fAgencyId); ub.set(SAgencyId, this.getSAgencyId(), this.isset_sAgencyId); ub.set(TAgencyId, this.getTAgencyId(), this.isset_tAgencyId); @@ -201,6 +200,7 @@ ub.set(AgencyId, this.getAgencyId(), this.isset_agencyId); ub.set(AgencyName, this.getAgencyName(), this.isset_agencyName); ub.set(CreateDate, this.getCreateDate(), this.isset_createDate); + ub.set(Type, this.getType(), this.isset_type); return ub.genMapSql(where, parameters); } @@ -215,7 +215,6 @@ ub.set(Classification, this.getClassification(), this.isset_classification); ub.set(States, this.getStates(), this.isset_states); ub.set(CategoryId, this.getCategoryId(), this.isset_categoryId); - ub.set(Unit, this.getUnit(), this.isset_unit); ub.set(FAgencyId, this.getFAgencyId(), this.isset_fAgencyId); ub.set(SAgencyId, this.getSAgencyId(), this.isset_sAgencyId); ub.set(TAgencyId, this.getTAgencyId(), this.isset_tAgencyId); @@ -224,6 +223,7 @@ ub.set(AgencyId, this.getAgencyId(), this.isset_agencyId); ub.set(AgencyName, this.getAgencyName(), this.isset_agencyName); ub.set(CreateDate, this.getCreateDate(), this.isset_createDate); + ub.set(Type, this.getType(), this.isset_type); return ub.genArraySql(where, parameters); } @@ -271,7 +271,7 @@ */ @Override public SqlAndParameters<Map<String, Object>> getSelectSql_(String where, Map<String, Object> parameters) { - return new SqlAndParameters<>("select id, goods_code, goods_name, classification, states, category_id, unit, f_agency_id, s_agency_id, t_agency_id, parent_agency_id, agency_level, agency_id, agency_name, create_date from " + this.getTableName_() + " " + where, parameters); + return new SqlAndParameters<>("select id, goods_code, goods_name, classification, states, category_id, f_agency_id, s_agency_id, t_agency_id, parent_agency_id, agency_level, agency_id, agency_name, create_date, type from " + this.getTableName_() + " " + where, parameters); } /** @@ -279,7 +279,7 @@ */ @Override public SqlAndParameters<Object[]> getSelectSql_(String where, Object[] parameters) { - return new SqlAndParameters<>("select id, goods_code, goods_name, classification, states, category_id, unit, f_agency_id, s_agency_id, t_agency_id, parent_agency_id, agency_level, agency_id, agency_name, create_date from " + this.getTableName_() + " " + where, parameters); + return new SqlAndParameters<>("select id, goods_code, goods_name, classification, states, category_id, f_agency_id, s_agency_id, t_agency_id, parent_agency_id, agency_level, agency_id, agency_name, create_date, type from " + this.getTableName_() + " " + where, parameters); } /** @@ -326,11 +326,7 @@ } columnIndex = resultSetUtils.findColumn(rs, BaseGoodsTemplate_mapper.Classification); if (columnIndex > 0) { - if (rs.getBigDecimal(columnIndex) == null) { - base_goods_template.setClassification(null); - } else { - base_goods_template.setClassification(rs.getInt(columnIndex)); - } + base_goods_template.setClassification(rs.getString(columnIndex)); } columnIndex = resultSetUtils.findColumn(rs, BaseGoodsTemplate_mapper.States); if (columnIndex > 0) { @@ -347,10 +343,6 @@ } else { base_goods_template.setCategoryId(rs.getLong(columnIndex)); } - } - columnIndex = resultSetUtils.findColumn(rs, BaseGoodsTemplate_mapper.Unit); - if (columnIndex > 0) { - base_goods_template.setUnit(rs.getString(columnIndex)); } columnIndex = resultSetUtils.findColumn(rs, BaseGoodsTemplate_mapper.FAgencyId); if (columnIndex > 0) { @@ -412,6 +404,14 @@ base_goods_template.setCreateDate(rs.getLong(columnIndex)); } } + columnIndex = resultSetUtils.findColumn(rs, BaseGoodsTemplate_mapper.Type); + if (columnIndex > 0) { + if (rs.getBigDecimal(columnIndex) == null) { + base_goods_template.setType(null); + } else { + base_goods_template.setType(rs.getInt(columnIndex)); + } + } return base_goods_template; } } diff --git a/consum-model-pojo/src/main/java/com/consum/model/po/FinSysOrg.java b/consum-model-pojo/src/main/java/com/consum/model/po/FinSysOrg.java new file mode 100644 index 0000000..9026406 --- /dev/null +++ b/consum-model-pojo/src/main/java/com/consum/model/po/FinSysOrg.java @@ -0,0 +1,377 @@ + +package com.consum.model.po; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.walker.jdbc.BasePo; + +/** + * 琛ㄥ悕:FIN_SYS_ORG * + * + * @author genrator + */ +@JsonAutoDetect(fieldVisibility = JsonAutoDetect.Visibility.ANY) +public class FinSysOrg extends BasePo<FinSysOrg> { + // 搴忓垪鍖栫増鏈彿 + private static final long serialVersionUID = 1L; + + // 涓婚敭 + private String id = null; + @JsonIgnore + protected boolean isset_id = false; + + // 灞炴�у垪琛� + private String name = null; + @JsonIgnore + protected boolean isset_name = false; + + private String orgCode = null; + @JsonIgnore + protected boolean isset_orgCode = false; + + private Integer orderNum = null; + @JsonIgnore + protected boolean isset_orderNum = false; + + private String parentId = null; + @JsonIgnore + protected boolean isset_parentId = false; + + private Integer orgType = null; + @JsonIgnore + protected boolean isset_orgType = false; + + private String tenantId = null; + @JsonIgnore + protected boolean isset_tenantId = false; + + private String summary = null; + @JsonIgnore + protected boolean isset_summary = false; + + private String createBy = null; + @JsonIgnore + protected boolean isset_createBy = false; + + private Long createTime = null; + @JsonIgnore + protected boolean isset_createTime = false; + + private String updateBy = null; + @JsonIgnore + protected boolean isset_updateBy = false; + + private Long updateTime = null; + @JsonIgnore + protected boolean isset_updateTime = false; + + private Integer lv = null; + @JsonIgnore + protected boolean isset_lv = false; + + private Long tempId = null; + @JsonIgnore + protected boolean isset_tempId = false; + + private Integer isDelete = null; + @JsonIgnore + protected boolean isset_isDelete = false; + + /** + * 榛樿鏋勯�犲嚱鏁� + */ + public FinSysOrg() {} + + /** + * 鏍规嵁涓婚敭鏋勯�犲璞� + */ + public FinSysOrg(String id) { + this.setId(id); + } + + /** + * 璁剧疆涓婚敭鍊� + */ + @Override + public void setPkValue(Object value) { + this.setId((String)value); + } + + public String getId() { + return this.id; + } + + public void setId(String id) { + this.id = id; + this.isset_id = true; + } + + @JsonIgnore + public boolean isEmptyId() { + return this.id == null; + } + + public String getName() { + return this.name; + } + + public void setName(String name) { + this.name = name; + this.isset_name = true; + } + + @JsonIgnore + public boolean isEmptyName() { + return this.name == null || this.name.length() == 0; + } + + public String getOrgCode() { + return this.orgCode; + } + + public void setOrgCode(String orgCode) { + this.orgCode = orgCode; + this.isset_orgCode = true; + } + + @JsonIgnore + public boolean isEmptyOrgCode() { + return this.orgCode == null || this.orgCode.length() == 0; + } + + public Integer getOrderNum() { + return this.orderNum; + } + + public void setOrderNum(Integer orderNum) { + this.orderNum = orderNum; + this.isset_orderNum = true; + } + + @JsonIgnore + public boolean isEmptyOrderNum() { + return this.orderNum == null; + } + + public String getParentId() { + return this.parentId; + } + + public void setParentId(String parentId) { + this.parentId = parentId; + this.isset_parentId = true; + } + + @JsonIgnore + public boolean isEmptyParentId() { + return this.parentId == null; + } + + public Integer getOrgType() { + return this.orgType; + } + + public void setOrgType(Integer orgType) { + this.orgType = orgType; + this.isset_orgType = true; + } + + public Integer getIsDelete() { + return this.isDelete; + } + + public void setIsDelete(Integer isDelete) { + this.isDelete = isDelete; + this.isset_isDelete = true; + } + + @JsonIgnore + public boolean isEmptyOrgType() { + return this.orgType == null; + } + + public String getTenantId() { + return this.tenantId; + } + + public void setTenantId(String tenantId) { + this.tenantId = tenantId; + this.isset_tenantId = true; + } + + @JsonIgnore + public boolean isEmptyTenantId() { + return this.tenantId == null || this.tenantId.length() == 0; + } + + public String getSummary() { + return this.summary; + } + + public void setSummary(String summary) { + this.summary = summary; + this.isset_summary = true; + } + + @JsonIgnore + public boolean isEmptySummary() { + return this.summary == null || this.summary.length() == 0; + } + + public String getCreateBy() { + return this.createBy; + } + + public void setCreateBy(String createBy) { + this.createBy = createBy; + this.isset_createBy = true; + } + + @JsonIgnore + public boolean isEmptyCreateBy() { + return this.createBy == null || this.createBy.length() == 0; + } + + public Long getCreateTime() { + return this.createTime; + } + + public void setCreateTime(Long createTime) { + this.createTime = createTime; + this.isset_createTime = true; + } + + @JsonIgnore + public boolean isEmptyCreateTime() { + return this.createTime == null; + } + + public String getUpdateBy() { + return this.updateBy; + } + + public void setUpdateBy(String updateBy) { + this.updateBy = updateBy; + this.isset_updateBy = true; + } + + @JsonIgnore + public boolean isEmptyUpdateBy() { + return this.updateBy == null || this.updateBy.length() == 0; + } + + public Long getUpdateTime() { + return this.updateTime; + } + + public void setUpdateTime(Long updateTime) { + this.updateTime = updateTime; + this.isset_updateTime = true; + } + + @JsonIgnore + public boolean isEmptyUpdateTime() { + return this.updateTime == null; + } + + public Integer getLv() { + return this.lv; + } + + public void setLv(Integer lv) { + this.lv = lv; + this.isset_lv = true; + } + + @JsonIgnore + public boolean isEmptyLv() { + return this.lv == null; + } + + public Long getTempId() { + return this.tempId; + } + + public void setTempId(Long tempId) { + this.tempId = tempId; + this.isset_tempId = true; + } + + @JsonIgnore + public boolean isEmptyTempId() { + return this.tempId == null; + } + + /** + * 閲嶅啓 toString() 鏂规硶 + */ + @Override + public String toString() { + return new StringBuilder().append("id=").append(this.id).append("name=").append(this.name).append("orgCode=") + .append(this.orgCode).append("orderNum=").append(this.orderNum).append("parentId=").append(this.parentId) + .append("orgType=").append(this.orgType).append("tenantId=").append(this.tenantId).append("summary=") + .append(this.summary).append("createBy=").append(this.createBy).append("createTime=") + .append(this.createTime).append("updateBy=").append(this.updateBy).append("updateTime=") + .append(this.updateTime).append("lv=").append(this.lv).append("isDelete=").append(this.isDelete) + .append("tempId=").append(this.tempId).toString(); + } + + /** + * 鍏嬮殕 + */ + public FinSysOrg $clone() { + FinSysOrg fin_sys_org = new FinSysOrg(); + + // 鏁版嵁搴撳悕绉� + // fin_sys_org.setDatabaseName_(this.getDatabaseName_()); + + // 涓婚敭 + if (this.isset_id) { + fin_sys_org.setId(this.getId()); + } + // 鏅�氬睘鎬� + if (this.isset_name) { + fin_sys_org.setName(this.getName()); + } + if (this.isset_orgCode) { + fin_sys_org.setOrgCode(this.getOrgCode()); + } + if (this.isset_orderNum) { + fin_sys_org.setOrderNum(this.getOrderNum()); + } + if (this.isset_parentId) { + fin_sys_org.setParentId(this.getParentId()); + } + if (this.isset_orgType) { + fin_sys_org.setOrgType(this.getOrgType()); + } + if (this.isset_tenantId) { + fin_sys_org.setTenantId(this.getTenantId()); + } + if (this.isset_summary) { + fin_sys_org.setSummary(this.getSummary()); + } + if (this.isset_createBy) { + fin_sys_org.setCreateBy(this.getCreateBy()); + } + if (this.isset_createTime) { + fin_sys_org.setCreateTime(this.getCreateTime()); + } + if (this.isset_updateBy) { + fin_sys_org.setUpdateBy(this.getUpdateBy()); + } + if (this.isset_updateTime) { + fin_sys_org.setUpdateTime(this.getUpdateTime()); + } + if (this.isset_lv) { + fin_sys_org.setLv(this.getLv()); + } + if (this.isset_tempId) { + fin_sys_org.setTempId(this.getTempId()); + } + if (this.isset_isDelete) { + fin_sys_org.setIsDelete(this.getIsDelete()); + } + return fin_sys_org; + } +} diff --git a/consum-model-pojo/src/main/java/com/consum/model/po/FinSysOrg_mapper.java b/consum-model-pojo/src/main/java/com/consum/model/po/FinSysOrg_mapper.java new file mode 100644 index 0000000..1f8a503 --- /dev/null +++ b/consum-model-pojo/src/main/java/com/consum/model/po/FinSysOrg_mapper.java @@ -0,0 +1,413 @@ +package com.consum.model.po; + +import com.walker.jdbc.BaseMapper; +import com.walker.jdbc.ResultSetUtils; +import com.walker.jdbc.SqlAndParameters; +import com.walker.jdbc.sqlgen.DeleteBuilder; +import com.walker.jdbc.sqlgen.InsertBuilder; +import com.walker.jdbc.sqlgen.SelectBuilder; +import com.walker.jdbc.sqlgen.UpdateBuilder; +import org.springframework.jdbc.core.RowMapper; + +import java.sql.ResultSet; +import java.sql.SQLException; +import java.util.Map; + +/** + * 琛ㄥ悕:FIN_SYS_ORG * + * + * @author genrator + */ +public class FinSysOrg_mapper extends FinSysOrg implements BaseMapper<FinSysOrg> { + // 搴忓垪鍖栫増鏈彿 + private static final long serialVersionUID = 1L; + + public static final RowMapper<FinSysOrg> ROW_MAPPER = new FinSysOrgRowMapper(); + + // 涓婚敭 + public static final String Id = "id"; + // 鏅�氬睘鎬� + public static final String Name = "name"; + public static final String OrgCode = "org_code"; + public static final String OrderNum = "order_num"; + public static final String ParentId = "parent_id"; + public static final String OrgType = "org_type"; + public static final String TenantId = "tenant_id"; + public static final String Summary = "summary"; + public static final String CreateBy = "create_by"; + public static final String CreateTime = "create_time"; + public static final String UpdateBy = "update_by"; + public static final String UpdateTime = "update_time"; + public static final String Lv = "lv"; + public static final String TempId = "temp_id"; + public static final String IsDelete = "is_delete"; + + /** + * 榛樿鏋勯�犲嚱鏁� + */ + public FinSysOrg_mapper(FinSysOrg finSysOrg) { + if (finSysOrg == null) { + throw new IllegalArgumentException("po鍙傛暟涓嶅厑璁镐负绌猴紒"); + } + // 涓婚敭 + if (finSysOrg.isset_id) { + this.setId(finSysOrg.getId()); + } + // 鏅�氬睘鎬� + if (finSysOrg.isset_name) { + this.setName(finSysOrg.getName()); + } + if (finSysOrg.isset_orgCode) { + this.setOrgCode(finSysOrg.getOrgCode()); + } + if (finSysOrg.isset_orderNum) { + this.setOrderNum(finSysOrg.getOrderNum()); + } + if (finSysOrg.isset_parentId) { + this.setParentId(finSysOrg.getParentId()); + } + if (finSysOrg.isset_orgType) { + this.setOrgType(finSysOrg.getOrgType()); + } + if (finSysOrg.isset_tenantId) { + this.setTenantId(finSysOrg.getTenantId()); + } + if (finSysOrg.isset_summary) { + this.setSummary(finSysOrg.getSummary()); + } + if (finSysOrg.isset_createBy) { + this.setCreateBy(finSysOrg.getCreateBy()); + } + if (finSysOrg.isset_createTime) { + this.setCreateTime(finSysOrg.getCreateTime()); + } + if (finSysOrg.isset_updateBy) { + this.setUpdateBy(finSysOrg.getUpdateBy()); + } + if (finSysOrg.isset_updateTime) { + this.setUpdateTime(finSysOrg.getUpdateTime()); + } + if (finSysOrg.isset_lv) { + this.setLv(finSysOrg.getLv()); + } + if (finSysOrg.isset_tempId) { + this.setTempId(finSysOrg.getTempId()); + } + if (finSysOrg.isset_isDelete) { + this.setIsDelete(finSysOrg.getIsDelete()); + } + // 鍘绘帀锛�2022-09-07 + // this.setDatabaseName_(fin_sys_org.getDatabaseName_()); + } + + /** + * 鑾峰彇琛ㄥ悕 + */ + @Override + public String getTableName_() { + String tableName = "fin_sys_org"; + /** + * if (StringUtils.isNotEmpty(this.getDatabaseName_())) { return this.getDatabaseName_() + "." + tableName; } + * else { return tableName; } + */ + return tableName; + } + + /** + * 鑾峰彇涓婚敭鍚嶇О + */ + @Override + public String getPkName_() { + return Id; + } + + /** + * 鑾峰彇涓婚敭鍊� + */ + @Override + public Object getPkValue_() { + return this.getId(); + } + + /** + * 鑾峰彇鎻掑叆璇彞鍜屽弬鏁� + */ + @Override + public SqlAndParameters<Map<String, Object>> getInsertSql_() { + InsertBuilder ib = new InsertBuilder(this.getTableName_()); + ib.set(Id, this.getId()); + ib.set(Name, this.getName(), this.isset_name); + ib.set(OrgCode, this.getOrgCode(), this.isset_orgCode); + ib.set(OrderNum, this.getOrderNum(), this.isset_orderNum); + ib.set(ParentId, this.getParentId(), this.isset_parentId); + ib.set(OrgType, this.getOrgType(), this.isset_orgType); + ib.set(TenantId, this.getTenantId(), this.isset_tenantId); + ib.set(Summary, this.getSummary(), this.isset_summary); + ib.set(CreateBy, this.getCreateBy(), this.isset_createBy); + ib.set(CreateTime, this.getCreateTime(), this.isset_createTime); + ib.set(UpdateBy, this.getUpdateBy(), this.isset_updateBy); + ib.set(UpdateTime, this.getUpdateTime(), this.isset_updateTime); + ib.set(Lv, this.getLv(), this.isset_lv); + ib.set(TempId, this.getTempId(), this.isset_tempId); + ib.set(IsDelete, this.getIsDelete(), this.isset_isDelete); + return ib.genMapSql(); + } + + /** + * 鑾峰彇鏇存柊璇彞鍜屽弬鏁� + */ + @Override + public SqlAndParameters<Map<String, Object>> getUpdateSql_() { + UpdateBuilder ub = new UpdateBuilder(this.getTableName_()); + ub.set(Name, this.getName(), this.isset_name); + ub.set(OrgCode, this.getOrgCode(), this.isset_orgCode); + ub.set(OrderNum, this.getOrderNum(), this.isset_orderNum); + ub.set(ParentId, this.getParentId(), this.isset_parentId); + ub.set(OrgType, this.getOrgType(), this.isset_orgType); + ub.set(TenantId, this.getTenantId(), this.isset_tenantId); + ub.set(Summary, this.getSummary(), this.isset_summary); + ub.set(CreateBy, this.getCreateBy(), this.isset_createBy); + ub.set(CreateTime, this.getCreateTime(), this.isset_createTime); + ub.set(UpdateBy, this.getUpdateBy(), this.isset_updateBy); + ub.set(UpdateTime, this.getUpdateTime(), this.isset_updateTime); + ub.set(Lv, this.getLv(), this.isset_lv); + ub.set(TempId, this.getTempId(), this.isset_tempId); + ub.set(IsDelete, this.getIsDelete(), this.isset_isDelete); + ub.where(this.getPkName_(), this.getPkValue_()); + return ub.genMapSql(); + } + + /** + * 鑾峰彇鏇存柊璇彞鍜屽弬鏁� + */ + @Override + public SqlAndParameters<Map<String, Object>> getUpdateSql_(String where, Map<String, Object> parameters) { + UpdateBuilder ub = new UpdateBuilder(this.getTableName_()); + ub.set(Name, this.getName(), this.isset_name); + ub.set(OrgCode, this.getOrgCode(), this.isset_orgCode); + ub.set(OrderNum, this.getOrderNum(), this.isset_orderNum); + ub.set(ParentId, this.getParentId(), this.isset_parentId); + ub.set(OrgType, this.getOrgType(), this.isset_orgType); + ub.set(TenantId, this.getTenantId(), this.isset_tenantId); + ub.set(Summary, this.getSummary(), this.isset_summary); + ub.set(CreateBy, this.getCreateBy(), this.isset_createBy); + ub.set(CreateTime, this.getCreateTime(), this.isset_createTime); + ub.set(UpdateBy, this.getUpdateBy(), this.isset_updateBy); + ub.set(UpdateTime, this.getUpdateTime(), this.isset_updateTime); + ub.set(Lv, this.getLv(), this.isset_lv); + ub.set(TempId, this.getTempId(), this.isset_tempId); + ub.set(IsDelete, this.getIsDelete(), this.isset_isDelete); + return ub.genMapSql(where, parameters); + } + + /** + * 鑾峰彇鏇存柊璇彞鍜屽弬鏁� + */ + @Override + public SqlAndParameters<Object[]> getUpdateSql_(String where, Object[] parameters) { + UpdateBuilder ub = new UpdateBuilder(this.getTableName_()); + ub.set(Name, this.getName(), this.isset_name); + ub.set(OrgCode, this.getOrgCode(), this.isset_orgCode); + ub.set(OrderNum, this.getOrderNum(), this.isset_orderNum); + ub.set(ParentId, this.getParentId(), this.isset_parentId); + ub.set(OrgType, this.getOrgType(), this.isset_orgType); + ub.set(TenantId, this.getTenantId(), this.isset_tenantId); + ub.set(Summary, this.getSummary(), this.isset_summary); + ub.set(CreateBy, this.getCreateBy(), this.isset_createBy); + ub.set(CreateTime, this.getCreateTime(), this.isset_createTime); + ub.set(UpdateBy, this.getUpdateBy(), this.isset_updateBy); + ub.set(UpdateTime, this.getUpdateTime(), this.isset_updateTime); + ub.set(Lv, this.getLv(), this.isset_lv); + ub.set(TempId, this.getTempId(), this.isset_tempId); + ub.set(IsDelete, this.getIsDelete(), this.isset_isDelete); + return ub.genArraySql(where, parameters); + } + + /** + * 鑾峰彇鍒犻櫎璇彞鍜屽弬鏁� + */ + @Override + public SqlAndParameters<Map<String, Object>> getDeleteSql_() { + DeleteBuilder db = new DeleteBuilder(this.getTableName_()); + db.where(this.getPkName_(), this.getPkValue_()); + return db.genMapSql(); + } + + /** + * 鑾峰彇鍒犻櫎璇彞鍜屽弬鏁� + */ + @Override + public SqlAndParameters<Map<String, Object>> getDeleteSql_(String where, Map<String, Object> parameters) { + DeleteBuilder db = new DeleteBuilder(this.getTableName_()); + return db.genMapSql(where, parameters); + } + + /** + * 鑾峰彇鍒犻櫎璇彞鍜屽弬鏁� + */ + @Override + public SqlAndParameters<Object[]> getDeleteSql_(String where, Object[] parameters) { + DeleteBuilder db = new DeleteBuilder(this.getTableName_()); + return db.genArraySql(where, parameters); + } + + /** + * 鑾峰彇鍗曡鏌ヨ璇彞鍜屽弬鏁� + */ + @Override + public SqlAndParameters<Map<String, Object>> getSingleSql_() { + SelectBuilder sb = new SelectBuilder(this.getTableName_()); + sb.where(this.getPkName_(), this.getPkValue_()); + return sb.genMapSql(); + } + + /** + * 鑾峰彇鏌ヨ璇彞鍜屽弬鏁� + */ + @Override + public SqlAndParameters<Map<String, Object>> getSelectSql_(String where, Map<String, Object> parameters) { + return new SqlAndParameters<>( + "select id, name, org_code, order_num, parent_id, org_type, tenant_id, summary, create_by, create_time, update_by, update_time, lv, temp_id from " + + this.getTableName_() + " " + where, + parameters); + } + + /** + * 鑾峰彇鏌ヨ璇彞鍜屽弬鏁� + */ + @Override + public SqlAndParameters<Object[]> getSelectSql_(String where, Object[] parameters) { + return new SqlAndParameters<>( + "select id, name, org_code, order_num, parent_id, org_type, tenant_id, summary, create_by, create_time, update_by, update_time, lv, temp_id from " + + this.getTableName_() + " " + where, + parameters); + } + + /** + * 灏唕esultset鐨勪竴琛岃浆鍖栦负po + */ + @Override + public FinSysOrg mapRow(ResultSet rs, int i) throws SQLException { + return ROW_MAPPER.mapRow(rs, i); + } + + /** + * 鍏嬮殕 + */ + public FinSysOrg toFinSysOrg() { + return super.$clone(); + } +} + +/** + * fin_sys_org RowMapper + * + * @author genrator + */ +class FinSysOrgRowMapper implements RowMapper<FinSysOrg> { + + @Override + public FinSysOrg mapRow(ResultSet rs, int i) throws SQLException { + ResultSetUtils resultSetUtils = new ResultSetUtils(); + FinSysOrg fin_sys_org = new FinSysOrg(); + Integer columnIndex; + // 涓婚敭 + columnIndex = resultSetUtils.findColumn(rs, FinSysOrg_mapper.Id); + if (columnIndex > 0) { + fin_sys_org.setId(rs.getString(columnIndex)); + } + // 鏅�氬睘鎬� + columnIndex = resultSetUtils.findColumn(rs, FinSysOrg_mapper.Name); + if (columnIndex > 0) { + fin_sys_org.setName(rs.getString(columnIndex)); + } + columnIndex = resultSetUtils.findColumn(rs, FinSysOrg_mapper.OrgCode); + if (columnIndex > 0) { + fin_sys_org.setOrgCode(rs.getString(columnIndex)); + } + columnIndex = resultSetUtils.findColumn(rs, FinSysOrg_mapper.OrderNum); + if (columnIndex > 0) { + if (rs.getBigDecimal(columnIndex) == null) { + fin_sys_org.setOrderNum(null); + } else { + fin_sys_org.setOrderNum(rs.getInt(columnIndex)); + } + } + // System.out.println("==========>"+fin_sys_org.getName()); + columnIndex = resultSetUtils.findColumn(rs, FinSysOrg_mapper.ParentId); + if (columnIndex > 0) { + // System.out.println("columnIndex=== "+columnIndex); + if (rs.getString(columnIndex) == null) { + fin_sys_org.setParentId(null); + } else { + fin_sys_org.setParentId(rs.getString(columnIndex)); + } + } + columnIndex = resultSetUtils.findColumn(rs, FinSysOrg_mapper.OrgType); + if (columnIndex > 0) { + if (rs.getBigDecimal(columnIndex) == null) { + fin_sys_org.setOrgType(null); + } else { + fin_sys_org.setOrgType(rs.getInt(columnIndex)); + } + } + columnIndex = resultSetUtils.findColumn(rs, FinSysOrg_mapper.TenantId); + if (columnIndex > 0) { + fin_sys_org.setTenantId(rs.getString(columnIndex)); + } + columnIndex = resultSetUtils.findColumn(rs, FinSysOrg_mapper.Summary); + if (columnIndex > 0) { + fin_sys_org.setSummary(rs.getString(columnIndex)); + } + columnIndex = resultSetUtils.findColumn(rs, FinSysOrg_mapper.CreateBy); + if (columnIndex > 0) { + fin_sys_org.setCreateBy(rs.getString(columnIndex)); + } + columnIndex = resultSetUtils.findColumn(rs, FinSysOrg_mapper.CreateTime); + if (columnIndex > 0) { + if (rs.getBigDecimal(columnIndex) == null) { + fin_sys_org.setCreateTime(null); + } else { + fin_sys_org.setCreateTime(rs.getLong(columnIndex)); + } + } + columnIndex = resultSetUtils.findColumn(rs, FinSysOrg_mapper.UpdateBy); + if (columnIndex > 0) { + fin_sys_org.setUpdateBy(rs.getString(columnIndex)); + } + columnIndex = resultSetUtils.findColumn(rs, FinSysOrg_mapper.UpdateTime); + if (columnIndex > 0) { + if (rs.getBigDecimal(columnIndex) == null) { + fin_sys_org.setUpdateTime(null); + } else { + fin_sys_org.setUpdateTime(rs.getLong(columnIndex)); + } + } + columnIndex = resultSetUtils.findColumn(rs, FinSysOrg_mapper.Lv); + if (columnIndex > 0) { + if (rs.getBigDecimal(columnIndex) == null) { + fin_sys_org.setLv(null); + } else { + fin_sys_org.setLv(rs.getInt(columnIndex)); + } + } + columnIndex = resultSetUtils.findColumn(rs, FinSysOrg_mapper.TempId); + if (columnIndex > 0) { + if (rs.getBigDecimal(columnIndex) == null) { + fin_sys_org.setTempId(null); + } else { + fin_sys_org.setTempId(rs.getLong(columnIndex)); + } + } + + columnIndex = resultSetUtils.findColumn(rs, FinSysOrg_mapper.IsDelete); + if (columnIndex > 0) { + if (rs.getBigDecimal(columnIndex) == null) { + fin_sys_org.setIsDelete(null); + } else { + fin_sys_org.setIsDelete(rs.getInt(columnIndex)); + } + } + return fin_sys_org; + } +} diff --git a/consum-model-pojo/src/main/java/com/consum/model/po/FinSysTenant.java b/consum-model-pojo/src/main/java/com/consum/model/po/FinSysTenant.java new file mode 100644 index 0000000..813dedd --- /dev/null +++ b/consum-model-pojo/src/main/java/com/consum/model/po/FinSysTenant.java @@ -0,0 +1,920 @@ + +package com.consum.model.po; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.walker.jdbc.BasePo; + +/** + * 琛ㄥ悕:FIN_SYS_TENANT * + * @author genrator + */ +@JsonAutoDetect(fieldVisibility = JsonAutoDetect.Visibility.ANY) +public class FinSysTenant extends BasePo<FinSysTenant> { + // 搴忓垪鍖栫増鏈彿 + private static final long serialVersionUID = 1L; + + // 涓婚敭 + private Long tempId = null; + @JsonIgnore + protected boolean isset_tempId = false; + + // 灞炴�у垪琛� + private Long id = null; + @JsonIgnore + protected boolean isset_id = false; + + private Long parentId = null; + @JsonIgnore + protected boolean isset_parentId = false; + + private String code = null; + @JsonIgnore + protected boolean isset_code = false; + + private String financeOrgCode = null; + @JsonIgnore + protected boolean isset_financeOrgCode = false; + + private String name = null; + @JsonIgnore + protected boolean isset_name = false; + + private Long lv1Id = null; + @JsonIgnore + protected boolean isset_lv1Id = false; + + private String lv1Name = null; + @JsonIgnore + protected boolean isset_lv1Name = false; + + private Long lv2Id = null; + @JsonIgnore + protected boolean isset_lv2Id = false; + + private String lv2Name = null; + @JsonIgnore + protected boolean isset_lv2Name = false; + + private Long lv3Id = null; + @JsonIgnore + protected boolean isset_lv3Id = false; + + private String lv3Name = null; + @JsonIgnore + protected boolean isset_lv3Name = false; + + private Long lv4Id = null; + @JsonIgnore + protected boolean isset_lv4Id = false; + + private String lv4Name = null; + @JsonIgnore + protected boolean isset_lv4Name = false; + + private Long lv5Id = null; + @JsonIgnore + protected boolean isset_lv5Id = false; + + private String lv5Name = null; + @JsonIgnore + protected boolean isset_lv5Name = false; + + private Integer lv = null; + @JsonIgnore + protected boolean isset_lv = false; + + private Integer orderNum = null; + @JsonIgnore + protected boolean isset_orderNum = false; + + private java.util.Date createTime3 = null; + @JsonIgnore + protected boolean isset_createTime3 = false; + + private java.util.Date modified = null; + @JsonIgnore + protected boolean isset_modified = false; + + private String summary = null; + @JsonIgnore + protected boolean isset_summary = false; + + private String address = null; + @JsonIgnore + protected boolean isset_address = false; + + private String lng = null; + @JsonIgnore + protected boolean isset_lng = false; + + private String lat = null; + @JsonIgnore + protected boolean isset_lat = false; + + private Integer openStatus = null; + @JsonIgnore + protected boolean isset_openStatus = false; + + private java.util.Date openTime = null; + @JsonIgnore + protected boolean isset_openTime = false; + + private Integer status = null; + @JsonIgnore + protected boolean isset_status = false; + + private Integer isDelete = null; + @JsonIgnore + protected boolean isset_isDelete = false; + + private String path = null; + @JsonIgnore + protected boolean isset_path = false; + + private String venueName = null; + @JsonIgnore + protected boolean isset_venueName = false; + + private Long cityId = null; + @JsonIgnore + protected boolean isset_cityId = false; + + private String orgPhoto = null; + @JsonIgnore + protected boolean isset_orgPhoto = false; + + private String shortName = null; + @JsonIgnore + protected boolean isset_shortName = false; + + private Integer tenantType = null; + @JsonIgnore + protected boolean isset_tenantType = false; + + private String createBy = null; + @JsonIgnore + protected boolean isset_createBy = false; + + private Long createTime = null; + @JsonIgnore + protected boolean isset_createTime = false; + + private String updateBy = null; + @JsonIgnore + protected boolean isset_updateBy = false; + + private Long updateTime = null; + @JsonIgnore + protected boolean isset_updateTime = false; + + private Integer belongProvince = null; + @JsonIgnore + protected boolean isset_belongProvince = false; + + /** + * 榛樿鏋勯�犲嚱鏁� + */ + public FinSysTenant() { + } + + /** + * 鏍规嵁涓婚敭鏋勯�犲璞� + */ + public FinSysTenant(Long tempId) { + this.setTempId(tempId); + } + + /** + * 璁剧疆涓婚敭鍊� + */ + @Override + public void setPkValue(Object value) { + this.setTempId((Long) value); + } + + public Long getTempId() { + return this.tempId; + } + + public void setTempId(Long tempId) { + this.tempId = tempId; + this.isset_tempId = true; + } + + @JsonIgnore + public boolean isEmptyTempId() { + return this.tempId == null; + } + + public Long getId() { + return this.id; + } + + public void setId(Long id) { + this.id = id; + this.isset_id = true; + } + + @JsonIgnore + public boolean isEmptyId() { + return this.id == null; + } + + public Long getParentId() { + return this.parentId; + } + + public void setParentId(Long parentId) { + this.parentId = parentId; + this.isset_parentId = true; + } + + @JsonIgnore + public boolean isEmptyParentId() { + return this.parentId == null; + } + + public String getCode() { + return this.code; + } + + public void setCode(String code) { + this.code = code; + this.isset_code = true; + } + + @JsonIgnore + public boolean isEmptyCode() { + return this.code == null || this.code.length() == 0; + } + + public String getFinanceOrgCode() { + return this.financeOrgCode; + } + + public void setFinanceOrgCode(String financeOrgCode) { + this.financeOrgCode = financeOrgCode; + this.isset_financeOrgCode = true; + } + + @JsonIgnore + public boolean isEmptyFinanceOrgCode() { + return this.financeOrgCode == null || this.financeOrgCode.length() == 0; + } + + public String getName() { + return this.name; + } + + public void setName(String name) { + this.name = name; + this.isset_name = true; + } + + @JsonIgnore + public boolean isEmptyName() { + return this.name == null || this.name.length() == 0; + } + + public Long getLv1Id() { + return this.lv1Id; + } + + public void setLv1Id(Long lv1Id) { + this.lv1Id = lv1Id; + this.isset_lv1Id = true; + } + + @JsonIgnore + public boolean isEmptyLv1Id() { + return this.lv1Id == null; + } + + public String getLv1Name() { + return this.lv1Name; + } + + public void setLv1Name(String lv1Name) { + this.lv1Name = lv1Name; + this.isset_lv1Name = true; + } + + @JsonIgnore + public boolean isEmptyLv1Name() { + return this.lv1Name == null || this.lv1Name.length() == 0; + } + + public Long getLv2Id() { + return this.lv2Id; + } + + public void setLv2Id(Long lv2Id) { + this.lv2Id = lv2Id; + this.isset_lv2Id = true; + } + + @JsonIgnore + public boolean isEmptyLv2Id() { + return this.lv2Id == null; + } + + public String getLv2Name() { + return this.lv2Name; + } + + public void setLv2Name(String lv2Name) { + this.lv2Name = lv2Name; + this.isset_lv2Name = true; + } + + @JsonIgnore + public boolean isEmptyLv2Name() { + return this.lv2Name == null || this.lv2Name.length() == 0; + } + + public Long getLv3Id() { + return this.lv3Id; + } + + public void setLv3Id(Long lv3Id) { + this.lv3Id = lv3Id; + this.isset_lv3Id = true; + } + + @JsonIgnore + public boolean isEmptyLv3Id() { + return this.lv3Id == null; + } + + public String getLv3Name() { + return this.lv3Name; + } + + public void setLv3Name(String lv3Name) { + this.lv3Name = lv3Name; + this.isset_lv3Name = true; + } + + @JsonIgnore + public boolean isEmptyLv3Name() { + return this.lv3Name == null || this.lv3Name.length() == 0; + } + + public Long getLv4Id() { + return this.lv4Id; + } + + public void setLv4Id(Long lv4Id) { + this.lv4Id = lv4Id; + this.isset_lv4Id = true; + } + + @JsonIgnore + public boolean isEmptyLv4Id() { + return this.lv4Id == null; + } + + public String getLv4Name() { + return this.lv4Name; + } + + public void setLv4Name(String lv4Name) { + this.lv4Name = lv4Name; + this.isset_lv4Name = true; + } + + @JsonIgnore + public boolean isEmptyLv4Name() { + return this.lv4Name == null || this.lv4Name.length() == 0; + } + + public Long getLv5Id() { + return this.lv5Id; + } + + public void setLv5Id(Long lv5Id) { + this.lv5Id = lv5Id; + this.isset_lv5Id = true; + } + + @JsonIgnore + public boolean isEmptyLv5Id() { + return this.lv5Id == null; + } + + public String getLv5Name() { + return this.lv5Name; + } + + public void setLv5Name(String lv5Name) { + this.lv5Name = lv5Name; + this.isset_lv5Name = true; + } + + @JsonIgnore + public boolean isEmptyLv5Name() { + return this.lv5Name == null || this.lv5Name.length() == 0; + } + + public Integer getLv() { + return this.lv; + } + + public void setLv(Integer lv) { + this.lv = lv; + this.isset_lv = true; + } + + @JsonIgnore + public boolean isEmptyLv() { + return this.lv == null; + } + + public Integer getOrderNum() { + return this.orderNum; + } + + public void setOrderNum(Integer orderNum) { + this.orderNum = orderNum; + this.isset_orderNum = true; + } + + @JsonIgnore + public boolean isEmptyOrderNum() { + return this.orderNum == null; + } + + public java.util.Date getCreateTime3() { + return this.createTime3; + } + + public void setCreateTime3(java.util.Date createTime3) { + this.createTime3 = createTime3; + this.isset_createTime3 = true; + } + + @JsonIgnore + public boolean isEmptyCreateTime3() { + return this.createTime3 == null; + } + + public java.util.Date getModified() { + return this.modified; + } + + public void setModified(java.util.Date modified) { + this.modified = modified; + this.isset_modified = true; + } + + @JsonIgnore + public boolean isEmptyModified() { + return this.modified == null; + } + + public String getSummary() { + return this.summary; + } + + public void setSummary(String summary) { + this.summary = summary; + this.isset_summary = true; + } + + @JsonIgnore + public boolean isEmptySummary() { + return this.summary == null || this.summary.length() == 0; + } + + public String getAddress() { + return this.address; + } + + public void setAddress(String address) { + this.address = address; + this.isset_address = true; + } + + @JsonIgnore + public boolean isEmptyAddress() { + return this.address == null || this.address.length() == 0; + } + + public String getLng() { + return this.lng; + } + + public void setLng(String lng) { + this.lng = lng; + this.isset_lng = true; + } + + @JsonIgnore + public boolean isEmptyLng() { + return this.lng == null || this.lng.length() == 0; + } + + public String getLat() { + return this.lat; + } + + public void setLat(String lat) { + this.lat = lat; + this.isset_lat = true; + } + + @JsonIgnore + public boolean isEmptyLat() { + return this.lat == null || this.lat.length() == 0; + } + + public Integer getOpenStatus() { + return this.openStatus; + } + + public void setOpenStatus(Integer openStatus) { + this.openStatus = openStatus; + this.isset_openStatus = true; + } + + @JsonIgnore + public boolean isEmptyOpenStatus() { + return this.openStatus == null; + } + + public java.util.Date getOpenTime() { + return this.openTime; + } + + public void setOpenTime(java.util.Date openTime) { + this.openTime = openTime; + this.isset_openTime = true; + } + + @JsonIgnore + public boolean isEmptyOpenTime() { + return this.openTime == null; + } + + public Integer getStatus() { + return this.status; + } + + public void setStatus(Integer status) { + this.status = status; + this.isset_status = true; + } + + @JsonIgnore + public boolean isEmptyStatus() { + return this.status == null; + } + + public Integer getIsDelete() { + return this.isDelete; + } + + public void setIsDelete(Integer isDelete) { + this.isDelete = isDelete; + this.isset_isDelete = true; + } + + @JsonIgnore + public boolean isEmptyIsDelete() { + return this.isDelete == null; + } + + public String getPath() { + return this.path; + } + + public void setPath(String path) { + this.path = path; + this.isset_path = true; + } + + @JsonIgnore + public boolean isEmptyPath() { + return this.path == null || this.path.length() == 0; + } + + public String getVenueName() { + return this.venueName; + } + + public void setVenueName(String venueName) { + this.venueName = venueName; + this.isset_venueName = true; + } + + @JsonIgnore + public boolean isEmptyVenueName() { + return this.venueName == null || this.venueName.length() == 0; + } + + public Long getCityId() { + return this.cityId; + } + + public void setCityId(Long cityId) { + this.cityId = cityId; + this.isset_cityId = true; + } + + @JsonIgnore + public boolean isEmptyCityId() { + return this.cityId == null; + } + + public String getOrgPhoto() { + return this.orgPhoto; + } + + public void setOrgPhoto(String orgPhoto) { + this.orgPhoto = orgPhoto; + this.isset_orgPhoto = true; + } + + @JsonIgnore + public boolean isEmptyOrgPhoto() { + return this.orgPhoto == null || this.orgPhoto.length() == 0; + } + + public String getShortName() { + return this.shortName; + } + + public void setShortName(String shortName) { + this.shortName = shortName; + this.isset_shortName = true; + } + + @JsonIgnore + public boolean isEmptyShortName() { + return this.shortName == null || this.shortName.length() == 0; + } + + public Integer getTenantType() { + return this.tenantType; + } + + public void setTenantType(Integer tenantType) { + this.tenantType = tenantType; + this.isset_tenantType = true; + } + + @JsonIgnore + public boolean isEmptyTenantType() { + return this.tenantType == null; + } + + public String getCreateBy() { + return this.createBy; + } + + public void setCreateBy(String createBy) { + this.createBy = createBy; + this.isset_createBy = true; + } + + @JsonIgnore + public boolean isEmptyCreateBy() { + return this.createBy == null || this.createBy.length() == 0; + } + + public Long getCreateTime() { + return this.createTime; + } + + public void setCreateTime(Long createTime) { + this.createTime = createTime; + this.isset_createTime = true; + } + + @JsonIgnore + public boolean isEmptyCreateTime() { + return this.createTime == null; + } + + public String getUpdateBy() { + return this.updateBy; + } + + public void setUpdateBy(String updateBy) { + this.updateBy = updateBy; + this.isset_updateBy = true; + } + + @JsonIgnore + public boolean isEmptyUpdateBy() { + return this.updateBy == null || this.updateBy.length() == 0; + } + + public Long getUpdateTime() { + return this.updateTime; + } + + public void setUpdateTime(Long updateTime) { + this.updateTime = updateTime; + this.isset_updateTime = true; + } + + @JsonIgnore + public boolean isEmptyUpdateTime() { + return this.updateTime == null; + } + + public Integer getBelongProvince() { + return this.belongProvince; + } + + public void setBelongProvince(Integer belongProvince) { + this.belongProvince = belongProvince; + this.isset_belongProvince = true; + } + + @JsonIgnore + public boolean isEmptyBelongProvince() { + return this.belongProvince == null; + } + + /** + * 閲嶅啓 toString() 鏂规硶 + */ + @Override + public String toString() { + return new StringBuilder() + .append("tempId=").append(this.tempId) + .append("id=").append(this.id) + .append("parentId=").append(this.parentId) + .append("code=").append(this.code) + .append("financeOrgCode=").append(this.financeOrgCode) + .append("name=").append(this.name) + .append("lv1Id=").append(this.lv1Id) + .append("lv1Name=").append(this.lv1Name) + .append("lv2Id=").append(this.lv2Id) + .append("lv2Name=").append(this.lv2Name) + .append("lv3Id=").append(this.lv3Id) + .append("lv3Name=").append(this.lv3Name) + .append("lv4Id=").append(this.lv4Id) + .append("lv4Name=").append(this.lv4Name) + .append("lv5Id=").append(this.lv5Id) + .append("lv5Name=").append(this.lv5Name) + .append("lv=").append(this.lv) + .append("orderNum=").append(this.orderNum) + .append("createTime3=").append(this.createTime3) + .append("modified=").append(this.modified) + .append("summary=").append(this.summary) + .append("address=").append(this.address) + .append("lng=").append(this.lng) + .append("lat=").append(this.lat) + .append("openStatus=").append(this.openStatus) + .append("openTime=").append(this.openTime) + .append("status=").append(this.status) + .append("isDelete=").append(this.isDelete) + .append("path=").append(this.path) + .append("venueName=").append(this.venueName) + .append("cityId=").append(this.cityId) + .append("orgPhoto=").append(this.orgPhoto) + .append("shortName=").append(this.shortName) + .append("tenantType=").append(this.tenantType) + .append("createBy=").append(this.createBy) + .append("createTime=").append(this.createTime) + .append("updateBy=").append(this.updateBy) + .append("updateTime=").append(this.updateTime) + .append("belongProvince=").append(this.belongProvince) + .toString(); + } + + /** + * 鍏嬮殕 + */ + public FinSysTenant $clone() { + FinSysTenant fin_sys_tenant = new FinSysTenant(); + + // 鏁版嵁搴撳悕绉� + //fin_sys_tenant.setDatabaseName_(this.getDatabaseName_()); + + // 涓婚敭 + if (this.isset_tempId) { + fin_sys_tenant.setTempId(this.getTempId()); + } + // 鏅�氬睘鎬� + if (this.isset_id) { + fin_sys_tenant.setId(this.getId()); + } + if (this.isset_parentId) { + fin_sys_tenant.setParentId(this.getParentId()); + } + if (this.isset_code) { + fin_sys_tenant.setCode(this.getCode()); + } + if (this.isset_financeOrgCode) { + fin_sys_tenant.setFinanceOrgCode(this.getFinanceOrgCode()); + } + if (this.isset_name) { + fin_sys_tenant.setName(this.getName()); + } + if (this.isset_lv1Id) { + fin_sys_tenant.setLv1Id(this.getLv1Id()); + } + if (this.isset_lv1Name) { + fin_sys_tenant.setLv1Name(this.getLv1Name()); + } + if (this.isset_lv2Id) { + fin_sys_tenant.setLv2Id(this.getLv2Id()); + } + if (this.isset_lv2Name) { + fin_sys_tenant.setLv2Name(this.getLv2Name()); + } + if (this.isset_lv3Id) { + fin_sys_tenant.setLv3Id(this.getLv3Id()); + } + if (this.isset_lv3Name) { + fin_sys_tenant.setLv3Name(this.getLv3Name()); + } + if (this.isset_lv4Id) { + fin_sys_tenant.setLv4Id(this.getLv4Id()); + } + if (this.isset_lv4Name) { + fin_sys_tenant.setLv4Name(this.getLv4Name()); + } + if (this.isset_lv5Id) { + fin_sys_tenant.setLv5Id(this.getLv5Id()); + } + if (this.isset_lv5Name) { + fin_sys_tenant.setLv5Name(this.getLv5Name()); + } + if (this.isset_lv) { + fin_sys_tenant.setLv(this.getLv()); + } + if (this.isset_orderNum) { + fin_sys_tenant.setOrderNum(this.getOrderNum()); + } + if (this.isset_createTime3) { + fin_sys_tenant.setCreateTime3(this.getCreateTime3()); + } + if (this.isset_modified) { + fin_sys_tenant.setModified(this.getModified()); + } + if (this.isset_summary) { + fin_sys_tenant.setSummary(this.getSummary()); + } + if (this.isset_address) { + fin_sys_tenant.setAddress(this.getAddress()); + } + if (this.isset_lng) { + fin_sys_tenant.setLng(this.getLng()); + } + if (this.isset_lat) { + fin_sys_tenant.setLat(this.getLat()); + } + if (this.isset_openStatus) { + fin_sys_tenant.setOpenStatus(this.getOpenStatus()); + } + if (this.isset_openTime) { + fin_sys_tenant.setOpenTime(this.getOpenTime()); + } + if (this.isset_status) { + fin_sys_tenant.setStatus(this.getStatus()); + } + if (this.isset_isDelete) { + fin_sys_tenant.setIsDelete(this.getIsDelete()); + } + if (this.isset_path) { + fin_sys_tenant.setPath(this.getPath()); + } + if (this.isset_venueName) { + fin_sys_tenant.setVenueName(this.getVenueName()); + } + if (this.isset_cityId) { + fin_sys_tenant.setCityId(this.getCityId()); + } + if (this.isset_orgPhoto) { + fin_sys_tenant.setOrgPhoto(this.getOrgPhoto()); + } + if (this.isset_shortName) { + fin_sys_tenant.setShortName(this.getShortName()); + } + if (this.isset_tenantType) { + fin_sys_tenant.setTenantType(this.getTenantType()); + } + if (this.isset_createBy) { + fin_sys_tenant.setCreateBy(this.getCreateBy()); + } + if (this.isset_createTime) { + fin_sys_tenant.setCreateTime(this.getCreateTime()); + } + if (this.isset_updateBy) { + fin_sys_tenant.setUpdateBy(this.getUpdateBy()); + } + if (this.isset_updateTime) { + fin_sys_tenant.setUpdateTime(this.getUpdateTime()); + } + if (this.isset_belongProvince) { + fin_sys_tenant.setBelongProvince(this.getBelongProvince()); + } + return fin_sys_tenant; + } +} diff --git a/consum-model-pojo/src/main/java/com/consum/model/po/FinSysTenantUser.java b/consum-model-pojo/src/main/java/com/consum/model/po/FinSysTenantUser.java new file mode 100644 index 0000000..bfc5d76 --- /dev/null +++ b/consum-model-pojo/src/main/java/com/consum/model/po/FinSysTenantUser.java @@ -0,0 +1,741 @@ + +package com.consum.model.po; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.walker.jdbc.BasePo; + +import java.util.List; + +/** + * 琛ㄥ悕:FIN_SYS_TENANT_USER * + * + * @author genrator + */ +@JsonAutoDetect(fieldVisibility = JsonAutoDetect.Visibility.ANY) +public class FinSysTenantUser extends BasePo<FinSysTenantUser> { + // 搴忓垪鍖栫増鏈彿 + private static final long serialVersionUID = 1L; + + // 涓婚敭 + private Long id = null; + @JsonIgnore + protected boolean isset_id = false; + + // 灞炴�у垪琛� + private String userName = null; + @JsonIgnore + protected boolean isset_userName = false; + + private String userCode = null; + @JsonIgnore + protected boolean isset_userCode = false; + + private String tenantId = null; + @JsonIgnore + protected boolean isset_tenantId = false; + + private String createBy = null; + @JsonIgnore + protected boolean isset_createBy = false; + + private Long createTime = null; + @JsonIgnore + protected boolean isset_createTime = false; + + private String updateBy = null; + @JsonIgnore + protected boolean isset_updateBy = false; + + private Long updateTime = null; + @JsonIgnore + protected boolean isset_updateTime = false; + + private Integer sex = null; + @JsonIgnore + protected boolean isset_sex = false; + + private Integer status = null; + @JsonIgnore + protected boolean isset_status = false; + + private Long seq = null; + @JsonIgnore + protected boolean isset_seq = false; + + private String remark = null; + @JsonIgnore + protected boolean isset_remark = false; + + private Long sysUserId = null; + @JsonIgnore + protected boolean isset_sysUserId = false; + + private Long sysDeptId = null; + @JsonIgnore + protected boolean isset_sysDeptId = false; + + private String tenantCode = null; + @JsonIgnore + protected boolean isset_tenantCode = false; + + private String userPhone = null; + @JsonIgnore + protected boolean isset_userPhone = false; + + private Integer isDelete = null; + @JsonIgnore + protected boolean isset_isDelete = false; + + private Integer kfStatus = null; + @JsonIgnore + protected boolean isset_kfStatus = false; + + private String agentJid = null; + @JsonIgnore + protected boolean isset_agentJid = false; + + private String workgroupJid = null; + @JsonIgnore + protected boolean isset_workgroupJid = false; + + private String clientNumber = null; + @JsonIgnore + protected boolean isset_clientNumber = false; + + private String clientPwd = null; + @JsonIgnore + protected boolean isset_clientPwd = false; + + private Long supplierId = null; + + @JsonIgnore + protected boolean isset_supplierId = false; + + private String tenantName = null; + @JsonIgnore + protected boolean isset_tenantName = false; + + private Integer lv = null; + @JsonIgnore + protected boolean isset_lv = false; + + private String roleStr = null; + @JsonIgnore + protected boolean isset_roleStr = false; + + private String avatar = null; + @JsonIgnore + protected boolean isset_avatar = false; + public String getAvatar() { + return avatar; + } + private String email = null; + @JsonIgnore + protected boolean isset_email = false; + + public void setAvatar(String avatar) { + this.avatar = avatar; + this.isset_avatar = true; + } + + public String getEmail() { + return email; + } + + public void setEmail(String email) { + this.email = email; + this.isset_email = true; + } + + public Long getSupplierId() { + return supplierId; + } + + public void setSupplierId(Long supplierId) { + this.supplierId = supplierId; + this.isset_supplierId=true; + } + + private List<Long> roleList = null; + + + + public List<Long> getRoleList() { + return roleList; + } + + public void setRoleList(List<Long> roleList) { + this.roleList = roleList; + } + + private Boolean isOnline = null; + @JsonIgnore + protected boolean isset_isOnline = false; + + private String parentCode = null; + @JsonIgnore + protected boolean isset_parentCode = false; + + private String isSupplier; //鏄惁涓鸿繍缁村晢 濡傛灉鏈夎繍缁村晢id 鍒欎唬琛ㄦ槸锛屽弽涔嬩笉鏄� + + public String getIsSupplier() { + return isSupplier; + } + + public void setIsSupplier(String isSupplier) { + this.isSupplier = isSupplier; + } + + /** + * 榛樿鏋勯�犲嚱鏁� + */ + public FinSysTenantUser() { + } + + /** + * 鏍规嵁涓婚敭鏋勯�犲璞� + */ + public FinSysTenantUser(Long id) { + this.setId(id); + } + + /** + * @Description 鏍规嵁鐢ㄦ埛id鏋勫缓瀵硅薄 + * @Author wh + * @Date 2023/7/18 10:57 + */ + public FinSysTenantUser(Long sysUserId, Long seq) { + this.sysUserId = sysUserId; + } + + /** + * 璁剧疆涓婚敭鍊� + */ + @Override + public void setPkValue(Object value) { + this.setId((Long) value); + } + + public Long getId() { + return this.id; + } + + public void setId(Long id) { + this.id = id; + this.isset_id = true; + } + + @JsonIgnore + public boolean isEmptyId() { + return this.id == null; + } + + public String getUserName() { + return this.userName; + } + + public void setUserName(String userName) { + this.userName = userName; + this.isset_userName = true; + } + + @JsonIgnore + public boolean isEmptyUserName() { + return this.userName == null || this.userName.length() == 0; + } + + public String getUserCode() { + return this.userCode; + } + + public void setUserCode(String userCode) { + this.userCode = userCode; + this.isset_userCode = true; + } + + @JsonIgnore + public boolean isEmptyUserCode() { + return this.userCode == null || this.userCode.length() == 0; + } + + public String getTenantId() { + return this.tenantId; + } + + public void setTenantId(String tenantId) { + this.tenantId = tenantId; + this.isset_tenantId = true; + } + + @JsonIgnore + public boolean isEmptyTenantId() { + return this.tenantId == null || this.tenantId.length() == 0; + } + + public String getCreateBy() { + return this.createBy; + } + + public void setCreateBy(String createBy) { + this.createBy = createBy; + this.isset_createBy = true; + } + + @JsonIgnore + public boolean isEmptyCreateBy() { + return this.createBy == null || this.createBy.length() == 0; + } + + public Long getCreateTime() { + return this.createTime; + } + + public void setCreateTime(Long createTime) { + this.createTime = createTime; + this.isset_createTime = true; + } + + @JsonIgnore + public boolean isEmptyCreateTime() { + return this.createTime == null; + } + + public String getUpdateBy() { + return this.updateBy; + } + + public void setUpdateBy(String updateBy) { + this.updateBy = updateBy; + this.isset_updateBy = true; + } + + @JsonIgnore + public boolean isEmptyUpdateBy() { + return this.updateBy == null || this.updateBy.length() == 0; + } + + public Long getUpdateTime() { + return this.updateTime; + } + + public void setUpdateTime(Long updateTime) { + this.updateTime = updateTime; + this.isset_updateTime = true; + } + + @JsonIgnore + public boolean isEmptyUpdateTime() { + return this.updateTime == null; + } + + public Integer getSex() { + return this.sex; + } + + public void setSex(Integer sex) { + this.sex = sex; + this.isset_sex = true; + } + + @JsonIgnore + public boolean isEmptySex() { + return this.sex == null; + } + + public Integer getStatus() { + return this.status; + } + + public void setStatus(Integer status) { + this.status = status; + this.isset_status = true; + } + + @JsonIgnore + public boolean isEmptyStatus() { + return this.status == null; + } + + public Long getSeq() { + return this.seq; + } + + public void setSeq(Long seq) { + this.seq = seq; + this.isset_seq = true; + } + + @JsonIgnore + public boolean isEmptySeq() { + return this.seq == null; + } + + public String getRemark() { + return this.remark; + } + + public void setRemark(String remark) { + this.remark = remark; + this.isset_remark = true; + } + + @JsonIgnore + public boolean isEmptyRemark() { + return this.remark == null || this.remark.length() == 0; + } + + public Long getSysUserId() { + return this.sysUserId; + } + + public void setSysUserId(Long sysUserId) { + this.sysUserId = sysUserId; + this.isset_sysUserId = true; + } + + @JsonIgnore + public boolean isEmptySysUserId() { + return this.sysUserId == null; + } + + public Long getSysDeptId() { + return this.sysDeptId; + } + + public void setSysDeptId(Long sysDeptId) { + this.sysDeptId = sysDeptId; + this.isset_sysDeptId = true; + } + + @JsonIgnore + public boolean isEmptySysDeptId() { + return this.sysDeptId == null; + } + + public String getTenantCode() { + return this.tenantCode; + } + + public void setTenantCode(String tenantCode) { + this.tenantCode = tenantCode; + this.isset_tenantCode = true; + } + + @JsonIgnore + public boolean isEmptyTenantCode() { + return this.tenantCode == null || this.tenantCode.length() == 0; + } + + public String getUserPhone() { + return this.userPhone; + } + + public void setUserPhone(String userPhone) { + this.userPhone = userPhone; + this.isset_userPhone = true; + } + + @JsonIgnore + public boolean isEmptyUserPhone() { + return this.userPhone == null || this.userPhone.length() == 0; + } + + public Integer getIsDelete() { + return this.isDelete; + } + + public void setIsDelete(Integer isDelete) { + this.isDelete = isDelete; + this.isset_isDelete = true; + } + + @JsonIgnore + public boolean isEmptyIsDelete() { + return this.isDelete == null; + } + + public Integer getKfStatus() { + return this.kfStatus; + } + + public void setKfStatus(Integer kfStatus) { + this.kfStatus = kfStatus; + this.isset_kfStatus = true; + } + + @JsonIgnore + public boolean isEmptyKfStatus() { + return this.kfStatus == null; + } + + public String getAgentJid() { + return this.agentJid; + } + + public void setAgentJid(String agentJid) { + this.agentJid = agentJid; + this.isset_agentJid = true; + } + + @JsonIgnore + public boolean isEmptyAgentJid() { + return this.agentJid == null || this.agentJid.length() == 0; + } + + public String getWorkgroupJid() { + return this.workgroupJid; + } + + public void setWorkgroupJid(String workgroupJid) { + this.workgroupJid = workgroupJid; + this.isset_workgroupJid = true; + } + + @JsonIgnore + public boolean isEmptyWorkgroupJid() { + return this.workgroupJid == null || this.workgroupJid.length() == 0; + } + + public String getClientNumber() { + return this.clientNumber; + } + + public void setClientNumber(String clientNumber) { + this.clientNumber = clientNumber; + this.isset_clientNumber = true; + } + + @JsonIgnore + public boolean isEmptyClientNumber() { + return this.clientNumber == null || this.clientNumber.length() == 0; + } + + public String getClientPwd() { + return this.clientPwd; + } + + public void setClientPwd(String clientPwd) { + this.clientPwd = clientPwd; + this.isset_clientPwd = true; + } + + @JsonIgnore + public boolean isEmptyClientPwd() { + return this.clientPwd == null || this.clientPwd.length() == 0; + } + + public String getTenantName() { + return this.tenantName; + } + + public void setTenantName(String tenantName) { + this.tenantName = tenantName; + this.isset_tenantName = true; + } + + @JsonIgnore + public boolean isEmptyTenantName() { + return this.tenantName == null || this.tenantName.length() == 0; + } + + public Integer getLv() { + return this.lv; + } + + public void setLv(Integer lv) { + this.lv = lv; + this.isset_lv = true; + } + + public Boolean getIsOnline() { + return this.isOnline; + } + + public void setIsOnline(Boolean isOnline) { + this.isOnline = isOnline; + this.isset_isOnline = true; + } + + public String getParentCode() { + return this.parentCode; + } + + public void setParentCode(String parentCode) { + this.parentCode = parentCode; + this.isset_parentCode = true; + } + + + + //roleStr + @JsonIgnore + public boolean isEmptRoleStr() { + return this.roleStr == null; + } + + + public String getRoleStr() { + return this.roleStr; + } + + public void setRoleStr(String roleStr) { + this.roleStr = roleStr; + this.isset_roleStr = true; + } + + + + @JsonIgnore + public boolean isEmptLv() { + return this.lv == null; + } + + + /** + * 閲嶅啓 toString() 鏂规硶 + */ + @Override + public String toString() { + return new StringBuilder() + .append("id=").append(this.id) + .append("userName=").append(this.userName) + .append("userCode=").append(this.userCode) + .append("tenantId=").append(this.tenantId) + .append("createBy=").append(this.createBy) + .append("createTime=").append(this.createTime) + .append("updateBy=").append(this.updateBy) + .append("updateTime=").append(this.updateTime) + .append("sex=").append(this.sex) + .append("status=").append(this.status) + .append("seq=").append(this.seq) + .append("remark=").append(this.remark) + .append("sysUserId=").append(this.sysUserId) + .append("sysDeptId=").append(this.sysDeptId) + .append("tenantCode=").append(this.tenantCode) + .append("userPhone=").append(this.userPhone) + .append("isDelete=").append(this.isDelete) + .append("kfStatus=").append(this.kfStatus) + .append("agentJid=").append(this.agentJid) + .append("workgroupJid=").append(this.workgroupJid) + .append("clientNumber=").append(this.clientNumber) + .append("clientPwd=").append(this.clientPwd) + .append("tenantName=").append(this.tenantName) + .append("lv=").append(this.lv) + .append("isOnline=").append(this.isOnline) + .append("parentCode=").append(this.parentCode) + .append("supplierId=").append(this.supplierId) + .append("roleStr=").append(this.roleStr) + + + .toString(); + } + + /** + * 鍏嬮殕 + */ + public FinSysTenantUser $clone() { + FinSysTenantUser fin_sys_tenant_user = new FinSysTenantUser(); + + // 鏁版嵁搴撳悕绉� + //fin_sys_tenant_user.setDatabaseName_(this.getDatabaseName_()); + + // 涓婚敭 + if (this.isset_id) { + fin_sys_tenant_user.setId(this.getId()); + } + // 鏅�氬睘鎬� + if (this.isset_userName) { + fin_sys_tenant_user.setUserName(this.getUserName()); + } + if (this.isset_avatar) { + fin_sys_tenant_user.setAvatar(this.getAvatar()); + } + if (this.isset_email) { + fin_sys_tenant_user.setEmail(this.getEmail()); + } + if (this.isset_userCode) { + fin_sys_tenant_user.setUserCode(this.getUserCode()); + } + if (this.isset_tenantId) { + fin_sys_tenant_user.setTenantId(this.getTenantId()); + } + if (this.isset_createBy) { + fin_sys_tenant_user.setCreateBy(this.getCreateBy()); + } + if (this.isset_createTime) { + fin_sys_tenant_user.setCreateTime(this.getCreateTime()); + } + if (this.isset_updateBy) { + fin_sys_tenant_user.setUpdateBy(this.getUpdateBy()); + } + if (this.isset_updateTime) { + fin_sys_tenant_user.setUpdateTime(this.getUpdateTime()); + } + if (this.isset_sex) { + fin_sys_tenant_user.setSex(this.getSex()); + } + if (this.isset_status) { + fin_sys_tenant_user.setStatus(this.getStatus()); + } + if (this.isset_seq) { + fin_sys_tenant_user.setSeq(this.getSeq()); + } + if (this.isset_remark) { + fin_sys_tenant_user.setRemark(this.getRemark()); + } + if (this.isset_sysUserId) { + fin_sys_tenant_user.setSysUserId(this.getSysUserId()); + } + if (this.isset_sysDeptId) { + fin_sys_tenant_user.setSysDeptId(this.getSysDeptId()); + } + if (this.isset_tenantCode) { + fin_sys_tenant_user.setTenantCode(this.getTenantCode()); + } + if (this.isset_userPhone) { + fin_sys_tenant_user.setUserPhone(this.getUserPhone()); + } + if (this.isset_isDelete) { + fin_sys_tenant_user.setIsDelete(this.getIsDelete()); + } + if (this.isset_kfStatus) { + fin_sys_tenant_user.setKfStatus(this.getKfStatus()); + } + if (this.isset_agentJid) { + fin_sys_tenant_user.setAgentJid(this.getAgentJid()); + } + if (this.isset_workgroupJid) { + fin_sys_tenant_user.setWorkgroupJid(this.getWorkgroupJid()); + } + if (this.isset_clientNumber) { + fin_sys_tenant_user.setClientNumber(this.getClientNumber()); + } + if (this.isset_clientPwd) { + fin_sys_tenant_user.setClientPwd(this.getClientPwd()); + } + if (this.isset_tenantName) { + fin_sys_tenant_user.setTenantName(this.getTenantName()); + } + if (this.isset_lv) { + fin_sys_tenant_user.setLv(this.getLv()); + } + if (this.isset_isOnline) { + fin_sys_tenant_user.setIsOnline(this.getIsOnline()); + } + if (this.isset_parentCode) { + fin_sys_tenant_user.setParentCode(this.getParentCode()); + } + if (this.isset_supplierId) { + fin_sys_tenant_user.setSupplierId(this.getSupplierId()); + } + if (this.isset_roleStr) { + fin_sys_tenant_user.setRoleStr(this.getRoleStr()); + } + + + + + return fin_sys_tenant_user; + } +} diff --git a/consum-model-pojo/src/main/java/com/consum/model/po/FinSysTenantUser_mapper.java b/consum-model-pojo/src/main/java/com/consum/model/po/FinSysTenantUser_mapper.java new file mode 100644 index 0000000..aaf437a --- /dev/null +++ b/consum-model-pojo/src/main/java/com/consum/model/po/FinSysTenantUser_mapper.java @@ -0,0 +1,582 @@ +package com.consum.model.po; + +import com.walker.jdbc.BaseMapper; +import com.walker.jdbc.ResultSetUtils; +import com.walker.jdbc.SqlAndParameters; +import com.walker.jdbc.sqlgen.DeleteBuilder; +import com.walker.jdbc.sqlgen.InsertBuilder; +import com.walker.jdbc.sqlgen.SelectBuilder; +import com.walker.jdbc.sqlgen.UpdateBuilder; +import org.springframework.jdbc.core.RowMapper; + +import java.sql.ResultSet; +import java.sql.SQLException; +import java.util.Map; + +/** + * 琛ㄥ悕:FIN_SYS_TENANT_USER * + * + * @author genrator + */ +public class FinSysTenantUser_mapper extends FinSysTenantUser implements BaseMapper<FinSysTenantUser> { + // 搴忓垪鍖栫増鏈彿 + private static final long serialVersionUID = 1L; + + public static final RowMapper<FinSysTenantUser> ROW_MAPPER = new FinSysTenantUserRowMapper(); + + // 涓婚敭 + public static final String Id = "id"; + // 鏅�氬睘鎬� + public static final String UserName = "user_name"; + public static final String Avatar = "avatar"; + public static final String Email = "email"; + public static final String UserCode = "user_code"; + public static final String TenantId = "tenant_id"; + public static final String CreateBy = "create_by"; + public static final String CreateTime = "create_time"; + public static final String UpdateBy = "update_by"; + public static final String UpdateTime = "update_time"; + public static final String Sex = "sex"; + public static final String Status = "status"; + public static final String Seq = "seq"; + public static final String Remark = "remark"; + public static final String SysUserId = "sys_user_id"; + public static final String SysDeptId = "sys_dept_id"; + public static final String TenantCode = "tenant_code"; + public static final String UserPhone = "user_phone"; + public static final String IsDelete = "is_delete"; + public static final String KfStatus = "kf_status"; + public static final String AgentJid = "agent_jid"; + public static final String WorkgroupJid = "workgroup_jid"; + public static final String ClientNumber = "client_number"; + public static final String ClientPwd = "client_pwd"; + public static final String TenantName = "tenant_name"; + public static final String Lv = "lv"; + public static final String SupplierId = "supplier_Id"; + public static final String RoleStr = "roleStr"; + public static final String IsOnline = "is_online"; + public static final String ParentCode = "parent_code"; + + /** + * 榛樿鏋勯�犲嚱鏁� + */ + public FinSysTenantUser_mapper(FinSysTenantUser finSysTenantUser) { + if (finSysTenantUser == null) { + throw new IllegalArgumentException("po鍙傛暟涓嶅厑璁镐负绌猴紒"); + } + //涓婚敭 + if (finSysTenantUser.isset_id) { + this.setId(finSysTenantUser.getId()); + } + //鏅�氬睘鎬� + if (finSysTenantUser.isset_userName) { + this.setUserName(finSysTenantUser.getUserName()); + } + if (finSysTenantUser.isset_avatar) { + this.setAvatar(finSysTenantUser.getAvatar()); + } + if (finSysTenantUser.isset_email) { + this.setEmail(finSysTenantUser.getEmail()); + } + if (finSysTenantUser.isset_userCode) { + this.setUserCode(finSysTenantUser.getUserCode()); + } + if (finSysTenantUser.isset_tenantId) { + this.setTenantId(finSysTenantUser.getTenantId()); + } + if (finSysTenantUser.isset_createBy) { + this.setCreateBy(finSysTenantUser.getCreateBy()); + } + if (finSysTenantUser.isset_createTime) { + this.setCreateTime(finSysTenantUser.getCreateTime()); + } + if (finSysTenantUser.isset_updateBy) { + this.setUpdateBy(finSysTenantUser.getUpdateBy()); + } + if (finSysTenantUser.isset_updateTime) { + this.setUpdateTime(finSysTenantUser.getUpdateTime()); + } + if (finSysTenantUser.isset_sex) { + this.setSex(finSysTenantUser.getSex()); + } + if (finSysTenantUser.isset_status) { + this.setStatus(finSysTenantUser.getStatus()); + } + if (finSysTenantUser.isset_seq) { + this.setSeq(finSysTenantUser.getSeq()); + } + if (finSysTenantUser.isset_remark) { + this.setRemark(finSysTenantUser.getRemark()); + } + if (finSysTenantUser.isset_sysUserId) { + this.setSysUserId(finSysTenantUser.getSysUserId()); + } + if (finSysTenantUser.isset_sysDeptId) { + this.setSysDeptId(finSysTenantUser.getSysDeptId()); + } + if (finSysTenantUser.isset_tenantCode) { + this.setTenantCode(finSysTenantUser.getTenantCode()); + } + if (finSysTenantUser.isset_userPhone) { + this.setUserPhone(finSysTenantUser.getUserPhone()); + } + if (finSysTenantUser.isset_isDelete) { + this.setIsDelete(finSysTenantUser.getIsDelete()); + } + if (finSysTenantUser.isset_kfStatus) { + this.setKfStatus(finSysTenantUser.getKfStatus()); + } + if (finSysTenantUser.isset_agentJid) { + this.setAgentJid(finSysTenantUser.getAgentJid()); + } + if (finSysTenantUser.isset_workgroupJid) { + this.setWorkgroupJid(finSysTenantUser.getWorkgroupJid()); + } + if (finSysTenantUser.isset_clientNumber) { + this.setClientNumber(finSysTenantUser.getClientNumber()); + } + if (finSysTenantUser.isset_clientPwd) { + this.setClientPwd(finSysTenantUser.getClientPwd()); + } + if (finSysTenantUser.isset_tenantName) { + this.setTenantName(finSysTenantUser.getTenantName()); + } + if (finSysTenantUser.isset_lv) { + this.setLv(finSysTenantUser.getLv()); + } + if (finSysTenantUser.isset_supplierId) { + this.setSupplierId(finSysTenantUser.getSupplierId()); + } + + if (finSysTenantUser.isset_roleStr) { + this.setRoleStr(finSysTenantUser.getRoleStr()); + } + + + if (finSysTenantUser.isset_isOnline) { + this.setIsOnline(finSysTenantUser.getIsOnline()); + } + if (finSysTenantUser.isset_parentCode) { + this.setParentCode(finSysTenantUser.getParentCode()); + } + // 鍘绘帀锛�2022-09-07 + // this.setDatabaseName_(fin_sys_tenant_user.getDatabaseName_()); + } + + /** + * 鑾峰彇琛ㄥ悕 + */ + @Override + public String getTableName_() { + String tableName = "fin_sys_tenant_user"; + /** + if (StringUtils.isNotEmpty(this.getDatabaseName_())) { + return this.getDatabaseName_() + "." + tableName; + } else { + return tableName; + } + */ + return tableName; + } + + /** + * 鑾峰彇涓婚敭鍚嶇О + */ + @Override + public String getPkName_() { + return Id; + } + + /** + * 鑾峰彇涓婚敭鍊� + */ + @Override + public Object getPkValue_() { + return this.getId(); + } + + /** + * 鑾峰彇鎻掑叆璇彞鍜屽弬鏁� + */ + @Override + public SqlAndParameters<Map<String, Object>> getInsertSql_() { + InsertBuilder ib = new InsertBuilder(this.getTableName_()); + ib.set(Id, this.getId()); + ib.set(UserName, this.getUserName(), this.isset_userName); + ib.set(Avatar, this.getAvatar(), this.isset_avatar); + ib.set(Email, this.getEmail(), this.isset_email); + ib.set(UserCode, this.getUserCode(), this.isset_userCode); + ib.set(TenantId, this.getTenantId(), this.isset_tenantId); + ib.set(CreateBy, this.getCreateBy(), this.isset_createBy); + ib.set(CreateTime, this.getCreateTime(), this.isset_createTime); + ib.set(UpdateBy, this.getUpdateBy(), this.isset_updateBy); + ib.set(UpdateTime, this.getUpdateTime(), this.isset_updateTime); + ib.set(Sex, this.getSex(), this.isset_sex); + ib.set(Status, this.getStatus(), this.isset_status); + ib.set(Seq, this.getSeq(), this.isset_seq); + ib.set(Remark, this.getRemark(), this.isset_remark); + ib.set(SysUserId, this.getSysUserId(), this.isset_sysUserId); + ib.set(SysDeptId, this.getSysDeptId(), this.isset_sysDeptId); + ib.set(TenantCode, this.getTenantCode(), this.isset_tenantCode); + ib.set(UserPhone, this.getUserPhone(), this.isset_userPhone); + ib.set(IsDelete, this.getIsDelete(), this.isset_isDelete); + ib.set(KfStatus, this.getKfStatus(), this.isset_kfStatus); + ib.set(SupplierId, this.getSupplierId(), this.isset_supplierId); + ib.set(AgentJid, this.getAgentJid(), this.isset_agentJid); + ib.set(WorkgroupJid, this.getWorkgroupJid(), this.isset_workgroupJid); + ib.set(ClientNumber, this.getClientNumber(), this.isset_clientNumber); + ib.set(ClientPwd, this.getClientPwd(), this.isset_clientPwd); + return ib.genMapSql(); + } + + /** + * 鑾峰彇鏇存柊璇彞鍜屽弬鏁� + */ + @Override + public SqlAndParameters<Map<String, Object>> getUpdateSql_() { + UpdateBuilder ub = new UpdateBuilder(this.getTableName_()); + ub.set(UserName, this.getUserName(), this.isset_userName); + ub.set(Avatar, this.getAvatar(), this.isset_avatar); + ub.set(Email, this.getEmail(), this.isset_email); + ub.set(UserCode, this.getUserCode(), this.isset_userCode); + ub.set(TenantId, this.getTenantId(), this.isset_tenantId); + ub.set(CreateBy, this.getCreateBy(), this.isset_createBy); + ub.set(CreateTime, this.getCreateTime(), this.isset_createTime); + ub.set(UpdateBy, this.getUpdateBy(), this.isset_updateBy); + ub.set(UpdateTime, this.getUpdateTime(), this.isset_updateTime); + ub.set(Sex, this.getSex(), this.isset_sex); + ub.set(Status, this.getStatus(), this.isset_status); + ub.set(Seq, this.getSeq(), this.isset_seq); + ub.set(Remark, this.getRemark(), this.isset_remark); + ub.set(SysUserId, this.getSysUserId(), this.isset_sysUserId); + ub.set(SysDeptId, this.getSysDeptId(), this.isset_sysDeptId); + ub.set(TenantCode, this.getTenantCode(), this.isset_tenantCode); + ub.set(UserPhone, this.getUserPhone(), this.isset_userPhone); + ub.set(IsDelete, this.getIsDelete(), this.isset_isDelete); + ub.set(KfStatus, this.getKfStatus(), this.isset_kfStatus); + ub.set(SupplierId, this.getSupplierId(), this.isset_supplierId); + ub.set(AgentJid, this.getAgentJid(), this.isset_agentJid); + ub.set(WorkgroupJid, this.getWorkgroupJid(), this.isset_workgroupJid); + ub.set(ClientNumber, this.getClientNumber(), this.isset_clientNumber); + ub.set(ClientPwd, this.getClientPwd(), this.isset_clientPwd); + ub.where(this.getPkName_(), this.getPkValue_()); + return ub.genMapSql(); + } + + /** + * 鑾峰彇鏇存柊璇彞鍜屽弬鏁� + */ + @Override + public SqlAndParameters<Map<String, Object>> getUpdateSql_(String where, Map<String, Object> parameters) { + UpdateBuilder ub = new UpdateBuilder(this.getTableName_()); + ub.set(UserName, this.getUserName(), this.isset_userName); + ub.set(Avatar, this.getAvatar(), this.isset_avatar); + ub.set(Email, this.getEmail(), this.isset_email); + ub.set(UserCode, this.getUserCode(), this.isset_userCode); + ub.set(TenantId, this.getTenantId(), this.isset_tenantId); + ub.set(CreateBy, this.getCreateBy(), this.isset_createBy); + ub.set(CreateTime, this.getCreateTime(), this.isset_createTime); + ub.set(UpdateBy, this.getUpdateBy(), this.isset_updateBy); + ub.set(UpdateTime, this.getUpdateTime(), this.isset_updateTime); + ub.set(Sex, this.getSex(), this.isset_sex); + ub.set(Status, this.getStatus(), this.isset_status); + ub.set(Seq, this.getSeq(), this.isset_seq); + ub.set(Remark, this.getRemark(), this.isset_remark); + ub.set(SysUserId, this.getSysUserId(), this.isset_sysUserId); + ub.set(SysDeptId, this.getSysDeptId(), this.isset_sysDeptId); + ub.set(TenantCode, this.getTenantCode(), this.isset_tenantCode); + ub.set(UserPhone, this.getUserPhone(), this.isset_userPhone); + ub.set(IsDelete, this.getIsDelete(), this.isset_isDelete); + ub.set(KfStatus, this.getKfStatus(), this.isset_kfStatus); + ub.set(SupplierId, this.getSupplierId(), this.isset_supplierId); + ub.set(AgentJid, this.getAgentJid(), this.isset_agentJid); + ub.set(WorkgroupJid, this.getWorkgroupJid(), this.isset_workgroupJid); + ub.set(ClientNumber, this.getClientNumber(), this.isset_clientNumber); + ub.set(ClientPwd, this.getClientPwd(), this.isset_clientPwd); + return ub.genMapSql(where, parameters); + } + + /** + * 鑾峰彇鏇存柊璇彞鍜屽弬鏁� + */ + @Override + public SqlAndParameters<Object[]> getUpdateSql_(String where, Object[] parameters) { + UpdateBuilder ub = new UpdateBuilder(this.getTableName_()); + ub.set(UserName, this.getUserName(), this.isset_userName); + ub.set(Avatar, this.getAvatar(), this.isset_avatar); + ub.set(Email, this.getEmail(), this.isset_email); + ub.set(UserCode, this.getUserCode(), this.isset_userCode); + ub.set(TenantId, this.getTenantId(), this.isset_tenantId); + ub.set(CreateBy, this.getCreateBy(), this.isset_createBy); + ub.set(CreateTime, this.getCreateTime(), this.isset_createTime); + ub.set(UpdateBy, this.getUpdateBy(), this.isset_updateBy); + ub.set(UpdateTime, this.getUpdateTime(), this.isset_updateTime); + ub.set(Sex, this.getSex(), this.isset_sex); + ub.set(Status, this.getStatus(), this.isset_status); + ub.set(Seq, this.getSeq(), this.isset_seq); + ub.set(Remark, this.getRemark(), this.isset_remark); + ub.set(SysUserId, this.getSysUserId(), this.isset_sysUserId); + ub.set(SysDeptId, this.getSysDeptId(), this.isset_sysDeptId); + ub.set(TenantCode, this.getTenantCode(), this.isset_tenantCode); + ub.set(UserPhone, this.getUserPhone(), this.isset_userPhone); + ub.set(IsDelete, this.getIsDelete(), this.isset_isDelete); + ub.set(KfStatus, this.getKfStatus(), this.isset_kfStatus); + ub.set(SupplierId, this.getSupplierId(), this.isset_supplierId); + ub.set(AgentJid, this.getAgentJid(), this.isset_agentJid); + ub.set(WorkgroupJid, this.getWorkgroupJid(), this.isset_workgroupJid); + ub.set(ClientNumber, this.getClientNumber(), this.isset_clientNumber); + ub.set(ClientPwd, this.getClientPwd(), this.isset_clientPwd); + return ub.genArraySql(where, parameters); + } + + /** + * 鑾峰彇鍒犻櫎璇彞鍜屽弬鏁� + */ + @Override + public SqlAndParameters<Map<String, Object>> getDeleteSql_() { + DeleteBuilder db = new DeleteBuilder(this.getTableName_()); + db.where(this.getPkName_(), this.getPkValue_()); + return db.genMapSql(); + } + + /** + * 鑾峰彇鍒犻櫎璇彞鍜屽弬鏁� + */ + @Override + public SqlAndParameters<Map<String, Object>> getDeleteSql_(String where, Map<String, Object> parameters) { + DeleteBuilder db = new DeleteBuilder(this.getTableName_()); + return db.genMapSql(where, parameters); + } + + /** + * 鑾峰彇鍒犻櫎璇彞鍜屽弬鏁� + */ + @Override + public SqlAndParameters<Object[]> getDeleteSql_(String where, Object[] parameters) { + DeleteBuilder db = new DeleteBuilder(this.getTableName_()); + return db.genArraySql(where, parameters); + } + + /** + * 鑾峰彇鍗曡鏌ヨ璇彞鍜屽弬鏁� + */ + @Override + public SqlAndParameters<Map<String, Object>> getSingleSql_() { + SelectBuilder sb = new SelectBuilder(this.getTableName_()); + sb.where(this.getPkName_(), this.getPkValue_()); + return sb.genMapSql(); + } + + + /** + * 鑾峰彇鏌ヨ璇彞鍜屽弬鏁� + */ + @Override + public SqlAndParameters<Map<String, Object>> getSelectSql_(String where, Map<String, Object> parameters) { + return new SqlAndParameters<>("select id, user_name, user_code, tenant_id, create_by, create_time, update_by, update_time, sex, status, seq, remark, sys_user_id, sys_dept_id, tenant_code, user_phone, is_delete, kf_status, supplier_id, agent_jid, workgroup_jid, client_number, client_pwd from " + this.getTableName_() + " " + where, parameters); + } + + /** + * 鑾峰彇鏌ヨ璇彞鍜屽弬鏁� + */ + @Override + public SqlAndParameters<Object[]> getSelectSql_(String where, Object[] parameters) { + return new SqlAndParameters<>("select id, user_name, user_code, tenant_id, create_by, create_time, update_by, update_time, sex, status, seq, remark, sys_user_id, sys_dept_id, tenant_code, user_phone, is_delete, kf_status, supplier_id, agent_jid, workgroup_jid, client_number, client_pwd from " + this.getTableName_() + " " + where, parameters); + } + + /** + * 灏唕esultset鐨勪竴琛岃浆鍖栦负po + */ + @Override + public FinSysTenantUser mapRow(ResultSet rs, int i) throws SQLException { + return ROW_MAPPER.mapRow(rs, i); + } + + /** + * 鍏嬮殕 + */ + public FinSysTenantUser toFinSysTenantUser() { + return super.$clone(); + } +} + +/** + * fin_sys_tenant_user RowMapper + * + * @author genrator + */ +class FinSysTenantUserRowMapper implements RowMapper<FinSysTenantUser> { + + @Override + public FinSysTenantUser mapRow(ResultSet rs, int i) throws SQLException { + ResultSetUtils resultSetUtils = new ResultSetUtils(); + FinSysTenantUser fin_sys_tenant_user = new FinSysTenantUser(); + Integer columnIndex; + //涓婚敭 + columnIndex = resultSetUtils.findColumn(rs, FinSysTenantUser_mapper.Id); + if (columnIndex > 0) { + fin_sys_tenant_user.setId(rs.getLong(columnIndex)); + } + //鏅�氬睘鎬� + columnIndex = resultSetUtils.findColumn(rs, FinSysTenantUser_mapper.UserName); + if (columnIndex > 0) { + fin_sys_tenant_user.setUserName(rs.getString(columnIndex)); + } + columnIndex = resultSetUtils.findColumn(rs, FinSysTenantUser_mapper.Avatar); + if (columnIndex > 0) { + fin_sys_tenant_user.setAvatar(rs.getString(columnIndex)); + } + columnIndex = resultSetUtils.findColumn(rs, FinSysTenantUser_mapper.Email); + if (columnIndex > 0) { + fin_sys_tenant_user.setEmail(rs.getString(columnIndex)); + } + columnIndex = resultSetUtils.findColumn(rs, FinSysTenantUser_mapper.UserCode); + if (columnIndex > 0) { + fin_sys_tenant_user.setUserCode(rs.getString(columnIndex)); + } + columnIndex = resultSetUtils.findColumn(rs, FinSysTenantUser_mapper.TenantId); + if (columnIndex > 0) { + fin_sys_tenant_user.setTenantId(rs.getString(columnIndex)); + } + columnIndex = resultSetUtils.findColumn(rs, FinSysTenantUser_mapper.CreateBy); + if (columnIndex > 0) { + fin_sys_tenant_user.setCreateBy(rs.getString(columnIndex)); + } + columnIndex = resultSetUtils.findColumn(rs, FinSysTenantUser_mapper.CreateTime); + if (columnIndex > 0) { + if (rs.getBigDecimal(columnIndex) == null) { + fin_sys_tenant_user.setCreateTime(null); + } else { + fin_sys_tenant_user.setCreateTime(rs.getLong(columnIndex)); + } + } + columnIndex = resultSetUtils.findColumn(rs, FinSysTenantUser_mapper.UpdateBy); + if (columnIndex > 0) { + fin_sys_tenant_user.setUpdateBy(rs.getString(columnIndex)); + } + columnIndex = resultSetUtils.findColumn(rs, FinSysTenantUser_mapper.UpdateTime); + if (columnIndex > 0) { + if (rs.getBigDecimal(columnIndex) == null) { + fin_sys_tenant_user.setUpdateTime(null); + } else { + fin_sys_tenant_user.setUpdateTime(rs.getLong(columnIndex)); + } + } + columnIndex = resultSetUtils.findColumn(rs, FinSysTenantUser_mapper.Sex); + if (columnIndex > 0) { + if (rs.getBigDecimal(columnIndex) == null) { + fin_sys_tenant_user.setSex(null); + } else { + fin_sys_tenant_user.setSex(rs.getInt(columnIndex)); + } + } + columnIndex = resultSetUtils.findColumn(rs, FinSysTenantUser_mapper.Status); + if (columnIndex > 0) { + if (rs.getBigDecimal(columnIndex) == null) { + fin_sys_tenant_user.setStatus(null); + } else { + fin_sys_tenant_user.setStatus(rs.getInt(columnIndex)); + } + } + columnIndex = resultSetUtils.findColumn(rs, FinSysTenantUser_mapper.Seq); + if (columnIndex > 0) { + if (rs.getBigDecimal(columnIndex) == null) { + fin_sys_tenant_user.setSeq(null); + } else { + fin_sys_tenant_user.setSeq(rs.getLong(columnIndex)); + } + } + columnIndex = resultSetUtils.findColumn(rs, FinSysTenantUser_mapper.Remark); + if (columnIndex > 0) { + fin_sys_tenant_user.setRemark(rs.getString(columnIndex)); + } + columnIndex = resultSetUtils.findColumn(rs, FinSysTenantUser_mapper.SysUserId); + if (columnIndex > 0) { + if (rs.getBigDecimal(columnIndex) == null) { + fin_sys_tenant_user.setSysUserId(null); + } else { + fin_sys_tenant_user.setSysUserId(rs.getLong(columnIndex)); + } + } + columnIndex = resultSetUtils.findColumn(rs, FinSysTenantUser_mapper.SysDeptId); + if (columnIndex > 0) { + if (rs.getBigDecimal(columnIndex) == null) { + fin_sys_tenant_user.setSysDeptId(null); + } else { + fin_sys_tenant_user.setSysDeptId(rs.getLong(columnIndex)); + } + } + columnIndex = resultSetUtils.findColumn(rs, FinSysTenantUser_mapper.TenantCode); + if (columnIndex > 0) { + fin_sys_tenant_user.setTenantCode(rs.getString(columnIndex)); + } + columnIndex = resultSetUtils.findColumn(rs, FinSysTenantUser_mapper.UserPhone); + if (columnIndex > 0) { + fin_sys_tenant_user.setUserPhone(rs.getString(columnIndex)); + } + columnIndex = resultSetUtils.findColumn(rs, FinSysTenantUser_mapper.IsDelete); + if (columnIndex > 0) { + if (rs.getBigDecimal(columnIndex) == null) { + fin_sys_tenant_user.setIsDelete(null); + } else { + fin_sys_tenant_user.setIsDelete(rs.getInt(columnIndex)); + } + } + columnIndex = resultSetUtils.findColumn(rs, FinSysTenantUser_mapper.TenantName); + if (columnIndex > 0) { + fin_sys_tenant_user.setTenantName(rs.getString(columnIndex)); + } + columnIndex = resultSetUtils.findColumn(rs, FinSysTenantUser_mapper.Lv); + if (columnIndex > 0) { + fin_sys_tenant_user.setLv(rs.getInt(columnIndex)); + } + + columnIndex = resultSetUtils.findColumn(rs, FinSysTenantUser_mapper.RoleStr); + if (columnIndex > 0) { + fin_sys_tenant_user.setRoleStr(rs.getString(columnIndex)); + } + + + columnIndex = resultSetUtils.findColumn(rs, FinSysTenantUser_mapper.SupplierId); + if (columnIndex > 0) { + if (rs.getBigDecimal(columnIndex) == null) { + fin_sys_tenant_user.setSupplierId(null); + } else { + fin_sys_tenant_user.setSupplierId(rs.getLong(columnIndex)); + } + } + columnIndex = resultSetUtils.findColumn(rs, FinSysTenantUser_mapper.IsOnline); + if (columnIndex > 0) { + fin_sys_tenant_user.setIsOnline(rs.getBoolean(columnIndex)); + } + columnIndex = resultSetUtils.findColumn(rs, FinSysTenantUser_mapper.ParentCode); + if (columnIndex > 0) { + fin_sys_tenant_user.setParentCode(rs.getString(columnIndex)); + } + columnIndex = resultSetUtils.findColumn(rs, FinSysTenantUser_mapper.KfStatus); + if (columnIndex > 0) { + if (rs.getBigDecimal(columnIndex) == null) { + fin_sys_tenant_user.setKfStatus(null); + } else { + fin_sys_tenant_user.setKfStatus(rs.getInt(columnIndex)); + } + } + columnIndex = resultSetUtils.findColumn(rs, FinSysTenantUser_mapper.AgentJid); + if (columnIndex > 0) { + fin_sys_tenant_user.setAgentJid(rs.getString(columnIndex)); + } + columnIndex = resultSetUtils.findColumn(rs, FinSysTenantUser_mapper.WorkgroupJid); + if (columnIndex > 0) { + fin_sys_tenant_user.setWorkgroupJid(rs.getString(columnIndex)); + } + columnIndex = resultSetUtils.findColumn(rs, FinSysTenantUser_mapper.ClientNumber); + if (columnIndex > 0) { + fin_sys_tenant_user.setClientNumber(rs.getString(columnIndex)); + } + columnIndex = resultSetUtils.findColumn(rs, FinSysTenantUser_mapper.ClientPwd); + if (columnIndex > 0) { + fin_sys_tenant_user.setClientPwd(rs.getString(columnIndex)); + } + return fin_sys_tenant_user; + } +} diff --git a/consum-model-pojo/src/main/java/com/consum/model/po/FinSysTenant_mapper.java b/consum-model-pojo/src/main/java/com/consum/model/po/FinSysTenant_mapper.java new file mode 100644 index 0000000..9a42783 --- /dev/null +++ b/consum-model-pojo/src/main/java/com/consum/model/po/FinSysTenant_mapper.java @@ -0,0 +1,733 @@ +package com.consum.model.po; + +import com.walker.jdbc.BaseMapper; +import com.walker.jdbc.ResultSetUtils; +import com.walker.jdbc.SqlAndParameters; +import com.walker.jdbc.sqlgen.DeleteBuilder; +import com.walker.jdbc.sqlgen.InsertBuilder; +import com.walker.jdbc.sqlgen.SelectBuilder; +import com.walker.jdbc.sqlgen.UpdateBuilder; +import com.walker.jdbc.util.StringUtils; + +import org.springframework.jdbc.core.RowMapper; + +import java.sql.ResultSet; +import java.sql.SQLException; +import java.util.Map; + +/** + * 琛ㄥ悕:FIN_SYS_TENANT * + * @author genrator + */ +public class FinSysTenant_mapper extends FinSysTenant implements BaseMapper<FinSysTenant> { + // 搴忓垪鍖栫増鏈彿 + private static final long serialVersionUID = 1L; + + public static final RowMapper<FinSysTenant> ROW_MAPPER = new FinSysTenantRowMapper(); + + // 涓婚敭 + public static final String TempId = "temp_id"; + // 鏅�氬睘鎬� + public static final String Id = "id"; + public static final String ParentId = "parent_id"; + public static final String Code = "code"; + public static final String FinanceOrgCode = "finance_org_code"; + public static final String Name = "name"; + public static final String Lv1Id = "lv1_id"; + public static final String Lv1Name = "lv1_name"; + public static final String Lv2Id = "lv2_id"; + public static final String Lv2Name = "lv2_name"; + public static final String Lv3Id = "lv3_id"; + public static final String Lv3Name = "lv3_name"; + public static final String Lv4Id = "lv4_id"; + public static final String Lv4Name = "lv4_name"; + public static final String Lv5Id = "lv5_id"; + public static final String Lv5Name = "lv5_name"; + public static final String Lv = "lv"; + public static final String OrderNum = "order_num"; + public static final String CreateTime3 = "create_time3"; + public static final String Modified = "modified"; + public static final String Summary = "summary"; + public static final String Address = "address"; + public static final String Lng = "lng"; + public static final String Lat = "lat"; + public static final String OpenStatus = "open_status"; + public static final String OpenTime = "open_time"; + public static final String Status = "status"; + public static final String IsDelete = "is_delete"; + public static final String Path = "path"; + public static final String VenueName = "venue_name"; + public static final String CityId = "city_id"; + public static final String OrgPhoto = "org_photo"; + public static final String ShortName = "short_name"; + public static final String TenantType = "tenant_type"; + public static final String CreateBy = "create_by"; + public static final String CreateTime = "create_time"; + public static final String UpdateBy = "update_by"; + public static final String UpdateTime = "update_time"; + public static final String BelongProvince = "belong_province"; + + /** + * 榛樿鏋勯�犲嚱鏁� + */ + public FinSysTenant_mapper(FinSysTenant finSysTenant) { + if (finSysTenant == null) { + throw new IllegalArgumentException("po鍙傛暟涓嶅厑璁镐负绌猴紒"); + } + //涓婚敭 + if (finSysTenant.isset_tempId) { + this.setTempId(finSysTenant.getTempId()); + } + //鏅�氬睘鎬� + if (finSysTenant.isset_id) { + this.setId(finSysTenant.getId()); + } + if (finSysTenant.isset_parentId) { + this.setParentId(finSysTenant.getParentId()); + } + if (finSysTenant.isset_code) { + this.setCode(finSysTenant.getCode()); + } + if (finSysTenant.isset_financeOrgCode) { + this.setFinanceOrgCode(finSysTenant.getFinanceOrgCode()); + } + if (finSysTenant.isset_name) { + this.setName(finSysTenant.getName()); + } + if (finSysTenant.isset_lv1Id) { + this.setLv1Id(finSysTenant.getLv1Id()); + } + if (finSysTenant.isset_lv1Name) { + this.setLv1Name(finSysTenant.getLv1Name()); + } + if (finSysTenant.isset_lv2Id) { + this.setLv2Id(finSysTenant.getLv2Id()); + } + if (finSysTenant.isset_lv2Name) { + this.setLv2Name(finSysTenant.getLv2Name()); + } + if (finSysTenant.isset_lv3Id) { + this.setLv3Id(finSysTenant.getLv3Id()); + } + if (finSysTenant.isset_lv3Name) { + this.setLv3Name(finSysTenant.getLv3Name()); + } + if (finSysTenant.isset_lv4Id) { + this.setLv4Id(finSysTenant.getLv4Id()); + } + if (finSysTenant.isset_lv4Name) { + this.setLv4Name(finSysTenant.getLv4Name()); + } + if (finSysTenant.isset_lv5Id) { + this.setLv5Id(finSysTenant.getLv5Id()); + } + if (finSysTenant.isset_lv5Name) { + this.setLv5Name(finSysTenant.getLv5Name()); + } + if (finSysTenant.isset_lv) { + this.setLv(finSysTenant.getLv()); + } + if (finSysTenant.isset_orderNum) { + this.setOrderNum(finSysTenant.getOrderNum()); + } + if (finSysTenant.isset_createTime3) { + this.setCreateTime3(finSysTenant.getCreateTime3()); + } + if (finSysTenant.isset_modified) { + this.setModified(finSysTenant.getModified()); + } + if (finSysTenant.isset_summary) { + this.setSummary(finSysTenant.getSummary()); + } + if (finSysTenant.isset_address) { + this.setAddress(finSysTenant.getAddress()); + } + if (finSysTenant.isset_lng) { + this.setLng(finSysTenant.getLng()); + } + if (finSysTenant.isset_lat) { + this.setLat(finSysTenant.getLat()); + } + if (finSysTenant.isset_openStatus) { + this.setOpenStatus(finSysTenant.getOpenStatus()); + } + if (finSysTenant.isset_openTime) { + this.setOpenTime(finSysTenant.getOpenTime()); + } + if (finSysTenant.isset_status) { + this.setStatus(finSysTenant.getStatus()); + } + if (finSysTenant.isset_isDelete) { + this.setIsDelete(finSysTenant.getIsDelete()); + } + if (finSysTenant.isset_path) { + this.setPath(finSysTenant.getPath()); + } + if (finSysTenant.isset_venueName) { + this.setVenueName(finSysTenant.getVenueName()); + } + if (finSysTenant.isset_cityId) { + this.setCityId(finSysTenant.getCityId()); + } + if (finSysTenant.isset_orgPhoto) { + this.setOrgPhoto(finSysTenant.getOrgPhoto()); + } + if (finSysTenant.isset_shortName) { + this.setShortName(finSysTenant.getShortName()); + } + if (finSysTenant.isset_tenantType) { + this.setTenantType(finSysTenant.getTenantType()); + } + if (finSysTenant.isset_createBy) { + this.setCreateBy(finSysTenant.getCreateBy()); + } + if (finSysTenant.isset_createTime) { + this.setCreateTime(finSysTenant.getCreateTime()); + } + if (finSysTenant.isset_updateBy) { + this.setUpdateBy(finSysTenant.getUpdateBy()); + } + if (finSysTenant.isset_updateTime) { + this.setUpdateTime(finSysTenant.getUpdateTime()); + } + if (finSysTenant.isset_belongProvince) { + this.setBelongProvince(finSysTenant.getBelongProvince()); + } + // 鍘绘帀锛�2022-09-07 + // this.setDatabaseName_(fin_sys_tenant.getDatabaseName_()); + } + + /** + * 鑾峰彇琛ㄥ悕 + */ + @Override + public String getTableName_() { + String tableName = "fin_sys_tenant"; + /** + if (StringUtils.isNotEmpty(this.getDatabaseName_())) { + return this.getDatabaseName_() + "." + tableName; + } else { + return tableName; + } + */ + return tableName; + } + + /** + * 鑾峰彇涓婚敭鍚嶇О + */ + @Override + public String getPkName_() { + return TempId; + } + + /** + * 鑾峰彇涓婚敭鍊� + */ + @Override + public Object getPkValue_() { + return this.getTempId(); + } + + /** + * 鑾峰彇鎻掑叆璇彞鍜屽弬鏁� + */ + @Override + public SqlAndParameters<Map<String, Object>> getInsertSql_() { + InsertBuilder ib = new InsertBuilder(this.getTableName_()); + ib.set(TempId, this.getTempId()); + ib.set(Id, this.getId(), this.isset_id); + ib.set(ParentId, this.getParentId(), this.isset_parentId); + ib.set(Code, this.getCode(), this.isset_code); + ib.set(FinanceOrgCode, this.getFinanceOrgCode(), this.isset_financeOrgCode); + ib.set(Name, this.getName(), this.isset_name); + ib.set(Lv1Id, this.getLv1Id(), this.isset_lv1Id); + ib.set(Lv1Name, this.getLv1Name(), this.isset_lv1Name); + ib.set(Lv2Id, this.getLv2Id(), this.isset_lv2Id); + ib.set(Lv2Name, this.getLv2Name(), this.isset_lv2Name); + ib.set(Lv3Id, this.getLv3Id(), this.isset_lv3Id); + ib.set(Lv3Name, this.getLv3Name(), this.isset_lv3Name); + ib.set(Lv4Id, this.getLv4Id(), this.isset_lv4Id); + ib.set(Lv4Name, this.getLv4Name(), this.isset_lv4Name); + ib.set(Lv5Id, this.getLv5Id(), this.isset_lv5Id); + ib.set(Lv5Name, this.getLv5Name(), this.isset_lv5Name); + ib.set(Lv, this.getLv(), this.isset_lv); + ib.set(OrderNum, this.getOrderNum(), this.isset_orderNum); + ib.set(CreateTime3, this.getCreateTime3(), this.isset_createTime3); + ib.set(Modified, this.getModified(), this.isset_modified); + ib.set(Summary, this.getSummary(), this.isset_summary); + ib.set(Address, this.getAddress(), this.isset_address); + ib.set(Lng, this.getLng(), this.isset_lng); + ib.set(Lat, this.getLat(), this.isset_lat); + ib.set(OpenStatus, this.getOpenStatus(), this.isset_openStatus); + ib.set(OpenTime, this.getOpenTime(), this.isset_openTime); + ib.set(Status, this.getStatus(), this.isset_status); + ib.set(IsDelete, this.getIsDelete(), this.isset_isDelete); + ib.set(Path, this.getPath(), this.isset_path); + ib.set(VenueName, this.getVenueName(), this.isset_venueName); + ib.set(CityId, this.getCityId(), this.isset_cityId); + ib.set(OrgPhoto, this.getOrgPhoto(), this.isset_orgPhoto); + ib.set(ShortName, this.getShortName(), this.isset_shortName); + ib.set(TenantType, this.getTenantType(), this.isset_tenantType); + ib.set(CreateBy, this.getCreateBy(), this.isset_createBy); + ib.set(CreateTime, this.getCreateTime(), this.isset_createTime); + ib.set(UpdateBy, this.getUpdateBy(), this.isset_updateBy); + ib.set(UpdateTime, this.getUpdateTime(), this.isset_updateTime); + ib.set(BelongProvince, this.getBelongProvince(), this.isset_belongProvince); + return ib.genMapSql(); + } + + /** + * 鑾峰彇鏇存柊璇彞鍜屽弬鏁� + */ + @Override + public SqlAndParameters<Map<String, Object>> getUpdateSql_() { + UpdateBuilder ub = new UpdateBuilder(this.getTableName_()); + ub.set(Id, this.getId(), this.isset_id); + ub.set(ParentId, this.getParentId(), this.isset_parentId); + ub.set(Code, this.getCode(), this.isset_code); + ub.set(FinanceOrgCode, this.getFinanceOrgCode(), this.isset_financeOrgCode); + ub.set(Name, this.getName(), this.isset_name); + ub.set(Lv1Id, this.getLv1Id(), this.isset_lv1Id); + ub.set(Lv1Name, this.getLv1Name(), this.isset_lv1Name); + ub.set(Lv2Id, this.getLv2Id(), this.isset_lv2Id); + ub.set(Lv2Name, this.getLv2Name(), this.isset_lv2Name); + ub.set(Lv3Id, this.getLv3Id(), this.isset_lv3Id); + ub.set(Lv3Name, this.getLv3Name(), this.isset_lv3Name); + ub.set(Lv4Id, this.getLv4Id(), this.isset_lv4Id); + ub.set(Lv4Name, this.getLv4Name(), this.isset_lv4Name); + ub.set(Lv5Id, this.getLv5Id(), this.isset_lv5Id); + ub.set(Lv5Name, this.getLv5Name(), this.isset_lv5Name); + ub.set(Lv, this.getLv(), this.isset_lv); + ub.set(OrderNum, this.getOrderNum(), this.isset_orderNum); + ub.set(CreateTime3, this.getCreateTime3(), this.isset_createTime3); + ub.set(Modified, this.getModified(), this.isset_modified); + ub.set(Summary, this.getSummary(), this.isset_summary); + ub.set(Address, this.getAddress(), this.isset_address); + ub.set(Lng, this.getLng(), this.isset_lng); + ub.set(Lat, this.getLat(), this.isset_lat); + ub.set(OpenStatus, this.getOpenStatus(), this.isset_openStatus); + ub.set(OpenTime, this.getOpenTime(), this.isset_openTime); + ub.set(Status, this.getStatus(), this.isset_status); + ub.set(IsDelete, this.getIsDelete(), this.isset_isDelete); + ub.set(Path, this.getPath(), this.isset_path); + ub.set(VenueName, this.getVenueName(), this.isset_venueName); + ub.set(CityId, this.getCityId(), this.isset_cityId); + ub.set(OrgPhoto, this.getOrgPhoto(), this.isset_orgPhoto); + ub.set(ShortName, this.getShortName(), this.isset_shortName); + ub.set(TenantType, this.getTenantType(), this.isset_tenantType); + ub.set(CreateBy, this.getCreateBy(), this.isset_createBy); + ub.set(CreateTime, this.getCreateTime(), this.isset_createTime); + ub.set(UpdateBy, this.getUpdateBy(), this.isset_updateBy); + ub.set(UpdateTime, this.getUpdateTime(), this.isset_updateTime); + ub.set(BelongProvince, this.getBelongProvince(), this.isset_belongProvince); + ub.where(this.getPkName_(), this.getPkValue_()); + return ub.genMapSql(); + } + + /** + * 鑾峰彇鏇存柊璇彞鍜屽弬鏁� + */ + @Override + public SqlAndParameters<Map<String, Object>> getUpdateSql_(String where, Map<String, Object> parameters) { + UpdateBuilder ub = new UpdateBuilder(this.getTableName_()); + ub.set(Id, this.getId(), this.isset_id); + ub.set(ParentId, this.getParentId(), this.isset_parentId); + ub.set(Code, this.getCode(), this.isset_code); + ub.set(FinanceOrgCode, this.getFinanceOrgCode(), this.isset_financeOrgCode); + ub.set(Name, this.getName(), this.isset_name); + ub.set(Lv1Id, this.getLv1Id(), this.isset_lv1Id); + ub.set(Lv1Name, this.getLv1Name(), this.isset_lv1Name); + ub.set(Lv2Id, this.getLv2Id(), this.isset_lv2Id); + ub.set(Lv2Name, this.getLv2Name(), this.isset_lv2Name); + ub.set(Lv3Id, this.getLv3Id(), this.isset_lv3Id); + ub.set(Lv3Name, this.getLv3Name(), this.isset_lv3Name); + ub.set(Lv4Id, this.getLv4Id(), this.isset_lv4Id); + ub.set(Lv4Name, this.getLv4Name(), this.isset_lv4Name); + ub.set(Lv5Id, this.getLv5Id(), this.isset_lv5Id); + ub.set(Lv5Name, this.getLv5Name(), this.isset_lv5Name); + ub.set(Lv, this.getLv(), this.isset_lv); + ub.set(OrderNum, this.getOrderNum(), this.isset_orderNum); + ub.set(CreateTime3, this.getCreateTime3(), this.isset_createTime3); + ub.set(Modified, this.getModified(), this.isset_modified); + ub.set(Summary, this.getSummary(), this.isset_summary); + ub.set(Address, this.getAddress(), this.isset_address); + ub.set(Lng, this.getLng(), this.isset_lng); + ub.set(Lat, this.getLat(), this.isset_lat); + ub.set(OpenStatus, this.getOpenStatus(), this.isset_openStatus); + ub.set(OpenTime, this.getOpenTime(), this.isset_openTime); + ub.set(Status, this.getStatus(), this.isset_status); + ub.set(IsDelete, this.getIsDelete(), this.isset_isDelete); + ub.set(Path, this.getPath(), this.isset_path); + ub.set(VenueName, this.getVenueName(), this.isset_venueName); + ub.set(CityId, this.getCityId(), this.isset_cityId); + ub.set(OrgPhoto, this.getOrgPhoto(), this.isset_orgPhoto); + ub.set(ShortName, this.getShortName(), this.isset_shortName); + ub.set(TenantType, this.getTenantType(), this.isset_tenantType); + ub.set(CreateBy, this.getCreateBy(), this.isset_createBy); + ub.set(CreateTime, this.getCreateTime(), this.isset_createTime); + ub.set(UpdateBy, this.getUpdateBy(), this.isset_updateBy); + ub.set(UpdateTime, this.getUpdateTime(), this.isset_updateTime); + ub.set(BelongProvince, this.getBelongProvince(), this.isset_belongProvince); + return ub.genMapSql(where, parameters); + } + + /** + * 鑾峰彇鏇存柊璇彞鍜屽弬鏁� + */ + @Override + public SqlAndParameters<Object[]> getUpdateSql_(String where, Object[] parameters) { + UpdateBuilder ub = new UpdateBuilder(this.getTableName_()); + ub.set(Id, this.getId(), this.isset_id); + ub.set(ParentId, this.getParentId(), this.isset_parentId); + ub.set(Code, this.getCode(), this.isset_code); + ub.set(FinanceOrgCode, this.getFinanceOrgCode(), this.isset_financeOrgCode); + ub.set(Name, this.getName(), this.isset_name); + ub.set(Lv1Id, this.getLv1Id(), this.isset_lv1Id); + ub.set(Lv1Name, this.getLv1Name(), this.isset_lv1Name); + ub.set(Lv2Id, this.getLv2Id(), this.isset_lv2Id); + ub.set(Lv2Name, this.getLv2Name(), this.isset_lv2Name); + ub.set(Lv3Id, this.getLv3Id(), this.isset_lv3Id); + ub.set(Lv3Name, this.getLv3Name(), this.isset_lv3Name); + ub.set(Lv4Id, this.getLv4Id(), this.isset_lv4Id); + ub.set(Lv4Name, this.getLv4Name(), this.isset_lv4Name); + ub.set(Lv5Id, this.getLv5Id(), this.isset_lv5Id); + ub.set(Lv5Name, this.getLv5Name(), this.isset_lv5Name); + ub.set(Lv, this.getLv(), this.isset_lv); + ub.set(OrderNum, this.getOrderNum(), this.isset_orderNum); + ub.set(CreateTime3, this.getCreateTime3(), this.isset_createTime3); + ub.set(Modified, this.getModified(), this.isset_modified); + ub.set(Summary, this.getSummary(), this.isset_summary); + ub.set(Address, this.getAddress(), this.isset_address); + ub.set(Lng, this.getLng(), this.isset_lng); + ub.set(Lat, this.getLat(), this.isset_lat); + ub.set(OpenStatus, this.getOpenStatus(), this.isset_openStatus); + ub.set(OpenTime, this.getOpenTime(), this.isset_openTime); + ub.set(Status, this.getStatus(), this.isset_status); + ub.set(IsDelete, this.getIsDelete(), this.isset_isDelete); + ub.set(Path, this.getPath(), this.isset_path); + ub.set(VenueName, this.getVenueName(), this.isset_venueName); + ub.set(CityId, this.getCityId(), this.isset_cityId); + ub.set(OrgPhoto, this.getOrgPhoto(), this.isset_orgPhoto); + ub.set(ShortName, this.getShortName(), this.isset_shortName); + ub.set(TenantType, this.getTenantType(), this.isset_tenantType); + ub.set(CreateBy, this.getCreateBy(), this.isset_createBy); + ub.set(CreateTime, this.getCreateTime(), this.isset_createTime); + ub.set(UpdateBy, this.getUpdateBy(), this.isset_updateBy); + ub.set(UpdateTime, this.getUpdateTime(), this.isset_updateTime); + ub.set(BelongProvince, this.getBelongProvince(), this.isset_belongProvince); + return ub.genArraySql(where, parameters); + } + + /** + * 鑾峰彇鍒犻櫎璇彞鍜屽弬鏁� + */ + @Override + public SqlAndParameters<Map<String, Object>> getDeleteSql_() { + DeleteBuilder db = new DeleteBuilder(this.getTableName_()); + db.where(this.getPkName_(), this.getPkValue_()); + return db.genMapSql(); + } + + /** + * 鑾峰彇鍒犻櫎璇彞鍜屽弬鏁� + */ + @Override + public SqlAndParameters<Map<String, Object>> getDeleteSql_(String where, Map<String, Object> parameters) { + DeleteBuilder db = new DeleteBuilder(this.getTableName_()); + return db.genMapSql(where, parameters); + } + + /** + * 鑾峰彇鍒犻櫎璇彞鍜屽弬鏁� + */ + @Override + public SqlAndParameters<Object[]> getDeleteSql_(String where, Object[] parameters) { + DeleteBuilder db = new DeleteBuilder(this.getTableName_()); + return db.genArraySql(where, parameters); + } + + /** + * 鑾峰彇鍗曡鏌ヨ璇彞鍜屽弬鏁� + */ + @Override + public SqlAndParameters<Map<String, Object>> getSingleSql_() { + SelectBuilder sb = new SelectBuilder(this.getTableName_()); + sb.where(this.getPkName_(), this.getPkValue_()); + return sb.genMapSql(); + } + + + /** + * 鑾峰彇鏌ヨ璇彞鍜屽弬鏁� + */ + @Override + public SqlAndParameters<Map<String, Object>> getSelectSql_(String where, Map<String, Object> parameters) { + return new SqlAndParameters<>("select temp_id, id, parent_id, code, finance_org_code, name, lv1_id, lv1_name, lv2_id, lv2_name, lv3_id, lv3_name, lv4_id, lv4_name, lv5_id, lv5_name, lv, order_num, create_time3, modified, summary, address, lng, lat, open_status, open_time, status, is_delete, path, venue_name, city_id, org_photo, short_name, tenant_type, create_by, create_time, update_by, update_time, belong_province from " + this.getTableName_() + " " + where, parameters); + } + + /** + * 鑾峰彇鏌ヨ璇彞鍜屽弬鏁� + */ + @Override + public SqlAndParameters<Object[]> getSelectSql_(String where, Object[] parameters) { + return new SqlAndParameters<>("select temp_id, id, parent_id, code, finance_org_code, name, lv1_id, lv1_name, lv2_id, lv2_name, lv3_id, lv3_name, lv4_id, lv4_name, lv5_id, lv5_name, lv, order_num, create_time3, modified, summary, address, lng, lat, open_status, open_time, status, is_delete, path, venue_name, city_id, org_photo, short_name, tenant_type, create_by, create_time, update_by, update_time, belong_province from " + this.getTableName_() + " " + where, parameters); + } + + /** + * 灏唕esultset鐨勪竴琛岃浆鍖栦负po + */ + @Override + public FinSysTenant mapRow(ResultSet rs, int i) throws SQLException { + return ROW_MAPPER.mapRow(rs, i); + } + + /** + * 鍏嬮殕 + */ + public FinSysTenant toFinSysTenant() { + return super.$clone(); + } +} + +/** + * fin_sys_tenant RowMapper + * + * @author genrator + */ +class FinSysTenantRowMapper implements RowMapper<FinSysTenant> { + + @Override + public FinSysTenant mapRow(ResultSet rs, int i) throws SQLException { + ResultSetUtils resultSetUtils = new ResultSetUtils(); + FinSysTenant fin_sys_tenant = new FinSysTenant(); + Integer columnIndex; + //涓婚敭 + columnIndex = resultSetUtils.findColumn(rs, FinSysTenant_mapper.TempId); + if (columnIndex > 0) { + fin_sys_tenant.setTempId(rs.getLong(columnIndex)); + } + //鏅�氬睘鎬� + columnIndex = resultSetUtils.findColumn(rs, FinSysTenant_mapper.Id); + if (columnIndex > 0) { + if (rs.getBigDecimal(columnIndex) == null) { + fin_sys_tenant.setId(null); + } else { + fin_sys_tenant.setId(rs.getLong(columnIndex)); + } + } + columnIndex = resultSetUtils.findColumn(rs, FinSysTenant_mapper.ParentId); + if (columnIndex > 0) { + if (rs.getBigDecimal(columnIndex) == null) { + fin_sys_tenant.setParentId(null); + } else { + fin_sys_tenant.setParentId(rs.getLong(columnIndex)); + } + } + columnIndex = resultSetUtils.findColumn(rs, FinSysTenant_mapper.Code); + if (columnIndex > 0) { + fin_sys_tenant.setCode(rs.getString(columnIndex)); + } + columnIndex = resultSetUtils.findColumn(rs, FinSysTenant_mapper.FinanceOrgCode); + if (columnIndex > 0) { + fin_sys_tenant.setFinanceOrgCode(rs.getString(columnIndex)); + } + columnIndex = resultSetUtils.findColumn(rs, FinSysTenant_mapper.Name); + if (columnIndex > 0) { + fin_sys_tenant.setName(rs.getString(columnIndex)); + } + columnIndex = resultSetUtils.findColumn(rs, FinSysTenant_mapper.Lv1Id); + if (columnIndex > 0) { + if (rs.getBigDecimal(columnIndex) == null) { + fin_sys_tenant.setLv1Id(null); + } else { + fin_sys_tenant.setLv1Id(rs.getLong(columnIndex)); + } + } + columnIndex = resultSetUtils.findColumn(rs, FinSysTenant_mapper.Lv1Name); + if (columnIndex > 0) { + fin_sys_tenant.setLv1Name(rs.getString(columnIndex)); + } + columnIndex = resultSetUtils.findColumn(rs, FinSysTenant_mapper.Lv2Id); + if (columnIndex > 0) { + if (rs.getBigDecimal(columnIndex) == null) { + fin_sys_tenant.setLv2Id(null); + } else { + fin_sys_tenant.setLv2Id(rs.getLong(columnIndex)); + } + } + columnIndex = resultSetUtils.findColumn(rs, FinSysTenant_mapper.Lv2Name); + if (columnIndex > 0) { + fin_sys_tenant.setLv2Name(rs.getString(columnIndex)); + } + columnIndex = resultSetUtils.findColumn(rs, FinSysTenant_mapper.Lv3Id); + if (columnIndex > 0) { + if (rs.getBigDecimal(columnIndex) == null) { + fin_sys_tenant.setLv3Id(null); + } else { + fin_sys_tenant.setLv3Id(rs.getLong(columnIndex)); + } + } + columnIndex = resultSetUtils.findColumn(rs, FinSysTenant_mapper.Lv3Name); + if (columnIndex > 0) { + fin_sys_tenant.setLv3Name(rs.getString(columnIndex)); + } + columnIndex = resultSetUtils.findColumn(rs, FinSysTenant_mapper.Lv4Id); + if (columnIndex > 0) { + if (rs.getBigDecimal(columnIndex) == null) { + fin_sys_tenant.setLv4Id(null); + } else { + fin_sys_tenant.setLv4Id(rs.getLong(columnIndex)); + } + } + columnIndex = resultSetUtils.findColumn(rs, FinSysTenant_mapper.Lv4Name); + if (columnIndex > 0) { + fin_sys_tenant.setLv4Name(rs.getString(columnIndex)); + } + columnIndex = resultSetUtils.findColumn(rs, FinSysTenant_mapper.Lv5Id); + if (columnIndex > 0) { + if (rs.getBigDecimal(columnIndex) == null) { + fin_sys_tenant.setLv5Id(null); + } else { + fin_sys_tenant.setLv5Id(rs.getLong(columnIndex)); + } + } + columnIndex = resultSetUtils.findColumn(rs, FinSysTenant_mapper.Lv5Name); + if (columnIndex > 0) { + fin_sys_tenant.setLv5Name(rs.getString(columnIndex)); + } + columnIndex = resultSetUtils.findColumn(rs, FinSysTenant_mapper.Lv); + if (columnIndex > 0) { + if (rs.getBigDecimal(columnIndex) == null) { + fin_sys_tenant.setLv(null); + } else { + fin_sys_tenant.setLv(rs.getInt(columnIndex)); + } + } + columnIndex = resultSetUtils.findColumn(rs, FinSysTenant_mapper.OrderNum); + if (columnIndex > 0) { + if (rs.getBigDecimal(columnIndex) == null) { + fin_sys_tenant.setOrderNum(null); + } else { + fin_sys_tenant.setOrderNum(rs.getInt(columnIndex)); + } + } + columnIndex = resultSetUtils.findColumn(rs, FinSysTenant_mapper.CreateTime3); + if (columnIndex > 0) { + fin_sys_tenant.setCreateTime3(rs.getDate(columnIndex)); + } + columnIndex = resultSetUtils.findColumn(rs, FinSysTenant_mapper.Modified); + if (columnIndex > 0) { + fin_sys_tenant.setModified(rs.getDate(columnIndex)); + } + columnIndex = resultSetUtils.findColumn(rs, FinSysTenant_mapper.Summary); + if (columnIndex > 0) { + fin_sys_tenant.setSummary(rs.getString(columnIndex)); + } + columnIndex = resultSetUtils.findColumn(rs, FinSysTenant_mapper.Address); + if (columnIndex > 0) { + fin_sys_tenant.setAddress(rs.getString(columnIndex)); + } + columnIndex = resultSetUtils.findColumn(rs, FinSysTenant_mapper.Lng); + if (columnIndex > 0) { + fin_sys_tenant.setLng(rs.getString(columnIndex)); + } + columnIndex = resultSetUtils.findColumn(rs, FinSysTenant_mapper.Lat); + if (columnIndex > 0) { + fin_sys_tenant.setLat(rs.getString(columnIndex)); + } + columnIndex = resultSetUtils.findColumn(rs, FinSysTenant_mapper.OpenStatus); + if (columnIndex > 0) { + if (rs.getBigDecimal(columnIndex) == null) { + fin_sys_tenant.setOpenStatus(null); + } else { + fin_sys_tenant.setOpenStatus(rs.getInt(columnIndex)); + } + } + columnIndex = resultSetUtils.findColumn(rs, FinSysTenant_mapper.OpenTime); + if (columnIndex > 0) { + fin_sys_tenant.setOpenTime(rs.getDate(columnIndex)); + } + columnIndex = resultSetUtils.findColumn(rs, FinSysTenant_mapper.Status); + if (columnIndex > 0) { + if (rs.getBigDecimal(columnIndex) == null) { + fin_sys_tenant.setStatus(null); + } else { + fin_sys_tenant.setStatus(rs.getInt(columnIndex)); + } + } + columnIndex = resultSetUtils.findColumn(rs, FinSysTenant_mapper.IsDelete); + if (columnIndex > 0) { + if (rs.getBigDecimal(columnIndex) == null) { + fin_sys_tenant.setIsDelete(null); + } else { + fin_sys_tenant.setIsDelete(rs.getInt(columnIndex)); + } + } + columnIndex = resultSetUtils.findColumn(rs, FinSysTenant_mapper.Path); + if (columnIndex > 0) { + fin_sys_tenant.setPath(rs.getString(columnIndex)); + } + columnIndex = resultSetUtils.findColumn(rs, FinSysTenant_mapper.VenueName); + if (columnIndex > 0) { + fin_sys_tenant.setVenueName(rs.getString(columnIndex)); + } + columnIndex = resultSetUtils.findColumn(rs, FinSysTenant_mapper.CityId); + if (columnIndex > 0) { + if (rs.getBigDecimal(columnIndex) == null) { + fin_sys_tenant.setCityId(null); + } else { + fin_sys_tenant.setCityId(rs.getLong(columnIndex)); + } + } + columnIndex = resultSetUtils.findColumn(rs, FinSysTenant_mapper.OrgPhoto); + if (columnIndex > 0) { + fin_sys_tenant.setOrgPhoto(rs.getString(columnIndex)); + } + columnIndex = resultSetUtils.findColumn(rs, FinSysTenant_mapper.ShortName); + if (columnIndex > 0) { + fin_sys_tenant.setShortName(rs.getString(columnIndex)); + } + columnIndex = resultSetUtils.findColumn(rs, FinSysTenant_mapper.TenantType); + if (columnIndex > 0) { + if (rs.getBigDecimal(columnIndex) == null) { + fin_sys_tenant.setTenantType(null); + } else { + fin_sys_tenant.setTenantType(rs.getInt(columnIndex)); + } + } + columnIndex = resultSetUtils.findColumn(rs, FinSysTenant_mapper.CreateBy); + if (columnIndex > 0) { + fin_sys_tenant.setCreateBy(rs.getString(columnIndex)); + } + columnIndex = resultSetUtils.findColumn(rs, FinSysTenant_mapper.CreateTime); + if (columnIndex > 0) { + if (rs.getBigDecimal(columnIndex) == null) { + fin_sys_tenant.setCreateTime(null); + } else { + fin_sys_tenant.setCreateTime(rs.getLong(columnIndex)); + } + } + columnIndex = resultSetUtils.findColumn(rs, FinSysTenant_mapper.UpdateBy); + if (columnIndex > 0) { + fin_sys_tenant.setUpdateBy(rs.getString(columnIndex)); + } + columnIndex = resultSetUtils.findColumn(rs, FinSysTenant_mapper.UpdateTime); + if (columnIndex > 0) { + if (rs.getBigDecimal(columnIndex) == null) { + fin_sys_tenant.setUpdateTime(null); + } else { + fin_sys_tenant.setUpdateTime(rs.getLong(columnIndex)); + } + } + columnIndex = resultSetUtils.findColumn(rs, FinSysTenant_mapper.BelongProvince); + if (columnIndex > 0) { + if (rs.getBigDecimal(columnIndex) == null) { + fin_sys_tenant.setBelongProvince(null); + } else { + fin_sys_tenant.setBelongProvince(rs.getInt(columnIndex)); + } + } + return fin_sys_tenant; + } +} diff --git a/consum-model-pojo/src/main/java/com/consum/model/vo/BaseGoodsTemplateVo.java b/consum-model-pojo/src/main/java/com/consum/model/vo/BaseGoodsTemplateVo.java new file mode 100644 index 0000000..696bf1d --- /dev/null +++ b/consum-model-pojo/src/main/java/com/consum/model/vo/BaseGoodsTemplateVo.java @@ -0,0 +1,22 @@ + +package com.consum.model.vo; + +import com.consum.model.po.BaseGoodsModels; +import com.consum.model.po.BaseGoodsTemplate; + +import java.util.List; + +public class BaseGoodsTemplateVo extends BaseGoodsTemplate { + /** + * 瑙勬牸鍨嬪彿 + */ + private List<BaseGoodsModels> models; + + public List<BaseGoodsModels> getModels() { + return models; + } + + public void setModels(List<BaseGoodsModels> models) { + this.models = models; + } +} diff --git a/deploy-jar-single/src/main/java/com/consum/test/CodeGeneratorServiceTest.java b/deploy-jar-single/src/main/java/com/consum/test/CodeGeneratorServiceTest.java index bd08c24..7321ad7 100644 --- a/deploy-jar-single/src/main/java/com/consum/test/CodeGeneratorServiceTest.java +++ b/deploy-jar-single/src/main/java/com/consum/test/CodeGeneratorServiceTest.java @@ -25,15 +25,15 @@ } } - @Test - public void createGoodsTemplateCode(){ - String[] prefixs = new String[] {"A","B","C","A","B"}; - int[] leis = new int[]{1,2,2,1,2}; - for (int i=0;i<5;i++){ - String code =service.createGoodsTemplateCode(prefixs[i],leis[i]); - System.out.println(code); - } - } +// @Test +// public void createGoodsTemplateCode(){ +// String[] prefixs = new String[] {"A","B","C","A","B"}; +// int[] leis = new int[]{1,2,2,1,2}; +// for (int i=0;i<5;i++){ +// String code =service.createGoodsTemplateCode(prefixs[i],leis[i]); +// System.out.println(code); +// } +// } @Test public void createBusinessFormCode(){ -- Gitblit v1.9.1