Merge branch 'dev' of http://192.168.2.237:3000/root/kangarooDataCenterV3 into yuecheng-project
This commit is contained in:
commit
6b0120eb23
|
@ -0,0 +1,15 @@
|
|||
package com.hzya.frame.plugin.masterData.customer.bank.dao;
|
||||
|
||||
import com.hzya.frame.plugin.masterData.customer.bank.entity.MdmCustomerBankEntity;
|
||||
import com.hzya.frame.basedao.dao.IBaseDao;
|
||||
|
||||
/**
|
||||
* 客户银行(mdm_customer_bank: table)表数据库访问层
|
||||
*
|
||||
* @author makejava
|
||||
* @since 2024-06-21 13:55:55
|
||||
*/
|
||||
public interface IMdmCustomerBankDao extends IBaseDao<MdmCustomerBankEntity, String> {
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,16 @@
|
|||
package com.hzya.frame.plugin.masterData.customer.bank.dao.impl;
|
||||
|
||||
import com.hzya.frame.plugin.masterData.customer.bank.entity.MdmCustomerBankEntity;
|
||||
import com.hzya.frame.plugin.masterData.customer.bank.dao.IMdmCustomerBankDao;
|
||||
import org.springframework.stereotype.Repository;
|
||||
import com.hzya.frame.basedao.dao.MybatisGenericDao;
|
||||
/**
|
||||
* 客户银行(MdmCustomerBank)表数据库访问层
|
||||
*
|
||||
* @author makejava
|
||||
* @since 2024-06-21 13:55:55
|
||||
*/
|
||||
public class MdmCustomerBankDaoImpl extends MybatisGenericDao<MdmCustomerBankEntity, String> implements IMdmCustomerBankDao{
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,86 @@
|
|||
package com.hzya.frame.plugin.masterData.customer.bank.entity;
|
||||
|
||||
import java.util.Date;
|
||||
import com.hzya.frame.web.entity.BaseEntity;
|
||||
/**
|
||||
* 客户银行(MdmCustomerBank)实体类
|
||||
*
|
||||
* @author makejava
|
||||
* @since 2024-06-21 13:55:55
|
||||
*/
|
||||
public class MdmCustomerBankEntity extends BaseEntity {
|
||||
|
||||
/** formmain_id */
|
||||
private String formmainId;
|
||||
/** 数据状态 Y正常 N删除 F修改 */
|
||||
private String dataStatus;
|
||||
/** 公司id */
|
||||
private String companyId;
|
||||
/** 银行 */
|
||||
private String bank;
|
||||
/** 开户银行 */
|
||||
private String pkBankdoc;
|
||||
/** 账号 */
|
||||
private String accnum;
|
||||
/** 联行号 */
|
||||
private String combinenum;
|
||||
|
||||
|
||||
public String getFormmainId() {
|
||||
return formmainId;
|
||||
}
|
||||
|
||||
public void setFormmainId(String formmainId) {
|
||||
this.formmainId = formmainId;
|
||||
}
|
||||
|
||||
public String getDataStatus() {
|
||||
return dataStatus;
|
||||
}
|
||||
|
||||
public void setDataStatus(String dataStatus) {
|
||||
this.dataStatus = dataStatus;
|
||||
}
|
||||
|
||||
public String getCompanyId() {
|
||||
return companyId;
|
||||
}
|
||||
|
||||
public void setCompanyId(String companyId) {
|
||||
this.companyId = companyId;
|
||||
}
|
||||
|
||||
public String getBank() {
|
||||
return bank;
|
||||
}
|
||||
|
||||
public void setBank(String bank) {
|
||||
this.bank = bank;
|
||||
}
|
||||
|
||||
public String getPkBankdoc() {
|
||||
return pkBankdoc;
|
||||
}
|
||||
|
||||
public void setPkBankdoc(String pkBankdoc) {
|
||||
this.pkBankdoc = pkBankdoc;
|
||||
}
|
||||
|
||||
public String getAccnum() {
|
||||
return accnum;
|
||||
}
|
||||
|
||||
public void setAccnum(String accnum) {
|
||||
this.accnum = accnum;
|
||||
}
|
||||
|
||||
public String getCombinenum() {
|
||||
return combinenum;
|
||||
}
|
||||
|
||||
public void setCombinenum(String combinenum) {
|
||||
this.combinenum = combinenum;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,267 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.hzya.frame.plugin.masterData.customer.bank.dao.impl.MdmCustomerBankDaoImpl">
|
||||
|
||||
<resultMap id="get-MdmCustomerBankEntity-result" type="com.hzya.frame.plugin.masterData.customer.bank.entity.MdmCustomerBankEntity" >
|
||||
<result property="id" column="id" jdbcType="VARCHAR"/>
|
||||
<result property="formmainId" column="formmain_id" jdbcType="VARCHAR"/>
|
||||
<result property="dataStatus" column="data_status" jdbcType="VARCHAR"/>
|
||||
<result property="sorts" column="sorts" jdbcType="INTEGER"/>
|
||||
<result property="create_user_id" column="create_user_id" jdbcType="VARCHAR"/>
|
||||
<result property="create_time" column="create_time" jdbcType="TIMESTAMP"/>
|
||||
<result property="modify_user_id" column="modify_user_id" jdbcType="VARCHAR"/>
|
||||
<result property="modify_time" column="modify_time" jdbcType="TIMESTAMP"/>
|
||||
<result property="sts" column="sts" jdbcType="VARCHAR"/>
|
||||
<result property="org_id" column="org_id" jdbcType="VARCHAR"/>
|
||||
<result property="companyId" column="company_id" jdbcType="VARCHAR"/>
|
||||
<result property="bank" column="bank" jdbcType="VARCHAR"/>
|
||||
<result property="pkBankdoc" column="pk_bankdoc" jdbcType="VARCHAR"/>
|
||||
<result property="accnum" column="accnum" jdbcType="VARCHAR"/>
|
||||
<result property="combinenum" column="combinenum" jdbcType="VARCHAR"/>
|
||||
</resultMap>
|
||||
<!-- 查询的字段-->
|
||||
<sql id = "MdmCustomerBankEntity_Base_Column_List">
|
||||
id
|
||||
,formmain_id
|
||||
,data_status
|
||||
,sorts
|
||||
,create_user_id
|
||||
,create_time
|
||||
,modify_user_id
|
||||
,modify_time
|
||||
,sts
|
||||
,org_id
|
||||
,company_id
|
||||
,bank
|
||||
,pk_bankdoc
|
||||
,accnum
|
||||
,combinenum
|
||||
</sql>
|
||||
<!-- 查询 采用==查询 -->
|
||||
<select id="entity_list_base" resultMap="get-MdmCustomerBankEntity-result" parameterType = "com.hzya.frame.plugin.masterData.customer.bank.entity.MdmCustomerBankEntity">
|
||||
select
|
||||
<include refid="MdmCustomerBankEntity_Base_Column_List" />
|
||||
from mdm_customer_bank
|
||||
<trim prefix="where" prefixOverrides="and">
|
||||
<if test="id != null and id != ''"> and id = #{id} </if>
|
||||
<if test="formmainId != null and formmainId != ''"> and formmain_id = #{formmainId} </if>
|
||||
<if test="dataStatus != null and dataStatus != ''"> and data_status = #{dataStatus} </if>
|
||||
<if test="sorts != null"> and sorts = #{sorts} </if>
|
||||
<if test="create_user_id != null and create_user_id != ''"> and create_user_id = #{create_user_id} </if>
|
||||
<if test="create_time != null"> and create_time = #{create_time} </if>
|
||||
<if test="modify_user_id != null and modify_user_id != ''"> and modify_user_id = #{modify_user_id} </if>
|
||||
<if test="modify_time != null"> and modify_time = #{modify_time} </if>
|
||||
<if test="sts != null and sts != ''"> and sts = #{sts} </if>
|
||||
<if test="org_id != null and org_id != ''"> and org_id = #{org_id} </if>
|
||||
<if test="companyId != null and companyId != ''"> and company_id = #{companyId} </if>
|
||||
<if test="bank != null and bank != ''"> and bank = #{bank} </if>
|
||||
<if test="pkBankdoc != null and pkBankdoc != ''"> and pk_bankdoc = #{pkBankdoc} </if>
|
||||
<if test="accnum != null and accnum != ''"> and accnum = #{accnum} </if>
|
||||
<if test="combinenum != null and combinenum != ''"> and combinenum = #{combinenum} </if>
|
||||
and sts='Y'
|
||||
</trim>
|
||||
<if test=" sort == null or sort == ''.toString() "> order by sorts asc</if>
|
||||
<if test=" sort !='' and sort!=null and order !='' and order!=null ">order by ${sort} ${order}</if>
|
||||
</select>
|
||||
|
||||
<!-- 查询符合条件的数量 -->
|
||||
<select id="entity_count" resultType="Integer" parameterType = "com.hzya.frame.plugin.masterData.customer.bank.entity.MdmCustomerBankEntity">
|
||||
select count(1) from mdm_customer_bank
|
||||
<trim prefix="where" prefixOverrides="and">
|
||||
<if test="id != null and id != ''"> and id = #{id} </if>
|
||||
<if test="formmainId != null and formmainId != ''"> and formmain_id = #{formmainId} </if>
|
||||
<if test="dataStatus != null and dataStatus != ''"> and data_status = #{dataStatus} </if>
|
||||
<if test="sorts != null"> and sorts = #{sorts} </if>
|
||||
<if test="create_user_id != null and create_user_id != ''"> and create_user_id = #{create_user_id} </if>
|
||||
<if test="create_time != null"> and create_time = #{create_time} </if>
|
||||
<if test="modify_user_id != null and modify_user_id != ''"> and modify_user_id = #{modify_user_id} </if>
|
||||
<if test="modify_time != null"> and modify_time = #{modify_time} </if>
|
||||
<if test="sts != null and sts != ''"> and sts = #{sts} </if>
|
||||
<if test="org_id != null and org_id != ''"> and org_id = #{org_id} </if>
|
||||
<if test="companyId != null and companyId != ''"> and company_id = #{companyId} </if>
|
||||
<if test="bank != null and bank != ''"> and bank = #{bank} </if>
|
||||
<if test="pkBankdoc != null and pkBankdoc != ''"> and pk_bankdoc = #{pkBankdoc} </if>
|
||||
<if test="accnum != null and accnum != ''"> and accnum = #{accnum} </if>
|
||||
<if test="combinenum != null and combinenum != ''"> and combinenum = #{combinenum} </if>
|
||||
and sts='Y'
|
||||
</trim>
|
||||
<if test=" sort == null or sort == ''.toString() "> order by sorts asc</if>
|
||||
<if test=" sort !='' and sort!=null and order !='' and order!=null "> order by ${sort} ${order}</if>
|
||||
</select>
|
||||
|
||||
<!-- 分页查询列表 采用like格式 -->
|
||||
<select id="entity_list_like" resultMap="get-MdmCustomerBankEntity-result" parameterType = "com.hzya.frame.plugin.masterData.customer.bank.entity.MdmCustomerBankEntity">
|
||||
select
|
||||
<include refid="MdmCustomerBankEntity_Base_Column_List" />
|
||||
from mdm_customer_bank
|
||||
<trim prefix="where" prefixOverrides="and">
|
||||
<if test="id != null and id != ''"> and id like concat('%',#{id},'%') </if>
|
||||
<if test="formmainId != null and formmainId != ''"> and formmain_id like concat('%',#{formmainId},'%') </if>
|
||||
<if test="dataStatus != null and dataStatus != ''"> and data_status like concat('%',#{dataStatus},'%') </if>
|
||||
<if test="sorts != null"> and sorts like concat('%',#{sorts},'%') </if>
|
||||
<if test="create_user_id != null and create_user_id != ''"> and create_user_id like concat('%',#{create_user_id},'%') </if>
|
||||
<if test="create_time != null"> and create_time like concat('%',#{create_time},'%') </if>
|
||||
<if test="modify_user_id != null and modify_user_id != ''"> and modify_user_id like concat('%',#{modify_user_id},'%') </if>
|
||||
<if test="modify_time != null"> and modify_time like concat('%',#{modify_time},'%') </if>
|
||||
<if test="sts != null and sts != ''"> and sts like concat('%',#{sts},'%') </if>
|
||||
<if test="org_id != null and org_id != ''"> and org_id like concat('%',#{org_id},'%') </if>
|
||||
<if test="companyId != null and companyId != ''"> and company_id like concat('%',#{companyId},'%') </if>
|
||||
<if test="bank != null and bank != ''"> and bank like concat('%',#{bank},'%') </if>
|
||||
<if test="pkBankdoc != null and pkBankdoc != ''"> and pk_bankdoc like concat('%',#{pkBankdoc},'%') </if>
|
||||
<if test="accnum != null and accnum != ''"> and accnum like concat('%',#{accnum},'%') </if>
|
||||
<if test="combinenum != null and combinenum != ''"> and combinenum like concat('%',#{combinenum},'%') </if>
|
||||
and sts='Y'
|
||||
</trim>
|
||||
<if test=" sort == null or sort == ''.toString() "> order by sorts asc</if>
|
||||
<if test=" sort !='' and sort!=null and order !='' and order!=null ">order by ${sort} ${order}</if>
|
||||
</select>
|
||||
|
||||
<!-- 查询列表 字段采用or格式 -->
|
||||
<select id="MdmCustomerBankentity_list_or" resultMap="get-MdmCustomerBankEntity-result" parameterType = "com.hzya.frame.plugin.masterData.customer.bank.entity.MdmCustomerBankEntity">
|
||||
select
|
||||
<include refid="MdmCustomerBankEntity_Base_Column_List" />
|
||||
from mdm_customer_bank
|
||||
<trim prefix="where" prefixOverrides="and">
|
||||
<if test="id != null and id != ''"> or id = #{id} </if>
|
||||
<if test="formmainId != null and formmainId != ''"> or formmain_id = #{formmainId} </if>
|
||||
<if test="dataStatus != null and dataStatus != ''"> or data_status = #{dataStatus} </if>
|
||||
<if test="sorts != null"> or sorts = #{sorts} </if>
|
||||
<if test="create_user_id != null and create_user_id != ''"> or create_user_id = #{create_user_id} </if>
|
||||
<if test="create_time != null"> or create_time = #{create_time} </if>
|
||||
<if test="modify_user_id != null and modify_user_id != ''"> or modify_user_id = #{modify_user_id} </if>
|
||||
<if test="modify_time != null"> or modify_time = #{modify_time} </if>
|
||||
<if test="sts != null and sts != ''"> or sts = #{sts} </if>
|
||||
<if test="org_id != null and org_id != ''"> or org_id = #{org_id} </if>
|
||||
<if test="companyId != null and companyId != ''"> or company_id = #{companyId} </if>
|
||||
<if test="bank != null and bank != ''"> or bank = #{bank} </if>
|
||||
<if test="pkBankdoc != null and pkBankdoc != ''"> or pk_bankdoc = #{pkBankdoc} </if>
|
||||
<if test="accnum != null and accnum != ''"> or accnum = #{accnum} </if>
|
||||
<if test="combinenum != null and combinenum != ''"> or combinenum = #{combinenum} </if>
|
||||
and sts='Y'
|
||||
</trim>
|
||||
<if test=" sort == null or sort == ''.toString() "> order by sorts asc</if>
|
||||
<if test=" sort !='' and sort!=null and order !='' and order!=null ">order by ${sort} ${order}</if>
|
||||
</select>
|
||||
|
||||
<!--新增所有列-->
|
||||
<insert id="entity_insert" parameterType = "com.hzya.frame.plugin.masterData.customer.bank.entity.MdmCustomerBankEntity" keyProperty="id" useGeneratedKeys="true">
|
||||
insert into mdm_customer_bank(
|
||||
<trim suffix="" suffixOverrides=",">
|
||||
<if test="id != null and id != ''"> id , </if>
|
||||
<if test="formmainId != null and formmainId != ''"> formmain_id , </if>
|
||||
<if test="dataStatus != null and dataStatus != ''"> data_status , </if>
|
||||
<if test="sorts != null"> sorts , </if>
|
||||
<if test="create_user_id != null and create_user_id != ''"> create_user_id , </if>
|
||||
<if test="create_time != null"> create_time , </if>
|
||||
<if test="modify_user_id != null and modify_user_id != ''"> modify_user_id , </if>
|
||||
<if test="modify_time != null"> modify_time , </if>
|
||||
<if test="sts != null and sts != ''"> sts , </if>
|
||||
<if test="org_id != null and org_id != ''"> org_id , </if>
|
||||
<if test="companyId != null and companyId != ''"> company_id , </if>
|
||||
<if test="bank != null and bank != ''"> bank , </if>
|
||||
<if test="pkBankdoc != null and pkBankdoc != ''"> pk_bankdoc , </if>
|
||||
<if test="accnum != null and accnum != ''"> accnum , </if>
|
||||
<if test="combinenum != null and combinenum != ''"> combinenum , </if>
|
||||
<if test="sorts == null ">sorts,</if>
|
||||
<if test="sts == null ">sts,</if>
|
||||
</trim>
|
||||
)values(
|
||||
<trim suffix="" suffixOverrides=",">
|
||||
<if test="id != null and id != ''"> #{id} ,</if>
|
||||
<if test="formmainId != null and formmainId != ''"> #{formmainId} ,</if>
|
||||
<if test="dataStatus != null and dataStatus != ''"> #{dataStatus} ,</if>
|
||||
<if test="sorts != null"> #{sorts} ,</if>
|
||||
<if test="create_user_id != null and create_user_id != ''"> #{create_user_id} ,</if>
|
||||
<if test="create_time != null"> #{create_time} ,</if>
|
||||
<if test="modify_user_id != null and modify_user_id != ''"> #{modify_user_id} ,</if>
|
||||
<if test="modify_time != null"> #{modify_time} ,</if>
|
||||
<if test="sts != null and sts != ''"> #{sts} ,</if>
|
||||
<if test="org_id != null and org_id != ''"> #{org_id} ,</if>
|
||||
<if test="companyId != null and companyId != ''"> #{companyId} ,</if>
|
||||
<if test="bank != null and bank != ''"> #{bank} ,</if>
|
||||
<if test="pkBankdoc != null and pkBankdoc != ''"> #{pkBankdoc} ,</if>
|
||||
<if test="accnum != null and accnum != ''"> #{accnum} ,</if>
|
||||
<if test="combinenum != null and combinenum != ''"> #{combinenum} ,</if>
|
||||
<if test="sorts == null ">(select (max(IFNULL( a.sorts, 0 )) + 1) as sort from mdm_customer_bank a WHERE a.sts = 'Y' ),</if>
|
||||
<if test="sts == null ">'Y',</if>
|
||||
</trim>
|
||||
)
|
||||
</insert>
|
||||
<!-- 批量新增 -->
|
||||
<insert id="entityInsertBatch" keyProperty="id" useGeneratedKeys="true">
|
||||
insert into mdm_customer_bank(formmain_id, data_status, create_user_id, create_time, modify_user_id, modify_time, sts, org_id, company_id, bank, pk_bankdoc, accnum, combinenum, sts)
|
||||
values
|
||||
<foreach collection="entities" item="entity" separator=",">
|
||||
(#{entity.formmainId},#{entity.dataStatus},#{entity.create_user_id},#{entity.create_time},#{entity.modify_user_id},#{entity.modify_time},#{entity.sts},#{entity.org_id},#{entity.companyId},#{entity.bank},#{entity.pkBankdoc},#{entity.accnum},#{entity.combinenum}, 'Y')
|
||||
</foreach>
|
||||
</insert>
|
||||
<!-- 批量新增或者修改-->
|
||||
<insert id="entityInsertOrUpdateBatch" keyProperty="id" useGeneratedKeys="true">
|
||||
insert into mdm_customer_bank(formmain_id, data_status, create_user_id, create_time, modify_user_id, modify_time, sts, org_id, company_id, bank, pk_bankdoc, accnum, combinenum)
|
||||
values
|
||||
<foreach collection="entities" item="entity" separator=",">
|
||||
(#{entity.formmainId},#{entity.dataStatus},#{entity.create_user_id},#{entity.create_time},#{entity.modify_user_id},#{entity.modify_time},#{entity.sts},#{entity.org_id},#{entity.companyId},#{entity.bank},#{entity.pkBankdoc},#{entity.accnum},#{entity.combinenum})
|
||||
</foreach>
|
||||
on duplicate key update
|
||||
formmain_id = values(formmain_id),
|
||||
data_status = values(data_status),
|
||||
create_user_id = values(create_user_id),
|
||||
create_time = values(create_time),
|
||||
modify_user_id = values(modify_user_id),
|
||||
modify_time = values(modify_time),
|
||||
sts = values(sts),
|
||||
org_id = values(org_id),
|
||||
company_id = values(company_id),
|
||||
bank = values(bank),
|
||||
pk_bankdoc = values(pk_bankdoc),
|
||||
accnum = values(accnum),
|
||||
combinenum = values(combinenum)</insert>
|
||||
<!--通过主键修改方法-->
|
||||
<update id="entity_update" parameterType = "com.hzya.frame.plugin.masterData.customer.bank.entity.MdmCustomerBankEntity" >
|
||||
update mdm_customer_bank set
|
||||
<trim suffix="" suffixOverrides=",">
|
||||
<if test="formmainId != null and formmainId != ''"> formmain_id = #{formmainId},</if>
|
||||
<if test="dataStatus != null and dataStatus != ''"> data_status = #{dataStatus},</if>
|
||||
<if test="create_user_id != null and create_user_id != ''"> create_user_id = #{create_user_id},</if>
|
||||
<if test="create_time != null"> create_time = #{create_time},</if>
|
||||
<if test="modify_user_id != null and modify_user_id != ''"> modify_user_id = #{modify_user_id},</if>
|
||||
<if test="modify_time != null"> modify_time = #{modify_time},</if>
|
||||
<if test="sts != null and sts != ''"> sts = #{sts},</if>
|
||||
<if test="org_id != null and org_id != ''"> org_id = #{org_id},</if>
|
||||
<if test="companyId != null and companyId != ''"> company_id = #{companyId},</if>
|
||||
<if test="bank != null and bank != ''"> bank = #{bank},</if>
|
||||
<if test="pkBankdoc != null and pkBankdoc != ''"> pk_bankdoc = #{pkBankdoc},</if>
|
||||
<if test="accnum != null and accnum != ''"> accnum = #{accnum},</if>
|
||||
<if test="combinenum != null and combinenum != ''"> combinenum = #{combinenum},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
<!-- 逻辑删除 -->
|
||||
<update id="entity_logicDelete" parameterType = "com.hzya.frame.plugin.masterData.customer.bank.entity.MdmCustomerBankEntity" >
|
||||
update mdm_customer_bank set sts= 'N' ,modify_time = #{modify_time},modify_user_id = #{modify_user_id}
|
||||
where id = #{id}
|
||||
</update>
|
||||
<!-- 多条件逻辑删除 -->
|
||||
<update id="entity_logicDelete_Multi_Condition" parameterType = "com.hzya.frame.plugin.masterData.customer.bank.entity.MdmCustomerBankEntity" >
|
||||
update mdm_customer_bank set sts= 'N' ,modify_time = #{modify_time},modify_user_id = #{modify_user_id}
|
||||
<trim prefix="where" prefixOverrides="and">
|
||||
<if test="id != null and id != ''"> and id = #{id} </if>
|
||||
<if test="formmainId != null and formmainId != ''"> and formmain_id = #{formmainId} </if>
|
||||
<if test="dataStatus != null and dataStatus != ''"> and data_status = #{dataStatus} </if>
|
||||
<if test="sorts != null"> and sorts = #{sorts} </if>
|
||||
<if test="sts != null and sts != ''"> and sts = #{sts} </if>
|
||||
<if test="companyId != null and companyId != ''"> and company_id = #{companyId} </if>
|
||||
<if test="bank != null and bank != ''"> and bank = #{bank} </if>
|
||||
<if test="pkBankdoc != null and pkBankdoc != ''"> and pk_bankdoc = #{pkBankdoc} </if>
|
||||
<if test="accnum != null and accnum != ''"> and accnum = #{accnum} </if>
|
||||
<if test="combinenum != null and combinenum != ''"> and combinenum = #{combinenum} </if>
|
||||
and sts='Y'
|
||||
</trim>
|
||||
</update>
|
||||
<!--通过主键删除-->
|
||||
<delete id="entity_delete">
|
||||
delete from mdm_customer_bank where id = #{id}
|
||||
</delete>
|
||||
|
||||
</mapper>
|
||||
|
|
@ -0,0 +1,50 @@
|
|||
package com.hzya.frame.plugin.masterData.customer.bank.plugin;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.hzya.frame.base.PluginBaseEntity;
|
||||
import com.hzya.frame.web.entity.JsonResultEntity;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
/**
|
||||
* 客户银行(MdmCustomerBank)表服务接口
|
||||
*
|
||||
* @author makejava
|
||||
* @since 2024-06-21 13:55:55
|
||||
*/
|
||||
public class MdmCustomerBankPluginInitializer extends PluginBaseEntity{
|
||||
Logger logger = LoggerFactory.getLogger(MdmCustomerBankPluginInitializer.class);
|
||||
|
||||
@Override
|
||||
public void initialize() {
|
||||
logger.info(getPluginLabel() + "執行初始化方法initialize()");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void destroy() {
|
||||
logger.info(getPluginLabel() + "執行銷毀方法destroy()");
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getPluginId() {
|
||||
return "MdmCustomerBankPlugin";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getPluginName() {
|
||||
return "MdmCustomerBankPlugin插件";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getPluginLabel() {
|
||||
return "MdmCustomerBankPlugin";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getPluginType() {
|
||||
return "1";
|
||||
}
|
||||
@Override
|
||||
public JsonResultEntity executeBusiness(JSONObject requestJson) {
|
||||
logger.info("执行业务代码逻辑");
|
||||
return null;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,12 @@
|
|||
package com.hzya.frame.plugin.masterData.customer.bank.service;
|
||||
|
||||
import com.hzya.frame.plugin.masterData.customer.bank.entity.MdmCustomerBankEntity;
|
||||
import com.hzya.frame.basedao.service.IBaseService;
|
||||
/**
|
||||
* 客户银行(MdmCustomerBank)表服务接口
|
||||
*
|
||||
* @author makejava
|
||||
* @since 2024-06-21 13:55:55
|
||||
*/
|
||||
public interface IMdmCustomerBankService extends IBaseService<MdmCustomerBankEntity, String>{
|
||||
}
|
|
@ -0,0 +1,25 @@
|
|||
package com.hzya.frame.plugin.masterData.customer.bank.service.impl;
|
||||
|
||||
import com.hzya.frame.plugin.masterData.customer.bank.entity.MdmCustomerBankEntity;
|
||||
import com.hzya.frame.plugin.masterData.customer.bank.dao.IMdmCustomerBankDao;
|
||||
import com.hzya.frame.plugin.masterData.customer.bank.service.IMdmCustomerBankService;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import javax.annotation.Resource;
|
||||
import com.hzya.frame.basedao.service.impl.BaseService;
|
||||
/**
|
||||
* 客户银行(MdmCustomerBank)表服务实现类
|
||||
*
|
||||
* @author makejava
|
||||
* @since 2024-06-21 13:55:55
|
||||
*/
|
||||
public class MdmCustomerBankServiceImpl extends BaseService<MdmCustomerBankEntity, String> implements IMdmCustomerBankService {
|
||||
|
||||
private IMdmCustomerBankDao mdmCustomerBankDao;
|
||||
|
||||
@Autowired
|
||||
public void setMdmCustomerBankDao(IMdmCustomerBankDao dao) {
|
||||
this.mdmCustomerBankDao = dao;
|
||||
this.dao = dao;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,15 @@
|
|||
package com.hzya.frame.plugin.masterData.customer.dao;
|
||||
|
||||
import com.hzya.frame.plugin.masterData.customer.entity.MdmCustomerEntity;
|
||||
import com.hzya.frame.basedao.dao.IBaseDao;
|
||||
|
||||
/**
|
||||
* 客户档案(mdm_customer: table)表数据库访问层
|
||||
*
|
||||
* @author makejava
|
||||
* @since 2024-06-21 13:52:35
|
||||
*/
|
||||
public interface IMdmCustomerDao extends IBaseDao<MdmCustomerEntity, String> {
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,16 @@
|
|||
package com.hzya.frame.plugin.masterData.customer.dao.impl;
|
||||
|
||||
import com.hzya.frame.plugin.masterData.customer.entity.MdmCustomerEntity;
|
||||
import com.hzya.frame.plugin.masterData.customer.dao.IMdmCustomerDao;
|
||||
import org.springframework.stereotype.Repository;
|
||||
import com.hzya.frame.basedao.dao.MybatisGenericDao;
|
||||
/**
|
||||
* 客户档案(MdmCustomer)表数据库访问层
|
||||
*
|
||||
* @author makejava
|
||||
* @since 2024-06-21 13:52:35
|
||||
*/
|
||||
public class MdmCustomerDaoImpl extends MybatisGenericDao<MdmCustomerEntity, String> implements IMdmCustomerDao{
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,186 @@
|
|||
package com.hzya.frame.plugin.masterData.customer.entity;
|
||||
|
||||
import java.util.Date;
|
||||
import com.hzya.frame.web.entity.BaseEntity;
|
||||
/**
|
||||
* 客户档案(MdmCustomer)实体类
|
||||
*
|
||||
* @author makejava
|
||||
* @since 2024-06-21 13:52:35
|
||||
*/
|
||||
public class MdmCustomerEntity extends BaseEntity {
|
||||
|
||||
/** 单据规则 */
|
||||
private String documentRule;
|
||||
/** 单据规则流水号 */
|
||||
private Long documentRuleNum;
|
||||
/** 数据状态 Y正常 N删除 F修改 */
|
||||
private String dataStatus;
|
||||
/** 新增数据状态 0待下发 1已下发 */
|
||||
private String addStatus;
|
||||
/** 修改数据状态 0待下发 1已下发 */
|
||||
private String updateStatus;
|
||||
/** 删除数据状态 0待下发 1已下发 */
|
||||
private String deleteStatus;
|
||||
/** 公司id */
|
||||
private String companyId;
|
||||
/** 客户编码 */
|
||||
private String code;
|
||||
/** 客户类型 */
|
||||
private String custprop;
|
||||
/** 客户状态 */
|
||||
private String custstate;
|
||||
/** 启用状态 */
|
||||
private String enablestate;
|
||||
/** 客户名称 */
|
||||
private String name;
|
||||
/** 国家/地区 */
|
||||
private String pkCountry;
|
||||
/** 客户基本分类 */
|
||||
private String pkCustclass;
|
||||
/** 所属集团 */
|
||||
private String pkGroup;
|
||||
/** 所属组织 */
|
||||
private String pkOrg;
|
||||
/** 纳税人登记号 */
|
||||
private String taxpayerid;
|
||||
|
||||
|
||||
public String getDocumentRule() {
|
||||
return documentRule;
|
||||
}
|
||||
|
||||
public void setDocumentRule(String documentRule) {
|
||||
this.documentRule = documentRule;
|
||||
}
|
||||
|
||||
public Long getDocumentRuleNum() {
|
||||
return documentRuleNum;
|
||||
}
|
||||
|
||||
public void setDocumentRuleNum(Long documentRuleNum) {
|
||||
this.documentRuleNum = documentRuleNum;
|
||||
}
|
||||
|
||||
public String getDataStatus() {
|
||||
return dataStatus;
|
||||
}
|
||||
|
||||
public void setDataStatus(String dataStatus) {
|
||||
this.dataStatus = dataStatus;
|
||||
}
|
||||
|
||||
public String getAddStatus() {
|
||||
return addStatus;
|
||||
}
|
||||
|
||||
public void setAddStatus(String addStatus) {
|
||||
this.addStatus = addStatus;
|
||||
}
|
||||
|
||||
public String getUpdateStatus() {
|
||||
return updateStatus;
|
||||
}
|
||||
|
||||
public void setUpdateStatus(String updateStatus) {
|
||||
this.updateStatus = updateStatus;
|
||||
}
|
||||
|
||||
public String getDeleteStatus() {
|
||||
return deleteStatus;
|
||||
}
|
||||
|
||||
public void setDeleteStatus(String deleteStatus) {
|
||||
this.deleteStatus = deleteStatus;
|
||||
}
|
||||
|
||||
public String getCompanyId() {
|
||||
return companyId;
|
||||
}
|
||||
|
||||
public void setCompanyId(String companyId) {
|
||||
this.companyId = companyId;
|
||||
}
|
||||
|
||||
public String getCode() {
|
||||
return code;
|
||||
}
|
||||
|
||||
public void setCode(String code) {
|
||||
this.code = code;
|
||||
}
|
||||
|
||||
public String getCustprop() {
|
||||
return custprop;
|
||||
}
|
||||
|
||||
public void setCustprop(String custprop) {
|
||||
this.custprop = custprop;
|
||||
}
|
||||
|
||||
public String getCuststate() {
|
||||
return custstate;
|
||||
}
|
||||
|
||||
public void setCuststate(String custstate) {
|
||||
this.custstate = custstate;
|
||||
}
|
||||
|
||||
public String getEnablestate() {
|
||||
return enablestate;
|
||||
}
|
||||
|
||||
public void setEnablestate(String enablestate) {
|
||||
this.enablestate = enablestate;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getPkCountry() {
|
||||
return pkCountry;
|
||||
}
|
||||
|
||||
public void setPkCountry(String pkCountry) {
|
||||
this.pkCountry = pkCountry;
|
||||
}
|
||||
|
||||
public String getPkCustclass() {
|
||||
return pkCustclass;
|
||||
}
|
||||
|
||||
public void setPkCustclass(String pkCustclass) {
|
||||
this.pkCustclass = pkCustclass;
|
||||
}
|
||||
|
||||
public String getPkGroup() {
|
||||
return pkGroup;
|
||||
}
|
||||
|
||||
public void setPkGroup(String pkGroup) {
|
||||
this.pkGroup = pkGroup;
|
||||
}
|
||||
|
||||
public String getPkOrg() {
|
||||
return pkOrg;
|
||||
}
|
||||
|
||||
public void setPkOrg(String pkOrg) {
|
||||
this.pkOrg = pkOrg;
|
||||
}
|
||||
|
||||
public String getTaxpayerid() {
|
||||
return taxpayerid;
|
||||
}
|
||||
|
||||
public void setTaxpayerid(String taxpayerid) {
|
||||
this.taxpayerid = taxpayerid;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,377 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.hzya.frame.plugin.masterData.customer.dao.impl.MdmCustomerDaoImpl">
|
||||
|
||||
<resultMap id="get-MdmCustomerEntity-result" type="com.hzya.frame.plugin.masterData.customer.entity.MdmCustomerEntity" >
|
||||
<result property="id" column="id" jdbcType="VARCHAR"/>
|
||||
<result property="documentRule" column="document_rule" jdbcType="VARCHAR"/>
|
||||
<result property="documentRuleNum" column="document_rule_num" jdbcType="INTEGER"/>
|
||||
<result property="dataStatus" column="data_status" jdbcType="VARCHAR"/>
|
||||
<result property="addStatus" column="add_status" jdbcType="VARCHAR"/>
|
||||
<result property="updateStatus" column="update_status" jdbcType="VARCHAR"/>
|
||||
<result property="deleteStatus" column="delete_status" jdbcType="VARCHAR"/>
|
||||
<result property="sorts" column="sorts" jdbcType="INTEGER"/>
|
||||
<result property="create_user_id" column="create_user_id" jdbcType="VARCHAR"/>
|
||||
<result property="create_time" column="create_time" jdbcType="TIMESTAMP"/>
|
||||
<result property="modify_user_id" column="modify_user_id" jdbcType="VARCHAR"/>
|
||||
<result property="modify_time" column="modify_time" jdbcType="TIMESTAMP"/>
|
||||
<result property="sts" column="sts" jdbcType="VARCHAR"/>
|
||||
<result property="org_id" column="org_id" jdbcType="VARCHAR"/>
|
||||
<result property="companyId" column="company_id" jdbcType="VARCHAR"/>
|
||||
<result property="code" column="code" jdbcType="VARCHAR"/>
|
||||
<result property="custprop" column="custprop" jdbcType="VARCHAR"/>
|
||||
<result property="custstate" column="custstate" jdbcType="VARCHAR"/>
|
||||
<result property="enablestate" column="enablestate" jdbcType="VARCHAR"/>
|
||||
<result property="name" column="name" jdbcType="VARCHAR"/>
|
||||
<result property="pkCountry" column="pk_country" jdbcType="VARCHAR"/>
|
||||
<result property="pkCustclass" column="pk_custclass" jdbcType="VARCHAR"/>
|
||||
<result property="pkGroup" column="pk_group" jdbcType="VARCHAR"/>
|
||||
<result property="pkOrg" column="pk_org" jdbcType="VARCHAR"/>
|
||||
<result property="taxpayerid" column="taxpayerid" jdbcType="VARCHAR"/>
|
||||
</resultMap>
|
||||
<!-- 查询的字段-->
|
||||
<sql id = "MdmCustomerEntity_Base_Column_List">
|
||||
id
|
||||
,document_rule
|
||||
,document_rule_num
|
||||
,data_status
|
||||
,add_status
|
||||
,update_status
|
||||
,delete_status
|
||||
,sorts
|
||||
,create_user_id
|
||||
,create_time
|
||||
,modify_user_id
|
||||
,modify_time
|
||||
,sts
|
||||
,org_id
|
||||
,company_id
|
||||
,code
|
||||
,custprop
|
||||
,custstate
|
||||
,enablestate
|
||||
,name
|
||||
,pk_country
|
||||
,pk_custclass
|
||||
,pk_group
|
||||
,pk_org
|
||||
,taxpayerid
|
||||
</sql>
|
||||
<!-- 查询 采用==查询 -->
|
||||
<select id="entity_list_base" resultMap="get-MdmCustomerEntity-result" parameterType = "com.hzya.frame.plugin.masterData.customer.entity.MdmCustomerEntity">
|
||||
select
|
||||
<include refid="MdmCustomerEntity_Base_Column_List" />
|
||||
from mdm_customer
|
||||
<trim prefix="where" prefixOverrides="and">
|
||||
<if test="id != null and id != ''"> and id = #{id} </if>
|
||||
<if test="documentRule != null and documentRule != ''"> and document_rule = #{documentRule} </if>
|
||||
<if test="documentRuleNum != null"> and document_rule_num = #{documentRuleNum} </if>
|
||||
<if test="dataStatus != null and dataStatus != ''"> and data_status = #{dataStatus} </if>
|
||||
<if test="addStatus != null and addStatus != ''"> and add_status = #{addStatus} </if>
|
||||
<if test="updateStatus != null and updateStatus != ''"> and update_status = #{updateStatus} </if>
|
||||
<if test="deleteStatus != null and deleteStatus != ''"> and delete_status = #{deleteStatus} </if>
|
||||
<if test="sorts != null"> and sorts = #{sorts} </if>
|
||||
<if test="create_user_id != null and create_user_id != ''"> and create_user_id = #{create_user_id} </if>
|
||||
<if test="create_time != null"> and create_time = #{create_time} </if>
|
||||
<if test="modify_user_id != null and modify_user_id != ''"> and modify_user_id = #{modify_user_id} </if>
|
||||
<if test="modify_time != null"> and modify_time = #{modify_time} </if>
|
||||
<if test="sts != null and sts != ''"> and sts = #{sts} </if>
|
||||
<if test="org_id != null and org_id != ''"> and org_id = #{org_id} </if>
|
||||
<if test="companyId != null and companyId != ''"> and company_id = #{companyId} </if>
|
||||
<if test="code != null and code != ''"> and code = #{code} </if>
|
||||
<if test="custprop != null and custprop != ''"> and custprop = #{custprop} </if>
|
||||
<if test="custstate != null and custstate != ''"> and custstate = #{custstate} </if>
|
||||
<if test="enablestate != null and enablestate != ''"> and enablestate = #{enablestate} </if>
|
||||
<if test="name != null and name != ''"> and name = #{name} </if>
|
||||
<if test="pkCountry != null and pkCountry != ''"> and pk_country = #{pkCountry} </if>
|
||||
<if test="pkCustclass != null and pkCustclass != ''"> and pk_custclass = #{pkCustclass} </if>
|
||||
<if test="pkGroup != null and pkGroup != ''"> and pk_group = #{pkGroup} </if>
|
||||
<if test="pkOrg != null and pkOrg != ''"> and pk_org = #{pkOrg} </if>
|
||||
<if test="taxpayerid != null and taxpayerid != ''"> and taxpayerid = #{taxpayerid} </if>
|
||||
and sts='Y'
|
||||
</trim>
|
||||
<if test=" sort == null or sort == ''.toString() "> order by sorts asc</if>
|
||||
<if test=" sort !='' and sort!=null and order !='' and order!=null ">order by ${sort} ${order}</if>
|
||||
</select>
|
||||
|
||||
<!-- 查询符合条件的数量 -->
|
||||
<select id="entity_count" resultType="Integer" parameterType = "com.hzya.frame.plugin.masterData.customer.entity.MdmCustomerEntity">
|
||||
select count(1) from mdm_customer
|
||||
<trim prefix="where" prefixOverrides="and">
|
||||
<if test="id != null and id != ''"> and id = #{id} </if>
|
||||
<if test="documentRule != null and documentRule != ''"> and document_rule = #{documentRule} </if>
|
||||
<if test="documentRuleNum != null"> and document_rule_num = #{documentRuleNum} </if>
|
||||
<if test="dataStatus != null and dataStatus != ''"> and data_status = #{dataStatus} </if>
|
||||
<if test="addStatus != null and addStatus != ''"> and add_status = #{addStatus} </if>
|
||||
<if test="updateStatus != null and updateStatus != ''"> and update_status = #{updateStatus} </if>
|
||||
<if test="deleteStatus != null and deleteStatus != ''"> and delete_status = #{deleteStatus} </if>
|
||||
<if test="sorts != null"> and sorts = #{sorts} </if>
|
||||
<if test="create_user_id != null and create_user_id != ''"> and create_user_id = #{create_user_id} </if>
|
||||
<if test="create_time != null"> and create_time = #{create_time} </if>
|
||||
<if test="modify_user_id != null and modify_user_id != ''"> and modify_user_id = #{modify_user_id} </if>
|
||||
<if test="modify_time != null"> and modify_time = #{modify_time} </if>
|
||||
<if test="sts != null and sts != ''"> and sts = #{sts} </if>
|
||||
<if test="org_id != null and org_id != ''"> and org_id = #{org_id} </if>
|
||||
<if test="companyId != null and companyId != ''"> and company_id = #{companyId} </if>
|
||||
<if test="code != null and code != ''"> and code = #{code} </if>
|
||||
<if test="custprop != null and custprop != ''"> and custprop = #{custprop} </if>
|
||||
<if test="custstate != null and custstate != ''"> and custstate = #{custstate} </if>
|
||||
<if test="enablestate != null and enablestate != ''"> and enablestate = #{enablestate} </if>
|
||||
<if test="name != null and name != ''"> and name = #{name} </if>
|
||||
<if test="pkCountry != null and pkCountry != ''"> and pk_country = #{pkCountry} </if>
|
||||
<if test="pkCustclass != null and pkCustclass != ''"> and pk_custclass = #{pkCustclass} </if>
|
||||
<if test="pkGroup != null and pkGroup != ''"> and pk_group = #{pkGroup} </if>
|
||||
<if test="pkOrg != null and pkOrg != ''"> and pk_org = #{pkOrg} </if>
|
||||
<if test="taxpayerid != null and taxpayerid != ''"> and taxpayerid = #{taxpayerid} </if>
|
||||
and sts='Y'
|
||||
</trim>
|
||||
<if test=" sort == null or sort == ''.toString() "> order by sorts asc</if>
|
||||
<if test=" sort !='' and sort!=null and order !='' and order!=null "> order by ${sort} ${order}</if>
|
||||
</select>
|
||||
|
||||
<!-- 分页查询列表 采用like格式 -->
|
||||
<select id="entity_list_like" resultMap="get-MdmCustomerEntity-result" parameterType = "com.hzya.frame.plugin.masterData.customer.entity.MdmCustomerEntity">
|
||||
select
|
||||
<include refid="MdmCustomerEntity_Base_Column_List" />
|
||||
from mdm_customer
|
||||
<trim prefix="where" prefixOverrides="and">
|
||||
<if test="id != null and id != ''"> and id like concat('%',#{id},'%') </if>
|
||||
<if test="documentRule != null and documentRule != ''"> and document_rule like concat('%',#{documentRule},'%') </if>
|
||||
<if test="documentRuleNum != null"> and document_rule_num like concat('%',#{documentRuleNum},'%') </if>
|
||||
<if test="dataStatus != null and dataStatus != ''"> and data_status like concat('%',#{dataStatus},'%') </if>
|
||||
<if test="addStatus != null and addStatus != ''"> and add_status like concat('%',#{addStatus},'%') </if>
|
||||
<if test="updateStatus != null and updateStatus != ''"> and update_status like concat('%',#{updateStatus},'%') </if>
|
||||
<if test="deleteStatus != null and deleteStatus != ''"> and delete_status like concat('%',#{deleteStatus},'%') </if>
|
||||
<if test="sorts != null"> and sorts like concat('%',#{sorts},'%') </if>
|
||||
<if test="create_user_id != null and create_user_id != ''"> and create_user_id like concat('%',#{create_user_id},'%') </if>
|
||||
<if test="create_time != null"> and create_time like concat('%',#{create_time},'%') </if>
|
||||
<if test="modify_user_id != null and modify_user_id != ''"> and modify_user_id like concat('%',#{modify_user_id},'%') </if>
|
||||
<if test="modify_time != null"> and modify_time like concat('%',#{modify_time},'%') </if>
|
||||
<if test="sts != null and sts != ''"> and sts like concat('%',#{sts},'%') </if>
|
||||
<if test="org_id != null and org_id != ''"> and org_id like concat('%',#{org_id},'%') </if>
|
||||
<if test="companyId != null and companyId != ''"> and company_id like concat('%',#{companyId},'%') </if>
|
||||
<if test="code != null and code != ''"> and code like concat('%',#{code},'%') </if>
|
||||
<if test="custprop != null and custprop != ''"> and custprop like concat('%',#{custprop},'%') </if>
|
||||
<if test="custstate != null and custstate != ''"> and custstate like concat('%',#{custstate},'%') </if>
|
||||
<if test="enablestate != null and enablestate != ''"> and enablestate like concat('%',#{enablestate},'%') </if>
|
||||
<if test="name != null and name != ''"> and name like concat('%',#{name},'%') </if>
|
||||
<if test="pkCountry != null and pkCountry != ''"> and pk_country like concat('%',#{pkCountry},'%') </if>
|
||||
<if test="pkCustclass != null and pkCustclass != ''"> and pk_custclass like concat('%',#{pkCustclass},'%') </if>
|
||||
<if test="pkGroup != null and pkGroup != ''"> and pk_group like concat('%',#{pkGroup},'%') </if>
|
||||
<if test="pkOrg != null and pkOrg != ''"> and pk_org like concat('%',#{pkOrg},'%') </if>
|
||||
<if test="taxpayerid != null and taxpayerid != ''"> and taxpayerid like concat('%',#{taxpayerid},'%') </if>
|
||||
and sts='Y'
|
||||
</trim>
|
||||
<if test=" sort == null or sort == ''.toString() "> order by sorts asc</if>
|
||||
<if test=" sort !='' and sort!=null and order !='' and order!=null ">order by ${sort} ${order}</if>
|
||||
</select>
|
||||
|
||||
<!-- 查询列表 字段采用or格式 -->
|
||||
<select id="MdmCustomerentity_list_or" resultMap="get-MdmCustomerEntity-result" parameterType = "com.hzya.frame.plugin.masterData.customer.entity.MdmCustomerEntity">
|
||||
select
|
||||
<include refid="MdmCustomerEntity_Base_Column_List" />
|
||||
from mdm_customer
|
||||
<trim prefix="where" prefixOverrides="and">
|
||||
<if test="id != null and id != ''"> or id = #{id} </if>
|
||||
<if test="documentRule != null and documentRule != ''"> or document_rule = #{documentRule} </if>
|
||||
<if test="documentRuleNum != null"> or document_rule_num = #{documentRuleNum} </if>
|
||||
<if test="dataStatus != null and dataStatus != ''"> or data_status = #{dataStatus} </if>
|
||||
<if test="addStatus != null and addStatus != ''"> or add_status = #{addStatus} </if>
|
||||
<if test="updateStatus != null and updateStatus != ''"> or update_status = #{updateStatus} </if>
|
||||
<if test="deleteStatus != null and deleteStatus != ''"> or delete_status = #{deleteStatus} </if>
|
||||
<if test="sorts != null"> or sorts = #{sorts} </if>
|
||||
<if test="create_user_id != null and create_user_id != ''"> or create_user_id = #{create_user_id} </if>
|
||||
<if test="create_time != null"> or create_time = #{create_time} </if>
|
||||
<if test="modify_user_id != null and modify_user_id != ''"> or modify_user_id = #{modify_user_id} </if>
|
||||
<if test="modify_time != null"> or modify_time = #{modify_time} </if>
|
||||
<if test="sts != null and sts != ''"> or sts = #{sts} </if>
|
||||
<if test="org_id != null and org_id != ''"> or org_id = #{org_id} </if>
|
||||
<if test="companyId != null and companyId != ''"> or company_id = #{companyId} </if>
|
||||
<if test="code != null and code != ''"> or code = #{code} </if>
|
||||
<if test="custprop != null and custprop != ''"> or custprop = #{custprop} </if>
|
||||
<if test="custstate != null and custstate != ''"> or custstate = #{custstate} </if>
|
||||
<if test="enablestate != null and enablestate != ''"> or enablestate = #{enablestate} </if>
|
||||
<if test="name != null and name != ''"> or name = #{name} </if>
|
||||
<if test="pkCountry != null and pkCountry != ''"> or pk_country = #{pkCountry} </if>
|
||||
<if test="pkCustclass != null and pkCustclass != ''"> or pk_custclass = #{pkCustclass} </if>
|
||||
<if test="pkGroup != null and pkGroup != ''"> or pk_group = #{pkGroup} </if>
|
||||
<if test="pkOrg != null and pkOrg != ''"> or pk_org = #{pkOrg} </if>
|
||||
<if test="taxpayerid != null and taxpayerid != ''"> or taxpayerid = #{taxpayerid} </if>
|
||||
and sts='Y'
|
||||
</trim>
|
||||
<if test=" sort == null or sort == ''.toString() "> order by sorts asc</if>
|
||||
<if test=" sort !='' and sort!=null and order !='' and order!=null ">order by ${sort} ${order}</if>
|
||||
</select>
|
||||
|
||||
<!--新增所有列-->
|
||||
<insert id="entity_insert" parameterType = "com.hzya.frame.plugin.masterData.customer.entity.MdmCustomerEntity" keyProperty="id" useGeneratedKeys="true">
|
||||
insert into mdm_customer(
|
||||
<trim suffix="" suffixOverrides=",">
|
||||
<if test="id != null and id != ''"> id , </if>
|
||||
<if test="documentRule != null and documentRule != ''"> document_rule , </if>
|
||||
<if test="documentRuleNum != null"> document_rule_num , </if>
|
||||
<if test="dataStatus != null and dataStatus != ''"> data_status , </if>
|
||||
<if test="addStatus != null and addStatus != ''"> add_status , </if>
|
||||
<if test="updateStatus != null and updateStatus != ''"> update_status , </if>
|
||||
<if test="deleteStatus != null and deleteStatus != ''"> delete_status , </if>
|
||||
<if test="sorts != null"> sorts , </if>
|
||||
<if test="create_user_id != null and create_user_id != ''"> create_user_id , </if>
|
||||
<if test="create_time != null"> create_time , </if>
|
||||
<if test="modify_user_id != null and modify_user_id != ''"> modify_user_id , </if>
|
||||
<if test="modify_time != null"> modify_time , </if>
|
||||
<if test="sts != null and sts != ''"> sts , </if>
|
||||
<if test="org_id != null and org_id != ''"> org_id , </if>
|
||||
<if test="companyId != null and companyId != ''"> company_id , </if>
|
||||
<if test="code != null and code != ''"> code , </if>
|
||||
<if test="custprop != null and custprop != ''"> custprop , </if>
|
||||
<if test="custstate != null and custstate != ''"> custstate , </if>
|
||||
<if test="enablestate != null and enablestate != ''"> enablestate , </if>
|
||||
<if test="name != null and name != ''"> name , </if>
|
||||
<if test="pkCountry != null and pkCountry != ''"> pk_country , </if>
|
||||
<if test="pkCustclass != null and pkCustclass != ''"> pk_custclass , </if>
|
||||
<if test="pkGroup != null and pkGroup != ''"> pk_group , </if>
|
||||
<if test="pkOrg != null and pkOrg != ''"> pk_org , </if>
|
||||
<if test="taxpayerid != null and taxpayerid != ''"> taxpayerid , </if>
|
||||
<if test="sorts == null ">sorts,</if>
|
||||
<if test="sts == null ">sts,</if>
|
||||
</trim>
|
||||
)values(
|
||||
<trim suffix="" suffixOverrides=",">
|
||||
<if test="id != null and id != ''"> #{id} ,</if>
|
||||
<if test="documentRule != null and documentRule != ''"> #{documentRule} ,</if>
|
||||
<if test="documentRuleNum != null"> #{documentRuleNum} ,</if>
|
||||
<if test="dataStatus != null and dataStatus != ''"> #{dataStatus} ,</if>
|
||||
<if test="addStatus != null and addStatus != ''"> #{addStatus} ,</if>
|
||||
<if test="updateStatus != null and updateStatus != ''"> #{updateStatus} ,</if>
|
||||
<if test="deleteStatus != null and deleteStatus != ''"> #{deleteStatus} ,</if>
|
||||
<if test="sorts != null"> #{sorts} ,</if>
|
||||
<if test="create_user_id != null and create_user_id != ''"> #{create_user_id} ,</if>
|
||||
<if test="create_time != null"> #{create_time} ,</if>
|
||||
<if test="modify_user_id != null and modify_user_id != ''"> #{modify_user_id} ,</if>
|
||||
<if test="modify_time != null"> #{modify_time} ,</if>
|
||||
<if test="sts != null and sts != ''"> #{sts} ,</if>
|
||||
<if test="org_id != null and org_id != ''"> #{org_id} ,</if>
|
||||
<if test="companyId != null and companyId != ''"> #{companyId} ,</if>
|
||||
<if test="code != null and code != ''"> #{code} ,</if>
|
||||
<if test="custprop != null and custprop != ''"> #{custprop} ,</if>
|
||||
<if test="custstate != null and custstate != ''"> #{custstate} ,</if>
|
||||
<if test="enablestate != null and enablestate != ''"> #{enablestate} ,</if>
|
||||
<if test="name != null and name != ''"> #{name} ,</if>
|
||||
<if test="pkCountry != null and pkCountry != ''"> #{pkCountry} ,</if>
|
||||
<if test="pkCustclass != null and pkCustclass != ''"> #{pkCustclass} ,</if>
|
||||
<if test="pkGroup != null and pkGroup != ''"> #{pkGroup} ,</if>
|
||||
<if test="pkOrg != null and pkOrg != ''"> #{pkOrg} ,</if>
|
||||
<if test="taxpayerid != null and taxpayerid != ''"> #{taxpayerid} ,</if>
|
||||
<if test="sorts == null ">(select (max(IFNULL( a.sorts, 0 )) + 1) as sort from mdm_customer a WHERE a.sts = 'Y' ),</if>
|
||||
<if test="sts == null ">'Y',</if>
|
||||
</trim>
|
||||
)
|
||||
</insert>
|
||||
<!-- 批量新增 -->
|
||||
<insert id="entityInsertBatch" keyProperty="id" useGeneratedKeys="true">
|
||||
insert into mdm_customer(document_rule, document_rule_num, data_status, add_status, update_status, delete_status, create_user_id, create_time, modify_user_id, modify_time, sts, org_id, company_id, code, custprop, custstate, enablestate, name, pk_country, pk_custclass, pk_group, pk_org, taxpayerid, sts)
|
||||
values
|
||||
<foreach collection="entities" item="entity" separator=",">
|
||||
(#{entity.documentRule},#{entity.documentRuleNum},#{entity.dataStatus},#{entity.addStatus},#{entity.updateStatus},#{entity.deleteStatus},#{entity.create_user_id},#{entity.create_time},#{entity.modify_user_id},#{entity.modify_time},#{entity.sts},#{entity.org_id},#{entity.companyId},#{entity.code},#{entity.custprop},#{entity.custstate},#{entity.enablestate},#{entity.name},#{entity.pkCountry},#{entity.pkCustclass},#{entity.pkGroup},#{entity.pkOrg},#{entity.taxpayerid}, 'Y')
|
||||
</foreach>
|
||||
</insert>
|
||||
<!-- 批量新增或者修改-->
|
||||
<insert id="entityInsertOrUpdateBatch" keyProperty="id" useGeneratedKeys="true">
|
||||
insert into mdm_customer(document_rule, document_rule_num, data_status, add_status, update_status, delete_status, create_user_id, create_time, modify_user_id, modify_time, sts, org_id, company_id, code, custprop, custstate, enablestate, name, pk_country, pk_custclass, pk_group, pk_org, taxpayerid)
|
||||
values
|
||||
<foreach collection="entities" item="entity" separator=",">
|
||||
(#{entity.documentRule},#{entity.documentRuleNum},#{entity.dataStatus},#{entity.addStatus},#{entity.updateStatus},#{entity.deleteStatus},#{entity.create_user_id},#{entity.create_time},#{entity.modify_user_id},#{entity.modify_time},#{entity.sts},#{entity.org_id},#{entity.companyId},#{entity.code},#{entity.custprop},#{entity.custstate},#{entity.enablestate},#{entity.name},#{entity.pkCountry},#{entity.pkCustclass},#{entity.pkGroup},#{entity.pkOrg},#{entity.taxpayerid})
|
||||
</foreach>
|
||||
on duplicate key update
|
||||
document_rule = values(document_rule),
|
||||
document_rule_num = values(document_rule_num),
|
||||
data_status = values(data_status),
|
||||
add_status = values(add_status),
|
||||
update_status = values(update_status),
|
||||
delete_status = values(delete_status),
|
||||
create_user_id = values(create_user_id),
|
||||
create_time = values(create_time),
|
||||
modify_user_id = values(modify_user_id),
|
||||
modify_time = values(modify_time),
|
||||
sts = values(sts),
|
||||
org_id = values(org_id),
|
||||
company_id = values(company_id),
|
||||
code = values(code),
|
||||
custprop = values(custprop),
|
||||
custstate = values(custstate),
|
||||
enablestate = values(enablestate),
|
||||
name = values(name),
|
||||
pk_country = values(pk_country),
|
||||
pk_custclass = values(pk_custclass),
|
||||
pk_group = values(pk_group),
|
||||
pk_org = values(pk_org),
|
||||
taxpayerid = values(taxpayerid)</insert>
|
||||
<!--通过主键修改方法-->
|
||||
<update id="entity_update" parameterType = "com.hzya.frame.plugin.masterData.customer.entity.MdmCustomerEntity" >
|
||||
update mdm_customer set
|
||||
<trim suffix="" suffixOverrides=",">
|
||||
<if test="documentRule != null and documentRule != ''"> document_rule = #{documentRule},</if>
|
||||
<if test="documentRuleNum != null"> document_rule_num = #{documentRuleNum},</if>
|
||||
<if test="dataStatus != null and dataStatus != ''"> data_status = #{dataStatus},</if>
|
||||
<if test="addStatus != null and addStatus != ''"> add_status = #{addStatus},</if>
|
||||
<if test="updateStatus != null and updateStatus != ''"> update_status = #{updateStatus},</if>
|
||||
<if test="deleteStatus != null and deleteStatus != ''"> delete_status = #{deleteStatus},</if>
|
||||
<if test="create_user_id != null and create_user_id != ''"> create_user_id = #{create_user_id},</if>
|
||||
<if test="create_time != null"> create_time = #{create_time},</if>
|
||||
<if test="modify_user_id != null and modify_user_id != ''"> modify_user_id = #{modify_user_id},</if>
|
||||
<if test="modify_time != null"> modify_time = #{modify_time},</if>
|
||||
<if test="sts != null and sts != ''"> sts = #{sts},</if>
|
||||
<if test="org_id != null and org_id != ''"> org_id = #{org_id},</if>
|
||||
<if test="companyId != null and companyId != ''"> company_id = #{companyId},</if>
|
||||
<if test="code != null and code != ''"> code = #{code},</if>
|
||||
<if test="custprop != null and custprop != ''"> custprop = #{custprop},</if>
|
||||
<if test="custstate != null and custstate != ''"> custstate = #{custstate},</if>
|
||||
<if test="enablestate != null and enablestate != ''"> enablestate = #{enablestate},</if>
|
||||
<if test="name != null and name != ''"> name = #{name},</if>
|
||||
<if test="pkCountry != null and pkCountry != ''"> pk_country = #{pkCountry},</if>
|
||||
<if test="pkCustclass != null and pkCustclass != ''"> pk_custclass = #{pkCustclass},</if>
|
||||
<if test="pkGroup != null and pkGroup != ''"> pk_group = #{pkGroup},</if>
|
||||
<if test="pkOrg != null and pkOrg != ''"> pk_org = #{pkOrg},</if>
|
||||
<if test="taxpayerid != null and taxpayerid != ''"> taxpayerid = #{taxpayerid},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
<!-- 逻辑删除 -->
|
||||
<update id="entity_logicDelete" parameterType = "com.hzya.frame.plugin.masterData.customer.entity.MdmCustomerEntity" >
|
||||
update mdm_customer set sts= 'N' ,modify_time = #{modify_time},modify_user_id = #{modify_user_id}
|
||||
where id = #{id}
|
||||
</update>
|
||||
<!-- 多条件逻辑删除 -->
|
||||
<update id="entity_logicDelete_Multi_Condition" parameterType = "com.hzya.frame.plugin.masterData.customer.entity.MdmCustomerEntity" >
|
||||
update mdm_customer set sts= 'N' ,modify_time = #{modify_time},modify_user_id = #{modify_user_id}
|
||||
<trim prefix="where" prefixOverrides="and">
|
||||
<if test="id != null and id != ''"> and id = #{id} </if>
|
||||
<if test="documentRule != null and documentRule != ''"> and document_rule = #{documentRule} </if>
|
||||
<if test="documentRuleNum != null"> and document_rule_num = #{documentRuleNum} </if>
|
||||
<if test="dataStatus != null and dataStatus != ''"> and data_status = #{dataStatus} </if>
|
||||
<if test="addStatus != null and addStatus != ''"> and add_status = #{addStatus} </if>
|
||||
<if test="updateStatus != null and updateStatus != ''"> and update_status = #{updateStatus} </if>
|
||||
<if test="deleteStatus != null and deleteStatus != ''"> and delete_status = #{deleteStatus} </if>
|
||||
<if test="sorts != null"> and sorts = #{sorts} </if>
|
||||
<if test="sts != null and sts != ''"> and sts = #{sts} </if>
|
||||
<if test="companyId != null and companyId != ''"> and company_id = #{companyId} </if>
|
||||
<if test="code != null and code != ''"> and code = #{code} </if>
|
||||
<if test="custprop != null and custprop != ''"> and custprop = #{custprop} </if>
|
||||
<if test="custstate != null and custstate != ''"> and custstate = #{custstate} </if>
|
||||
<if test="enablestate != null and enablestate != ''"> and enablestate = #{enablestate} </if>
|
||||
<if test="name != null and name != ''"> and name = #{name} </if>
|
||||
<if test="pkCountry != null and pkCountry != ''"> and pk_country = #{pkCountry} </if>
|
||||
<if test="pkCustclass != null and pkCustclass != ''"> and pk_custclass = #{pkCustclass} </if>
|
||||
<if test="pkGroup != null and pkGroup != ''"> and pk_group = #{pkGroup} </if>
|
||||
<if test="pkOrg != null and pkOrg != ''"> and pk_org = #{pkOrg} </if>
|
||||
<if test="taxpayerid != null and taxpayerid != ''"> and taxpayerid = #{taxpayerid} </if>
|
||||
and sts='Y'
|
||||
</trim>
|
||||
</update>
|
||||
<!--通过主键删除-->
|
||||
<delete id="entity_delete">
|
||||
delete from mdm_customer where id = #{id}
|
||||
</delete>
|
||||
|
||||
</mapper>
|
||||
|
|
@ -0,0 +1,50 @@
|
|||
package com.hzya.frame.plugin.masterData.customer.plugin;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.hzya.frame.base.PluginBaseEntity;
|
||||
import com.hzya.frame.web.entity.JsonResultEntity;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
/**
|
||||
* 客户档案(MdmCustomer)表服务接口
|
||||
*
|
||||
* @author makejava
|
||||
* @since 2024-06-21 13:52:35
|
||||
*/
|
||||
public class MdmCustomerPluginInitializer extends PluginBaseEntity{
|
||||
Logger logger = LoggerFactory.getLogger(MdmCustomerPluginInitializer.class);
|
||||
|
||||
@Override
|
||||
public void initialize() {
|
||||
logger.info(getPluginLabel() + "執行初始化方法initialize()");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void destroy() {
|
||||
logger.info(getPluginLabel() + "執行銷毀方法destroy()");
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getPluginId() {
|
||||
return "MdmCustomerPlugin";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getPluginName() {
|
||||
return "MdmCustomerPlugin插件";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getPluginLabel() {
|
||||
return "MdmCustomerPlugin";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getPluginType() {
|
||||
return "1";
|
||||
}
|
||||
@Override
|
||||
public JsonResultEntity executeBusiness(JSONObject requestJson) {
|
||||
logger.info("执行业务代码逻辑");
|
||||
return null;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,12 @@
|
|||
package com.hzya.frame.plugin.masterData.customer.service;
|
||||
|
||||
import com.hzya.frame.plugin.masterData.customer.entity.MdmCustomerEntity;
|
||||
import com.hzya.frame.basedao.service.IBaseService;
|
||||
/**
|
||||
* 客户档案(MdmCustomer)表服务接口
|
||||
*
|
||||
* @author makejava
|
||||
* @since 2024-06-21 13:52:35
|
||||
*/
|
||||
public interface IMdmCustomerService extends IBaseService<MdmCustomerEntity, String>{
|
||||
}
|
|
@ -0,0 +1,25 @@
|
|||
package com.hzya.frame.plugin.masterData.customer.service.impl;
|
||||
|
||||
import com.hzya.frame.plugin.masterData.customer.entity.MdmCustomerEntity;
|
||||
import com.hzya.frame.plugin.masterData.customer.dao.IMdmCustomerDao;
|
||||
import com.hzya.frame.plugin.masterData.customer.service.IMdmCustomerService;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import javax.annotation.Resource;
|
||||
import com.hzya.frame.basedao.service.impl.BaseService;
|
||||
/**
|
||||
* 客户档案(MdmCustomer)表服务实现类
|
||||
*
|
||||
* @author makejava
|
||||
* @since 2024-06-21 13:52:35
|
||||
*/
|
||||
public class MdmCustomerServiceImpl extends BaseService<MdmCustomerEntity, String> implements IMdmCustomerService {
|
||||
|
||||
private IMdmCustomerDao mdmCustomerDao;
|
||||
|
||||
@Autowired
|
||||
public void setMdmCustomerDao(IMdmCustomerDao dao) {
|
||||
this.mdmCustomerDao = dao;
|
||||
this.dao = dao;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,6 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<plugin>
|
||||
<id>MdmCustomerBankPlugin</id>
|
||||
<name>MdmCustomerBankPlugin插件</name>
|
||||
<category>90000001</category>
|
||||
</plugin>
|
|
@ -0,0 +1,5 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">
|
||||
<beans default-autowire="byName">
|
||||
<bean name="mdmCustomerBankDao" class="com.hzya.frame.plugin.masterData.customer.bank.dao.impl.MdmCustomerBankDaoImpl" />
|
||||
</beans>
|
|
@ -0,0 +1,5 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">
|
||||
<beans default-autowire="byName">
|
||||
<bean name="mdmCustomerBankInitializer" class="com.hzya.frame.plugin.masterData.customer.bank.plugin.MdmCustomerBankPluginInitializer" />
|
||||
</beans>
|
|
@ -0,0 +1,5 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">
|
||||
<beans default-autowire="byName">
|
||||
<bean name="mdmCustomerBankService" class="com.hzya.frame.plugin.masterData.customer.bank.service.impl.MdmCustomerBankServiceImpl" />
|
||||
</beans>
|
|
@ -0,0 +1,6 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<plugin>
|
||||
<id>MdmCustomerPlugin</id>
|
||||
<name>MdmCustomerPlugin插件</name>
|
||||
<category>90000001</category>
|
||||
</plugin>
|
|
@ -0,0 +1,5 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">
|
||||
<beans default-autowire="byName">
|
||||
<bean name="mdmCustomerDao" class="com.hzya.frame.plugin.masterData.customer.dao.impl.MdmCustomerDaoImpl" />
|
||||
</beans>
|
|
@ -0,0 +1,5 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">
|
||||
<beans default-autowire="byName">
|
||||
<bean name="mdmCustomerInitializer" class="com.hzya.frame.plugin.masterData.customer.plugin.MdmCustomerPluginInitializer" />
|
||||
</beans>
|
|
@ -0,0 +1,5 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">
|
||||
<beans default-autowire="byName">
|
||||
<bean name="mdmCustomerService" class="com.hzya.frame.plugin.masterData.customer.service.impl.MdmCustomerServiceImpl" />
|
||||
</beans>
|
|
@ -93,20 +93,25 @@ public class ComparisonServiceImpl extends BaseService<ComparisonEntity, String>
|
|||
}
|
||||
comparisonEntity.setMap(map);
|
||||
try {
|
||||
List<JSONObject> list=new ArrayList<>();
|
||||
//查询主表数据
|
||||
List<Map<String,Object>> comparisonEntitiePages = comparisonDao.queryComparisonPage(comparisonEntity);
|
||||
JSONArray jsonArray=new JSONArray();
|
||||
if(CollectionUtils.isNotEmpty(comparisonEntitiePages)){
|
||||
for (Map<String, Object> comparisonEntitiePage : comparisonEntitiePages) {
|
||||
comparisonDetailsEntity.setFormmainId(String.valueOf(comparisonEntitiePage.get("id")));
|
||||
List<Map<String, Object>> maps = comparisonDetailsDao.queryComparisonDetailsPage(comparisonDetailsEntity);
|
||||
jsonArray.add(maps);
|
||||
}
|
||||
}
|
||||
JSONObject jsonObjects=new JSONObject();
|
||||
jsonObjects.put("main",comparisonEntitiePages);
|
||||
jsonObjects.put("details",jsonArray);
|
||||
List<JSONObject> jsonObjects1 = JSON.parseArray(jsonObjects.toJSONString(), JSONObject.class);
|
||||
PageInfo pageInfo = new PageInfo(jsonObjects1);
|
||||
jsonObjects.put(comparisonEntity.getDbName(),comparisonEntitiePage);
|
||||
comparisonDetailsEntity.setFormmainId(String.valueOf(comparisonEntitiePage.get("id")));
|
||||
//查询明细表数据
|
||||
List<Map<String, Object>> maps = comparisonDetailsDao.queryComparisonDetailsPage(comparisonDetailsEntity);
|
||||
if(CollectionUtils.isNotEmpty(maps)){
|
||||
jsonObjects.put(comparisonDetailsEntity.getDbName(),maps);
|
||||
}else {
|
||||
jsonObjects.put(comparisonDetailsEntity.getDbName(),new JSONArray());
|
||||
}
|
||||
list.add(jsonObjects);
|
||||
}
|
||||
}
|
||||
PageInfo pageInfo = new PageInfo(list);
|
||||
return BaseResult.getSuccessMessageEntity("查询成功", pageInfo);
|
||||
} catch (Exception e) {
|
||||
logger.info("查询通用数据错误:{}", e.getMessage());
|
||||
|
@ -313,7 +318,7 @@ public class ComparisonServiceImpl extends BaseService<ComparisonEntity, String>
|
|||
comparisonDetailsEntity.setMapDetails(mapDetails);
|
||||
comparisonDetailsDao.updateComparisonDetailsByType(comparisonDetailsEntity);
|
||||
//保存操作日志
|
||||
controlsLogDaoimpl.saveControlsLog(comparisonDetailsEntity.getId(),jsonObject.getString("appName"),jsonObject.getString("appCode"),jsonObject.toJSONString(),"接口更新",jsonObject.getString("optionName"),comparisonDetailsEntity.getDbName()+"_option_log");
|
||||
// controlsLogDaoimpl.saveControlsLog(comparisonDetailsEntity.getId(),jsonObject.getString("appName"),jsonObject.getString("appCode"),jsonObject.toJSONString(),"接口更新",jsonObject.getString("optionName"),comparisonDetailsEntity.getDbName()+"_option_log");
|
||||
}
|
||||
//保存操作日志
|
||||
controlsLogDaoimpl.saveControlsLog(comparisonEntity.getId(),jsonObject.getString("appName"),jsonObject.getString("appCode"),jsonObject.toJSONString(),"接口更新",jsonObject.getString("optionName"),comparisonEntity.getDbName()+"_option_log");
|
||||
|
@ -385,7 +390,7 @@ public class ComparisonServiceImpl extends BaseService<ComparisonEntity, String>
|
|||
comparisonDetailsEntity.setFormmainId(jsonObjectMain.getString("id"));
|
||||
comparisonDetailsEntity.setModify_user_id("c796fd9ba4c9f5ff3cc2fa41a040e443");
|
||||
comparisonDetailsDao.deleteComparisonDetails(comparisonDetailsEntity);
|
||||
controlsLogDaoimpl.saveControlsLog(comparisonDetailsEntity.getId(),jsonObject.getString("appName"),jsonObject.getString("appCode"),jsonObject.toJSONString(),"接口删除",jsonObject.getString("optionName"),comparisonEntity.getDbName()+"_option_log");
|
||||
// controlsLogDaoimpl.saveControlsLog(comparisonDetailsEntity.getId(),jsonObject.getString("appName"),jsonObject.getString("appCode"),jsonObject.toJSONString(),"接口删除",jsonObject.getString("optionName"),comparisonEntity.getDbName()+"_option_log");
|
||||
}
|
||||
controlsLogDaoimpl.saveControlsLog(comparisonEntity.getId(),jsonObject.getString("appName"),jsonObject.getString("appCode"),jsonObject.toJSONString(),"接口删除",jsonObject.getString("optionName"),comparisonEntity.getDbName()+"_option_log");
|
||||
return BaseResult.getSuccessMessageEntity("删除成功",integer);
|
||||
|
|
Loading…
Reference in New Issue