删除基础数据往来单位导入详情表
parent
9597d7cb5e
commit
ce92c21b3d
@ -1,26 +0,0 @@
|
|||||||
package com.glxp.api.dao.basic;
|
|
||||||
|
|
||||||
|
|
||||||
import com.glxp.api.entity.basic.BasicCorpsImportDetailEntity;
|
|
||||||
import com.glxp.api.req.basic.FilterCorpImportLogRequest;
|
|
||||||
import org.apache.ibatis.annotations.Mapper;
|
|
||||||
import org.apache.ibatis.annotations.Param;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
@Mapper
|
|
||||||
public interface BasicCorpImportDetailDao {
|
|
||||||
|
|
||||||
List<BasicCorpsImportDetailEntity> filterCorpImport(FilterCorpImportLogRequest filterCorpImportLogRequest);
|
|
||||||
|
|
||||||
boolean insertCorpImport(BasicCorpsImportDetailEntity corpImportDetailEntity);
|
|
||||||
|
|
||||||
boolean updateCorpImport(BasicCorpsImportDetailEntity corpImportDetailEntity);
|
|
||||||
|
|
||||||
boolean insertCorpImports(@Param("corps") List<BasicCorpsImportDetailEntity> corpImportDetailEntities);
|
|
||||||
|
|
||||||
boolean deleteById(@Param("id") String id);
|
|
||||||
|
|
||||||
boolean deleteByGenkey(@Param("genKey") String genKey);
|
|
||||||
|
|
||||||
}
|
|
@ -1,23 +0,0 @@
|
|||||||
package com.glxp.api.service.basic;
|
|
||||||
|
|
||||||
|
|
||||||
import com.glxp.api.entity.basic.BasicCorpsImportDetailEntity;
|
|
||||||
import com.glxp.api.req.basic.FilterCorpImportLogRequest;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
public interface BasicCorpImportDetailService {
|
|
||||||
|
|
||||||
List<BasicCorpsImportDetailEntity> filterCorpImport(FilterCorpImportLogRequest filterCorpImportLogRequest);
|
|
||||||
|
|
||||||
boolean insertCorpImport(BasicCorpsImportDetailEntity corpImportDetailEntity);
|
|
||||||
|
|
||||||
boolean updateCorpImport(BasicCorpsImportDetailEntity corpImportDetailEntity);
|
|
||||||
|
|
||||||
boolean insertCorpImports(List<BasicCorpsImportDetailEntity> corpImportDetailEntities);
|
|
||||||
|
|
||||||
boolean deleteById(String id);
|
|
||||||
|
|
||||||
boolean deleteByGenkey(String genKey);
|
|
||||||
|
|
||||||
}
|
|
@ -1,56 +0,0 @@
|
|||||||
package com.glxp.api.service.basic.impl;
|
|
||||||
|
|
||||||
import com.github.pagehelper.PageHelper;
|
|
||||||
import com.glxp.api.dao.basic.BasicCorpImportDetailDao;
|
|
||||||
import com.glxp.api.entity.basic.BasicCorpsImportDetailEntity;
|
|
||||||
import com.glxp.api.req.basic.FilterCorpImportLogRequest;
|
|
||||||
import com.glxp.api.service.basic.BasicCorpImportDetailService;
|
|
||||||
import org.springframework.stereotype.Service;
|
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
|
||||||
import java.util.Collections;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
@Service
|
|
||||||
public class BasicCorpImportDetailServiceImpl implements BasicCorpImportDetailService {
|
|
||||||
@Resource
|
|
||||||
BasicCorpImportDetailDao basicCorpImportDetailDao;
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public List<BasicCorpsImportDetailEntity> filterCorpImport(FilterCorpImportLogRequest filterCorpImportLogRequest) {
|
|
||||||
if (filterCorpImportLogRequest == null) {
|
|
||||||
return Collections.emptyList();
|
|
||||||
}
|
|
||||||
if (filterCorpImportLogRequest.getPage() != null) {
|
|
||||||
int offset = (filterCorpImportLogRequest.getPage() - 1) * filterCorpImportLogRequest.getLimit();
|
|
||||||
PageHelper.offsetPage(offset, filterCorpImportLogRequest.getLimit());
|
|
||||||
}
|
|
||||||
List<BasicCorpsImportDetailEntity> data = basicCorpImportDetailDao.filterCorpImport(filterCorpImportLogRequest);
|
|
||||||
return data;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean insertCorpImport(BasicCorpsImportDetailEntity basicCorpsImportDetailEntity) {
|
|
||||||
return basicCorpImportDetailDao.insertCorpImport(basicCorpsImportDetailEntity);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean updateCorpImport(BasicCorpsImportDetailEntity basicCorpsImportDetailEntity) {
|
|
||||||
return basicCorpImportDetailDao.updateCorpImport(basicCorpsImportDetailEntity);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean insertCorpImports(List<BasicCorpsImportDetailEntity> basicCorpsImportDetailEntity) {
|
|
||||||
return basicCorpImportDetailDao.insertCorpImports(basicCorpsImportDetailEntity);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean deleteById(String id) {
|
|
||||||
return basicCorpImportDetailDao.deleteById(id);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean deleteByGenkey(String genKey) {
|
|
||||||
return basicCorpImportDetailDao.deleteByGenkey(genKey);
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,113 +0,0 @@
|
|||||||
<?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.glxp.api.dao.basic.BasicCorpImportDetailDao">
|
|
||||||
|
|
||||||
<select id="filterCorpImport" parameterType="com.glxp.api.req.basic.FilterCorpImportLogRequest"
|
|
||||||
resultType="com.glxp.api.entity.basic.BasicCorpsImportDetailEntity">
|
|
||||||
SELECT * FROM basic_corps_import_detail
|
|
||||||
<where>
|
|
||||||
<if test="genKey != '' and genKey != null">
|
|
||||||
AND genKeyFk = #{genKey}
|
|
||||||
</if>
|
|
||||||
<if test="id != '' and id != null">
|
|
||||||
AND id = #{id}
|
|
||||||
</if>
|
|
||||||
<if test="status != '' and status != null">
|
|
||||||
AND status = #{status}
|
|
||||||
</if>
|
|
||||||
</where>
|
|
||||||
|
|
||||||
</select>
|
|
||||||
|
|
||||||
|
|
||||||
<insert id="insertCorpImport" keyProperty="id"
|
|
||||||
parameterType="com.glxp.api.entity.basic.BasicCorpsImportDetailEntity">
|
|
||||||
insert INTO basic_corps_import_detail
|
|
||||||
(
|
|
||||||
thirdId,erpId,name,spell,
|
|
||||||
addr,status,type,creditNo,contact,mobile,thirdId1,thirdId2,thirdId3,thirdId4,
|
|
||||||
thirdName,thirdName1,thirdName2,thirdName3,thirdName4,
|
|
||||||
importStatus,updateTime,remark,genKeyFk)
|
|
||||||
values
|
|
||||||
(
|
|
||||||
#{thirdId},
|
|
||||||
#{erpId},
|
|
||||||
#{name},
|
|
||||||
#{spell},
|
|
||||||
#{addr},
|
|
||||||
#{status},
|
|
||||||
#{type},
|
|
||||||
#{creditNo},
|
|
||||||
#{contact},
|
|
||||||
#{mobile},#{thirdId1},#{thirdId2},#{thirdId3},#{thirdId4},
|
|
||||||
#{thirdName},#{thirdName1},#{thirdName2},#{thirdName3},#{thirdName4},
|
|
||||||
#{importStatus},
|
|
||||||
#{updateTime},#{remark}, #{genKeyFk}
|
|
||||||
)
|
|
||||||
</insert>
|
|
||||||
|
|
||||||
<insert id="insertCorpImports" keyProperty="id" parameterType="java.util.List">
|
|
||||||
insert INTO basic_corps_import_detail
|
|
||||||
(
|
|
||||||
thirdId,erpId,name,spell,
|
|
||||||
addr,status,type,creditNo,contact,mobile,thirdId1,thirdId2,thirdId3,thirdId4,
|
|
||||||
thirdName,thirdName1,thirdName2,thirdName3,thirdName4,
|
|
||||||
importStatus,updateTime,remark,genKeyFk)
|
|
||||||
values
|
|
||||||
<foreach collection="corps" item="item" index="index"
|
|
||||||
separator=",">
|
|
||||||
(
|
|
||||||
#{item.thirdId},
|
|
||||||
#{item.erpId},
|
|
||||||
#{item.name},
|
|
||||||
#{item.spell},
|
|
||||||
#{item.addr},
|
|
||||||
#{item.status},
|
|
||||||
#{item.type},
|
|
||||||
#{item.creditNo},
|
|
||||||
#{item.contact},
|
|
||||||
#{item.mobile},#{item.thirdId1},#{item.thirdId2},#{item.thirdId3},#{item.thirdId4},
|
|
||||||
#{item.thirdName},#{item.thirdName1},#{item.thirdName2},#{item.thirdName3},#{item.thirdName4},
|
|
||||||
#{item.importStatus},
|
|
||||||
#{item.updateTime},#{item.remark}, #{item.genKeyFk}
|
|
||||||
)
|
|
||||||
</foreach>
|
|
||||||
</insert>
|
|
||||||
<delete id="deleteById" parameterType="Map">
|
|
||||||
DELETE FROM basic_corps_import_detail WHERE id = #{id}
|
|
||||||
</delete>
|
|
||||||
<delete id="deleteByGenkey" parameterType="Map">
|
|
||||||
DELETE FROM basic_corps_import_detail WHERE genKeyFk = #{genKey}
|
|
||||||
</delete>
|
|
||||||
|
|
||||||
<update id="updateCorpImport" parameterType="com.glxp.api.entity.basic.BasicCorpsImportDetailEntity">
|
|
||||||
UPDATE basic_corps_import_detail
|
|
||||||
<trim prefix="set" suffixOverrides=",">
|
|
||||||
<if test="thirdId != null">thirdId=#{thirdId},</if>
|
|
||||||
<if test="erpId != null">erpId=#{erpId},</if>
|
|
||||||
<if test="name != null">name=#{name},</if>
|
|
||||||
<if test="spell != null">spell=#{spell},</if>
|
|
||||||
<if test="addr != null">addr=#{addr},</if>
|
|
||||||
<if test="status != null">status=#{status},</if>
|
|
||||||
<if test="type != null">type=#{type},</if>
|
|
||||||
<if test="creditNo != null">creditNo=#{creditNo},</if>
|
|
||||||
<if test="contact != null">contact=#{contact},</if>
|
|
||||||
<if test="mobile != null">mobile=#{mobile},</if>
|
|
||||||
<if test="thirdId1 != null">thirdId1=#{thirdId1},</if>
|
|
||||||
<if test="thirdId2 != null">thirdId2=#{thirdId2},</if>
|
|
||||||
<if test="thirdId3 != null">thirdId3=#{thirdId3},</if>
|
|
||||||
<if test="thirdId4 != null">thirdId4=#{thirdId4},</if>
|
|
||||||
<if test="thirdName != null">thirdName=#{thirdName},</if>
|
|
||||||
<if test="thirdName1 != null">thirdName1=#{thirdName1},</if>
|
|
||||||
<if test="thirdName2 != null">thirdName2=#{thirdName2},</if>
|
|
||||||
<if test="thirdName3 != null">thirdName3=#{thirdName3},</if>
|
|
||||||
<if test="thirdName4 != null">thirdName4=#{thirdName4},</if>
|
|
||||||
<if test="importStatus != null">importStatus=#{importStatus},</if>
|
|
||||||
<if test="updateTime != null">updateTime=#{updateTime},</if>
|
|
||||||
<if test="remark != null">remark=#{remark},</if>
|
|
||||||
</trim>
|
|
||||||
WHERE id = #{id}
|
|
||||||
</update>
|
|
||||||
|
|
||||||
</mapper>
|
|
Loading…
Reference in New Issue