Browse Source

Merge branch 'dev_plugins' into dev_temp

dev_shibei_match
sunyuchao 5 years ago
parent
commit
2638ebda4d
  1. 2
      epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/controller/FunctionCustomizedController.java
  2. 2
      epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/FunctionCustomizedService.java
  3. 8
      epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/impl/CustomerFunctionDetailServiceImpl.java
  4. 8
      epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/impl/FunctionCustomizedServiceImpl.java
  5. 4
      epmet-module/oper-customize/oper-customize-server/src/main/resources/mapper/FunctionCustomizedDao.xml

2
epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/controller/FunctionCustomizedController.java

@ -143,7 +143,7 @@ public class FunctionCustomizedController {
/** /**
* 定制功能修改 * 定制功能修改
* 有客户在使用该功能时则不允许修改上下架状态业务域名和外链地址所属端app, * 有客户在使用该功能时则不允许修改上下架状态业务域名和外链地址所属端app,
* 只能修改功能名称和大小图标 * 只能修改功能名称和大小图标功能说明
* 修改的要判断是否有客户在使用有用的要批量更新已使用客户数据 * 修改的要判断是否有客户在使用有用的要批量更新已使用客户数据
* *
* @param formDTO * @param formDTO

2
epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/FunctionCustomizedService.java

@ -130,7 +130,7 @@ public interface FunctionCustomizedService extends BaseService<FunctionCustomize
/** /**
* 定制功能修改 * 定制功能修改
* 有客户在使用该功能时则不允许修改上下架状态业务域名和外链地址所属端app, * 有客户在使用该功能时则不允许修改上下架状态业务域名和外链地址所属端app,
* 只能修改功能名称和大小图标 * 只能修改功能名称和大小图标功能说明
* 修改的要判断是否有客户在使用有用的要批量更新已使用客户数据 * 修改的要判断是否有客户在使用有用的要批量更新已使用客户数据
* *
* @param formDTO * @param formDTO

8
epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/impl/CustomerFunctionDetailServiceImpl.java

@ -155,15 +155,13 @@ public class CustomerFunctionDetailServiceImpl extends BaseServiceImpl<CustomerF
public Result updateShoppingStatus(UpdateShoppingStatusFormDTO formDTO) { public Result updateShoppingStatus(UpdateShoppingStatusFormDTO formDTO) {
// 用户定制功能上架,需判断,已上架的数量是否超过12 // 用户定制功能上架,需判断,已上架的数量是否超过12
if (NumConstant.ONE_STR.equals(formDTO.getShoppingStatus())){ if (NumConstant.ONE_STR.equals(formDTO.getShoppingStatus())){
// 根据functionId,customerId、所属端,查询当前客户 现已上架的 功能数量。 // 根据functionId,customerId,查询当前客户所属端 现已上架的 功能数量。
CustomerFunctionDetailDTO functionDetailDTO = new CustomerFunctionDetailDTO(); CustomerFunctionDetailDTO functionDetailDTO = new CustomerFunctionDetailDTO();
functionDetailDTO.setFunctionId(formDTO.getFunctionId()); functionDetailDTO.setFunctionId(formDTO.getFunctionId());
functionDetailDTO.setCustomerId(formDTO.getCustomerId()); functionDetailDTO.setCustomerId(formDTO.getCustomerId());
CustomerFunctionCollectResultDTO functionNum = baseDao.sumCustomerFunctionNum(functionDetailDTO); CustomerFunctionCollectResultDTO functionNum = baseDao.sumCustomerFunctionNum(functionDetailDTO);
if (null != functionNum){ if (NumConstant.TWELVE <= functionNum.getNum()){
if (NumConstant.TWELVE <= functionNum.getNum()){ return new Result().error(EpmetErrorCode.SERVER_ERROR.getCode(),"当前客户"+ functionNum.getFromAppName() +"已上架12个定制功能。不能继续上架!");
return new Result().error(8000,"当前客户"+ functionNum.getFromAppName() +"已上架12个定制功能。不能继续上架!");
}
} }
} }
// 修改 客户定制功能详情表,上下架状态 // 修改 客户定制功能详情表,上下架状态

8
epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/impl/FunctionCustomizedServiceImpl.java

@ -200,18 +200,18 @@ public class FunctionCustomizedServiceImpl extends BaseServiceImpl<FunctionCusto
&& customizedDTO.getIconSmallImg().equals(customizedId.get(i).getIconSmallImg()) && customizedDTO.getIconSmallImg().equals(customizedId.get(i).getIconSmallImg())
&& customizedDTO.getDomainName().equals(customizedId.get(i).getDomainName()) && customizedDTO.getDomainName().equals(customizedId.get(i).getDomainName())
&& customizedDTO.getTargetLink().equals(customizedId.get(i).getTargetLink()) ){ && customizedDTO.getTargetLink().equals(customizedId.get(i).getTargetLink()) ){
// 这个功能,客户使用的是默认的,则判断本次修改的字段,如果是功能名称和大小图标,则批量更新客户数据,负责提示 不能修改 // 这个功能,客户使用的是默认的,则判断本次修改的字段,如果是功能名称和大小图标、功能说明,则批量更新客户数据,负责提示 不能修改
if (!formDTO.getShoppingStatus().equals(customizedDTO.getShoppingStatus()) if (!formDTO.getShoppingStatus().equals(customizedDTO.getShoppingStatus())
|| !formDTO.getFunctionExplain().equals(customizedDTO.getFunctionExplain())
|| !formDTO.getTargetLink().equals(customizedDTO.getTargetLink()) || !formDTO.getTargetLink().equals(customizedDTO.getTargetLink())
|| !formDTO.getDomainName().equals(customizedDTO.getDomainName()) || !formDTO.getDomainName().equals(customizedDTO.getDomainName())
|| !formDTO.getFromApp().equals(customizedDTO.getFromApp()) ){ || !formDTO.getFromApp().equals(customizedDTO.getFromApp()) ){
// 4.1 如果修改的内容是其他字段,则返回语句 // 4.1 如果修改的内容是其他字段,则返回语句
tipCustomizedInfoUserId.append(customizedId.get(i).getId() + ","); tipCustomizedInfoUserId.append(customizedId.get(i).getId() + ",");
} else if (!formDTO.getFunctionName().equals(customizedDTO.getCustomizedName()) } else if (!formDTO.getFunctionName().equals(customizedDTO.getCustomizedName())
|| !formDTO.getFunctionExplain().equals(customizedDTO.getFunctionExplain())
|| !formDTO.getIconLargeImg().equals(customizedDTO.getIconLargeImg()) || !formDTO.getIconLargeImg().equals(customizedDTO.getIconLargeImg())
|| !formDTO.getIconSmallImg().equals(customizedDTO.getIconSmallImg())){ || !formDTO.getIconSmallImg().equals(customizedDTO.getIconSmallImg())){
// 4.2 如果修改的内容只是:功能名称和大小图标,, 需要批量更新客户数据 // 4.2 如果修改的内容只是:功能名称和大小图标、功能说明,, 需要批量更新客户数据
CustomerFunctionDetailEntity customer = new CustomerFunctionDetailEntity(); CustomerFunctionDetailEntity customer = new CustomerFunctionDetailEntity();
customer.setFunctionName(formDTO.getFunctionName()); customer.setFunctionName(formDTO.getFunctionName());
customer.setIconLargeImg(formDTO.getIconLargeImg()); customer.setIconLargeImg(formDTO.getIconLargeImg());
@ -340,9 +340,9 @@ public class FunctionCustomizedServiceImpl extends BaseServiceImpl<FunctionCusto
entity.setId(formDTO.getFunctionId()); entity.setId(formDTO.getFunctionId());
entity.setFunctionName(formDTO.getFunctionName()); entity.setFunctionName(formDTO.getFunctionName());
entity.setFunctionIcon(formDTO.getIconLargeImg()); entity.setFunctionIcon(formDTO.getIconLargeImg());
entity.setFunctionExplain(formDTO.getFunctionExplain());
if (NumConstant.ONE == flag){ if (NumConstant.ONE == flag){
entity.setShoppingStatus(Integer.valueOf(formDTO.getShoppingStatus())); entity.setShoppingStatus(Integer.valueOf(formDTO.getShoppingStatus()));
entity.setFunctionExplain(formDTO.getFunctionExplain());
} }
functionService.updateById(entity); functionService.updateById(entity);
} }

4
epmet-module/oper-customize/oper-customize-server/src/main/resources/mapper/FunctionCustomizedDao.xml

@ -66,7 +66,7 @@
AND cu.CUSTOMIZED_NAME like concat('%', #{customizedName}, '%') AND cu.CUSTOMIZED_NAME like concat('%', #{customizedName}, '%')
</if> </if>
<if test="fromApp != null and fromApp.trim() != ''"> <if test="fromApp != null and fromApp.trim() != ''">
AND cu.FROM_APP = 'gov' AND cu.FROM_APP = #{fromApp}
</if> </if>
ORDER BY cu.FROM_APP, f.CREATED_TIME DESC ORDER BY cu.FROM_APP, f.CREATED_TIME DESC
</select> </select>
@ -84,7 +84,7 @@
AND cu.CUSTOMIZED_NAME like concat('%', #{customizedName}, '%') AND cu.CUSTOMIZED_NAME like concat('%', #{customizedName}, '%')
</if> </if>
<if test="fromApp != null and fromApp.trim() != ''"> <if test="fromApp != null and fromApp.trim() != ''">
AND cu.FROM_APP = 'gov' AND cu.FROM_APP = #{fromApp}
</if> </if>
</select> </select>
<select id="selectDomains" resultType="com.epmet.dto.FunctionCustomizedDTO"> <select id="selectDomains" resultType="com.epmet.dto.FunctionCustomizedDTO">

Loading…
Cancel
Save