Browse Source

Merge branch 'dev_footbar' into dev_temp

master
wxz 5 years ago
parent
commit
044492c755
  1. 6
      epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/dao/CustomerFootBarDao.java
  2. 6
      epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/impl/CustomerFootBarServiceImpl.java
  3. 48
      epmet-module/oper-customize/oper-customize-server/src/main/resources/mapper/CustomerFootBarDao.xml

6
epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/dao/CustomerFootBarDao.java

@ -70,10 +70,16 @@ public interface CustomerFootBarDao extends BaseDao<CustomerFootBarEntity> {
@Param("appType") String appType, @Param("appType") String appType,
@Param("barKey") String barKey); @Param("barKey") String barKey);
CustomerFootBarEntity getByAppTypeAndBarNameOfCustomer(@Param("customerId") String customerId,
@Param("appType") String appType,
@Param("barName") String barName);
List<CustomerFootBarEntity> listByAppTypeAndCustomerId(@Param("customerId") String customerId, List<CustomerFootBarEntity> listByAppTypeAndCustomerId(@Param("customerId") String customerId,
@Param("appType") String appType); @Param("appType") String appType);
void updateDisplayStatus(@Param("id") String id, @Param("display") Boolean display); void updateDisplayStatus(@Param("id") String id, @Param("display") Boolean display);
List<String> listFootBarOwnerCustomerIds(); List<String> listFootBarOwnerCustomerIds();
void physicsDeleteById(@Param("id") String id);
} }

6
epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/impl/CustomerFootBarServiceImpl.java

@ -231,7 +231,7 @@ public class CustomerFootBarServiceImpl extends BaseServiceImpl<CustomerFootBarD
@Override @Override
public void deleteFootBar(String id) { public void deleteFootBar(String id) {
baseDao.deleteById(id); baseDao.physicsDeleteById(id);
} }
/** /**
@ -251,8 +251,8 @@ public class CustomerFootBarServiceImpl extends BaseServiceImpl<CustomerFootBarD
private void validateBeforeUpdate(CustomerFootBarFormDTO form) { private void validateBeforeUpdate(CustomerFootBarFormDTO form) {
synchronized (this) { synchronized (this) {
int uniqueCount2 = baseDao.count4Unique(form.getCustomerId(), form.getAppType(), null, form.getBarName()); CustomerFootBarEntity entity = baseDao.getByAppTypeAndBarNameOfCustomer(form.getCustomerId(), form.getAppType(), form.getBarName());
if (uniqueCount2 > 0) { if (entity != null && entity.getId().equals(form.getId())) {
throw new RenException(EpmetErrorCode.OPER_CUSTOMER_FOOTBAR_EXISTS.getCode(), throw new RenException(EpmetErrorCode.OPER_CUSTOMER_FOOTBAR_EXISTS.getCode(),
EpmetErrorCode.OPER_CUSTOMER_FOOTBAR_EXISTS.getMsg()); EpmetErrorCode.OPER_CUSTOMER_FOOTBAR_EXISTS.getMsg());
} }

48
epmet-module/oper-customize/oper-customize-server/src/main/resources/mapper/CustomerFootBarDao.xml

@ -34,6 +34,13 @@
where ID = #{id} where ID = #{id}
</update> </update>
<!--物理删除-->
<delete id="physicsDeleteById">
delete
from customer_foot_bar
where ID = #{id}
</delete>
<!--查询客户的footbar列表--> <!--查询客户的footbar列表-->
<select id="listDisplayCustomerFootBars" resultType="com.epmet.entity.CustomerFootBarEntity"> <select id="listDisplayCustomerFootBars" resultType="com.epmet.entity.CustomerFootBarEntity">
SELECT SELECT
@ -123,7 +130,22 @@
</select> </select>
<select id="getByAppTypeAndBarKeyOfCustomer" resultType="com.epmet.entity.CustomerFootBarEntity"> <select id="getByAppTypeAndBarKeyOfCustomer" resultType="com.epmet.entity.CustomerFootBarEntity">
select * select id,
customer_id,
app_type,
bar_key,
bar_name,
page_title,
icon_path,
selected_icon_path,
display,
order_index,
del_flag,
revision,
created_by,
created_time,
updated_by,
updated_time
from customer_foot_bar from customer_foot_bar
where CUSTOMER_ID = #{customerId} where CUSTOMER_ID = #{customerId}
and APP_TYPE = #{appType} and APP_TYPE = #{appType}
@ -150,6 +172,7 @@
from customer_foot_bar from customer_foot_bar
where CUSTOMER_ID = #{customerId} where CUSTOMER_ID = #{customerId}
and app_type = #{appType} and app_type = #{appType}
and DEL_FLAG=0
</select> </select>
<select id="listFootBarOwnerCustomerIds" resultType="java.lang.String"> <select id="listFootBarOwnerCustomerIds" resultType="java.lang.String">
@ -158,5 +181,28 @@
where CUSTOMER_ID != 'default' where CUSTOMER_ID != 'default'
</select> </select>
<select id="getByAppTypeAndBarNameOfCustomer" resultType="com.epmet.entity.CustomerFootBarEntity">
select id,
customer_id,
app_type,
bar_key,
bar_name,
page_title,
icon_path,
selected_icon_path,
display,
order_index,
del_flag,
revision,
created_by,
created_time,
updated_by,
updated_time
from customer_foot_bar
where CUSTOMER_ID = #{customerId}
and APP_TYPE = #{appType}
and BAR_NAME = #{barName}
</select>
</mapper> </mapper>
Loading…
Cancel
Save