From 817a6839fe35106cca7075777088d57e9bc545b0 Mon Sep 17 00:00:00 2001 From: syruan <15555146157@163.com> Date: Sat, 2 Dec 2023 15:14:14 +0800 Subject: [PATCH] =?UTF-8?q?zltp-company=E6=9C=8D=E5=8A=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- zlpt-modules/zlpt-company/pom.xml | 39 ++ .../zlpt/company/ZlptCompanyApplication.java | 26 ++ .../controller/BmCoBankController.java | 40 ++ .../controller/BmCompanyInfoController.java | 80 ++++ .../controller/MaUserCollectController.java | 88 +++++ .../bonus/zlpt/company/domain/BmCoBank.java | 59 +++ .../zlpt/company/domain/BmCompanyInfo.java | 151 +++++++ .../zlpt/company/domain/MaUserCollect.java | 45 +++ .../zlpt/company/mapper/BmCoBankMapper.java | 56 +++ .../zlpt/company/mapper/BmCompanyInfoDao.java | 30 ++ .../company/mapper/MaUserCollectMapper.java | 37 ++ .../zlpt/company/service/BmCoBankService.java | 25 ++ .../company/service/BmCompanyInfoService.java | 25 ++ .../company/service/MaUserCollectService.java | 27 ++ .../service/impl/BmCoBankServiceImpl.java | 52 +++ .../impl/BmCompanyInfoServiceImpl.java | 52 +++ .../impl/MaUserCollectServiceImpl.java | 60 +++ .../src/main/resources/banner.txt | 10 + .../src/main/resources/bootstrap.yml | 27 ++ .../src/main/resources/logback.xml | 74 ++++ .../main/resources/mapper/BmCoBankMapper.xml | 139 +++++++ .../resources/mapper/BmCompanyInfoMapper.xml | 374 ++++++++++++++++++ .../resources/mapper/MaUserCollectMapper.xml | 118 ++++++ 23 files changed, 1634 insertions(+) create mode 100644 zlpt-modules/zlpt-company/pom.xml create mode 100644 zlpt-modules/zlpt-company/src/main/java/com/bonus/zlpt/company/ZlptCompanyApplication.java create mode 100644 zlpt-modules/zlpt-company/src/main/java/com/bonus/zlpt/company/controller/BmCoBankController.java create mode 100644 zlpt-modules/zlpt-company/src/main/java/com/bonus/zlpt/company/controller/BmCompanyInfoController.java create mode 100644 zlpt-modules/zlpt-company/src/main/java/com/bonus/zlpt/company/controller/MaUserCollectController.java create mode 100644 zlpt-modules/zlpt-company/src/main/java/com/bonus/zlpt/company/domain/BmCoBank.java create mode 100644 zlpt-modules/zlpt-company/src/main/java/com/bonus/zlpt/company/domain/BmCompanyInfo.java create mode 100644 zlpt-modules/zlpt-company/src/main/java/com/bonus/zlpt/company/domain/MaUserCollect.java create mode 100644 zlpt-modules/zlpt-company/src/main/java/com/bonus/zlpt/company/mapper/BmCoBankMapper.java create mode 100644 zlpt-modules/zlpt-company/src/main/java/com/bonus/zlpt/company/mapper/BmCompanyInfoDao.java create mode 100644 zlpt-modules/zlpt-company/src/main/java/com/bonus/zlpt/company/mapper/MaUserCollectMapper.java create mode 100644 zlpt-modules/zlpt-company/src/main/java/com/bonus/zlpt/company/service/BmCoBankService.java create mode 100644 zlpt-modules/zlpt-company/src/main/java/com/bonus/zlpt/company/service/BmCompanyInfoService.java create mode 100644 zlpt-modules/zlpt-company/src/main/java/com/bonus/zlpt/company/service/MaUserCollectService.java create mode 100644 zlpt-modules/zlpt-company/src/main/java/com/bonus/zlpt/company/service/impl/BmCoBankServiceImpl.java create mode 100644 zlpt-modules/zlpt-company/src/main/java/com/bonus/zlpt/company/service/impl/BmCompanyInfoServiceImpl.java create mode 100644 zlpt-modules/zlpt-company/src/main/java/com/bonus/zlpt/company/service/impl/MaUserCollectServiceImpl.java create mode 100644 zlpt-modules/zlpt-company/src/main/resources/banner.txt create mode 100644 zlpt-modules/zlpt-company/src/main/resources/bootstrap.yml create mode 100644 zlpt-modules/zlpt-company/src/main/resources/logback.xml create mode 100644 zlpt-modules/zlpt-company/src/main/resources/mapper/BmCoBankMapper.xml create mode 100644 zlpt-modules/zlpt-company/src/main/resources/mapper/BmCompanyInfoMapper.xml create mode 100644 zlpt-modules/zlpt-company/src/main/resources/mapper/MaUserCollectMapper.xml diff --git a/zlpt-modules/zlpt-company/pom.xml b/zlpt-modules/zlpt-company/pom.xml new file mode 100644 index 0000000..c54c926 --- /dev/null +++ b/zlpt-modules/zlpt-company/pom.xml @@ -0,0 +1,39 @@ + + + 4.0.0 + + com.bonus.zlpt + zlpt-modules + 3.6.3 + + + com.bonus + zlpt-company + + + 8 + 8 + UTF-8 + + + + org.springframework.boot + spring-boot-starter-web + + + com.bonus.zlpt + zlpt-common-core + + + com.bonus.zlpt + zlpt-common-log + + + com.bonus.zlpt + zlpt-common-swagger + + + + \ No newline at end of file diff --git a/zlpt-modules/zlpt-company/src/main/java/com/bonus/zlpt/company/ZlptCompanyApplication.java b/zlpt-modules/zlpt-company/src/main/java/com/bonus/zlpt/company/ZlptCompanyApplication.java new file mode 100644 index 0000000..92fd802 --- /dev/null +++ b/zlpt-modules/zlpt-company/src/main/java/com/bonus/zlpt/company/ZlptCompanyApplication.java @@ -0,0 +1,26 @@ +package com.bonus.zlpt.company; + +import com.bonus.zlpt.common.security.annotation.EnableCustomConfig; +import com.bonus.zlpt.common.security.annotation.EnableRyFeignClients; +import com.bonus.zlpt.common.swagger.annotation.EnableCustomSwagger2; +import org.springframework.boot.SpringApplication; +import org.springframework.boot.autoconfigure.SpringBootApplication; + +/** + * Description: 企业模块启动类 + * + * @Author 阮世耀 + * @Create 2023/12/2 12:20 + * @Version 1.0 + */ +@EnableCustomConfig +@EnableCustomSwagger2 +@EnableRyFeignClients +@SpringBootApplication +public class ZlptCompanyApplication { + public static void main(String[] args) { + SpringApplication.run(ZlptCompanyApplication.class, args); + System.out.println("company---企业模块启动成功!!"); + + } +} diff --git a/zlpt-modules/zlpt-company/src/main/java/com/bonus/zlpt/company/controller/BmCoBankController.java b/zlpt-modules/zlpt-company/src/main/java/com/bonus/zlpt/company/controller/BmCoBankController.java new file mode 100644 index 0000000..7197659 --- /dev/null +++ b/zlpt-modules/zlpt-company/src/main/java/com/bonus/zlpt/company/controller/BmCoBankController.java @@ -0,0 +1,40 @@ +package com.bonus.zlpt.company.controller; +import com.bonus.zlpt.company.domain.BmCoBank; +import com.bonus.zlpt.company.service.impl.BmCoBankServiceImpl; +import org.springframework.web.bind.annotation.*; + +import javax.annotation.Resource; + +/** +* bm_co_bank企业开户行信息(bm_co_bank)表控制层 +* +* @author syruan +*/ +@RestController +@RequestMapping("/company_bank") +public class BmCoBankController { + + /** + * 服务对象 + */ + @Resource + private BmCoBankServiceImpl bmCoBankServiceImpl; + + /** + * 通过主键查询单条数据 + * + * @param id 主键 + * @return 单条数据 + */ + @GetMapping("selectOne") + public BmCoBank selectOne(Integer id) { + return bmCoBankServiceImpl.selectByPrimaryKey(id); + } + + + @PostMapping("insert") + public int insert(@RequestBody BmCoBank bmCoBank){ + return bmCoBankServiceImpl.insert(bmCoBank); + } + +} diff --git a/zlpt-modules/zlpt-company/src/main/java/com/bonus/zlpt/company/controller/BmCompanyInfoController.java b/zlpt-modules/zlpt-company/src/main/java/com/bonus/zlpt/company/controller/BmCompanyInfoController.java new file mode 100644 index 0000000..2add146 --- /dev/null +++ b/zlpt-modules/zlpt-company/src/main/java/com/bonus/zlpt/company/controller/BmCompanyInfoController.java @@ -0,0 +1,80 @@ +package com.bonus.zlpt.company.controller; +import com.bonus.zlpt.common.core.web.controller.BaseController; +import com.bonus.zlpt.common.core.web.domain.AjaxResult; +import com.bonus.zlpt.common.log.enums.BusinessType; +import com.bonus.zlpt.common.security.annotation.RequiresPermissions; +import com.bonus.zlpt.company.domain.BmCompanyInfo; +import com.bonus.zlpt.company.mapper.BmCompanyInfoDao; +import com.bonus.zlpt.company.service.BmCompanyInfoService; +import com.bonus.zlpt.common.log.annotation.Log; +import org.springframework.web.bind.annotation.*; + +import javax.annotation.Resource; +import java.util.List; + +/** +* 企业信息表(bm_company_info)表控制层 +* @author 阮世耀 +*/ +@RestController +@RequestMapping("/company_info") +public class BmCompanyInfoController extends BaseController { + + @Resource + private BmCompanyInfoService bmCompanyInfoService; + + @Resource + private BmCompanyInfoDao bmCompanyInfoDao; + + /** + * 通过主键查询单条数据 + * @param id 主键 + * @return 单条数据 + */ + @GetMapping("selectById") + public BmCompanyInfo selectById(Integer id) { return bmCompanyInfoService.selectByPrimaryKey(id); } + + + /** + * 获取公司列表 + */ + @RequiresPermissions("system:company:list") + @GetMapping("/list") + public AjaxResult list(BmCompanyInfo obj) { + List list = bmCompanyInfoDao.selectCompanyList(obj); + return success(list); + } + + /** + * 新增 -- 录入企业信息 + */ + @RequiresPermissions("system:company:add") + @Log(title = "企业管理", businessType = BusinessType.INSERT) + @PostMapping("addCompanyInfo") + public AjaxResult add(@RequestBody BmCompanyInfo obj) { + return toAjax(bmCompanyInfoService.insertSelective(obj)); + } + + /** + * 修改 -- 企业信息变更 + */ + @RequiresPermissions("system:company:edit") + @Log(title = "企业管理", businessType = BusinessType.UPDATE) + @PostMapping("updateCompanyInfo") + public AjaxResult edit(@RequestBody BmCompanyInfo obj) { + Integer deptId = obj.getCompanyId(); + return toAjax(bmCompanyInfoService.updateByPrimaryKeySelective(obj)); + } + + /** + * 删除 -- 企业注销 + */ + @RequiresPermissions("system:company:remove") + @Log(title = "企业管理", businessType = BusinessType.DELETE) + @DeleteMapping("/{deptId}") + public AjaxResult remove(@PathVariable Integer deptId) { + return toAjax(bmCompanyInfoService.deleteByPrimaryKey(deptId)); + } + + +} diff --git a/zlpt-modules/zlpt-company/src/main/java/com/bonus/zlpt/company/controller/MaUserCollectController.java b/zlpt-modules/zlpt-company/src/main/java/com/bonus/zlpt/company/controller/MaUserCollectController.java new file mode 100644 index 0000000..e45081b --- /dev/null +++ b/zlpt-modules/zlpt-company/src/main/java/com/bonus/zlpt/company/controller/MaUserCollectController.java @@ -0,0 +1,88 @@ +package com.bonus.zlpt.company.controller; +import com.bonus.zlpt.common.core.web.controller.BaseController; +import com.bonus.zlpt.common.core.web.domain.AjaxResult; +import com.bonus.zlpt.common.log.annotation.Log; +import com.bonus.zlpt.common.log.enums.BusinessType; +import com.bonus.zlpt.common.security.annotation.RequiresPermissions; +import com.bonus.zlpt.company.domain.MaUserCollect; +import com.bonus.zlpt.company.mapper.MaUserCollectMapper; +import com.bonus.zlpt.company.service.MaUserCollectService; +import org.springframework.web.bind.annotation.*; + +import javax.annotation.Resource; +import java.util.List; + +/** + * 我的收藏 + * (ma_user_collect)表控制层 + * @author 阮世耀 +*/ +@RestController +@RequestMapping("/user_collect") +public class MaUserCollectController extends BaseController { + + /** + * 服务对象 + */ + @Resource + private MaUserCollectService maUserCollectService; + + @Resource + private MaUserCollectMapper maUserCollectMapper; + + /** + * 新增 -- 收藏设备 + */ + @RequiresPermissions("system:collect:add") + @Log(title = "收藏设备", businessType = BusinessType.INSERT) + @PostMapping("saveCollectedEquipment") + public AjaxResult saveCollectedEquipment(@RequestBody MaUserCollect obj) { + try { + return toAjax(maUserCollectService.insertSelective(obj)); + } catch (Exception e) { + return error(e.getMessage()); + } + } + + /** + * 获取收藏列表 + */ + @RequiresPermissions("system:collect:list") + @GetMapping("/list") + public AjaxResult list(MaUserCollect obj) { + try { + List list = maUserCollectMapper.selectAll(obj); + return success(getDataTable(list)); + } catch (Exception e) { + return error(e.getMessage()); + } + } + + + /** + * 查询 -- 根据设备id获取信息 + */ + @RequiresPermissions("system:collect:list") + @Log(title = "根据设备id查询信息", businessType = BusinessType.OTHER) + @GetMapping("selectByMaId") + public AjaxResult selectByMaId(Integer maId) { + try { + return success(maUserCollectService.selectByMaId(maId)); + } catch (Exception e) { + return error(e.getMessage()); + } + } + + + /** + * 通过主键查询单条数据 + * + * @param id 主键 + * @return 单条数据 + */ + @GetMapping("selectOne") + public MaUserCollect selectOne(Integer id) { + return maUserCollectService.selectByPrimaryKey(id); + } + +} diff --git a/zlpt-modules/zlpt-company/src/main/java/com/bonus/zlpt/company/domain/BmCoBank.java b/zlpt-modules/zlpt-company/src/main/java/com/bonus/zlpt/company/domain/BmCoBank.java new file mode 100644 index 0000000..7aa9f19 --- /dev/null +++ b/zlpt-modules/zlpt-company/src/main/java/com/bonus/zlpt/company/domain/BmCoBank.java @@ -0,0 +1,59 @@ +package com.bonus.zlpt.company.domain; + +import java.io.Serializable; +import lombok.Data; + +/** +* Description: +* @Author 阮世耀 +* @Create 2023/12/2 12:53 +* @Version 1.0 +*/ + +/** + * bm_co_bank企业开户行信息 + */ +@Data +public class BmCoBank implements Serializable { + + private static final long serialVersionUID = 9028660704843374531L; + + private Integer id; + + /** + * 开户行 + */ + private String bankName; + + /** + * 账户名称 + */ + private String accountName; + + /** + * 银行账号 + */ + private String bankAccount; + + /** + * 开户行所在地 + */ + private String bankAddress; + + /** + * 开户许可证核准号 + */ + private String permitNumber; + + /** + * 开户许可证 + */ + private String permitUrl; + + /** + * 企业id + */ + private Integer coId; + + +} \ No newline at end of file diff --git a/zlpt-modules/zlpt-company/src/main/java/com/bonus/zlpt/company/domain/BmCompanyInfo.java b/zlpt-modules/zlpt-company/src/main/java/com/bonus/zlpt/company/domain/BmCompanyInfo.java new file mode 100644 index 0000000..386a8aa --- /dev/null +++ b/zlpt-modules/zlpt-company/src/main/java/com/bonus/zlpt/company/domain/BmCompanyInfo.java @@ -0,0 +1,151 @@ +package com.bonus.zlpt.company.domain; + +import java.io.Serializable; +import lombok.Data; + +/** +* Description: +* @Author 阮世耀 +* @Create 2023/12/1 19:40 +* @Version 1.0 +*/ + +/** + * 企业信息表 + */ +@Data +public class BmCompanyInfo implements Serializable { + /** + * 企业id + */ + private Integer companyId; + + /** + * 企业名称 + */ + private String companyName; + + /** + * 企业类型(社会企业,南网集团企业,南网控股企业) + */ + private String companyType; + + /** + * 企业所属(广东电网、广西电网、贵州电网、云南电网、海南电网、储能公司、深圳供电局、超高压公司) + */ + private String companyLtd; + + /** + * 统一社会信用代码 + */ + private String creditCode; + + /** + * 注册地址 + */ + private String registerAddress; + + /** + * 经营地址 + */ + private String operateAddress; + + /** + * 证件类型 + */ + private String certificatetype; + + /** + * 法人证件号码 + */ + private String idNumber; + + /** + * 营业执照 + */ + private String businessLicense; + + /** + * 法人姓名 + */ + private String legalPerson; + + /** + * 邀请码 + */ + private String invitationCode; + + /** + * 邀请企业名称 + */ + private String invitationCoName; + + /** + * 经营范围 + */ + private String businessScope; + + /** + * 被授权人姓名 + */ + private String authPerson; + + /** + * 被授权人身份证 + */ + private String authIdNumber; + + /** + * 被授权人手机号 + */ + private String authPhone; + + /** + * 法人授权书 + */ + private String authDocument; + + /** + * 被授权人身份证头像面 + */ + private String idFaceUrl; + + /** + * 被授权人身份证国徽面 + */ + private String idNationUrl; + + /** + * 创建时间 + */ + private String createTime; + + /** + * 创建人 + */ + private String creator; + + /** + * 审核人 + */ + private Integer auditor; + + /** + * 审核时间 + */ + private String auditTime; + + /** + * 审核备注 + */ + private String auditRemark; + + /** + * 状态(0待审核,1通过,2驳回) + */ + private String status; + + private String updateTime; + + private static final long serialVersionUID = 1L; +} \ No newline at end of file diff --git a/zlpt-modules/zlpt-company/src/main/java/com/bonus/zlpt/company/domain/MaUserCollect.java b/zlpt-modules/zlpt-company/src/main/java/com/bonus/zlpt/company/domain/MaUserCollect.java new file mode 100644 index 0000000..d4c6edf --- /dev/null +++ b/zlpt-modules/zlpt-company/src/main/java/com/bonus/zlpt/company/domain/MaUserCollect.java @@ -0,0 +1,45 @@ +package com.bonus.zlpt.company.domain; + +import java.io.Serializable; +import lombok.Data; + +/** +* Description: 我的收藏表 +* @Author 阮世耀 +* @Create 2023/12/2 13:41 +* @Version 1.0 +*/ + +@Data +public class MaUserCollect implements Serializable { + + private static final long serialVersionUID = -8259045797259132976L; + + private Integer id; + + /** + * 用户id + */ + private Integer userId; + + /** + * 用户名 + */ + private String userName; + + /** + * 设备id + */ + private Integer maId; + + /** + * 设备名称 + */ + private String maName; + + /** + * 收藏时间 + */ + private String time; + +} \ No newline at end of file diff --git a/zlpt-modules/zlpt-company/src/main/java/com/bonus/zlpt/company/mapper/BmCoBankMapper.java b/zlpt-modules/zlpt-company/src/main/java/com/bonus/zlpt/company/mapper/BmCoBankMapper.java new file mode 100644 index 0000000..78d083e --- /dev/null +++ b/zlpt-modules/zlpt-company/src/main/java/com/bonus/zlpt/company/mapper/BmCoBankMapper.java @@ -0,0 +1,56 @@ +package com.bonus.zlpt.company.mapper; + +import com.bonus.zlpt.company.domain.BmCoBank; +import org.apache.ibatis.annotations.Mapper; + +/** +* Description: +* @Author 阮世耀 +* @Create 2023/12/2 12:53 +* @Version 1.0 +*/ + +@Mapper +public interface BmCoBankMapper { + /** + * delete by primary key + * @param id primaryKey + * @return deleteCount + */ + int deleteByPrimaryKey(Integer id); + + /** + * insert record to table + * @param record the record + * @return insert count + */ + int insert(BmCoBank record); + + /** + * insert record to table selective + * @param record the record + * @return insert count + */ + int insertSelective(BmCoBank record); + + /** + * select by primary key + * @param id primary key + * @return object by primary key + */ + BmCoBank selectByPrimaryKey(Integer id); + + /** + * update record selective + * @param record the updated record + * @return update count + */ + int updateByPrimaryKeySelective(BmCoBank record); + + /** + * update record + * @param record the updated record + * @return update count + */ + int updateByPrimaryKey(BmCoBank record); +} \ No newline at end of file diff --git a/zlpt-modules/zlpt-company/src/main/java/com/bonus/zlpt/company/mapper/BmCompanyInfoDao.java b/zlpt-modules/zlpt-company/src/main/java/com/bonus/zlpt/company/mapper/BmCompanyInfoDao.java new file mode 100644 index 0000000..2e13934 --- /dev/null +++ b/zlpt-modules/zlpt-company/src/main/java/com/bonus/zlpt/company/mapper/BmCompanyInfoDao.java @@ -0,0 +1,30 @@ +package com.bonus.zlpt.company.mapper; + +import com.bonus.zlpt.company.domain.BmCompanyInfo; +import org.apache.ibatis.annotations.Mapper; + +import java.util.List; + +/** +* Description: +* @Author 阮世耀 +* @Create 2023/12/1 19:40 +* @Version 1.0 +*/ + +@Mapper +public interface BmCompanyInfoDao { + int deleteByPrimaryKey(Integer companyId); + + int insert(BmCompanyInfo record); + + int insertSelective(BmCompanyInfo record); + + BmCompanyInfo selectByPrimaryKey(Integer companyId); + + List selectCompanyList(BmCompanyInfo record); + + int updateByPrimaryKeySelective(BmCompanyInfo record); + + int updateByPrimaryKey(BmCompanyInfo record); +} \ No newline at end of file diff --git a/zlpt-modules/zlpt-company/src/main/java/com/bonus/zlpt/company/mapper/MaUserCollectMapper.java b/zlpt-modules/zlpt-company/src/main/java/com/bonus/zlpt/company/mapper/MaUserCollectMapper.java new file mode 100644 index 0000000..065719d --- /dev/null +++ b/zlpt-modules/zlpt-company/src/main/java/com/bonus/zlpt/company/mapper/MaUserCollectMapper.java @@ -0,0 +1,37 @@ +package com.bonus.zlpt.company.mapper; + +import com.bonus.zlpt.company.domain.MaUserCollect; +import org.apache.ibatis.annotations.Mapper; + +import java.util.List; + +/** +* Description: +* @Author 阮世耀 +* @Create 2023/12/2 13:41 +* @Version 1.0 +*/ + +@Mapper +public interface MaUserCollectMapper { + int deleteByPrimaryKey(Integer id); + + int insert(MaUserCollect record); + + int insertSelective(MaUserCollect record); + + MaUserCollect selectByPrimaryKey(Integer id); + + /** + * 根据设备id查询设备信息 + * @param maId 设备id + * @return 设备信息 + */ + MaUserCollect selectByMaId(Integer maId); + + List selectAll(MaUserCollect record); + + int updateByPrimaryKeySelective(MaUserCollect record); + + int updateByPrimaryKey(MaUserCollect record); +} \ No newline at end of file diff --git a/zlpt-modules/zlpt-company/src/main/java/com/bonus/zlpt/company/service/BmCoBankService.java b/zlpt-modules/zlpt-company/src/main/java/com/bonus/zlpt/company/service/BmCoBankService.java new file mode 100644 index 0000000..25ffbdb --- /dev/null +++ b/zlpt-modules/zlpt-company/src/main/java/com/bonus/zlpt/company/service/BmCoBankService.java @@ -0,0 +1,25 @@ +package com.bonus.zlpt.company.service; + +import com.bonus.zlpt.company.domain.BmCoBank; + /** +* Description: +* @Author 阮世耀 +* @Create 2023/12/2 12:53 +* @Version 1.0 +*/ + +public interface BmCoBankService{ + + int deleteByPrimaryKey(Integer id); + + int insert(BmCoBank record); + + int insertSelective(BmCoBank record); + + BmCoBank selectByPrimaryKey(Integer id); + + int updateByPrimaryKeySelective(BmCoBank record); + + int updateByPrimaryKey(BmCoBank record); + +} diff --git a/zlpt-modules/zlpt-company/src/main/java/com/bonus/zlpt/company/service/BmCompanyInfoService.java b/zlpt-modules/zlpt-company/src/main/java/com/bonus/zlpt/company/service/BmCompanyInfoService.java new file mode 100644 index 0000000..1651c19 --- /dev/null +++ b/zlpt-modules/zlpt-company/src/main/java/com/bonus/zlpt/company/service/BmCompanyInfoService.java @@ -0,0 +1,25 @@ +package com.bonus.zlpt.company.service; + +import com.bonus.zlpt.company.domain.BmCompanyInfo; + /** +* Description: +* @Author 阮世耀 +* @Create 2023/12/1 19:40 +* @Version 1.0 +*/ + +public interface BmCompanyInfoService{ + + int deleteByPrimaryKey(Integer companyId); + + int insert(BmCompanyInfo record); + + int insertSelective(BmCompanyInfo record); + + BmCompanyInfo selectByPrimaryKey(Integer companyId); + + int updateByPrimaryKeySelective(BmCompanyInfo record); + + int updateByPrimaryKey(BmCompanyInfo record); + +} diff --git a/zlpt-modules/zlpt-company/src/main/java/com/bonus/zlpt/company/service/MaUserCollectService.java b/zlpt-modules/zlpt-company/src/main/java/com/bonus/zlpt/company/service/MaUserCollectService.java new file mode 100644 index 0000000..129d40c --- /dev/null +++ b/zlpt-modules/zlpt-company/src/main/java/com/bonus/zlpt/company/service/MaUserCollectService.java @@ -0,0 +1,27 @@ +package com.bonus.zlpt.company.service; + +import com.bonus.zlpt.company.domain.MaUserCollect; + /** +* Description: +* @Author 阮世耀 +* @Create 2023/12/2 13:41 +* @Version 1.0 +*/ + +public interface MaUserCollectService{ + + MaUserCollect selectByMaId(Integer maId); + + int deleteByPrimaryKey(Integer id); + + int insert(MaUserCollect record); + + int insertSelective(MaUserCollect record); + + MaUserCollect selectByPrimaryKey(Integer id); + + int updateByPrimaryKeySelective(MaUserCollect record); + + int updateByPrimaryKey(MaUserCollect record); + +} diff --git a/zlpt-modules/zlpt-company/src/main/java/com/bonus/zlpt/company/service/impl/BmCoBankServiceImpl.java b/zlpt-modules/zlpt-company/src/main/java/com/bonus/zlpt/company/service/impl/BmCoBankServiceImpl.java new file mode 100644 index 0000000..59ef702 --- /dev/null +++ b/zlpt-modules/zlpt-company/src/main/java/com/bonus/zlpt/company/service/impl/BmCoBankServiceImpl.java @@ -0,0 +1,52 @@ +package com.bonus.zlpt.company.service.impl; + +import com.bonus.zlpt.company.service.BmCoBankService; +import org.springframework.stereotype.Service; +import javax.annotation.Resource; +import com.bonus.zlpt.company.mapper.BmCoBankMapper; +import com.bonus.zlpt.company.domain.BmCoBank; + +/** +* Description: +* @Author 阮世耀 +* @Create 2023/12/2 12:53 +* @Version 1.0 +*/ + +@Service +public class BmCoBankServiceImpl implements BmCoBankService { + + @Resource + private BmCoBankMapper bmCoBankMapper; + + @Override + public int deleteByPrimaryKey(Integer id) { + return bmCoBankMapper.deleteByPrimaryKey(id); + } + + @Override + public int insert(BmCoBank record) { + return bmCoBankMapper.insert(record); + } + + @Override + public int insertSelective(BmCoBank record) { + return bmCoBankMapper.insertSelective(record); + } + + @Override + public BmCoBank selectByPrimaryKey(Integer id) { + return bmCoBankMapper.selectByPrimaryKey(id); + } + + @Override + public int updateByPrimaryKeySelective(BmCoBank record) { + return bmCoBankMapper.updateByPrimaryKeySelective(record); + } + + @Override + public int updateByPrimaryKey(BmCoBank record) { + return bmCoBankMapper.updateByPrimaryKey(record); + } + +} diff --git a/zlpt-modules/zlpt-company/src/main/java/com/bonus/zlpt/company/service/impl/BmCompanyInfoServiceImpl.java b/zlpt-modules/zlpt-company/src/main/java/com/bonus/zlpt/company/service/impl/BmCompanyInfoServiceImpl.java new file mode 100644 index 0000000..59281f3 --- /dev/null +++ b/zlpt-modules/zlpt-company/src/main/java/com/bonus/zlpt/company/service/impl/BmCompanyInfoServiceImpl.java @@ -0,0 +1,52 @@ +package com.bonus.zlpt.company.service.impl; + +import com.bonus.zlpt.company.service.BmCompanyInfoService; +import org.springframework.stereotype.Service; +import javax.annotation.Resource; +import com.bonus.zlpt.company.domain.BmCompanyInfo; +import com.bonus.zlpt.company.mapper.BmCompanyInfoDao; + +/** +* Description: +* @Author 阮世耀 +* @Create 2023/12/1 19:40 +* @Version 1.0 +*/ + +@Service +public class BmCompanyInfoServiceImpl implements BmCompanyInfoService { + + @Resource + private BmCompanyInfoDao bmCompanyInfoMapper; + + @Override + public int deleteByPrimaryKey(Integer companyId) { + return bmCompanyInfoMapper.deleteByPrimaryKey(companyId); + } + + @Override + public int insert(BmCompanyInfo record) { + return bmCompanyInfoMapper.insert(record); + } + + @Override + public int insertSelective(BmCompanyInfo record) { + return bmCompanyInfoMapper.insertSelective(record); + } + + @Override + public BmCompanyInfo selectByPrimaryKey(Integer companyId) { + return bmCompanyInfoMapper.selectByPrimaryKey(companyId); + } + + @Override + public int updateByPrimaryKeySelective(BmCompanyInfo record) { + return bmCompanyInfoMapper.updateByPrimaryKeySelective(record); + } + + @Override + public int updateByPrimaryKey(BmCompanyInfo record) { + return bmCompanyInfoMapper.updateByPrimaryKey(record); + } + +} diff --git a/zlpt-modules/zlpt-company/src/main/java/com/bonus/zlpt/company/service/impl/MaUserCollectServiceImpl.java b/zlpt-modules/zlpt-company/src/main/java/com/bonus/zlpt/company/service/impl/MaUserCollectServiceImpl.java new file mode 100644 index 0000000..41cd1b5 --- /dev/null +++ b/zlpt-modules/zlpt-company/src/main/java/com/bonus/zlpt/company/service/impl/MaUserCollectServiceImpl.java @@ -0,0 +1,60 @@ +package com.bonus.zlpt.company.service.impl; + +import org.springframework.stereotype.Service; +import javax.annotation.Resource; +import com.bonus.zlpt.company.mapper.MaUserCollectMapper; +import com.bonus.zlpt.company.domain.MaUserCollect; +import com.bonus.zlpt.company.service.MaUserCollectService; +/** +* Description: +* @Author 阮世耀 +* @Create 2023/12/2 13:41 +* @Version 1.0 +*/ + +@Service +public class MaUserCollectServiceImpl implements MaUserCollectService{ + + @Resource + private MaUserCollectMapper maUserCollectMapper; + + /** + * @param maId 设备id + * @return 设备信息 + */ + @Override + public MaUserCollect selectByMaId(Integer maId) { + return maUserCollectMapper.selectByMaId(maId); + } + + @Override + public int deleteByPrimaryKey(Integer id) { + return maUserCollectMapper.deleteByPrimaryKey(id); + } + + @Override + public int insert(MaUserCollect record) { + return maUserCollectMapper.insert(record); + } + + @Override + public int insertSelective(MaUserCollect record) { + return maUserCollectMapper.insertSelective(record); + } + + @Override + public MaUserCollect selectByPrimaryKey(Integer id) { + return maUserCollectMapper.selectByPrimaryKey(id); + } + + @Override + public int updateByPrimaryKeySelective(MaUserCollect record) { + return maUserCollectMapper.updateByPrimaryKeySelective(record); + } + + @Override + public int updateByPrimaryKey(MaUserCollect record) { + return maUserCollectMapper.updateByPrimaryKey(record); + } + +} diff --git a/zlpt-modules/zlpt-company/src/main/resources/banner.txt b/zlpt-modules/zlpt-company/src/main/resources/banner.txt new file mode 100644 index 0000000..fbd45f5 --- /dev/null +++ b/zlpt-modules/zlpt-company/src/main/resources/banner.txt @@ -0,0 +1,10 @@ +Spring Boot Version: ${spring-boot.version} +Spring Application Name: ${spring.application.name} + _ _ + (_) | | + _ __ _ _ ___ _ _ _ ______ ___ _ _ ___ | |_ ___ _ __ ___ +| '__|| | | | / _ \ | | | || ||______|/ __|| | | |/ __|| __| / _ \| '_ ` _ \ +| | | |_| || (_) || |_| || | \__ \| |_| |\__ \| |_ | __/| | | | | | +|_| \__,_| \___/ \__, ||_| |___/ \__, ||___/ \__| \___||_| |_| |_| + __/ | __/ | + |___/ |___/ \ No newline at end of file diff --git a/zlpt-modules/zlpt-company/src/main/resources/bootstrap.yml b/zlpt-modules/zlpt-company/src/main/resources/bootstrap.yml new file mode 100644 index 0000000..114cd9a --- /dev/null +++ b/zlpt-modules/zlpt-company/src/main/resources/bootstrap.yml @@ -0,0 +1,27 @@ +# Tomcat +server: + port: 9201 + +# Spring +spring: + application: + # 应用名称 + name: zlpt-company + profiles: + # 环境配置 + active: zlpt_cloud_dev + cloud: + nacos: + discovery: + # 服务注册地址 + server-addr: 192.168.0.14:8848 + namespace: zlpt_cloud_dev + config: + # 配置中心地址 + server-addr: 192.168.0.14:8848 + namespace: zlpt_cloud_dev + # 配置文件格式 + file-extension: yml + # 共享配置 + shared-configs: + - application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension} diff --git a/zlpt-modules/zlpt-company/src/main/resources/logback.xml b/zlpt-modules/zlpt-company/src/main/resources/logback.xml new file mode 100644 index 0000000..2b4fe87 --- /dev/null +++ b/zlpt-modules/zlpt-company/src/main/resources/logback.xml @@ -0,0 +1,74 @@ + + + + + + + + + + + ${log.pattern} + + + + + + ${log.path}/info.log + + + + ${log.path}/info.%d{yyyy-MM-dd}.log + + 60 + + + ${log.pattern} + + + + INFO + + ACCEPT + + DENY + + + + + ${log.path}/error.log + + + + ${log.path}/error.%d{yyyy-MM-dd}.log + + 60 + + + ${log.pattern} + + + + ERROR + + ACCEPT + + DENY + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/zlpt-modules/zlpt-company/src/main/resources/mapper/BmCoBankMapper.xml b/zlpt-modules/zlpt-company/src/main/resources/mapper/BmCoBankMapper.xml new file mode 100644 index 0000000..0f1f71b --- /dev/null +++ b/zlpt-modules/zlpt-company/src/main/resources/mapper/BmCoBankMapper.xml @@ -0,0 +1,139 @@ + + + + + + + + + + + + + + + + + + + id, bank_name, account_name, bank_account, bank_address, permit_number, permit_url, co_id + + + + + + + delete from bm_co_bank + where id = #{id,jdbcType=INTEGER} + + + + + insert into bm_co_bank (bank_name, account_name, bank_account, + bank_address, permit_number, permit_url, + co_id) + values (#{bankName,jdbcType=VARCHAR}, #{accountName,jdbcType=VARCHAR}, #{bankAccount,jdbcType=VARCHAR}, + #{bankAddress,jdbcType=VARCHAR}, #{permitNumber,jdbcType=VARCHAR}, #{permitUrl,jdbcType=VARCHAR}, + #{coId,jdbcType=INTEGER}) + + + + + insert into bm_co_bank + + + bank_name, + + + account_name, + + + bank_account, + + + bank_address, + + + permit_number, + + + permit_url, + + + co_id, + + + + + #{bankName,jdbcType=VARCHAR}, + + + #{accountName,jdbcType=VARCHAR}, + + + #{bankAccount,jdbcType=VARCHAR}, + + + #{bankAddress,jdbcType=VARCHAR}, + + + #{permitNumber,jdbcType=VARCHAR}, + + + #{permitUrl,jdbcType=VARCHAR}, + + + #{coId,jdbcType=INTEGER}, + + + + + + + update bm_co_bank + + + bank_name = #{bankName,jdbcType=VARCHAR}, + + + account_name = #{accountName,jdbcType=VARCHAR}, + + + bank_account = #{bankAccount,jdbcType=VARCHAR}, + + + bank_address = #{bankAddress,jdbcType=VARCHAR}, + + + permit_number = #{permitNumber,jdbcType=VARCHAR}, + + + permit_url = #{permitUrl,jdbcType=VARCHAR}, + + + co_id = #{coId,jdbcType=INTEGER}, + + + where id = #{id,jdbcType=INTEGER} + + + + + update bm_co_bank + set bank_name = #{bankName,jdbcType=VARCHAR}, + account_name = #{accountName,jdbcType=VARCHAR}, + bank_account = #{bankAccount,jdbcType=VARCHAR}, + bank_address = #{bankAddress,jdbcType=VARCHAR}, + permit_number = #{permitNumber,jdbcType=VARCHAR}, + permit_url = #{permitUrl,jdbcType=VARCHAR}, + co_id = #{coId,jdbcType=INTEGER} + where id = #{id,jdbcType=INTEGER} + + + \ No newline at end of file diff --git a/zlpt-modules/zlpt-company/src/main/resources/mapper/BmCompanyInfoMapper.xml b/zlpt-modules/zlpt-company/src/main/resources/mapper/BmCompanyInfoMapper.xml new file mode 100644 index 0000000..4afe808 --- /dev/null +++ b/zlpt-modules/zlpt-company/src/main/resources/mapper/BmCompanyInfoMapper.xml @@ -0,0 +1,374 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + company_id, company_name, company_type, company_ltd, credit_code, register_address, + operate_address, certificateType, id_number, business_license, legal_person, invitation_code, + invitation_co_name, business_scope, auth_person, auth_id_number, auth_phone, auth_document, + id_face_url, id_nation_url, create_time, creator, auditor, audit_time, audit_remark, + `status`, update_time + + + + + + update bm_company_info set status = '2' + where company_id = #{companyId,jdbcType=INTEGER} + + + + + insert into bm_company_info (company_name, company_type, company_ltd, + credit_code, register_address, operate_address, + certificateType, id_number, business_license, + legal_person, invitation_code, invitation_co_name, + business_scope, auth_person, auth_id_number, + auth_phone, auth_document, id_face_url, + id_nation_url, create_time, creator, + auditor, audit_time, audit_remark, + `status`, update_time) + values (#{companyName,jdbcType=VARCHAR}, #{companyType,jdbcType=VARCHAR}, #{companyLtd,jdbcType=VARCHAR}, + #{creditCode,jdbcType=VARCHAR}, #{registerAddress,jdbcType=VARCHAR}, #{operateAddress,jdbcType=VARCHAR}, + #{certificatetype,jdbcType=VARCHAR}, #{idNumber,jdbcType=VARCHAR}, #{businessLicense,jdbcType=VARCHAR}, + #{legalPerson,jdbcType=VARCHAR}, #{invitationCode,jdbcType=VARCHAR}, #{invitationCoName,jdbcType=VARCHAR}, + #{businessScope,jdbcType=VARCHAR}, #{authPerson,jdbcType=VARCHAR}, #{authIdNumber,jdbcType=VARCHAR}, + #{authPhone,jdbcType=VARCHAR}, #{authDocument,jdbcType=VARCHAR}, #{idFaceUrl,jdbcType=VARCHAR}, + #{idNationUrl,jdbcType=VARCHAR}, #{createTime,jdbcType=VARCHAR}, #{creator,jdbcType=VARCHAR}, + #{auditor,jdbcType=INTEGER}, #{auditTime,jdbcType=VARCHAR}, #{auditRemark,jdbcType=VARCHAR}, + #{status,jdbcType=VARCHAR}, #{updateTime,jdbcType=VARCHAR}) + + + + + insert into bm_company_info + + + company_name, + + + company_type, + + + company_ltd, + + + credit_code, + + + register_address, + + + operate_address, + + + certificateType, + + + id_number, + + + business_license, + + + legal_person, + + + invitation_code, + + + invitation_co_name, + + + business_scope, + + + auth_person, + + + auth_id_number, + + + auth_phone, + + + auth_document, + + + id_face_url, + + + id_nation_url, + + + create_time, + + + creator, + + + auditor, + + + audit_time, + + + audit_remark, + + + `status`, + + + update_time, + + + + + #{companyName,jdbcType=VARCHAR}, + + + #{companyType,jdbcType=VARCHAR}, + + + #{companyLtd,jdbcType=VARCHAR}, + + + #{creditCode,jdbcType=VARCHAR}, + + + #{registerAddress,jdbcType=VARCHAR}, + + + #{operateAddress,jdbcType=VARCHAR}, + + + #{certificatetype,jdbcType=VARCHAR}, + + + #{idNumber,jdbcType=VARCHAR}, + + + #{businessLicense,jdbcType=VARCHAR}, + + + #{legalPerson,jdbcType=VARCHAR}, + + + #{invitationCode,jdbcType=VARCHAR}, + + + #{invitationCoName,jdbcType=VARCHAR}, + + + #{businessScope,jdbcType=VARCHAR}, + + + #{authPerson,jdbcType=VARCHAR}, + + + #{authIdNumber,jdbcType=VARCHAR}, + + + #{authPhone,jdbcType=VARCHAR}, + + + #{authDocument,jdbcType=VARCHAR}, + + + #{idFaceUrl,jdbcType=VARCHAR}, + + + #{idNationUrl,jdbcType=VARCHAR}, + + + #{createTime,jdbcType=VARCHAR}, + + + #{creator,jdbcType=VARCHAR}, + + + #{auditor,jdbcType=INTEGER}, + + + #{auditTime,jdbcType=VARCHAR}, + + + #{auditRemark,jdbcType=VARCHAR}, + + + #{status,jdbcType=VARCHAR}, + + + #{updateTime,jdbcType=VARCHAR}, + + + + + + + update bm_company_info + + + company_name = #{companyName,jdbcType=VARCHAR}, + + + company_type = #{companyType,jdbcType=VARCHAR}, + + + company_ltd = #{companyLtd,jdbcType=VARCHAR}, + + + credit_code = #{creditCode,jdbcType=VARCHAR}, + + + register_address = #{registerAddress,jdbcType=VARCHAR}, + + + operate_address = #{operateAddress,jdbcType=VARCHAR}, + + + certificateType = #{certificatetype,jdbcType=VARCHAR}, + + + id_number = #{idNumber,jdbcType=VARCHAR}, + + + business_license = #{businessLicense,jdbcType=VARCHAR}, + + + legal_person = #{legalPerson,jdbcType=VARCHAR}, + + + invitation_code = #{invitationCode,jdbcType=VARCHAR}, + + + invitation_co_name = #{invitationCoName,jdbcType=VARCHAR}, + + + business_scope = #{businessScope,jdbcType=VARCHAR}, + + + auth_person = #{authPerson,jdbcType=VARCHAR}, + + + auth_id_number = #{authIdNumber,jdbcType=VARCHAR}, + + + auth_phone = #{authPhone,jdbcType=VARCHAR}, + + + auth_document = #{authDocument,jdbcType=VARCHAR}, + + + id_face_url = #{idFaceUrl,jdbcType=VARCHAR}, + + + id_nation_url = #{idNationUrl,jdbcType=VARCHAR}, + + + create_time = #{createTime,jdbcType=VARCHAR}, + + + creator = #{creator,jdbcType=VARCHAR}, + + + auditor = #{auditor,jdbcType=INTEGER}, + + + audit_time = #{auditTime,jdbcType=VARCHAR}, + + + audit_remark = #{auditRemark,jdbcType=VARCHAR}, + + + `status` = #{status,jdbcType=VARCHAR}, + + + update_time = #{updateTime,jdbcType=VARCHAR}, + + + where company_id = #{companyId,jdbcType=INTEGER} + + + + + update bm_company_info + set company_name = #{companyName,jdbcType=VARCHAR}, + company_type = #{companyType,jdbcType=VARCHAR}, + company_ltd = #{companyLtd,jdbcType=VARCHAR}, + credit_code = #{creditCode,jdbcType=VARCHAR}, + register_address = #{registerAddress,jdbcType=VARCHAR}, + operate_address = #{operateAddress,jdbcType=VARCHAR}, + certificateType = #{certificatetype,jdbcType=VARCHAR}, + id_number = #{idNumber,jdbcType=VARCHAR}, + business_license = #{businessLicense,jdbcType=VARCHAR}, + legal_person = #{legalPerson,jdbcType=VARCHAR}, + invitation_code = #{invitationCode,jdbcType=VARCHAR}, + invitation_co_name = #{invitationCoName,jdbcType=VARCHAR}, + business_scope = #{businessScope,jdbcType=VARCHAR}, + auth_person = #{authPerson,jdbcType=VARCHAR}, + auth_id_number = #{authIdNumber,jdbcType=VARCHAR}, + auth_phone = #{authPhone,jdbcType=VARCHAR}, + auth_document = #{authDocument,jdbcType=VARCHAR}, + id_face_url = #{idFaceUrl,jdbcType=VARCHAR}, + id_nation_url = #{idNationUrl,jdbcType=VARCHAR}, + create_time = #{createTime,jdbcType=VARCHAR}, + creator = #{creator,jdbcType=VARCHAR}, + auditor = #{auditor,jdbcType=INTEGER}, + audit_time = #{auditTime,jdbcType=VARCHAR}, + audit_remark = #{auditRemark,jdbcType=VARCHAR}, + `status` = #{status,jdbcType=VARCHAR}, + update_time = #{updateTime,jdbcType=VARCHAR} + where company_id = #{companyId,jdbcType=INTEGER} + + + + \ No newline at end of file diff --git a/zlpt-modules/zlpt-company/src/main/resources/mapper/MaUserCollectMapper.xml b/zlpt-modules/zlpt-company/src/main/resources/mapper/MaUserCollectMapper.xml new file mode 100644 index 0000000..5c423e4 --- /dev/null +++ b/zlpt-modules/zlpt-company/src/main/resources/mapper/MaUserCollectMapper.xml @@ -0,0 +1,118 @@ + + + + + + + + + + + + + + + id, user_id, ma_id, `time` + + + + + + + delete from ma_user_collect + where id = #{id,jdbcType=INTEGER} + + + + + insert into ma_user_collect (user_id, ma_id, `time`) + values (#{userId,jdbcType=INTEGER}, #{maId,jdbcType=INTEGER}, #{time,jdbcType=VARCHAR}) + + + + + insert into ma_user_collect + + + user_id, + + + ma_id, + + + `time`, + + + + + #{userId,jdbcType=INTEGER}, + + + #{maId,jdbcType=INTEGER}, + + + #{time,jdbcType=VARCHAR}, + + + + + + + update ma_user_collect + + + user_id = #{userId,jdbcType=INTEGER}, + + + ma_id = #{maId,jdbcType=INTEGER}, + + + `time` = #{time,jdbcType=VARCHAR}, + + + where id = #{id,jdbcType=INTEGER} + + + + + update ma_user_collect + set user_id = #{userId,jdbcType=INTEGER}, + ma_id = #{maId,jdbcType=INTEGER}, + `time` = #{time,jdbcType=VARCHAR} + where id = #{id,jdbcType=INTEGER} + + + + + + + \ No newline at end of file