41 changed files with 219 additions and 92 deletions
@ -0,0 +1,11 @@ |
|||||
|
package com.epmet.dto.form; |
||||
|
|
||||
|
import lombok.Data; |
||||
|
|
||||
|
import javax.validation.constraints.NotBlank; |
||||
|
|
||||
|
@Data |
||||
|
public class GovFootBarFormDTO { |
||||
|
//@NotBlank(message = "客户ID不能为空")
|
||||
|
private String customerId; |
||||
|
} |
@ -1,21 +0,0 @@ |
|||||
package com.epmet.feign; |
|
||||
|
|
||||
import com.epmet.commons.tools.constant.ServiceConstant; |
|
||||
import com.epmet.commons.tools.utils.Result; |
|
||||
import com.epmet.dto.CustomerFootBarDTO; |
|
||||
import com.epmet.dto.form.CustomerFootBarFormDTO; |
|
||||
import com.epmet.feign.fallback.OperCustomizeFeignClientFallBack; |
|
||||
import org.springframework.cloud.openfeign.FeignClient; |
|
||||
import org.springframework.http.MediaType; |
|
||||
import org.springframework.web.bind.annotation.PostMapping; |
|
||||
import org.springframework.web.bind.annotation.RequestBody; |
|
||||
|
|
||||
import java.util.List; |
|
||||
|
|
||||
@FeignClient(name = ServiceConstant.OPER_CUSTOMIZE_SERVER, fallback = OperCustomizeFeignClientFallBack.class) |
|
||||
public interface OperCustomizeFeignClient { |
|
||||
|
|
||||
@PostMapping(value = "/oper/customize/customerfootbar/customerfootbars", consumes = MediaType.APPLICATION_JSON_UTF8_VALUE) |
|
||||
Result<List<CustomerFootBarDTO>> getCustomerfootbars(@RequestBody CustomerFootBarFormDTO formDTO); |
|
||||
|
|
||||
} |
|
@ -1,22 +0,0 @@ |
|||||
package com.epmet.feign.fallback; |
|
||||
|
|
||||
import com.epmet.commons.tools.constant.ServiceConstant; |
|
||||
import com.epmet.commons.tools.utils.ModuleUtils; |
|
||||
import com.epmet.commons.tools.utils.Result; |
|
||||
import com.epmet.dto.CustomerFootBarDTO; |
|
||||
import com.epmet.dto.form.CustomerFootBarFormDTO; |
|
||||
import com.epmet.dto.form.CustomerHomeFormDTO; |
|
||||
import com.epmet.dto.result.HomeDesignByCustomerResultDTO; |
|
||||
import com.epmet.feign.OperCustomizeFeignClient; |
|
||||
import org.springframework.stereotype.Component; |
|
||||
|
|
||||
import java.util.List; |
|
||||
|
|
||||
@Component |
|
||||
public class OperCustomizeFeignClientFallBack implements OperCustomizeFeignClient { |
|
||||
|
|
||||
@Override |
|
||||
public Result<List<CustomerFootBarDTO>> getCustomerfootbars(CustomerFootBarFormDTO formDTO) { |
|
||||
return ModuleUtils.feignConError(ServiceConstant.OPER_CUSTOMIZE_SERVER, "getCustomerfootbars",formDTO); |
|
||||
} |
|
||||
} |
|
@ -0,0 +1,11 @@ |
|||||
|
alter table customer_foot_bar add column `app_type` varchar(20) not null after `CUSTOMER_ID`; |
||||
|
alter table customer_foot_bar add column `order` int(2) not null after `SELECTED_ICON_PATH`; |
||||
|
|
||||
|
update customer_foot_bar set `app_type`='gov' , `order`=1 where CUSTOMER_ID='default' and BAR_KEY='work'; |
||||
|
update customer_foot_bar set `app_type`='gov' , `order`=2 where CUSTOMER_ID='default' and BAR_KEY='org'; |
||||
|
update customer_foot_bar set `app_type`='gov' , `order`=3 where CUSTOMER_ID='default' and BAR_KEY='data'; |
||||
|
update customer_foot_bar set `app_type`='gov' , `order`=4 where CUSTOMER_ID='default' and BAR_KEY='find'; |
||||
|
|
||||
|
INSERT INTO epmet_oper_customize.customer_foot_bar (ID, CUSTOMER_ID, app_type, BAR_KEY, BAR_NAME, PAGE_TITLE, ICON_PATH, SELECTED_ICON_PATH, `order`, DEL_FLAG, REVISION, CREATED_BY, CREATED_TIME, UPDATED_BY, UPDATED_TIME) VALUES (uuid(), 'default', 'resi', 'garden', '党建园地', '党建园地', null, null, 1, 0, 0, 'APP_USER', now(), 'APP_USER', now()); |
||||
|
INSERT INTO epmet_oper_customize.customer_foot_bar (ID, CUSTOMER_ID, app_type, BAR_KEY, BAR_NAME, PAGE_TITLE, ICON_PATH, SELECTED_ICON_PATH, `order`, DEL_FLAG, REVISION, CREATED_BY, CREATED_TIME, UPDATED_BY, UPDATED_TIME) VALUES (uuid(), 'default', 'resi', 'issue', '党群议事', '党群议事', null, null, 2, 0, 0, 'APP_USER', now(), 'APP_USER', now()); |
||||
|
INSERT INTO epmet_oper_customize.customer_foot_bar (ID, CUSTOMER_ID, app_type, BAR_KEY, BAR_NAME, PAGE_TITLE, ICON_PATH, SELECTED_ICON_PATH, `order`, DEL_FLAG, REVISION, CREATED_BY, CREATED_TIME, UPDATED_BY, UPDATED_TIME) VALUES (uuid(), 'default', 'resi', 'group', '楼院小组', '楼院小组', null, null, 3, 0, 0, 'APP_USER', now(), 'APP_USER', now()); |
@ -0,0 +1,10 @@ |
|||||
|
package com.epmet.resi.mine.dto.from; |
||||
|
|
||||
|
import lombok.Data; |
||||
|
|
||||
|
@Data |
||||
|
public class ResiFootBarFormDTO { |
||||
|
|
||||
|
private String customerId; |
||||
|
|
||||
|
} |
@ -0,0 +1,39 @@ |
|||||
|
package com.epmet.modules.app.controller; |
||||
|
|
||||
|
import com.epmet.commons.tools.constant.AppClientConstant; |
||||
|
import com.epmet.commons.tools.utils.Result; |
||||
|
import com.epmet.dto.CustomerFootBarDTO; |
||||
|
import com.epmet.dto.form.CustomerFootBarFormDTO; |
||||
|
import com.epmet.feign.OperCustomizeOpenFeignClient; |
||||
|
import com.epmet.resi.mine.dto.from.ResiFootBarFormDTO; |
||||
|
import org.springframework.beans.factory.annotation.Autowired; |
||||
|
import org.springframework.util.CollectionUtils; |
||||
|
import org.springframework.web.bind.annotation.PostMapping; |
||||
|
import org.springframework.web.bind.annotation.RequestBody; |
||||
|
import org.springframework.web.bind.annotation.RequestMapping; |
||||
|
import org.springframework.web.bind.annotation.RestController; |
||||
|
|
||||
|
import java.util.List; |
||||
|
|
||||
|
@RestController |
||||
|
@RequestMapping("app") |
||||
|
public class AppController { |
||||
|
|
||||
|
@Autowired |
||||
|
private OperCustomizeOpenFeignClient operCustomizeFeign; |
||||
|
|
||||
|
@PostMapping("footbar") |
||||
|
public Result getResiFootBars(@RequestBody ResiFootBarFormDTO input) { |
||||
|
CustomerFootBarFormDTO form = new CustomerFootBarFormDTO(); |
||||
|
form.setCustomerId(input.getCustomerId()); |
||||
|
form.setAppType(AppClientConstant.APP_RESI); |
||||
|
Result<List<CustomerFootBarDTO>> result = operCustomizeFeign.getCustomerfootbars(form); |
||||
|
if (CollectionUtils.isEmpty(result.getData())) { |
||||
|
form.setCustomerId("default"); |
||||
|
result = operCustomizeFeign.getCustomerfootbars(form); |
||||
|
} |
||||
|
return result; |
||||
|
|
||||
|
} |
||||
|
|
||||
|
} |
@ -0,0 +1 @@ |
|||||
|
INSERT INTO epmet_user.gov_staff_role_template (ID, ROLE_KEY, ROLE_NAME, ORG_TYPE, FULL_TIME_ONLY, DEL_FLAG, REVISION, CREATED_BY, CREATED_TIME, UPDATED_BY, UPDATED_TIME) VALUES (uuid(), 'root_manager', '根管理员', 'agency', 1, 0, 0, 'APP_USER', now(), 'APP_USER', now()); |
Loading…
Reference in new issue