运维工具-删除供应商
This commit is contained in:
parent
8886faeae9
commit
2b2debfe30
|
|
@ -43,6 +43,7 @@ public class CleanAdvisory implements Serializable {
|
||||||
private String izYg;
|
private String izYg;
|
||||||
private String izJs;
|
private String izJs;
|
||||||
private String izJg;
|
private String izJg;
|
||||||
|
private String izGys;
|
||||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||||
private Date createTime;
|
private Date createTime;
|
||||||
|
|
|
||||||
|
|
@ -31,4 +31,9 @@ public interface CleanAdvisoryMapper extends BaseMapper<CleanAdvisory> {
|
||||||
void cleanNotice(CleanAdvisory cleanAdvisory);
|
void cleanNotice(CleanAdvisory cleanAdvisory);
|
||||||
|
|
||||||
void cleanAccountInfo(CleanAdvisory cleanAdvisory);
|
void cleanAccountInfo(CleanAdvisory cleanAdvisory);
|
||||||
|
|
||||||
|
void deleteOpeSuppliersApply(CleanAdvisory cleanAdvisory);
|
||||||
|
void deleteSuppliersOrg(CleanAdvisory cleanAdvisory);
|
||||||
|
void deleteBizSuppliersApply(CleanAdvisory cleanAdvisory);
|
||||||
|
void deleteSuppliersInfo(CleanAdvisory cleanAdvisory);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -2,16 +2,42 @@
|
||||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
<mapper namespace="com.nu.modules.cleanadvisory.mapper.CleanAdvisoryMapper">
|
<mapper namespace="com.nu.modules.cleanadvisory.mapper.CleanAdvisoryMapper">
|
||||||
<select id="findPage" parameterType="com.nu.modules.cleanadvisory.entity.CleanAdvisory" resultType="com.nu.modules.cleanadvisory.entity.CleanAdvisory">
|
<select id="findPage" parameterType="com.nu.modules.cleanadvisory.entity.CleanAdvisory" resultType="com.nu.modules.cleanadvisory.entity.CleanAdvisory">
|
||||||
|
select
|
||||||
|
a.id,
|
||||||
|
b.id AS applyId,
|
||||||
|
a.open_id AS openId,
|
||||||
|
b.name,
|
||||||
|
a.tel,
|
||||||
|
'1' AS advisoryType,
|
||||||
|
a.iz_yg AS izYg,
|
||||||
|
a.iz_js AS izJs,
|
||||||
|
a.iz_jg AS izJg,
|
||||||
|
a.iz_gys AS izGys,
|
||||||
|
a.create_time AS createTime,
|
||||||
|
b.create_time AS updateTime,
|
||||||
|
'' AS comName
|
||||||
|
FROM nu_biz_advisory_info a
|
||||||
|
INNER JOIN nu_biz_elder_info b ON a.open_id = b.guardian_open_id
|
||||||
|
<where>
|
||||||
|
<if test="params.tel != null and params.tel != ''">
|
||||||
|
AND a.tel = #{params.tel}
|
||||||
|
</if>
|
||||||
|
<if test="params.openId != null and params.openId != ''">
|
||||||
|
AND a.open_id = #{params.openId}
|
||||||
|
</if>
|
||||||
|
</where>
|
||||||
|
union
|
||||||
select
|
select
|
||||||
a.id,
|
a.id,
|
||||||
b.id as applyId,
|
b.id as applyId,
|
||||||
a.open_id as openId,
|
a.open_id as openId,
|
||||||
b.name,
|
b.name,
|
||||||
a.tel,
|
a.tel,
|
||||||
a.advisory_type as advisoryType,
|
'2' as advisoryType,
|
||||||
a.iz_yg as izYg,
|
a.iz_yg as izYg,
|
||||||
a.iz_js as izJs,
|
a.iz_js as izJs,
|
||||||
a.iz_jg as izJg,
|
a.iz_jg as izJg,
|
||||||
|
a.iz_gys AS izGys,
|
||||||
a.create_time as createTime,
|
a.create_time as createTime,
|
||||||
b.create_time as updateTime,
|
b.create_time as updateTime,
|
||||||
'' as comName
|
'' as comName
|
||||||
|
|
@ -31,33 +57,11 @@
|
||||||
a.open_id as openId,
|
a.open_id as openId,
|
||||||
b.name,
|
b.name,
|
||||||
a.tel,
|
a.tel,
|
||||||
a.advisory_type as advisoryType,
|
'3' as advisoryType,
|
||||||
a.iz_yg as izYg,
|
|
||||||
a.iz_js as izJs,
|
|
||||||
a.iz_jg as izJg,
|
|
||||||
a.create_time as createTime,
|
|
||||||
b.create_time as updateTime,
|
|
||||||
'' as comName
|
|
||||||
from nu_biz_advisory_info a inner join nu_employees_advisory_info b on a.open_id = b.open_id
|
|
||||||
<where>
|
|
||||||
<if test="params.tel != null and params.tel != ''">
|
|
||||||
AND a.tel = #{params.tel}
|
|
||||||
</if>
|
|
||||||
<if test="params.openId != null and params.openId != ''">
|
|
||||||
AND a.open_id = #{params.openId}
|
|
||||||
</if>
|
|
||||||
</where>
|
|
||||||
union
|
|
||||||
select
|
|
||||||
a.id,
|
|
||||||
b.id as applyId,
|
|
||||||
a.open_id as openId,
|
|
||||||
b.name,
|
|
||||||
a.tel,
|
|
||||||
a.advisory_type as advisoryType,
|
|
||||||
a.iz_yg as izYg,
|
a.iz_yg as izYg,
|
||||||
a.iz_js as izJs,
|
a.iz_js as izJs,
|
||||||
a.iz_jg as izJg,
|
a.iz_jg as izJg,
|
||||||
|
a.iz_gys AS izGys,
|
||||||
a.create_time as createTime,
|
a.create_time as createTime,
|
||||||
b.create_time as updateTime,
|
b.create_time as updateTime,
|
||||||
ifnull(b.com_name,'') as comName
|
ifnull(b.com_name,'') as comName
|
||||||
|
|
@ -70,6 +74,31 @@
|
||||||
AND a.open_id = #{params.openId}
|
AND a.open_id = #{params.openId}
|
||||||
</if>
|
</if>
|
||||||
</where>
|
</where>
|
||||||
|
union
|
||||||
|
select
|
||||||
|
a.id,
|
||||||
|
b.id AS applyId,
|
||||||
|
a.open_id AS openId,
|
||||||
|
b.person_in_charge as name,
|
||||||
|
a.tel,
|
||||||
|
'4' AS advisoryType,
|
||||||
|
a.iz_yg AS izYg,
|
||||||
|
a.iz_js AS izJs,
|
||||||
|
a.iz_jg AS izJg,
|
||||||
|
a.iz_gys AS izGys,
|
||||||
|
a.create_time AS createTime,
|
||||||
|
b.create_time AS updateTime,
|
||||||
|
ifnull( b.suppliers_name, '' ) AS comName
|
||||||
|
FROM nu_biz_advisory_info a
|
||||||
|
INNER JOIN nu_biz_suppliers_apply b ON a.open_id = b.open_id
|
||||||
|
<where>
|
||||||
|
<if test="params.tel != null and params.tel != ''">
|
||||||
|
AND a.tel = #{params.tel}
|
||||||
|
</if>
|
||||||
|
<if test="params.openId != null and params.openId != ''">
|
||||||
|
AND a.open_id = #{params.openId}
|
||||||
|
</if>
|
||||||
|
</where>
|
||||||
order by id desc
|
order by id desc
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|
@ -113,4 +142,16 @@
|
||||||
<update id="updateBaseInfo">
|
<update id="updateBaseInfo">
|
||||||
update nu_base_info set open_id = null , elder_id = null,status = 0 where open_id = #{openId}
|
update nu_base_info set open_id = null , elder_id = null,status = 0 where open_id = #{openId}
|
||||||
</update>
|
</update>
|
||||||
|
<delete id="deleteOpeSuppliersApply">
|
||||||
|
delete from nu_biz_suppliers_apply where open_id = #{openId}
|
||||||
|
</delete>
|
||||||
|
<delete id="deleteSuppliersOrg">
|
||||||
|
delete from nu_biz_suppliers_org where open_id = #{openId}
|
||||||
|
</delete>
|
||||||
|
<delete id="deleteBizSuppliersApply">
|
||||||
|
delete from nu_config_suppliers_apply where suppliers_id = #{id}
|
||||||
|
</delete>
|
||||||
|
<delete id="deleteSuppliersInfo">
|
||||||
|
delete from nu_config_suppliers_info where id = #{id}
|
||||||
|
</delete>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|
|
||||||
|
|
@ -69,6 +69,30 @@ public class CleanAdvisoryServiceImpl extends ServiceImpl<CleanAdvisoryMapper, C
|
||||||
cleanAdvisory.setNoticeType("1");
|
cleanAdvisory.setNoticeType("1");
|
||||||
baseMapper.cleanNotice(cleanAdvisory);
|
baseMapper.cleanNotice(cleanAdvisory);
|
||||||
}
|
}
|
||||||
|
//清除机构咨询信息
|
||||||
|
if (advisoryType.equals("4") || advisoryType.equals("-1")) {
|
||||||
|
cleanAdvisory.setIzGys("0");
|
||||||
|
cleanAdvisory.setAdvisoryType("0");
|
||||||
|
updateById(cleanAdvisory);
|
||||||
|
onlycleanAdvisoryServiceImpl.clearSuppliers(cleanAdvisory);
|
||||||
|
//清除消息通知
|
||||||
|
cleanAdvisory.setNoticeType("4");
|
||||||
|
baseMapper.cleanNotice(cleanAdvisory);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void clearSuppliers(CleanAdvisory cleanAdvisory) {
|
||||||
|
baseMapper.deleteOpeSuppliersApply(cleanAdvisory);
|
||||||
|
baseMapper.deleteSuppliersOrg(cleanAdvisory);
|
||||||
|
onlycleanAdvisoryServiceImpl.deleteSuppliers("101", cleanAdvisory);
|
||||||
|
onlycleanAdvisoryServiceImpl.deleteSuppliers("102", cleanAdvisory);
|
||||||
|
onlycleanAdvisoryServiceImpl.deleteSuppliers("103", cleanAdvisory);
|
||||||
|
}
|
||||||
|
|
||||||
|
@DS("#dataSourceCode")
|
||||||
|
public void deleteSuppliers(String dataSourceCode, CleanAdvisory cleanAdvisory) {
|
||||||
|
baseMapper.deleteBizSuppliersApply(cleanAdvisory);
|
||||||
|
baseMapper.deleteSuppliersInfo(cleanAdvisory);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void clearEmp(CleanAdvisory cleanAdvisory) {
|
public void clearEmp(CleanAdvisory cleanAdvisory) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue