forked from rongchao/epmet-cloud-rizhao
18 changed files with 395 additions and 36 deletions
@ -0,0 +1,26 @@ |
|||
package com.epmet.dto.indexcollect.form; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import javax.validation.constraints.NotEmpty; |
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* 客户业务组织关系 入参 |
|||
*/ |
|||
@Data |
|||
public class CustomerBizOrgFormDTO implements Serializable { |
|||
|
|||
|
|||
/** |
|||
* 当为true时后台将删除本月数据 |
|||
*/ |
|||
@NotEmpty(message = "客户Id不能为空") |
|||
private String customerId; |
|||
|
|||
/** |
|||
* 业务类型:智慧社区: community |
|||
*/ |
|||
@NotEmpty(message = "业务类型不能为空") |
|||
private String bizType; |
|||
} |
@ -0,0 +1,40 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* <p> |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.epmet.dao.evaluationindex.screen; |
|||
|
|||
import com.epmet.commons.mybatis.dao.BaseDao; |
|||
import com.epmet.dto.indexcollect.form.CustomerBizOrgFormDTO; |
|||
import com.epmet.entity.evaluationindex.screen.ScreenCustomerBizOrgEntity; |
|||
import org.apache.ibatis.annotations.Mapper; |
|||
import org.apache.ibatis.annotations.Param; |
|||
|
|||
import java.util.List; |
|||
|
|||
/** |
|||
* 组织机构信息 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2020-08-18 |
|||
*/ |
|||
@Mapper |
|||
public interface ScreenCustomerBizOrgDao extends BaseDao<ScreenCustomerBizOrgEntity> { |
|||
|
|||
int deleteByBizType(CustomerBizOrgFormDTO formDTO); |
|||
|
|||
int batchInsert(@Param("list") List<ScreenCustomerBizOrgEntity> list); |
|||
} |
@ -0,0 +1,52 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* <p> |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
package com.epmet.entity.evaluationindex.screen; |
|||
|
|||
import com.baomidou.mybatisplus.annotation.TableName; |
|||
import com.epmet.commons.mybatis.entity.BaseEpmetEntity; |
|||
import lombok.Data; |
|||
import lombok.EqualsAndHashCode; |
|||
|
|||
/** |
|||
* 组织机构信息 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2020-08-21 |
|||
*/ |
|||
@Data |
|||
@EqualsAndHashCode(callSuper = false) |
|||
@TableName("screen_customer_biz_org") |
|||
public class ScreenCustomerBizOrgEntity extends BaseEpmetEntity { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** |
|||
* 客户id |
|||
*/ |
|||
private String customerId; |
|||
|
|||
/** |
|||
* 组织id |
|||
*/ |
|||
private String orgId; |
|||
|
|||
/** |
|||
* 业务类型 community:智慧社区 |
|||
*/ |
|||
private String bizType; |
|||
|
|||
} |
@ -0,0 +1,39 @@ |
|||
<?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.epmet.dao.evaluationindex.screen.ScreenCustomerBizOrgDao"> |
|||
<delete id="deleteByBizType"> |
|||
delete from screen_customer_biz_org |
|||
where CUSTOMER_ID = #{customerId} |
|||
and BIZ_TYPE = #{bizType,jdbcType=VARCHAR} |
|||
</delete> |
|||
<insert id="batchInsert"> |
|||
insert into screen_customer_biz_org |
|||
( |
|||
ID, |
|||
CUSTOMER_ID, |
|||
ORG_ID, |
|||
BIZ_TYPE, |
|||
DEL_FLAG, |
|||
REVISION, |
|||
CREATED_BY, |
|||
CREATED_TIME, |
|||
UPDATED_BY, |
|||
UPDATED_TIME |
|||
) values |
|||
<foreach collection="list" item="item" separator=","> |
|||
( |
|||
(SELECT REPLACE(UUID(), '-', '') AS id), |
|||
#{item.customerId}, |
|||
#{item.orgId}, |
|||
#{item.bizType}, |
|||
0, |
|||
0, |
|||
'APP_USER', |
|||
now(), |
|||
'APP_USER', |
|||
now() |
|||
) |
|||
</foreach> |
|||
</insert> |
|||
</mapper> |
Loading…
Reference in new issue