This commit is contained in:
parent
c589a94b7a
commit
e9807ad8a8
|
|
@ -1,9 +1,13 @@
|
|||
package com.bonus.base;
|
||||
|
||||
import com.bonus.common.security.annotation.EnableCustomConfig;
|
||||
import com.bonus.common.security.annotation.EnableRyFeignClients;
|
||||
import com.bonus.common.swagger.annotation.EnableCustomSwagger2;
|
||||
import org.mybatis.spring.annotation.MapperScan;
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
|
||||
/**
|
||||
* @author : 阮世耀
|
||||
|
|
@ -13,7 +17,9 @@ import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
|
|||
* @Description: Base基础模块启动类
|
||||
*/
|
||||
|
||||
@EnableCustomConfig
|
||||
@EnableCustomSwagger2
|
||||
@EnableRyFeignClients
|
||||
@SpringBootApplication(exclude = {DataSourceAutoConfiguration.class })
|
||||
public class BonusBaseApplication {
|
||||
public static void main(String[] args) {
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@ public class BmAgreementController {
|
|||
@PostMapping(value = "/add")
|
||||
public ResultBean<Boolean> add(BmAgreement bmAgreement) {
|
||||
int result = this.bmAgreementService.insertSelective(bmAgreement);
|
||||
return result > 0 ? ResultBean.success(true) : ResultBean.error(0, "删除0条");
|
||||
return result > 0 ? ResultBean.success(true) : ResultBean.error(0, "删除失败");
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ import java.util.List;
|
|||
* @author 阮世耀
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/bm_customer_type")
|
||||
@RequestMapping("/unittype")
|
||||
public class BmCustomerTypeController extends BaseController {
|
||||
|
||||
/**
|
||||
|
|
@ -28,8 +28,8 @@ public class BmCustomerTypeController extends BaseController {
|
|||
@Autowired
|
||||
private BmCustomerTypeService bmCustomerTypeService;
|
||||
|
||||
@RequiresPermissions("system:customerType:list")
|
||||
@GetMapping("/list")
|
||||
// @RequiresPermissions("base:customerType:query")
|
||||
@GetMapping("/getUnitTypeList")
|
||||
@SysLog(title = "往来单位类型", businessType = OperaType.QUERY, logType = 1, module = "往来单位类型->分页查询", details = "往来单位类型列表")
|
||||
public TableDataInfo list(BmCustomerType bmCustomerType) {
|
||||
startPage();
|
||||
|
|
@ -44,7 +44,7 @@ public class BmCustomerTypeController extends BaseController {
|
|||
* @return 单条数据
|
||||
*/
|
||||
@GetMapping("{id}")
|
||||
@RequiresPermissions("system:customerType:list")
|
||||
@RequiresPermissions("base:customerType:query")
|
||||
public ResultBean<BmCustomerType> queryById(@PathVariable("id") Integer id) {
|
||||
return ResultBean.success(this.bmCustomerTypeService.selectByPrimaryKey(id));
|
||||
}
|
||||
|
|
@ -56,7 +56,7 @@ public class BmCustomerTypeController extends BaseController {
|
|||
* @return 新增结果
|
||||
*/
|
||||
@PostMapping(value = "/add")
|
||||
@RequiresPermissions("system:customerType:add")
|
||||
@RequiresPermissions("base:customerType:add")
|
||||
public ResultBean<Boolean> add(BmCustomerType bmCustomerType) {
|
||||
this.bmCustomerTypeService.insertSelective(bmCustomerType);
|
||||
return ResultBean.success(true);
|
||||
|
|
@ -69,7 +69,7 @@ public class BmCustomerTypeController extends BaseController {
|
|||
* @return 编辑结果
|
||||
*/
|
||||
@PutMapping(value = "/update")
|
||||
@RequiresPermissions("system:customerType:update")
|
||||
@RequiresPermissions("base:customerType:edit")
|
||||
public ResultBean<Boolean> edit(BmCustomerType bmCustomerType) {
|
||||
this.bmCustomerTypeService.updateByPrimaryKeySelective(bmCustomerType);
|
||||
return ResultBean.success(true);
|
||||
|
|
@ -81,8 +81,8 @@ public class BmCustomerTypeController extends BaseController {
|
|||
* @param id 主键
|
||||
* @return 删除是否成功
|
||||
*/
|
||||
@PostMapping(value = "/delete/{id}")
|
||||
@RequiresPermissions("system:customerType:delete")
|
||||
@PostMapping(value = "/del/{id}")
|
||||
@RequiresPermissions("base:customerType:remove")
|
||||
public ResultBean<Boolean> deleteById(@PathVariable("id") Integer id) {
|
||||
this.bmCustomerTypeService.deleteByPrimaryKey(id);
|
||||
return ResultBean.success(true);
|
||||
|
|
|
|||
|
|
@ -1,12 +1,17 @@
|
|||
package com.bonus.base.controller;
|
||||
import com.bonus.base.domain.BmCustomerType;
|
||||
import com.bonus.base.domain.BmProject;
|
||||
import com.bonus.base.service.BmProjectService;
|
||||
import com.bonus.base.utils.ResultBean;
|
||||
import com.bonus.common.core.web.controller.BaseController;
|
||||
import com.bonus.common.core.web.page.TableDataInfo;
|
||||
import com.bonus.common.security.annotation.RequiresPermissions;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 工程项目管理(bm_project)表控制层
|
||||
*
|
||||
|
|
@ -22,6 +27,21 @@ public class BmProjectController extends BaseController {
|
|||
@Autowired
|
||||
private BmProjectService bmProjectService;
|
||||
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
* @param bmCustomerType 请求条件
|
||||
* @return 工程列表
|
||||
*/
|
||||
@GetMapping("/getProjectList")
|
||||
@RequiresPermissions("base:project:query")
|
||||
public TableDataInfo list(BmProject bmCustomerType) {
|
||||
startPage();
|
||||
List<BmProject> list = bmProjectService.selectAll();
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 通过主键查询单条数据
|
||||
*
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
package com.bonus.base.domain;
|
||||
|
||||
import com.bonus.common.core.web.domain.BaseEntity;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import java.io.Serializable;
|
||||
|
|
@ -16,9 +17,7 @@ import lombok.Data;
|
|||
|
||||
@ApiModel(description="协议管理")
|
||||
@Data
|
||||
public class BmAgreement implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
public class BmAgreement extends BaseEntity implements Serializable {
|
||||
|
||||
@ApiModelProperty(value="")
|
||||
private Integer id;
|
||||
|
|
|
|||
|
|
@ -3,6 +3,8 @@ package com.bonus.base.mapper;
|
|||
import com.bonus.base.domain.BmProject;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
*@PackagePath: com.bonus.base
|
||||
*@author : 阮世耀
|
||||
|
|
@ -44,6 +46,8 @@ public interface BmProjectMapper {
|
|||
*/
|
||||
BmProject selectByPrimaryKey(Integer id);
|
||||
|
||||
List<BmProject> selectAll();
|
||||
|
||||
/**
|
||||
* update record selective
|
||||
* @param record the updated record
|
||||
|
|
|
|||
|
|
@ -1,60 +1,64 @@
|
|||
package com.bonus.base.service;
|
||||
|
||||
import com.baomidou.dynamic.datasource.annotation.DS;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
||||
import com.bonus.base.domain.BmAgreement;
|
||||
import com.bonus.base.mapper.BmAgreementMapper;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
/**
|
||||
*@PackagePath: com.bonus.base
|
||||
*@author : 阮世耀
|
||||
*@CreateTime: 2024-08-09 10:33
|
||||
*@Description: 描述
|
||||
*@version : 1.0
|
||||
* @PackagePath: com.bonus.base
|
||||
* @author : 阮世耀
|
||||
* @CreateTime: 2024-08-09 10:33
|
||||
* @Description: 描述
|
||||
* @version : 1.0
|
||||
*/
|
||||
@Service
|
||||
@DS("master")
|
||||
public class BmAgreementService{
|
||||
|
||||
@Autowired
|
||||
@Resource
|
||||
private BmAgreementMapper bmAgreementMapper;
|
||||
|
||||
|
||||
public int deleteByPrimaryKey(Integer id) {
|
||||
return bmAgreementMapper.deleteByPrimaryKey(id);
|
||||
}
|
||||
|
||||
|
||||
|
||||
public int insert(BmAgreement record) {
|
||||
return bmAgreementMapper.insert(record);
|
||||
}
|
||||
|
||||
|
||||
|
||||
public int insertOrUpdate(BmAgreement record) {
|
||||
return bmAgreementMapper.insertOrUpdate(record);
|
||||
}
|
||||
|
||||
|
||||
|
||||
public int insertOrUpdateSelective(BmAgreement record) {
|
||||
return bmAgreementMapper.insertOrUpdateSelective(record);
|
||||
}
|
||||
|
||||
|
||||
|
||||
public int insertSelective(BmAgreement record) {
|
||||
return bmAgreementMapper.insertSelective(record);
|
||||
}
|
||||
|
||||
|
||||
|
||||
public BmAgreement selectByPrimaryKey(Integer id) {
|
||||
return bmAgreementMapper.selectByPrimaryKey(id);
|
||||
}
|
||||
|
||||
|
||||
|
||||
public int updateByPrimaryKeySelective(BmAgreement record) {
|
||||
return bmAgreementMapper.updateByPrimaryKeySelective(record);
|
||||
}
|
||||
|
||||
|
||||
|
||||
public int updateByPrimaryKey(BmAgreement record) {
|
||||
return bmAgreementMapper.updateByPrimaryKey(record);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
package com.bonus.base.service;
|
||||
|
||||
import com.baomidou.dynamic.datasource.annotation.DS;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
|
@ -15,6 +16,7 @@ import com.bonus.base.mapper.BmCustomerTypeMapper;
|
|||
* @version : 1.0
|
||||
*/
|
||||
@Service
|
||||
@DS("master")
|
||||
public class BmCustomerTypeService{
|
||||
|
||||
@Autowired
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
package com.bonus.base.service;
|
||||
|
||||
import com.baomidou.dynamic.datasource.annotation.DS;
|
||||
import com.bonus.base.mapper.BmProjectMapper;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
|
|
@ -7,6 +8,8 @@ import org.springframework.beans.factory.annotation.Autowired;
|
|||
|
||||
import com.bonus.base.domain.BmProject;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
*@PackagePath: com.bonus.base
|
||||
*@author : 阮世耀
|
||||
|
|
@ -15,11 +18,16 @@ import com.bonus.base.domain.BmProject;
|
|||
*@version : 1.0
|
||||
*/
|
||||
@Service
|
||||
@DS("master")
|
||||
public class BmProjectService{
|
||||
|
||||
@Autowired
|
||||
private BmProjectMapper bmProjectMapper;
|
||||
|
||||
public List<BmProject> selectAll() {
|
||||
return bmProjectMapper.selectAll();
|
||||
}
|
||||
|
||||
public int deleteByPrimaryKey(Integer id) {
|
||||
return bmProjectMapper.deleteByPrimaryKey(id);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -19,13 +19,13 @@ spring:
|
|||
discovery:
|
||||
# 服务注册地址
|
||||
server-addr: 192.168.0.56:8848
|
||||
namespace: 9cde1ce1-98bc-4b9c-9213-f1fbf8a5b3cc
|
||||
namespace: 693e01a9-1dc4-4858-b1ae-439da3d35f66
|
||||
config:
|
||||
# 配置中心地址
|
||||
server-addr: 192.168.0.56:8848
|
||||
namespace: 9cde1ce1-98bc-4b9c-9213-f1fbf8a5b3cc
|
||||
namespace: 693e01a9-1dc4-4858-b1ae-439da3d35f66
|
||||
# 配置文件格式
|
||||
file-extension: yml
|
||||
# 共享配置
|
||||
shared-configs:
|
||||
- application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension}
|
||||
- application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension}
|
||||
|
|
@ -7,7 +7,6 @@
|
|||
<id column="id" jdbcType="INTEGER" property="id" />
|
||||
<result column="code" jdbcType="VARCHAR" property="code" />
|
||||
<result column="sign_date" jdbcType="VARCHAR" property="signDate" />
|
||||
<result column="lease_company" jdbcType="INTEGER" property="leaseCompany" />
|
||||
<result column="project" jdbcType="INTEGER" property="project" />
|
||||
<result column="start_time" jdbcType="VARCHAR" property="startTime" />
|
||||
<result column="lease_term" jdbcType="VARCHAR" property="leaseTerm" />
|
||||
|
|
@ -27,7 +26,7 @@
|
|||
</resultMap>
|
||||
<sql id="Base_Column_List">
|
||||
<!--@mbg.generated-->
|
||||
id, code, sign_date, lease_company, project, start_time, lease_term, advance_charge,
|
||||
id, code, sign_date, project, start_time, lease_term, advance_charge,
|
||||
authorizing_person, authorizing_phone, contract_number, creator, create_time, remark,
|
||||
settlement_time, is_balance, url, is_sure, company_id, is_push
|
||||
</sql>
|
||||
|
|
@ -45,15 +44,14 @@
|
|||
</delete>
|
||||
<insert id="insert" parameterType="com.bonus.base.domain.BmAgreement">
|
||||
<!--@mbg.generated-->
|
||||
insert into bm_agreement (id, code, sign_date,
|
||||
lease_company, project, start_time,
|
||||
insert into bm_agreement (id, code, sign_date, project, start_time,
|
||||
lease_term, advance_charge, authorizing_person,
|
||||
authorizing_phone, contract_number, creator,
|
||||
create_time, remark, settlement_time,
|
||||
is_balance, url, is_sure,
|
||||
company_id, is_push)
|
||||
values (#{id,jdbcType=INTEGER}, #{code,jdbcType=VARCHAR}, #{signDate,jdbcType=VARCHAR},
|
||||
#{leaseCompany,jdbcType=INTEGER}, #{project,jdbcType=INTEGER}, #{startTime,jdbcType=VARCHAR},
|
||||
#{project,jdbcType=INTEGER}, #{startTime,jdbcType=VARCHAR},
|
||||
#{leaseTerm,jdbcType=VARCHAR}, #{advanceCharge,jdbcType=VARCHAR}, #{authorizingPerson,jdbcType=VARCHAR},
|
||||
#{authorizingPhone,jdbcType=VARCHAR}, #{contractNumber,jdbcType=VARCHAR}, #{creator,jdbcType=VARCHAR},
|
||||
#{createTime,jdbcType=VARCHAR}, #{remark,jdbcType=VARCHAR}, #{settlementTime,jdbcType=VARCHAR},
|
||||
|
|
@ -73,9 +71,7 @@
|
|||
<if test="signDate != null and signDate != ''">
|
||||
sign_date,
|
||||
</if>
|
||||
<if test="leaseCompany != null">
|
||||
lease_company,
|
||||
</if>
|
||||
|
||||
<if test="project != null">
|
||||
project,
|
||||
</if>
|
||||
|
|
@ -135,9 +131,6 @@
|
|||
<if test="signDate != null and signDate != ''">
|
||||
#{signDate,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="leaseCompany != null">
|
||||
#{leaseCompany,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="project != null">
|
||||
#{project,jdbcType=INTEGER},
|
||||
</if>
|
||||
|
|
@ -198,9 +191,6 @@
|
|||
<if test="signDate != null and signDate != ''">
|
||||
sign_date = #{signDate,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="leaseCompany != null">
|
||||
lease_company = #{leaseCompany,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="project != null">
|
||||
project = #{project,jdbcType=INTEGER},
|
||||
</if>
|
||||
|
|
@ -257,7 +247,6 @@
|
|||
update bm_agreement
|
||||
set code = #{code,jdbcType=VARCHAR},
|
||||
sign_date = #{signDate,jdbcType=VARCHAR},
|
||||
lease_company = #{leaseCompany,jdbcType=INTEGER},
|
||||
project = #{project,jdbcType=INTEGER},
|
||||
start_time = #{startTime,jdbcType=VARCHAR},
|
||||
lease_term = #{leaseTerm,jdbcType=VARCHAR},
|
||||
|
|
@ -279,12 +268,12 @@
|
|||
<insert id="insertOrUpdate" parameterType="com.bonus.base.domain.BmAgreement">
|
||||
<!--@mbg.generated-->
|
||||
insert into bm_agreement
|
||||
(id, code, sign_date, lease_company, project, start_time, lease_term, advance_charge,
|
||||
(id, code, sign_date, project, start_time, lease_term, advance_charge,
|
||||
authorizing_person, authorizing_phone, contract_number, creator, create_time, remark,
|
||||
settlement_time, is_balance, url, is_sure, company_id, is_push)
|
||||
values
|
||||
(#{id,jdbcType=INTEGER}, #{code,jdbcType=VARCHAR}, #{signDate,jdbcType=VARCHAR},
|
||||
#{leaseCompany,jdbcType=INTEGER}, #{project,jdbcType=INTEGER}, #{startTime,jdbcType=VARCHAR},
|
||||
#{project,jdbcType=INTEGER}, #{startTime,jdbcType=VARCHAR},
|
||||
#{leaseTerm,jdbcType=VARCHAR}, #{advanceCharge,jdbcType=VARCHAR}, #{authorizingPerson,jdbcType=VARCHAR},
|
||||
#{authorizingPhone,jdbcType=VARCHAR}, #{contractNumber,jdbcType=VARCHAR}, #{creator,jdbcType=VARCHAR},
|
||||
#{createTime,jdbcType=VARCHAR}, #{remark,jdbcType=VARCHAR}, #{settlementTime,jdbcType=VARCHAR},
|
||||
|
|
@ -294,8 +283,8 @@
|
|||
id = #{id,jdbcType=INTEGER},
|
||||
code = #{code,jdbcType=VARCHAR},
|
||||
sign_date = #{signDate,jdbcType=VARCHAR},
|
||||
lease_company = #{leaseCompany,jdbcType=INTEGER},
|
||||
project = #{project,jdbcType=INTEGER},
|
||||
|
||||
project = #{project,jdbcType=INTEGER},
|
||||
start_time = #{startTime,jdbcType=VARCHAR},
|
||||
lease_term = #{leaseTerm,jdbcType=VARCHAR},
|
||||
advance_charge = #{advanceCharge,jdbcType=VARCHAR},
|
||||
|
|
@ -325,9 +314,6 @@
|
|||
<if test="signDate != null and signDate != ''">
|
||||
sign_date,
|
||||
</if>
|
||||
<if test="leaseCompany != null">
|
||||
lease_company,
|
||||
</if>
|
||||
<if test="project != null">
|
||||
project,
|
||||
</if>
|
||||
|
|
@ -388,9 +374,6 @@
|
|||
<if test="signDate != null and signDate != ''">
|
||||
#{signDate,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="leaseCompany != null">
|
||||
#{leaseCompany,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="project != null">
|
||||
#{project,jdbcType=INTEGER},
|
||||
</if>
|
||||
|
|
@ -451,9 +434,6 @@
|
|||
<if test="signDate != null and signDate != ''">
|
||||
sign_date = #{signDate,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="leaseCompany != null">
|
||||
lease_company = #{leaseCompany,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="project != null">
|
||||
project = #{project,jdbcType=INTEGER},
|
||||
</if>
|
||||
|
|
|
|||
|
|
@ -49,6 +49,14 @@
|
|||
where id = #{id,jdbcType=INTEGER}
|
||||
</select>
|
||||
|
||||
<select id="selectAll" resultMap="BaseResultMap">
|
||||
<!--@mbg.generated-->
|
||||
select
|
||||
<include refid="Base_Column_List" />
|
||||
from bm_project
|
||||
where is_active = '1'
|
||||
</select>
|
||||
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
|
||||
<!--@mbg.generated-->
|
||||
delete from bm_project
|
||||
|
|
@ -71,7 +79,7 @@
|
|||
#{phone,jdbcType=VARCHAR}, #{fax,jdbcType=VARCHAR}, #{address,jdbcType=VARCHAR},
|
||||
#{remarks,jdbcType=VARCHAR}, #{materialClerk,jdbcType=VARCHAR}, #{clerkPhone,jdbcType=VARCHAR},
|
||||
#{voltageClass,jdbcType=INTEGER}, #{companyId,jdbcType=INTEGER}, #{isBalanceEnd,jdbcType=CHAR},
|
||||
#{time,jdbcType=VARCHAR}, #{isActive,jdbcType=VARCHAR}, #{lon,jdbcType=VARCHAR},
|
||||
#{time,jdbcType=VARCHAR}, '1', #{lon,jdbcType=VARCHAR},
|
||||
#{lat,jdbcType=VARCHAR}, #{company,jdbcType=VARCHAR}, #{impUnit,jdbcType=VARCHAR},
|
||||
#{deptName,jdbcType=VARCHAR}, #{proId,jdbcType=VARCHAR}, #{deptId,jdbcType=INTEGER},
|
||||
#{cvo,jdbcType=VARCHAR}, #{stats,jdbcType=VARCHAR}, #{htzt,jdbcType=VARCHAR})
|
||||
|
|
|
|||
Loading…
Reference in New Issue