diff --git a/zlpt-auth/src/main/resources/logback.xml b/zlpt-auth/src/main/resources/logback.xml index 3a4835e..5aafb84 100644 --- a/zlpt-auth/src/main/resources/logback.xml +++ b/zlpt-auth/src/main/resources/logback.xml @@ -58,7 +58,7 @@ - + diff --git a/zlpt-modules/zlpt-bigScreen/src/main/resources/logback.xml b/zlpt-modules/zlpt-bigScreen/src/main/resources/logback.xml index 4cfe0f9..2b4fe87 100644 --- a/zlpt-modules/zlpt-bigScreen/src/main/resources/logback.xml +++ b/zlpt-modules/zlpt-bigScreen/src/main/resources/logback.xml @@ -58,7 +58,7 @@ - + diff --git a/zlpt-modules/zlpt-company/src/main/java/com/bonus/zlpt/company/controller/BusinessOpenController.java b/zlpt-modules/zlpt-company/src/main/java/com/bonus/zlpt/company/controller/BusinessOpenController.java new file mode 100644 index 0000000..5f59a0d --- /dev/null +++ b/zlpt-modules/zlpt-company/src/main/java/com/bonus/zlpt/company/controller/BusinessOpenController.java @@ -0,0 +1,87 @@ +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.BusinessOpen; +import com.bonus.zlpt.company.mapper.BusinessOpenMapper; +import com.bonus.zlpt.company.service.BusinessOpenService; +import org.springframework.web.bind.annotation.*; + +import javax.annotation.Resource; + +/** + * 业务开通表 + * (BusinessOpen)表控制层 + * @author 阮世耀 +*/ +@RestController +@RequestMapping("/business_open") +public class BusinessOpenController extends BaseController { + + /** + * 服务对象 + */ + @Resource + private BusinessOpenService businessOpenService; + + @Resource + private BusinessOpenMapper businessOpenMapper; + + /** + * 新增 -- 业务开通 + */ + @RequiresPermissions("system:business:add") + @Log(title = "业务开通", businessType = BusinessType.INSERT) + @PostMapping("openBusiness") + public AjaxResult openBusiness(@RequestBody BusinessOpen obj) { + try { + return toAjax(businessOpenService.insertSelective(obj)); + } catch (Exception e) { + return error(e.getMessage()); + } + } + + /** + * 获取业务开通列表 + */ + @RequiresPermissions("system:business:list") + @Log(title = "获取业务列表", businessType = BusinessType.OTHER) + @GetMapping("getBusinessList") + public AjaxResult getBusinessList(BusinessOpen record) { + try { + return success(getDataTable(businessOpenMapper.selectBusinessOpenList(record))); + } catch (Exception e) { + return error(e.getMessage()); + } + } + + + /** + * 查询 -- 根据id获取开通记录信息 + */ + @RequiresPermissions("system:business:list") + @Log(title = "根据id获取开通记录信息", businessType = BusinessType.OTHER) + @GetMapping("selectById") + public AjaxResult selectById(Integer id) { + try { + return success(businessOpenService.selectByPrimaryKey(id)); + } catch (Exception e) { + return error(e.getMessage()); + } + } + + + /** + * 通过主键查询单条数据 + * + * @param id 主键 + * @return 单条数据 + */ + @GetMapping("selectOne") + public BusinessOpen selectOne(Integer id) { + return businessOpenService.selectByPrimaryKey(id); + } + +} diff --git a/zlpt-modules/zlpt-company/src/main/java/com/bonus/zlpt/company/domain/BusinessOpen.java b/zlpt-modules/zlpt-company/src/main/java/com/bonus/zlpt/company/domain/BusinessOpen.java new file mode 100644 index 0000000..1f2e385 --- /dev/null +++ b/zlpt-modules/zlpt-company/src/main/java/com/bonus/zlpt/company/domain/BusinessOpen.java @@ -0,0 +1,74 @@ +package com.bonus.zlpt.company.domain; + +import java.io.Serializable; +import lombok.Data; + +/** +* Description: 业务开通表 +* @Author 阮世耀 +* @Create 2023/12/2 15:37 +* @Version 1.0 +*/ + +/** + * 业务开通 + */ +@Data +public class BusinessOpen implements Serializable { + + private static final long serialVersionUID = 4523755810983395619L; + + private Integer id; + + /** + * 用户id + */ + private Integer userId; + + /** + * 企业id + */ + private Integer coId; + + /** + * 业务id + */ + private Integer businessId; + + /** + * 开通申请日期 + */ + private String time; + + /** + * 附件名称 + */ + private String fileName; + + /** + * 附件地址 + */ + private String fileUrl; + + /** + * 审核人 + */ + private String auditor; + + /** + * 审核日期 + */ + private String auditTime; + + /** + * 状态(0待审核,1通过,2驳回) + */ + private String status; + + /** + * 审核备注 + */ + private String auditRemark; + + +} \ No newline at end of file diff --git a/zlpt-modules/zlpt-company/src/main/java/com/bonus/zlpt/company/mapper/BusinessOpenMapper.java b/zlpt-modules/zlpt-company/src/main/java/com/bonus/zlpt/company/mapper/BusinessOpenMapper.java new file mode 100644 index 0000000..4c88a09 --- /dev/null +++ b/zlpt-modules/zlpt-company/src/main/java/com/bonus/zlpt/company/mapper/BusinessOpenMapper.java @@ -0,0 +1,30 @@ +package com.bonus.zlpt.company.mapper; + +import com.bonus.zlpt.company.domain.BusinessOpen; +import org.apache.ibatis.annotations.Mapper; + +import java.util.List; + +/** +* Description: 业务开通表DAO层 +* @Author 阮世耀 +* @Create 2023/12/2 15:37 +* @Version 1.0 +*/ + +@Mapper +public interface BusinessOpenMapper { + int deleteByPrimaryKey(Integer id); + + int insert(BusinessOpen record); + + int insertSelective(BusinessOpen record); + + BusinessOpen selectByPrimaryKey(Integer id); + + List selectBusinessOpenList(BusinessOpen record); + + int updateByPrimaryKeySelective(BusinessOpen record); + + int updateByPrimaryKey(BusinessOpen record); +} \ No newline at end of file diff --git a/zlpt-modules/zlpt-company/src/main/java/com/bonus/zlpt/company/service/BusinessOpenService.java b/zlpt-modules/zlpt-company/src/main/java/com/bonus/zlpt/company/service/BusinessOpenService.java new file mode 100644 index 0000000..8a60406 --- /dev/null +++ b/zlpt-modules/zlpt-company/src/main/java/com/bonus/zlpt/company/service/BusinessOpenService.java @@ -0,0 +1,25 @@ +package com.bonus.zlpt.company.service; + +import com.bonus.zlpt.company.domain.BusinessOpen; + /** +* Description: +* @Author 阮世耀 +* @Create 2023/12/2 15:37 +* @Version 1.0 +*/ + +public interface BusinessOpenService{ + + int deleteByPrimaryKey(Integer id); + + int insert(BusinessOpen record); + + int insertSelective(BusinessOpen record); + + BusinessOpen selectByPrimaryKey(Integer id); + + int updateByPrimaryKeySelective(BusinessOpen record); + + int updateByPrimaryKey(BusinessOpen record); + +} diff --git a/zlpt-modules/zlpt-company/src/main/java/com/bonus/zlpt/company/service/impl/BusinessOpenServiceImpl.java b/zlpt-modules/zlpt-company/src/main/java/com/bonus/zlpt/company/service/impl/BusinessOpenServiceImpl.java new file mode 100644 index 0000000..ade2e96 --- /dev/null +++ b/zlpt-modules/zlpt-company/src/main/java/com/bonus/zlpt/company/service/impl/BusinessOpenServiceImpl.java @@ -0,0 +1,51 @@ +package com.bonus.zlpt.company.service.impl; + +import org.springframework.stereotype.Service; +import javax.annotation.Resource; +import com.bonus.zlpt.company.mapper.BusinessOpenMapper; +import com.bonus.zlpt.company.domain.BusinessOpen; +import com.bonus.zlpt.company.service.BusinessOpenService; +/** +* Description: +* @Author 阮世耀 +* @Create 2023/12/2 15:37 +* @Version 1.0 +*/ + +@Service +public class BusinessOpenServiceImpl implements BusinessOpenService{ + + @Resource + private BusinessOpenMapper businessOpenMapper; + + @Override + public int deleteByPrimaryKey(Integer id) { + return businessOpenMapper.deleteByPrimaryKey(id); + } + + @Override + public int insert(BusinessOpen record) { + return businessOpenMapper.insert(record); + } + + @Override + public int insertSelective(BusinessOpen record) { + return businessOpenMapper.insertSelective(record); + } + + @Override + public BusinessOpen selectByPrimaryKey(Integer id) { + return businessOpenMapper.selectByPrimaryKey(id); + } + + @Override + public int updateByPrimaryKeySelective(BusinessOpen record) { + return businessOpenMapper.updateByPrimaryKeySelective(record); + } + + @Override + public int updateByPrimaryKey(BusinessOpen record) { + return businessOpenMapper.updateByPrimaryKey(record); + } + +} diff --git a/zlpt-modules/zlpt-company/src/main/resources/mapper/BusinessOpenMapper.xml b/zlpt-modules/zlpt-company/src/main/resources/mapper/BusinessOpenMapper.xml new file mode 100644 index 0000000..7c36ac2 --- /dev/null +++ b/zlpt-modules/zlpt-company/src/main/resources/mapper/BusinessOpenMapper.xml @@ -0,0 +1,184 @@ + + + + + + + + + + + + + + + + + + + + + + id, user_id, co_id, business_id, `time`, file_name, file_url, auditor, audit_time, + `status`, audit_remark + + + + + + + delete from business_open + where id = #{id,jdbcType=INTEGER} + + + + + insert into business_open (id, user_id, co_id, + business_id, `time`, file_name, + file_url, auditor, audit_time, + `status`, audit_remark) + values (#{id,jdbcType=INTEGER}, #{userId,jdbcType=INTEGER}, #{coId,jdbcType=INTEGER}, + #{businessId,jdbcType=INTEGER}, #{time,jdbcType=VARCHAR}, #{fileName,jdbcType=VARCHAR}, + #{fileUrl,jdbcType=VARCHAR}, #{auditor,jdbcType=VARCHAR}, #{auditTime,jdbcType=VARCHAR}, + #{status,jdbcType=VARCHAR}, #{auditRemark,jdbcType=VARCHAR}) + + + + + insert into business_open + + + id, + + + user_id, + + + co_id, + + + business_id, + + + `time`, + + + file_name, + + + file_url, + + + auditor, + + + audit_time, + + + `status`, + + + audit_remark, + + + + + #{id,jdbcType=INTEGER}, + + + #{userId,jdbcType=INTEGER}, + + + #{coId,jdbcType=INTEGER}, + + + #{businessId,jdbcType=INTEGER}, + + + #{time,jdbcType=VARCHAR}, + + + #{fileName,jdbcType=VARCHAR}, + + + #{fileUrl,jdbcType=VARCHAR}, + + + #{auditor,jdbcType=VARCHAR}, + + + #{auditTime,jdbcType=VARCHAR}, + + + #{status,jdbcType=VARCHAR}, + + + #{auditRemark,jdbcType=VARCHAR}, + + + + + + + update business_open + + + user_id = #{userId,jdbcType=INTEGER}, + + + co_id = #{coId,jdbcType=INTEGER}, + + + business_id = #{businessId,jdbcType=INTEGER}, + + + `time` = #{time,jdbcType=VARCHAR}, + + + file_name = #{fileName,jdbcType=VARCHAR}, + + + file_url = #{fileUrl,jdbcType=VARCHAR}, + + + auditor = #{auditor,jdbcType=VARCHAR}, + + + audit_time = #{auditTime,jdbcType=VARCHAR}, + + + `status` = #{status,jdbcType=VARCHAR}, + + + audit_remark = #{auditRemark,jdbcType=VARCHAR}, + + + where id = #{id,jdbcType=INTEGER} + + + + + update business_open + set user_id = #{userId,jdbcType=INTEGER}, + co_id = #{coId,jdbcType=INTEGER}, + business_id = #{businessId,jdbcType=INTEGER}, + `time` = #{time,jdbcType=VARCHAR}, + file_name = #{fileName,jdbcType=VARCHAR}, + file_url = #{fileUrl,jdbcType=VARCHAR}, + auditor = #{auditor,jdbcType=VARCHAR}, + audit_time = #{auditTime,jdbcType=VARCHAR}, + `status` = #{status,jdbcType=VARCHAR}, + audit_remark = #{auditRemark,jdbcType=VARCHAR} + where id = #{id,jdbcType=INTEGER} + + + + \ No newline at end of file diff --git a/zlpt-modules/zlpt-home/src/main/resources/logback.xml b/zlpt-modules/zlpt-home/src/main/resources/logback.xml index 4cfe0f9..2b4fe87 100644 --- a/zlpt-modules/zlpt-home/src/main/resources/logback.xml +++ b/zlpt-modules/zlpt-home/src/main/resources/logback.xml @@ -58,7 +58,7 @@ - + diff --git a/zlpt-modules/zlpt-system/src/main/resources/logback.xml b/zlpt-modules/zlpt-system/src/main/resources/logback.xml index 4cfe0f9..2b4fe87 100644 --- a/zlpt-modules/zlpt-system/src/main/resources/logback.xml +++ b/zlpt-modules/zlpt-system/src/main/resources/logback.xml @@ -58,7 +58,7 @@ - +