30个文件已删除
117个文件已修改
32 文件已重命名
12个文件已添加
| New file |
| | |
| | | package com.java110.dto.appraise; |
| | | |
| | | import java.io.Serializable; |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * 评价实体类 |
| | | */ |
| | | public class AppraiseDto implements Serializable { |
| | | |
| | | |
| | | private String appraiseId; |
| | | private int appraiseScore; |
| | | private String appraiseType; |
| | | private String context; |
| | | private String parentAppraiseId; |
| | | private Date createTime; |
| | | private String appraiseUserId; |
| | | private String appraiseUserName; |
| | | private String objType; |
| | | private String objId; |
| | | |
| | | |
| | | public String getAppraiseId() { |
| | | return appraiseId; |
| | | } |
| | | |
| | | public void setAppraiseId(String appraiseId) { |
| | | this.appraiseId = appraiseId; |
| | | } |
| | | |
| | | public int getAppraiseScore() { |
| | | return appraiseScore; |
| | | } |
| | | |
| | | public void setAppraiseScore(int appraiseScore) { |
| | | this.appraiseScore = appraiseScore; |
| | | } |
| | | |
| | | public String getAppraiseType() { |
| | | return appraiseType; |
| | | } |
| | | |
| | | public void setAppraiseType(String appraiseType) { |
| | | this.appraiseType = appraiseType; |
| | | } |
| | | |
| | | public String getContext() { |
| | | return context; |
| | | } |
| | | |
| | | public void setContext(String context) { |
| | | this.context = context; |
| | | } |
| | | |
| | | public String getParentAppraiseId() { |
| | | return parentAppraiseId; |
| | | } |
| | | |
| | | public void setParentAppraiseId(String parentAppraiseId) { |
| | | this.parentAppraiseId = parentAppraiseId; |
| | | } |
| | | |
| | | public Date getCreateTime() { |
| | | return createTime; |
| | | } |
| | | |
| | | public void setCreateTime(Date createTime) { |
| | | this.createTime = createTime; |
| | | } |
| | | |
| | | public String getAppraiseUserId() { |
| | | return appraiseUserId; |
| | | } |
| | | |
| | | public void setAppraiseUserId(String appraiseUserId) { |
| | | this.appraiseUserId = appraiseUserId; |
| | | } |
| | | |
| | | public String getAppraiseUserName() { |
| | | return appraiseUserName; |
| | | } |
| | | |
| | | public void setAppraiseUserName(String appraiseUserName) { |
| | | this.appraiseUserName = appraiseUserName; |
| | | } |
| | | |
| | | public String getObjType() { |
| | | return objType; |
| | | } |
| | | |
| | | public void setObjType(String objType) { |
| | | this.objType = objType; |
| | | } |
| | | |
| | | public String getObjId() { |
| | | return objId; |
| | | } |
| | | |
| | | public void setObjId(String objId) { |
| | | this.objId = objId; |
| | | } |
| | | } |
| New file |
| | |
| | | package com.java110.core.base.service; |
| | | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | |
| | | /** |
| | | * 抽象服务类 |
| | | */ |
| | | public abstract class AbstractBaseService extends BaseService { |
| | | |
| | | /** |
| | | * 统一业务处理类 |
| | | * |
| | | * @param t 对象分装 |
| | | * @return ResponseEntity对象 |
| | | */ |
| | | public final <T> T businessProcess(T t, Class clazz) { |
| | | |
| | | |
| | | return null; |
| | | |
| | | } |
| | | } |
| New file |
| | |
| | | package com.java110.core.base.service; |
| | | |
| | | public class BaseService { |
| | | } |
| | |
| | | public static final String CODE_PREFIX_wechatMenuId = "77"; |
| | | public static final String CODE_PREFIX_settingId = "78"; |
| | | public static final String CODE_PREFIX_typeUserId = "79"; |
| | | public static final String CODE_PREFIX_appraiseId = "80"; |
| | | |
| | | |
| | | public static final String CODE_PREFIX_waterId = "78"; |
| | |
| | | package com.java110.core.smo.common; |
| | | |
| | | import com.java110.core.feign.FeignConfiguration; |
| | | import com.java110.dto.auditMessage.AuditMessageDto; |
| | | import com.java110.dto.purchaseApply.PurchaseApplyDto; |
| | | import com.java110.entity.audit.AuditUser; |
| | | import com.java110.config.feign.FeignConfiguration; |
| | | import org.springframework.cloud.openfeign.FeignClient; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RequestMethod; |
| | | |
| | | import java.util.List; |
| | | |
| | | @FeignClient(name = "common-service", configuration = {FeignConfiguration.class}) |
| | | @RequestMapping("/activitiWorkflowImageApi") |
| | |
| | | package com.java110.core.smo.common; |
| | | |
| | | import com.java110.core.feign.FeignConfiguration; |
| | | import com.java110.config.feign.FeignConfiguration; |
| | | import com.java110.dto.advert.AdvertDto; |
| | | import org.springframework.cloud.openfeign.FeignClient; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | |
| | | package com.java110.core.smo.common; |
| | | |
| | | import com.java110.core.feign.FeignConfiguration; |
| | | import com.java110.config.feign.FeignConfiguration; |
| | | import com.java110.dto.advert.AdvertItemDto; |
| | | import org.springframework.cloud.openfeign.FeignClient; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | |
| | | package com.java110.core.smo.common; |
| | | |
| | | import com.java110.core.feign.FeignConfiguration; |
| | | import com.java110.config.feign.FeignConfiguration; |
| | | import com.java110.dto.machine.ApplicationKeyDto; |
| | | import org.springframework.cloud.openfeign.FeignClient; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | |
| | | package com.java110.core.smo.common; |
| | | |
| | | import com.java110.core.feign.FeignConfiguration; |
| | | import com.java110.config.feign.FeignConfiguration; |
| | | import com.java110.dto.area.AreaDto; |
| | | import org.springframework.cloud.openfeign.FeignClient; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | |
| | | package com.java110.core.smo.common; |
| | | |
| | | import com.java110.core.feign.FeignConfiguration; |
| | | import com.java110.config.feign.FeignConfiguration; |
| | | import com.java110.dto.auditUser.AuditUserDto; |
| | | import org.springframework.cloud.openfeign.FeignClient; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | |
| | | package com.java110.core.smo.common; |
| | | |
| | | import com.java110.core.feign.FeignConfiguration; |
| | | import com.java110.config.feign.FeignConfiguration; |
| | | import com.java110.dto.machine.CarBlackWhiteDto; |
| | | import org.springframework.cloud.openfeign.FeignClient; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | |
| | | package com.java110.core.smo.common; |
| | | |
| | | import com.java110.core.feign.FeignConfiguration; |
| | | import com.java110.config.feign.FeignConfiguration; |
| | | import com.java110.dto.machine.CarInoutDetailDto; |
| | | import org.springframework.cloud.openfeign.FeignClient; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | |
| | | package com.java110.core.smo.common; |
| | | |
| | | import com.java110.core.feign.FeignConfiguration; |
| | | import com.java110.config.feign.FeignConfiguration; |
| | | import com.java110.dto.machine.CarInoutDto; |
| | | import org.springframework.cloud.openfeign.FeignClient; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | |
| | | package com.java110.core.smo.common; |
| | | |
| | | import com.java110.core.feign.FeignConfiguration; |
| | | import com.java110.config.feign.FeignConfiguration; |
| | | import com.java110.dto.auditMessage.AuditMessageDto; |
| | | import com.java110.dto.complaint.ComplaintDto; |
| | | import com.java110.entity.audit.AuditUser; |
| | |
| | | package com.java110.core.smo.common; |
| | | |
| | | import com.java110.core.feign.FeignConfiguration; |
| | | import com.java110.config.feign.FeignConfiguration; |
| | | import com.java110.dto.file.FileDto; |
| | | import org.springframework.cloud.openfeign.FeignClient; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | |
| | | package com.java110.core.smo.common; |
| | | |
| | | import com.java110.core.feign.FeignConfiguration; |
| | | import com.java110.config.feign.FeignConfiguration; |
| | | import com.java110.dto.file.FileRelDto; |
| | | import org.springframework.cloud.openfeign.FeignClient; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | |
| | | package com.java110.core.smo.common; |
| | | |
| | | import com.java110.core.feign.FeignConfiguration; |
| | | import com.java110.config.feign.FeignConfiguration; |
| | | import com.java110.dto.machine.MachineAttrDto; |
| | | import org.springframework.cloud.openfeign.FeignClient; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | |
| | | package com.java110.core.smo.common; |
| | | |
| | | import com.java110.core.feign.FeignConfiguration; |
| | | import com.java110.config.feign.FeignConfiguration; |
| | | import com.java110.dto.machine.MachineDto; |
| | | import org.springframework.cloud.openfeign.FeignClient; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | |
| | | package com.java110.core.smo.common; |
| | | |
| | | import com.java110.core.feign.FeignConfiguration; |
| | | import com.java110.config.feign.FeignConfiguration; |
| | | import com.java110.dto.machine.MachineRecordDto; |
| | | import org.springframework.cloud.openfeign.FeignClient; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | |
| | | package com.java110.core.smo.common; |
| | | |
| | | import com.java110.core.feign.FeignConfiguration; |
| | | import com.java110.config.feign.FeignConfiguration; |
| | | import com.java110.dto.machine.MachineTranslateDto; |
| | | import org.springframework.cloud.openfeign.FeignClient; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | |
| | | package com.java110.core.smo.common; |
| | | |
| | | import com.java110.core.feign.FeignConfiguration; |
| | | import com.java110.config.feign.FeignConfiguration; |
| | | import com.java110.dto.msg.MsgDto; |
| | | import org.springframework.cloud.openfeign.FeignClient; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | |
| | | package com.java110.core.smo.common; |
| | | |
| | | import com.java110.core.feign.FeignConfiguration; |
| | | import com.java110.config.feign.FeignConfiguration; |
| | | import com.java110.dto.msg.MsgReadDto; |
| | | import org.springframework.cloud.openfeign.FeignClient; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | |
| | | package com.java110.core.smo.common; |
| | | |
| | | import com.java110.core.feign.FeignConfiguration; |
| | | import com.java110.config.feign.FeignConfiguration; |
| | | import com.java110.dto.auditMessage.AuditMessageDto; |
| | | import com.java110.dto.complaint.ComplaintDto; |
| | | import com.java110.dto.purchaseApply.PurchaseApplyDto; |
| | | import com.java110.entity.audit.AuditUser; |
| | | import org.springframework.cloud.openfeign.FeignClient; |
| | |
| | | package com.java110.core.smo.common; |
| | | |
| | | import com.java110.core.feign.FeignConfiguration; |
| | | import com.java110.config.feign.FeignConfiguration; |
| | | import com.java110.dto.purchaseApply.PurchaseApplyDto; |
| | | import com.java110.dto.resourceStore.ResourceOrderDto; |
| | | import com.java110.entity.audit.AuditUser; |
| | |
| | | package com.java110.core.smo.common; |
| | | |
| | | import com.java110.core.feign.FeignConfiguration; |
| | | import com.java110.dto.msg.MsgDto; |
| | | import com.java110.config.feign.FeignConfiguration; |
| | | import com.java110.dto.msg.SmsDto; |
| | | import org.springframework.cloud.openfeign.FeignClient; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RequestMethod; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @ClassName IMsgInnerServiceSMO |
| | |
| | | package com.java110.core.smo.common; |
| | | |
| | | import com.java110.core.feign.FeignConfiguration; |
| | | import com.java110.config.feign.FeignConfiguration; |
| | | import com.java110.dto.workflow.WorkflowAuditInfoDto; |
| | | import com.java110.dto.workflow.WorkflowDto; |
| | | import org.springframework.cloud.openfeign.FeignClient; |
| | |
| | | package com.java110.core.smo.common; |
| | | |
| | | import com.java110.core.feign.FeignConfiguration; |
| | | import com.java110.config.feign.FeignConfiguration; |
| | | import com.java110.dto.workflow.WorkflowStepDto; |
| | | import org.springframework.cloud.openfeign.FeignClient; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | |
| | | package com.java110.core.smo.common; |
| | | |
| | | import com.java110.core.feign.FeignConfiguration; |
| | | import com.java110.config.feign.FeignConfiguration; |
| | | import com.java110.dto.workflow.WorkflowStepStaffDto; |
| | | import org.springframework.cloud.openfeign.FeignClient; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | |
| | | package com.java110.core.smo.community; |
| | | |
| | | import com.java110.core.feign.FeignConfiguration; |
| | | import com.java110.config.feign.FeignConfiguration; |
| | | import com.java110.dto.Dict.DictDto; |
| | | import com.java110.dto.Dict.DictQueryDto; |
| | | import org.springframework.cloud.openfeign.FeignClient; |
| | |
| | | package com.java110.core.smo.community; |
| | | |
| | | import com.java110.core.feign.FeignConfiguration; |
| | | import com.java110.config.feign.FeignConfiguration; |
| | | import com.java110.dto.activities.ActivitiesDto; |
| | | import org.springframework.cloud.openfeign.FeignClient; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | |
| | | package com.java110.core.smo.community; |
| | | |
| | | import com.java110.core.feign.FeignConfiguration; |
| | | import com.java110.config.feign.FeignConfiguration; |
| | | import com.java110.dto.app.AppDto; |
| | | import org.springframework.cloud.openfeign.FeignClient; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | |
| | | package com.java110.core.smo.community; |
| | | |
| | | |
| | | import com.java110.core.feign.FeignConfiguration; |
| | | import com.java110.config.feign.FeignConfiguration; |
| | | import com.java110.dto.CommunityMemberDto; |
| | | import com.java110.dto.community.CommunityAttrDto; |
| | | import com.java110.dto.community.CommunityDto; |
| | |
| | | package com.java110.core.smo.community; |
| | | |
| | | import com.java110.core.feign.FeignConfiguration; |
| | | import com.java110.config.feign.FeignConfiguration; |
| | | import com.java110.dto.communityLocation.CommunityLocationDto; |
| | | import org.springframework.cloud.openfeign.FeignClient; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | |
| | | package com.java110.core.smo.community; |
| | | |
| | | import com.java110.core.feign.FeignConfiguration; |
| | | import com.java110.config.feign.FeignConfiguration; |
| | | import com.java110.dto.fastuser.FastuserDto; |
| | | import com.java110.vo.api.fastuser.ApiFastuserDataVo; |
| | | import org.springframework.cloud.openfeign.FeignClient; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | |
| | | package com.java110.core.smo.community; |
| | | |
| | | import com.java110.core.feign.FeignConfiguration; |
| | | import com.java110.config.feign.FeignConfiguration; |
| | | import com.java110.dto.FloorDto; |
| | | import com.java110.dto.UnitDto; |
| | | import org.springframework.cloud.openfeign.FeignClient; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | |
| | | package com.java110.core.smo.community; |
| | | |
| | | import com.java110.core.feign.FeignConfiguration; |
| | | import com.java110.dto.PageDto; |
| | | import com.java110.config.feign.FeignConfiguration; |
| | | import com.java110.dto.inspectionPoint.InspectionDto; |
| | | import com.java110.utils.util.BeanConvertUtil; |
| | | import org.springframework.cloud.openfeign.FeignClient; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | |
| | | package com.java110.core.smo.community; |
| | | |
| | | import com.java110.core.feign.FeignConfiguration; |
| | | import com.java110.config.feign.FeignConfiguration; |
| | | import com.java110.dto.inspectionPlan.InspectionPlanDto; |
| | | import org.springframework.cloud.openfeign.FeignClient; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | |
| | | package com.java110.core.smo.community; |
| | | |
| | | import com.java110.core.feign.FeignConfiguration; |
| | | import com.java110.config.feign.FeignConfiguration; |
| | | import com.java110.dto.inspectionPlanStaff.InspectionPlanStaffDto; |
| | | import org.springframework.cloud.openfeign.FeignClient; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | |
| | | package com.java110.core.smo.community; |
| | | |
| | | import com.java110.core.feign.FeignConfiguration; |
| | | import com.java110.config.feign.FeignConfiguration; |
| | | import com.java110.dto.inspectionRoute.InspectionRouteDto; |
| | | import org.springframework.cloud.openfeign.FeignClient; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | |
| | | package com.java110.core.smo.community; |
| | | |
| | | import com.java110.core.feign.FeignConfiguration; |
| | | import com.java110.config.feign.FeignConfiguration; |
| | | import com.java110.dto.inspectionRoute.InspectionRoutePointRelDto; |
| | | import org.springframework.cloud.openfeign.FeignClient; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | |
| | | package com.java110.core.smo.community; |
| | | |
| | | import com.java110.core.feign.FeignConfiguration; |
| | | import com.java110.config.feign.FeignConfiguration; |
| | | import com.java110.dto.inspectionTaskDetail.InspectionTaskDetailDto; |
| | | import org.springframework.cloud.openfeign.FeignClient; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | |
| | | package com.java110.core.smo.community; |
| | | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.java110.core.feign.FeignConfiguration; |
| | | import com.java110.config.feign.FeignConfiguration; |
| | | import com.java110.dto.inspectionTask.InspectionTaskDto; |
| | | import org.springframework.cloud.openfeign.FeignClient; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | |
| | | package com.java110.core.smo.community; |
| | | |
| | | import com.java110.core.feign.FeignConfiguration; |
| | | import com.java110.config.feign.FeignConfiguration; |
| | | import com.java110.dto.mapping.MappingDto; |
| | | import org.springframework.cloud.openfeign.FeignClient; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | |
| | | package com.java110.core.smo.community; |
| | | |
| | | import com.java110.core.feign.FeignConfiguration; |
| | | import com.java110.config.feign.FeignConfiguration; |
| | | import com.java110.dto.basePrivilege.BasePrivilegeDto; |
| | | import com.java110.dto.menu.MenuDto; |
| | | import com.java110.dto.menuGroup.MenuGroupDto; |
| | |
| | | package com.java110.core.smo.community; |
| | | |
| | | import com.java110.core.feign.FeignConfiguration; |
| | | import com.java110.config.feign.FeignConfiguration; |
| | | import com.java110.dto.notice.NoticeDto; |
| | | import org.springframework.cloud.openfeign.FeignClient; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | |
| | | package com.java110.core.smo.community; |
| | | |
| | | import com.java110.core.feign.FeignConfiguration; |
| | | import com.java110.config.feign.FeignConfiguration; |
| | | import com.java110.dto.parking.ParkingAreaDto; |
| | | import org.springframework.cloud.openfeign.FeignClient; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | |
| | | package com.java110.core.smo.community; |
| | | |
| | | import com.java110.core.feign.FeignConfiguration; |
| | | import com.java110.config.feign.FeignConfiguration; |
| | | import com.java110.dto.parking.ParkingSpaceDto; |
| | | import org.springframework.cloud.openfeign.FeignClient; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | |
| | | package com.java110.core.smo.community; |
| | | |
| | | import com.java110.core.feign.FeignConfiguration; |
| | | import com.java110.config.feign.FeignConfiguration; |
| | | import com.java110.dto.repair.RepairDto; |
| | | import org.springframework.cloud.openfeign.FeignClient; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | |
| | | package com.java110.core.smo.repairSetting; |
| | | |
| | | import com.java110.core.feign.FeignConfiguration; |
| | | import com.java110.config.feign.FeignConfiguration; |
| | | import com.java110.dto.repair.RepairSettingDto; |
| | | import org.springframework.cloud.openfeign.FeignClient; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | |
| | | package com.java110.core.smo.community; |
| | | |
| | | import com.java110.core.feign.FeignConfiguration; |
| | | import com.java110.config.feign.FeignConfiguration; |
| | | import com.java110.dto.repair.RepairTypeUserDto; |
| | | import org.springframework.cloud.openfeign.FeignClient; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | |
| | | package com.java110.core.smo.community; |
| | | |
| | | import com.java110.core.feign.FeignConfiguration; |
| | | import com.java110.config.feign.FeignConfiguration; |
| | | import com.java110.dto.repair.RepairUserDto; |
| | | import org.springframework.cloud.openfeign.FeignClient; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | |
| | | |
| | | package com.java110.core.smo.community; |
| | | |
| | | import com.java110.core.feign.FeignConfiguration; |
| | | import com.java110.config.feign.FeignConfiguration; |
| | | import com.java110.dto.RoomAttrDto; |
| | | import org.springframework.cloud.openfeign.FeignClient; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | |
| | | package com.java110.core.smo.community; |
| | | |
| | | import com.java110.core.feign.FeignConfiguration; |
| | | import com.java110.config.feign.FeignConfiguration; |
| | | import com.java110.dto.RoomDto; |
| | | import org.springframework.cloud.openfeign.FeignClient; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | |
| | | package com.java110.core.smo.community; |
| | | |
| | | import com.java110.core.feign.FeignConfiguration; |
| | | import com.java110.config.feign.FeignConfiguration; |
| | | import com.java110.dto.service.RouteDto; |
| | | import org.springframework.cloud.openfeign.FeignClient; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | |
| | | package com.java110.core.smo.community; |
| | | |
| | | import com.java110.core.feign.FeignConfiguration; |
| | | import com.java110.config.feign.FeignConfiguration; |
| | | import com.java110.dto.service.ServiceBusinessDto; |
| | | import org.springframework.cloud.openfeign.FeignClient; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | |
| | | package com.java110.core.smo.community; |
| | | |
| | | import com.java110.core.feign.FeignConfiguration; |
| | | import com.java110.dto.service.ServiceDto; |
| | | import com.java110.config.feign.FeignConfiguration; |
| | | import com.java110.dto.service.ServiceDto; |
| | | import com.java110.dto.service.ServiceProvideDto; |
| | | import org.springframework.cloud.openfeign.FeignClient; |
| | |
| | | package com.java110.core.smo.community; |
| | | |
| | | import com.java110.core.feign.FeignConfiguration; |
| | | import com.java110.config.feign.FeignConfiguration; |
| | | import com.java110.dto.UnitDto; |
| | | import com.java110.dto.unit.FloorAndUnitDto; |
| | | import com.java110.utils.exception.DAOException; |
| | |
| | | import org.springframework.web.bind.annotation.RequestMethod; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * @ClassName IFloorInnerServiceSMO |
| | |
| | | package com.java110.core.smo.community; |
| | | |
| | | import com.java110.core.feign.FeignConfiguration; |
| | | import com.java110.config.feign.FeignConfiguration; |
| | | import com.java110.dto.visit.VisitDto; |
| | | import org.springframework.cloud.openfeign.FeignClient; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | |
| | | package com.java110.core.smo.demo; |
| | | |
| | | import com.java110.core.feign.FeignConfiguration; |
| | | import com.java110.config.feign.FeignConfiguration; |
| | | import com.java110.dto.demo.DemoDto; |
| | | import org.springframework.cloud.openfeign.FeignClient; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | |
| | | package com.java110.core.smo.fee; |
| | | |
| | | import com.java110.core.feign.FeignConfiguration; |
| | | import com.java110.config.feign.FeignConfiguration; |
| | | import com.java110.dto.fee.FeeAttrDto; |
| | | import org.springframework.cloud.openfeign.FeignClient; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | |
| | | package com.java110.core.smo.fee; |
| | | |
| | | import com.java110.core.feign.FeignConfiguration; |
| | | import com.java110.config.feign.FeignConfiguration; |
| | | import com.java110.dto.fee.FeeConfigDto; |
| | | import org.springframework.cloud.openfeign.FeignClient; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | |
| | | package com.java110.core.smo.fee; |
| | | |
| | | import com.java110.core.feign.FeignConfiguration; |
| | | import com.java110.config.feign.FeignConfiguration; |
| | | import com.java110.dto.fee.FeeDetailDto; |
| | | import org.springframework.cloud.openfeign.FeignClient; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | |
| | | package com.java110.core.smo.fee; |
| | | |
| | | import com.java110.core.feign.FeignConfiguration; |
| | | import com.java110.config.feign.FeignConfiguration; |
| | | import com.java110.dto.fee.BillDto; |
| | | import com.java110.dto.fee.BillOweFeeDto; |
| | | import com.java110.dto.fee.FeeDto; |
| | | import com.java110.utils.util.BeanConvertUtil; |
| | | import org.springframework.cloud.openfeign.FeignClient; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | |
| | | package com.java110.core.smo.fee; |
| | | |
| | | import com.java110.core.feign.FeignConfiguration; |
| | | import com.java110.config.feign.FeignConfiguration; |
| | | import com.java110.dto.meterWater.MeterWaterDto; |
| | | import org.springframework.cloud.openfeign.FeignClient; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | |
| | | package com.java110.core.smo.fee; |
| | | |
| | | import com.java110.core.feign.FeignConfiguration; |
| | | import com.java110.config.feign.FeignConfiguration; |
| | | import com.java110.dto.returnPayFee.ReturnPayFeeDto; |
| | | import org.springframework.cloud.openfeign.FeignClient; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | |
| | | package com.java110.core.smo.job; |
| | | |
| | | import com.java110.core.feign.FeignConfiguration; |
| | | import com.java110.config.feign.FeignConfiguration; |
| | | import com.java110.dto.taskAttr.TaskAttrDto; |
| | | import org.springframework.cloud.openfeign.FeignClient; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | |
| | | package com.java110.core.smo.job; |
| | | |
| | | import com.java110.core.feign.FeignConfiguration; |
| | | import com.java110.config.feign.FeignConfiguration; |
| | | import com.java110.dto.task.TaskDto; |
| | | import com.java110.dto.task.TaskTemplateDto; |
| | | import com.java110.dto.task.TaskTemplateSpecDto; |
| | |
| | | package com.java110.core.smo.order; |
| | | |
| | | import com.java110.core.feign.FeignConfiguration; |
| | | import com.java110.config.feign.FeignConfiguration; |
| | | import com.java110.dto.corder.CorderDto; |
| | | import org.springframework.cloud.openfeign.FeignClient; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | |
| | | package com.java110.core.smo.order; |
| | | |
| | | import com.java110.core.feign.FeignConfiguration; |
| | | import com.java110.config.feign.FeignConfiguration; |
| | | import com.java110.dto.order.BusinessDto; |
| | | import com.java110.dto.order.OrderDto; |
| | | import org.springframework.cloud.openfeign.FeignClient; |
| | |
| | | package com.java110.core.smo.store; |
| | | |
| | | import com.java110.core.feign.FeignConfiguration; |
| | | import com.java110.config.feign.FeignConfiguration; |
| | | import com.java110.dto.businesstype.CbusinesstypeDto; |
| | | import org.springframework.cloud.openfeign.FeignClient; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | |
| | | package com.java110.core.smo.store; |
| | | |
| | | import com.java110.core.feign.FeignConfiguration; |
| | | import com.java110.config.feign.FeignConfiguration; |
| | | import com.java110.dto.complaint.ComplaintDto; |
| | | import org.springframework.cloud.openfeign.FeignClient; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | |
| | | package com.java110.core.smo.store; |
| | | |
| | | import com.java110.core.feign.FeignConfiguration; |
| | | import com.java110.config.feign.FeignConfiguration; |
| | | import com.java110.dto.purchaseApplyDetail.PurchaseApplyDetailDto; |
| | | import org.springframework.cloud.openfeign.FeignClient; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | |
| | | package com.java110.core.smo.store; |
| | | |
| | | import com.java110.core.feign.FeignConfiguration; |
| | | import com.java110.dto.complaint.ComplaintDto; |
| | | import com.java110.config.feign.FeignConfiguration; |
| | | import com.java110.dto.purchaseApply.PurchaseApplyDetailDto; |
| | | import com.java110.dto.purchaseApply.PurchaseApplyDto; |
| | | import org.springframework.cloud.openfeign.FeignClient; |
| | |
| | | package com.java110.core.smo.store; |
| | | |
| | | import com.java110.core.feign.FeignConfiguration; |
| | | import com.java110.config.feign.FeignConfiguration; |
| | | import com.java110.dto.resourceStore.ResourceStoreDto; |
| | | import org.springframework.cloud.openfeign.FeignClient; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | |
| | | package com.java110.core.smo.store; |
| | | |
| | | import com.java110.core.feign.FeignConfiguration; |
| | | import com.java110.config.feign.FeignConfiguration; |
| | | import com.java110.dto.smallWeChat.SmallWeChatDto; |
| | | import org.springframework.cloud.openfeign.FeignClient; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | |
| | | package com.java110.core.smo.store; |
| | | |
| | | import com.java110.core.feign.FeignConfiguration; |
| | | import com.java110.config.feign.FeignConfiguration; |
| | | import com.java110.dto.smallWechatAttr.SmallWechatAttrDto; |
| | | import org.springframework.cloud.openfeign.FeignClient; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | |
| | | package com.java110.core.smo.store; |
| | | |
| | | import com.java110.core.feign.FeignConfiguration; |
| | | import com.java110.config.feign.FeignConfiguration; |
| | | import com.java110.dto.store.StoreAttrDto; |
| | | import org.springframework.cloud.openfeign.FeignClient; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | |
| | | package com.java110.core.smo.store; |
| | | |
| | | import com.java110.core.feign.FeignConfiguration; |
| | | import com.java110.config.feign.FeignConfiguration; |
| | | import com.java110.dto.store.StoreAttrDto; |
| | | import com.java110.dto.store.StoreDto; |
| | | import org.springframework.cloud.openfeign.FeignClient; |
| | |
| | | package com.java110.core.smo.store; |
| | | |
| | | import com.java110.core.feign.FeignConfiguration; |
| | | import com.java110.config.feign.FeignConfiguration; |
| | | import com.java110.dto.wechatMenu.WechatMenuDto; |
| | | import org.springframework.cloud.openfeign.FeignClient; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | |
| | | package com.java110.core.smo.user; |
| | | |
| | | import com.java110.core.feign.FeignConfiguration; |
| | | import com.java110.config.feign.FeignConfiguration; |
| | | import com.java110.dto.junkRequirement.JunkRequirementDto; |
| | | import org.springframework.cloud.openfeign.FeignClient; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | |
| | | package com.java110.core.smo.user; |
| | | |
| | | import com.java110.core.feign.FeignConfiguration; |
| | | import com.java110.config.feign.FeignConfiguration; |
| | | import com.java110.dto.org.OrgCommunityDto; |
| | | import org.springframework.cloud.openfeign.FeignClient; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | |
| | | package com.java110.core.smo.user; |
| | | |
| | | import com.java110.core.feign.FeignConfiguration; |
| | | import com.java110.config.feign.FeignConfiguration; |
| | | import com.java110.dto.org.OrgDto; |
| | | import org.springframework.cloud.openfeign.FeignClient; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | |
| | | package com.java110.core.smo.user; |
| | | |
| | | import com.java110.core.feign.FeignConfiguration; |
| | | import com.java110.config.feign.FeignConfiguration; |
| | | import com.java110.dto.org.OrgStaffRelDto; |
| | | import org.springframework.cloud.openfeign.FeignClient; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | |
| | | package com.java110.core.smo.user; |
| | | |
| | | import com.java110.core.feign.FeignConfiguration; |
| | | import com.java110.config.feign.FeignConfiguration; |
| | | import com.java110.dto.owner.OwnerAppUserDto; |
| | | import org.springframework.cloud.openfeign.FeignClient; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | |
| | | package com.java110.core.smo.user; |
| | | |
| | | import com.java110.core.feign.FeignConfiguration; |
| | | import com.java110.config.feign.FeignConfiguration; |
| | | import com.java110.dto.owner.OwnerCarDto; |
| | | import org.springframework.cloud.openfeign.FeignClient; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | |
| | | package com.java110.core.smo.user; |
| | | |
| | | import com.java110.core.feign.FeignConfiguration; |
| | | import com.java110.config.feign.FeignConfiguration; |
| | | import com.java110.dto.owner.OwnerDto; |
| | | import org.springframework.cloud.openfeign.FeignClient; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | |
| | | package com.java110.core.smo.user; |
| | | |
| | | import com.java110.core.feign.FeignConfiguration; |
| | | import com.java110.config.feign.FeignConfiguration; |
| | | import com.java110.dto.owner.OwnerRoomRelDto; |
| | | import org.springframework.cloud.openfeign.FeignClient; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | |
| | | package com.java110.core.smo.user; |
| | | |
| | | import com.java110.core.feign.FeignConfiguration; |
| | | import com.java110.config.feign.FeignConfiguration; |
| | | import com.java110.dto.user.UserAttrDto; |
| | | import org.springframework.cloud.openfeign.FeignClient; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | |
| | | package com.java110.core.smo.user; |
| | | |
| | | import com.java110.core.feign.FeignConfiguration; |
| | | import com.java110.config.feign.FeignConfiguration; |
| | | import com.java110.dto.user.UserAttrDto; |
| | | import com.java110.dto.user.UserDto; |
| | | import org.springframework.cloud.openfeign.FeignClient; |
| | |
| | | <name>java110-db</name> |
| | | <!-- FIXME change it to the project's website --> |
| | | <url>http://www.example.com</url> |
| | | <build> |
| | | <plugins> |
| | | <plugin> |
| | | <groupId>org.apache.maven.plugins</groupId> |
| | | <artifactId>maven-compiler-plugin</artifactId> |
| | | <configuration> |
| | | <source>8</source> |
| | | <target>8</target> |
| | | </configuration> |
| | | </plugin> |
| | | </plugins> |
| | | </build> |
| | | |
| | | <properties> |
| | | <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> |
| | |
| | | </dependency> |
| | | <dependency> |
| | | <groupId>com.java110</groupId> |
| | | <artifactId>java110-config</artifactId> |
| | | <artifactId>java110-interface</artifactId> |
| | | </dependency> |
| | | |
| | | </dependencies> |
| New file |
| | |
| | | package com.java110.db; |
| | | |
| | | import org.apache.commons.collections4.CollectionUtils; |
| | | import org.apache.ibatis.executor.statement.StatementHandler; |
| | | import org.apache.ibatis.mapping.MappedStatement; |
| | | import org.apache.ibatis.plugin.*; |
| | | import org.apache.ibatis.reflection.MetaObject; |
| | | import org.apache.ibatis.reflection.SystemMetaObject; |
| | | import org.slf4j.Logger; |
| | | import org.slf4j.LoggerFactory; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | import java.beans.Statement; |
| | | import java.lang.reflect.Proxy; |
| | | import java.util.*; |
| | | |
| | | @Intercepts({ |
| | | @Signature(type = StatementHandler.class, method = "update", args = {Statement.class}), |
| | | @Signature(type = StatementHandler.class, method = "query", args = {Statement.class}), |
| | | @Signature(type = StatementHandler.class, method = "batch", args = {Statement.class}) |
| | | }) |
| | | |
| | | public class Java110MybatisInterceptor implements Interceptor { |
| | | private static Logger logger = LoggerFactory.getLogger(Java110MybatisInterceptor.class); |
| | | |
| | | @Override |
| | | public Object intercept(Invocation invocation) throws Throwable { |
| | | Statement statement; |
| | | //获取方法参数 |
| | | Object firstArg = invocation.getArgs()[0]; |
| | | if (Proxy.isProxyClass(firstArg.getClass())) { |
| | | statement = (Statement) SystemMetaObject.forObject(firstArg).getValue("h.statement"); |
| | | } else { |
| | | statement = (Statement) firstArg; |
| | | } |
| | | MetaObject stmtMetaObj = SystemMetaObject.forObject(statement); |
| | | //获取Statement对象(sql语法已经构建完毕) |
| | | statement = (Statement) stmtMetaObj.getValue("stmt.statement"); |
| | | //获取sql语句 |
| | | String originalSql = statement.toString(); |
| | | |
| | | //将原始sql中的空白字符(\s包括换行符,制表符,空格符)替换为" " |
| | | originalSql = originalSql.replaceAll("[\\s]+", " "); |
| | | |
| | | //只获取sql的select/update/insert/delete开头的sql |
| | | int index = indexOfSqlStart(originalSql); |
| | | if (index > 0) { |
| | | originalSql = originalSql.substring(index); |
| | | } |
| | | |
| | | // 计算执行 SQL 耗时 |
| | | long start = System.currentTimeMillis(); |
| | | Object result = invocation.proceed(); |
| | | long timing = System.currentTimeMillis() - start; |
| | | |
| | | //获取MapperStatement对象,获取到sql的详细信息 |
| | | Object realTarget = realTarget(invocation.getTarget()); |
| | | //获取metaObject对象 |
| | | MetaObject metaObject = SystemMetaObject.forObject(realTarget); |
| | | //获取MappedStatement对象 |
| | | MappedStatement ms = (MappedStatement) metaObject.getValue("delegate.mappedStatement"); |
| | | StringBuilder formatSql = new StringBuilder() |
| | | .append(" Time:").append(timing) |
| | | //获取Mapper信息和方法信息 |
| | | .append(" ms - ID:").append(ms.getId()) |
| | | .append("Execute SQL:") |
| | | .append(originalSql); |
| | | //打印sql信息 |
| | | logger.debug(formatSql.toString()); |
| | | return result; |
| | | } |
| | | |
| | | @Override |
| | | public Object plugin(Object target) { |
| | | if (target instanceof StatementHandler) { |
| | | |
| | | return Plugin.wrap(target, this); |
| | | } |
| | | return target; |
| | | } |
| | | |
| | | @Override |
| | | public void setProperties(Properties properties) { |
| | | |
| | | } |
| | | |
| | | /** |
| | | * 获取sql语句开头部分 |
| | | * |
| | | * @param sql |
| | | * @return |
| | | */ |
| | | private int indexOfSqlStart(String sql) { |
| | | String upperCaseSql = sql.toUpperCase(); |
| | | Set<Integer> set = new HashSet<>(); |
| | | set.add(upperCaseSql.indexOf("SELECT ")); |
| | | set.add(upperCaseSql.indexOf("UPDATE ")); |
| | | set.add(upperCaseSql.indexOf("INSERT ")); |
| | | set.add(upperCaseSql.indexOf("DELETE ")); |
| | | set.remove(-1); |
| | | if (CollectionUtils.isEmpty(set)) { |
| | | return -1; |
| | | } |
| | | List<Integer> list = new ArrayList<>(set); |
| | | list.sort(Comparator.naturalOrder()); |
| | | return list.get(0); |
| | | } |
| | | |
| | | /** |
| | | * <p> |
| | | * 获得真正的处理对象,可能多层代理. |
| | | * </p> |
| | | */ |
| | | @SuppressWarnings("unchecked") |
| | | public static <T> T realTarget(Object target) { |
| | | if (Proxy.isProxyClass(target.getClass())) { |
| | | MetaObject metaObject = SystemMetaObject.forObject(target); |
| | | return realTarget(metaObject.getValue("h.target")); |
| | | } |
| | | return (T) target; |
| | | } |
| | | } |
| | |
| | | package com.java110.db; |
| | | |
| | | import com.java110.config.properties.code.Java110Properties; |
| | | import org.apache.ibatis.plugin.Interceptor; |
| | | import org.apache.ibatis.session.SqlSessionFactory; |
| | | import org.mybatis.spring.SqlSessionFactoryBean; |
| | | import org.mybatis.spring.SqlSessionTemplate; |
| | |
| | | SqlSessionFactoryBean bean = new SqlSessionFactoryBean(); |
| | | bean.setDataSource(dataSource); |
| | | bean.setTypeAliasesPackage("tk.mybatis.springboot.model"); |
| | | bean.setPlugins(new Interceptor[]{new Java110MybatisInterceptor()}); |
| | | |
| | | //添加XML目录 |
| | | ResourcePatternResolver resolver = new PathMatchingResourcePatternResolver(); |
| | | try { |
| | | // bean.setMapperLocations(resolver.getResources("classpath:mapper/*/*.xml")); |
| | | // bean.setMapperLocations(resolver.getResources("classpath:mapper/*/*.xml")); |
| | | Resource[] resources = null; |
| | | List<Resource> resourceList = new ArrayList<Resource>(); |
| | | for(String path : java110Properties.getMappingPath().split(",")) { |
| | | for (String path : java110Properties.getMappingPath().split(",")) { |
| | | resources = resolver.getResources(path); |
| | | resourceList.addAll(Arrays.asList(resources)); |
| | | } |
| | |
| | | return new DataSourceTransactionManager(dataSource); |
| | | } |
| | | |
| | | |
| | | public Java110Properties getJava110Properties() { |
| | | return java110Properties; |
| | | } |
| | |
| | | </if> |
| | | </select> |
| | | |
| | | |
| | | <!--保存订单信息 c_orders 中 --> |
| | | <insert id="saveOrder" parameterType="Map"> |
| | | <![CDATA[ |
| | |
| | | <!-- 保存属性信息c_orders_attrs 中--> |
| | | <insert id="saveOrderAttrs" parameterType="Map"> |
| | | <![CDATA[ |
| | | |
| | | insert into c_orders_attrs(o_id,attr_id,spec_cd,value) |
| | | values(#{oId},#{attrId},#{specCd},#{value}) |
| | | |
| | | insert into c_orders_attrs(o_id,attr_id,spec_cd,value) |
| | | values(#{oId},#{attrId},#{specCd},#{value}) |
| | | ]]> |
| | | </insert> |
| | | |
| | | <!--保存订单信息 c_order_item 中 --> |
| | | <insert id="saveOrderItem" parameterType="Map"> |
| | | INSERT INTO `c_order_item` (`b_id`, `o_id`, `action`, `action_obj`, `finish_time`, `remark`) |
| | | VALUES (#{bId}, #{oId}, #{action}, #{actionObj}, #{finishTime}, #{remark}) |
| | | </insert> |
| | | |
| | | <!--保存订单信息 unitem_log 中 --> |
| | | <insert id="saveUnItemLog" parameterType="Map"> |
| | | INSERT INTO `unitem_log` (`b_id`, `o_id`, `service_name`, `log_text`) |
| | | VALUES (#{bId}, #{oId}, #{serviceName}, #{logText}) |
| | | </insert> |
| | | |
| | | <!-- 保存订单项信息 c_business --> |
| | | <insert id="saveBusiness" parameterType="Map"> |
| | | <![CDATA[ |
| New file |
| | |
| | | <?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="appraiseServiceDaoImpl"> |
| | | |
| | | <!-- 保存评价信息 add by wuxw 2018-07-03 --> |
| | | <insert id="saveAppraise" parameterType="Map"> |
| | | INSERT INTO appraise (`appraise_id`, `appraise_score`, `appraise_type`, `context`, `parent_appraise_id`, |
| | | `appraise_user_id`, `appraise_user_name`, `obj_type`, `obj_id`) |
| | | VALUES (#{appraiseId}, #{appraiseScore}, #{appraiseType}, #{context}, #{parentAppraiseId}, #{appraiseUserId}, |
| | | #{appraiseUserName}, |
| | | #{objType}, #{objId}); |
| | | </insert> |
| | | |
| | | </mapper> |
| | |
| | | </dependency> |
| | | <dependency> |
| | | <groupId>com.java110</groupId> |
| | | <artifactId>java110-config</artifactId> |
| | | <artifactId>java110-interface</artifactId> |
| | | <scope>provided</scope> |
| | | </dependency> |
| | | |
| | |
| | | package com.java110.core.smo.store; |
| | | |
| | | import com.java110.core.feign.FeignConfiguration; |
| | | import com.java110.config.feign.FeignConfiguration; |
| | | import com.java110.dto.store.StoreDto; |
| | | import org.springframework.cloud.openfeign.FeignClient; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| File was renamed from java110-config/pom.xml |
| | |
| | | </parent> |
| | | <modelVersion>4.0.0</modelVersion> |
| | | |
| | | <artifactId>java110-config</artifactId> |
| | | <artifactId>java110-interface</artifactId> |
| | | <packaging>jar</packaging> |
| | | |
| | | <name>java110-config</name> |
| | | <name>java110-interface</name> |
| | | <url>http://maven.apache.org</url> |
| | | |
| | | <properties> |
| | |
| | | <version>3.8.1</version> |
| | | <scope>test</scope> |
| | | </dependency> |
| | | <dependency> |
| | | <groupId>com.java110</groupId> |
| | | <artifactId>java110-bean</artifactId> |
| | | <scope>provided</scope> |
| | | </dependency> |
| | | <dependency> |
| | | <groupId>org.springframework.cloud</groupId> |
| | | <artifactId>spring-cloud-starter-openfeign</artifactId> |
| | | <scope>provided</scope> |
| | | </dependency> |
| | | </dependencies> |
| | | </project> |
| File was renamed from java110-core/src/main/java/com/java110/core/feign/FeignConfiguration.java |
| | |
| | | package com.java110.core.feign; |
| | | package com.java110.config.feign; |
| | | |
| | | import feign.Logger; |
| | | import feign.codec.ErrorDecoder; |
| File was renamed from java110-core/src/main/java/com/java110/core/feign/UserErrorDecoder.java |
| | |
| | | package com.java110.core.feign; |
| | | package com.java110.config.feign; |
| | | |
| | | |
| | | import com.netflix.hystrix.exception.HystrixBadRequestException; |
| New file |
| | |
| | | package com.java110.intf.common; |
| | | |
| | | import com.java110.config.feign.FeignConfiguration; |
| | | import com.java110.dto.advert.AdvertDto; |
| | | import org.springframework.cloud.openfeign.FeignClient; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RequestMethod; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @ClassName IAdvertInnerServiceSMO |
| | | * @Description 广告信息接口类 |
| | | * @Author wuxw |
| | | * @Date 2019/4/24 9:04 |
| | | * @Version 1.0 |
| | | * add by wuxw 2019/4/24 |
| | | **/ |
| | | @FeignClient(name = "common-service", configuration = {FeignConfiguration.class}) |
| | | @RequestMapping("/advertApi") |
| | | public interface IAdvertInnerServiceSMO { |
| | | |
| | | /** |
| | | * <p>查询小区楼信息</p> |
| | | * |
| | | * @param advertDto 数据对象分享 |
| | | * @return AdvertDto 对象数据 |
| | | */ |
| | | @RequestMapping(value = "/queryAdverts", method = RequestMethod.POST) |
| | | List<AdvertDto> queryAdverts(@RequestBody AdvertDto advertDto); |
| | | |
| | | /** |
| | | * 查询<p>小区楼</p>总记录数 |
| | | * |
| | | * @param advertDto 数据对象分享 |
| | | * @return 小区下的小区楼记录数 |
| | | */ |
| | | @RequestMapping(value = "/queryAdvertsCount", method = RequestMethod.POST) |
| | | int queryAdvertsCount(@RequestBody AdvertDto advertDto); |
| | | } |
| New file |
| | |
| | | package com.java110.intf.common.appraise; |
| | | |
| | | import com.java110.config.feign.FeignConfiguration; |
| | | import com.java110.dto.appraise.AppraiseDto; |
| | | import org.springframework.cloud.openfeign.FeignClient; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RequestMethod; |
| | | |
| | | /** |
| | | * 保存评价接口类 |
| | | */ |
| | | @FeignClient(name = "common-service", configuration = {FeignConfiguration.class}) |
| | | @RequestMapping("/appraise") |
| | | public interface ISaveAppraiseService { |
| | | |
| | | /** |
| | | * 保存接口评价 |
| | | * @param appraiseDto |
| | | * @return |
| | | */ |
| | | @RequestMapping(value = "/saveAppraise", method = RequestMethod.POST) |
| | | public AppraiseDto saveAppraise(@RequestBody AppraiseDto appraiseDto); |
| | | } |
| | |
| | | |
| | | <dependency> |
| | | <groupId>com.java110</groupId> |
| | | <artifactId>java110-config</artifactId> |
| | | <artifactId>java110-interface</artifactId> |
| | | </dependency> |
| | | |
| | | <dependency> |
| | |
| | | |
| | | <dependency> |
| | | <groupId>com.java110</groupId> |
| | | <artifactId>java110-config</artifactId> |
| | | <artifactId>java110-interface</artifactId> |
| | | </dependency> |
| | | <!-- |
| | | <dependency> |
| | |
| | | |
| | | public final static String HTTP_SERVICE_API = "API"; |
| | | public final static String HTTP_SERVICE = "SERVICE"; |
| | | public final static String HTTP_SUB_SERVICE = "SUB_SERVICE"; //微服务 |
| | | public final static String HTTP_ACTION = "ACTION"; |
| | | public final static String HTTP_RESOURCE = "RESOURCE"; |
| | | public final static String HTTP_METHOD = "METHOD"; |
| | | public final static String HTTP_APP_ID = "app_id"; |
| | | public final static String HTTP_TRANSACTION_ID = "transaction_id"; |
| | |
| | | public static final String SERVICE_CODE_DO_SERVICE_TRANSFER = "do.service.transfer"; |
| | | |
| | | /** |
| | | * 透传服务 |
| | | */ |
| | | public static final String SERVICE_CODE_SYSTEM_TRANSFER = "system.transfer"; |
| | | |
| | | /** |
| | | * 订单类服务处理 |
| | | */ |
| | | public static final String SERVICE_CODE_DO_SERVICE_ORDER = "do.service.order"; |
| | |
| | | hasLength(info.get(key) == null ? "" : info.get(key).toString(), message); |
| | | } |
| | | |
| | | /** |
| | | * 判断 jsonObject 是否为空 |
| | | * |
| | | * @param info |
| | | * @param key |
| | | * @param message |
| | | */ |
| | | public static void hasKeyAndValue(Object info, String key, String message) { |
| | | hasKeyAndValue(BeanConvertUtil.beanCovertMap(info), key, message); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 判断json是否为空 |
| | |
| | | <version>1.0-SNAPSHOT</version> |
| | | <modules> |
| | | <module>java110-bean</module> |
| | | <module>java110-config</module> |
| | | <module>java110-interface</module> |
| | | <module>java110-utils</module> |
| | | <module>java110-core</module> |
| | | <module>java110-service</module> |
| | |
| | | <module>service-store</module> |
| | | <module>service-rule</module> |
| | | <module>service-order</module> |
| | | <module>service-comment</module> |
| | | <module>service-api</module> |
| | | <module>service-community</module> |
| | | <module>service-job</module> |
| | |
| | | </dependency> |
| | | <dependency> |
| | | <groupId>com.java110</groupId> |
| | | <artifactId>java110-config</artifactId> |
| | | <artifactId>java110-interface</artifactId> |
| | | <version>${microcommunity.version}</version> |
| | | </dependency> |
| | | |
| | |
| | | |
| | | <dependency> |
| | | <groupId>com.java110</groupId> |
| | | <artifactId>java110-config</artifactId> |
| | | <artifactId>java110-interface</artifactId> |
| | | <scope>provided</scope> |
| | | </dependency> |
| | | |
| | |
| | | <artifactItems> |
| | | <artifactItem> |
| | | <groupId>com.java110</groupId> |
| | | <artifactId>java110-config</artifactId> |
| | | <artifactId>java110-interface</artifactId> |
| | | <version>${microcommunity.version}</version> |
| | | <type>jar</type> |
| | | <overWrite>true</overWrite> |
| New file |
| | |
| | | package com.java110.api.listener.system; |
| | | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.aliyuncs.utils.StringUtils; |
| | | import com.java110.api.listener.AbstractServiceApiListener; |
| | | import com.java110.core.annotation.Java110Listener; |
| | | import com.java110.core.context.DataFlowContext; |
| | | import com.java110.core.event.service.api.ServiceDataFlowEvent; |
| | | import com.java110.entity.center.AppService; |
| | | import com.java110.utils.constant.CommonConstant; |
| | | import com.java110.utils.constant.ServiceCodeConstant; |
| | | import com.java110.utils.util.StringUtil; |
| | | import com.java110.vo.ResultVo; |
| | | import org.slf4j.Logger; |
| | | import org.slf4j.LoggerFactory; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.http.*; |
| | | import org.springframework.web.client.HttpStatusCodeException; |
| | | import org.springframework.web.client.RestTemplate; |
| | | |
| | | import java.util.Map; |
| | | |
| | | @Java110Listener("transferListener") |
| | | public class TransferListener extends AbstractServiceApiListener { |
| | | private final static Logger logger = LoggerFactory.getLogger(TransferListener.class); |
| | | |
| | | |
| | | @Autowired |
| | | private RestTemplate restTemplate; |
| | | |
| | | @Override |
| | | protected void validate(ServiceDataFlowEvent event, JSONObject reqJson) { |
| | | |
| | | } |
| | | |
| | | @Override |
| | | protected void doSoService(ServiceDataFlowEvent event, DataFlowContext context, JSONObject reqJson) { |
| | | |
| | | AppService service = event.getAppService(); |
| | | Map<String, String> reqHeader = context.getRequestCurrentHeaders(); |
| | | HttpHeaders header = new HttpHeaders(); |
| | | for (String key : context.getRequestCurrentHeaders().keySet()) { |
| | | header.add(key, reqHeader.get(key)); |
| | | } |
| | | HttpEntity<String> httpEntity = new HttpEntity<String>(reqJson.toJSONString(), header); |
| | | String orgRequestUrl = context.getRequestHeaders().get("REQUEST_URL"); |
| | | |
| | | |
| | | String requestUrl = service.getUrl() + "/" + reqHeader.get(CommonConstant.HTTP_RESOURCE) + "/" + reqHeader.get(CommonConstant.HTTP_ACTION); |
| | | |
| | | ResponseEntity responseEntity = null; |
| | | if (!StringUtil.isNullOrNone(orgRequestUrl)) { |
| | | String param = orgRequestUrl.contains("?") ? orgRequestUrl.substring(requestUrl.indexOf("?") + 1, orgRequestUrl.length()) : ""; |
| | | requestUrl += ("?" + param); |
| | | } |
| | | try { |
| | | if (CommonConstant.HTTP_METHOD_GET.equals(service.getMethod())) { |
| | | responseEntity = restTemplate.exchange(requestUrl, HttpMethod.GET, httpEntity, String.class); |
| | | } else if (CommonConstant.HTTP_METHOD_PUT.equals(service.getMethod())) { |
| | | responseEntity = restTemplate.exchange(service.getUrl(), HttpMethod.PUT, httpEntity, String.class); |
| | | } else if (CommonConstant.HTTP_METHOD_DELETE.equals(service.getMethod())) { |
| | | responseEntity = restTemplate.exchange(requestUrl, HttpMethod.DELETE, httpEntity, String.class); |
| | | } else { |
| | | responseEntity = restTemplate.exchange(service.getUrl(), HttpMethod.POST, httpEntity, String.class); |
| | | } |
| | | } catch (HttpStatusCodeException e) { //这里spring 框架 在4XX 或 5XX 时抛出 HttpServerErrorException 异常,需要重新封装一下 |
| | | responseEntity = new ResponseEntity<String>(e.getResponseBodyAsString(), e.getStatusCode()); |
| | | } |
| | | |
| | | logger.debug("API 服务调用下游服务请求:{},返回为:{}", httpEntity, responseEntity); |
| | | |
| | | if (responseEntity.getStatusCode() != HttpStatus.OK) { |
| | | responseEntity = ResultVo.createResponseEntity(ResultVo.CODE_ERROR, String.valueOf(responseEntity.getBody())); |
| | | context.setResponseEntity(responseEntity); |
| | | |
| | | return; |
| | | } |
| | | if (StringUtils.isEmpty(responseEntity.getBody() + "")) { |
| | | responseEntity = ResultVo.createResponseEntity(ResultVo.CODE_ERROR, "处理失败"); |
| | | context.setResponseEntity(responseEntity); |
| | | return; |
| | | } |
| | | JSONObject resParam = JSONObject.parseObject(responseEntity.getBody() + ""); |
| | | if (resParam.containsKey("code") && resParam.containsKey("msg")) { // 说明微服务返回的是 resultVo 对象直接返回就可以 |
| | | context.setResponseEntity(responseEntity); |
| | | return; |
| | | } |
| | | responseEntity = ResultVo.createResponseEntity(resParam); |
| | | context.setResponseEntity(responseEntity); |
| | | |
| | | } |
| | | |
| | | @Override |
| | | public String getServiceCode() { |
| | | return ServiceCodeConstant.SERVICE_CODE_SYSTEM_TRANSFER; |
| | | } |
| | | |
| | | @Override |
| | | public HttpMethod getHttpMethod() { |
| | | return null; |
| | | } |
| | | } |
| | |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.http.HttpStatus; |
| | | import org.springframework.http.ResponseEntity; |
| | | import org.springframework.web.bind.annotation.PathVariable; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RequestMethod; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import java.util.HashMap; |
| | |
| | | * @param request 请求对象 查询头信息 url等信息 |
| | | * @return http status 200 成功 其他失败 |
| | | */ |
| | | |
| | | @RequestMapping(path = "/{service:.+}", method = RequestMethod.POST) |
| | | @ApiOperation(value = "资源post请求", notes = "test: 返回 2XX 表示服务正常") |
| | | @ApiImplicitParam(paramType = "query", name = "service", value = "用户编号", required = true, dataType = "String") |
| | |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 资源请求 post方式 |
| | | * |
| | | * @param resource 请求接口方式 |
| | | * @param postInfo post内容 |
| | | * @param request 请求对象 查询头信息 url等信息 |
| | | * @return http status 200 成功 其他失败 |
| | | */ |
| | | @RequestMapping(path = "/{resource}/{action}", method = RequestMethod.POST) |
| | | @ApiOperation(value = "资源post请求", notes = "test: 返回 2XX 表示服务正常") |
| | | @ApiImplicitParam(paramType = "query", name = "subServicePost", value = "用户编号", required = true, dataType = "String") |
| | | public ResponseEntity<String> subServicePost( |
| | | @PathVariable String resource, |
| | | @PathVariable String action, |
| | | @RequestBody String postInfo, |
| | | HttpServletRequest request) { |
| | | ResponseEntity<String> responseEntity = null; |
| | | Map<String, String> headers = new HashMap<String, String>(); |
| | | try { |
| | | this.getRequestInfo(request, headers); |
| | | headers.put(CommonConstant.HTTP_SERVICE, "/" + resource + "/" + action); |
| | | headers.put(CommonConstant.HTTP_RESOURCE, resource); |
| | | headers.put(CommonConstant.HTTP_ACTION, action); |
| | | headers.put(CommonConstant.HTTP_METHOD, CommonConstant.HTTP_METHOD_POST); |
| | | logger.debug("api:{} 请求报文为:{},header信息为:{}", action, postInfo, headers); |
| | | responseEntity = apiServiceSMOImpl.service(postInfo, headers); |
| | | } catch (Throwable e) { |
| | | logger.error("请求post 方法[" + action + "]失败:" + postInfo, e); |
| | | responseEntity = new ResponseEntity<String>("请求发生异常," + e.getMessage(), HttpStatus.INTERNAL_SERVER_ERROR); |
| | | } |
| | | logger.debug("api:{} 返回信息为:{}", action, responseEntity); |
| | | if (responseEntity.getStatusCode() == HttpStatus.OK) { |
| | | return responseEntity; |
| | | } |
| | | //当 接口版本号为2.0时 返回错误处理 |
| | | if (headers.containsKey(VERSION) && VERSION_2.equals(headers.get(VERSION))) { |
| | | return ResultVo.createResponseEntity(ResultVo.CODE_ERROR, responseEntity.getBody()); |
| | | } |
| | | return responseEntity; |
| | | } |
| | | |
| | | /** |
| | | * 资源请求 get方式 |
| | | * |
| | | * @param request 请求对象 查询头信息 url等信息 |
| | | * @return http status 200 成功 其他失败 |
| | | */ |
| | | |
| | | @RequestMapping(path = "/{resource}/{action}", method = RequestMethod.GET) |
| | | @ApiOperation(value = "资源get请求", notes = "test: 返回 2XX 表示服务正常") |
| | | @ApiImplicitParam(paramType = "query", name = "subServiceGet", value = "用户编号", required = true, dataType = "String") |
| | | public ResponseEntity<String> subServiceGet( |
| | | @PathVariable String resource, |
| | | @PathVariable String action, |
| | | HttpServletRequest request) { |
| | | ResponseEntity<String> responseEntity = null; |
| | | Map<String, String> headers = new HashMap<String, String>(); |
| | | try { |
| | | this.getRequestInfo(request, headers); |
| | | headers.put(CommonConstant.HTTP_SERVICE, "/" + resource + "/" + action); |
| | | headers.put(CommonConstant.HTTP_RESOURCE, resource); |
| | | headers.put(CommonConstant.HTTP_ACTION, action); |
| | | headers.put(CommonConstant.HTTP_METHOD, CommonConstant.HTTP_METHOD_GET); |
| | | logger.debug("api:{} 请求报文为:{},header信息为:{}", "", headers); |
| | | responseEntity = apiServiceSMOImpl.service(JSONObject.toJSONString(getParameterStringMap(request)), headers); |
| | | } catch (Throwable e) { |
| | | logger.error("请求get 方法[" + action + "]失败:", e); |
| | | responseEntity = new ResponseEntity<String>("请求发生异常," + e.getMessage(), HttpStatus.INTERNAL_SERVER_ERROR); |
| | | } |
| | | logger.debug("api:{} 返回信息为:{}", action, responseEntity); |
| | | |
| | | if (responseEntity.getStatusCode() == HttpStatus.OK) { |
| | | return responseEntity; |
| | | } |
| | | //当 接口版本号为2.0时 返回错误处理 |
| | | if (headers.containsKey(VERSION) && VERSION_2.equals(headers.get(VERSION))) { |
| | | return ResultVo.createResponseEntity(ResultVo.CODE_ERROR, responseEntity.getBody()); |
| | | } |
| | | |
| | | return responseEntity; |
| | | } |
| | | |
| | | |
| | | public IApiServiceSMO getApiServiceSMOImpl() { |
| | | return apiServiceSMOImpl; |
| | | } |
| | |
| | | import com.alibaba.fastjson.JSONArray; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.java110.api.smo.IApiServiceSMO; |
| | | import com.java110.utils.cache.AppRouteCache; |
| | | import com.java110.utils.cache.MappingCache; |
| | | import com.java110.utils.constant.CommonConstant; |
| | | import com.java110.utils.constant.KafkaConstant; |
| | | import com.java110.utils.constant.MappingConstant; |
| | | import com.java110.utils.constant.ResponseConstant; |
| | | import com.java110.utils.constant.ServiceCodeConstant; |
| | | import com.java110.utils.exception.BusinessException; |
| | | import com.java110.utils.exception.DecryptException; |
| | | import com.java110.utils.exception.InitConfigDataException; |
| | | import com.java110.utils.exception.ListenerExecuteException; |
| | | import com.java110.utils.exception.NoAuthorityException; |
| | | import com.java110.utils.exception.SMOException; |
| | | import com.java110.utils.kafka.KafkaFactory; |
| | | import com.java110.utils.log.LoggerEngine; |
| | | import com.java110.utils.util.DateUtil; |
| | | import com.java110.utils.util.StringUtil; |
| | | import com.java110.core.client.RestTemplate; |
| | | import com.java110.core.context.ApiDataFlow; |
| | | import com.java110.core.context.DataFlow; |
| | | import com.java110.core.event.service.api.ServiceDataFlowEventPublishing; |
| | | import com.java110.core.factory.AuthenticationFactory; |
| | | import com.java110.core.factory.DataFlowFactory; |
| | | import com.java110.core.factory.GenerateCodeFactory; |
| | | import com.java110.entity.center.AppRoute; |
| | | import com.java110.entity.center.AppService; |
| | | import com.java110.entity.center.DataFlowLinksCost; |
| | | import com.java110.core.event.service.api.ServiceDataFlowEventPublishing; |
| | | import com.java110.utils.cache.AppRouteCache; |
| | | import com.java110.utils.cache.MappingCache; |
| | | import com.java110.utils.constant.*; |
| | | import com.java110.utils.exception.*; |
| | | import com.java110.utils.kafka.KafkaFactory; |
| | | import com.java110.utils.log.LoggerEngine; |
| | | import com.java110.utils.util.DateUtil; |
| | | import com.java110.utils.util.StringUtil; |
| | | import org.apache.commons.lang3.math.NumberUtils; |
| | | import org.slf4j.Logger; |
| | | import org.slf4j.LoggerFactory; |
| | |
| | | if (!StringUtil.isNullOrNone(dataFlow.getAppRoutes().get(0).getSecurityCode())) { |
| | | String sign = AuthenticationFactory.apiDataFlowMd5(dataFlow); |
| | | if (!sign.equals(dataFlow.getReqSign().toLowerCase())) { |
| | | throw new NoAuthorityException(ResponseConstant.RESULT_CODE_NO_AUTHORITY_ERROR, "签名失败"+sign); |
| | | throw new NoAuthorityException(ResponseConstant.RESULT_CODE_NO_AUTHORITY_ERROR, "签名失败" + sign); |
| | | } |
| | | } |
| | | |
| | |
| | | "服务【" + appService.getServiceCode() + "】调用方式不对请检查,当前请求方式为:" + httpMethod); |
| | | } |
| | | dataFlow.setApiCurrentService(ServiceCodeConstant.SERVICE_CODE_DO_SERVICE_TRANSFER); |
| | | } else if ("T".equals(appService.getIsInstance())) { |
| | | //如果是透传类 请求方式必须与接口提供方调用方式一致 |
| | | String httpMethod = dataFlow.getRequestCurrentHeaders().get(CommonConstant.HTTP_METHOD); |
| | | if (!appService.getMethod().equals(httpMethod)) { |
| | | throw new ListenerExecuteException(ResponseConstant.RESULT_CODE_ERROR, |
| | | "服务【" + appService.getServiceCode() + "】调用方式不对请检查,当前请求方式为:" + httpMethod); |
| | | } |
| | | dataFlow.setApiCurrentService(ServiceCodeConstant.SERVICE_CODE_SYSTEM_TRANSFER); |
| | | } else { |
| | | dataFlow.setApiCurrentService(dataFlow.getRequestHeaders().get(CommonConstant.HTTP_SERVICE)); |
| | | } |
| | |
| | | <artifactItems> |
| | | <artifactItem> |
| | | <groupId>com.java110</groupId> |
| | | <artifactId>java110-config</artifactId> |
| | | <artifactId>java110-interface</artifactId> |
| | | <version>${microcommunity.version}</version> |
| | | <type>jar</type> |
| | | <overWrite>true</overWrite> |
| New file |
| | |
| | | package com.java110.common.dao; |
| | | |
| | | import java.util.Map; |
| | | |
| | | public interface IAppraiseServiceDao { |
| | | |
| | | /** |
| | | * 保存评价 |
| | | * @param info |
| | | * @return |
| | | */ |
| | | int saveAppraise(Map info); |
| | | } |
| New file |
| | |
| | | package com.java110.common.dao.impl; |
| | | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.java110.common.dao.IAppraiseServiceDao; |
| | | import com.java110.core.base.dao.BaseServiceDao; |
| | | import com.java110.utils.constant.ResponseConstant; |
| | | import com.java110.utils.exception.DAOException; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * 评价服务 数据操作层 |
| | | */ |
| | | @Service("appraiseServiceDaoImpl") |
| | | public class AppraiseServiceDaoImpl extends BaseServiceDao implements IAppraiseServiceDao { |
| | | @Override |
| | | public int saveAppraise(Map info) { |
| | | int saveFlag = sqlSessionTemplate.insert("appraiseServiceDaoImpl.saveAppraise", info); |
| | | |
| | | if (saveFlag < 1) { |
| | | throw new DAOException(ResponseConstant.RESULT_PARAM_ERROR, "保存评价数据失败:" + JSONObject.toJSONString(info)); |
| | | } |
| | | return saveFlag; |
| | | } |
| | | } |
| New file |
| | |
| | | package com.java110.common.service.appraise; |
| | | |
| | | import com.java110.common.dao.IAppraiseServiceDao; |
| | | import com.java110.core.annotation.Java110Transactional; |
| | | import com.java110.core.factory.GenerateCodeFactory; |
| | | import com.java110.dto.appraise.AppraiseDto; |
| | | import com.java110.intf.common.appraise.ISaveAppraiseService; |
| | | import com.java110.utils.util.Assert; |
| | | import com.java110.utils.util.BeanConvertUtil; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | @RestController |
| | | public class SaveAppraiseServiceImpl implements ISaveAppraiseService { |
| | | |
| | | @Autowired |
| | | IAppraiseServiceDao appraiseServiceDaoImpl; |
| | | |
| | | /** |
| | | * 校验入参 |
| | | * |
| | | * @param appraiseDto |
| | | */ |
| | | private void validate(AppraiseDto appraiseDto) { |
| | | |
| | | Assert.hasKeyAndValue(appraiseDto, "appraiseScore", "未包含评分"); |
| | | Assert.hasKeyAndValue(appraiseDto, "appraiseType", "未包含评价类型"); |
| | | Assert.hasKeyAndValue(appraiseDto, "context", "未包含评价内容"); |
| | | Assert.hasKeyAndValue(appraiseDto, "appraiseUserId", "未包含评价者"); |
| | | Assert.hasKeyAndValue(appraiseDto, "appraiseUserName", "未包含评价者名称"); |
| | | Assert.hasKeyAndValue(appraiseDto, "objType", "未包含评价对象类型"); |
| | | Assert.hasKeyAndValue(appraiseDto, "objId", "未包含评价对象ID"); |
| | | |
| | | } |
| | | |
| | | |
| | | @Override |
| | | @Java110Transactional |
| | | public AppraiseDto saveAppraise(@RequestBody AppraiseDto appraiseDto) { |
| | | validate(appraiseDto); |
| | | if (appraiseDto.getAppraiseId().startsWith("-")) { |
| | | appraiseDto.setAppraiseId(GenerateCodeFactory.getGeneratorId(GenerateCodeFactory.CODE_PREFIX_appraiseId)); |
| | | } |
| | | int saveFlag = appraiseServiceDaoImpl.saveAppraise(BeanConvertUtil.beanCovertMap(appraiseDto)); |
| | | if (saveFlag > 0) { |
| | | return appraiseDto; |
| | | } |
| | | return null; |
| | | } |
| | | } |
| New file |
| | |
| | | package com.java110.common.service; |
| | | |
| | | public class test { |
| | | } |
| | |
| | | <artifactItems> |
| | | <artifactItem> |
| | | <groupId>com.java110</groupId> |
| | | <artifactId>java110-config</artifactId> |
| | | <artifactId>java110-interface</artifactId> |
| | | <version>${microcommunity.version}</version> |
| | | <type>jar</type> |
| | | <overWrite>true</overWrite> |
| | |
| | | <artifactItems> |
| | | <artifactItem> |
| | | <groupId>com.java110</groupId> |
| | | <artifactId>java110-config</artifactId> |
| | | <artifactId>java110-interface</artifactId> |
| | | <version>${microcommunity.version}</version> |
| | | <type>jar</type> |
| | | <overWrite>true</overWrite> |
| | |
| | | |
| | | <dependency> |
| | | <groupId>com.java110</groupId> |
| | | <artifactId>java110-config</artifactId> |
| | | <artifactId>java110-interface</artifactId> |
| | | <scope>provided</scope> |
| | | </dependency> |
| | | |
| | |
| | | <artifactItems> |
| | | <artifactItem> |
| | | <groupId>com.java110</groupId> |
| | | <artifactId>java110-config</artifactId> |
| | | <artifactId>java110-interface</artifactId> |
| | | <version>${microcommunity.version}</version> |
| | | <type>jar</type> |
| | | <overWrite>true</overWrite> |
| | |
| | | <artifactItems> |
| | | <artifactItem> |
| | | <groupId>com.java110</groupId> |
| | | <artifactId>java110-config</artifactId> |
| | | <artifactId>java110-interface</artifactId> |
| | | <!--<testFailureIgnore>true</testFailureIgnore>--> |
| | | <version>${microcommunity.version}</version> |
| | | <type>jar</type> |
| | |
| | | |
| | | <dependency> |
| | | <groupId>com.java110</groupId> |
| | | <artifactId>java110-config</artifactId> |
| | | <artifactId>java110-interface</artifactId> |
| | | <scope>provided</scope> |
| | | </dependency> |
| | | </dependencies> |
| | |
| | | <artifactItems> |
| | | <artifactItem> |
| | | <groupId>com.java110</groupId> |
| | | <artifactId>java110-config</artifactId> |
| | | <artifactId>java110-interface</artifactId> |
| | | <version>${microcommunity.version}</version> |
| | | <type>jar</type> |
| | | <overWrite>true</overWrite> |
| | |
| | | |
| | | <dependency> |
| | | <groupId>com.java110</groupId> |
| | | <artifactId>java110-config</artifactId> |
| | | <artifactId>java110-interface</artifactId> |
| | | <scope>provided</scope> |
| | | </dependency> |
| | | |
| | |
| | | <artifactItems> |
| | | <artifactItem> |
| | | <groupId>com.java110</groupId> |
| | | <artifactId>java110-config</artifactId> |
| | | <artifactId>java110-interface</artifactId> |
| | | <version>${microcommunity.version}</version> |
| | | <type>jar</type> |
| | | <overWrite>true</overWrite> |
| | |
| | | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.java110.dto.order.OrderDto; |
| | | import com.java110.dto.order.OrderItemDto; |
| | | import com.java110.order.smo.IOIdServiceSMO; |
| | | import com.java110.utils.util.BeanConvertUtil; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | |
| | | |
| | | /** |
| | | * 回退事务 |
| | | * |
| | | * @param order |
| | | * @return |
| | | */ |
| | | @RequestMapping(path = "/fallBackOId", method = RequestMethod.POST) |
| | | public ResponseEntity<String> fallBackOId(@RequestBody String order){ |
| | | public ResponseEntity<String> fallBackOId(@RequestBody String order) { |
| | | JSONObject orderObj = JSONObject.parseObject(order); |
| | | OrderDto orderDto = BeanConvertUtil.covertBean(orderObj, OrderDto.class); |
| | | return tServiceSMOImpl.fallBackOId(orderDto); |
| | | } |
| | | |
| | | /** |
| | | * 上报Item |
| | | * |
| | | * @param orderItem |
| | | * @return |
| | | */ |
| | | @RequestMapping(path = "/createOrderItem", method = RequestMethod.POST) |
| | | public ResponseEntity<String> createOrderItem(@RequestBody String orderItem) { |
| | | JSONObject orderItemObj = JSONObject.parseObject(orderItem); |
| | | OrderItemDto orderItemDto = BeanConvertUtil.covertBean(orderItemObj, OrderItemDto.class); |
| | | return tServiceSMOImpl.createOrderItem(orderItemDto); |
| | | } |
| | | } |
| | |
| | | /** |
| | | * 保存订单信息 |
| | | * |
| | | * @param orderItem 订单信息 |
| | | * @return |
| | | */ |
| | | public void saveOrderItem(Map orderItem) throws DAOException; |
| | | |
| | | /** |
| | | * 保存订单信息 |
| | | * |
| | | * @param order 订单信息 |
| | | * @return |
| | | */ |
| | |
| | | import com.java110.order.dao.ICenterServiceDAO; |
| | | import com.java110.utils.constant.ResponseConstant; |
| | | import com.java110.utils.exception.DAOException; |
| | | import com.java110.utils.util.StringUtil; |
| | | import org.slf4j.Logger; |
| | | import org.slf4j.LoggerFactory; |
| | | import org.springframework.stereotype.Service; |
| | |
| | | return orderItems; |
| | | } |
| | | |
| | | @Override |
| | | public void saveOrderItem(Map orderItem) throws DAOException { |
| | | logger.debug("----【CenterServiceDAOImpl.saveOrderItem】保存数据入参 : " + JSONObject.toJSONString(orderItem)); |
| | | |
| | | int saveFlag = sqlSessionTemplate.insert("centerServiceDAOImpl.saveOrderItem", orderItem); |
| | | if (saveFlag < 1) { |
| | | throw new DAOException(ResponseConstant.RESULT_CODE_INNER_ERROR, "保存订单项信息失败:" + JSONObject.toJSONString(orderItem)); |
| | | } |
| | | |
| | | if (!orderItem.containsKey("logText") || StringUtil.isEmpty(orderItem.get("logText") + "")) { |
| | | return; |
| | | } |
| | | |
| | | saveFlag = sqlSessionTemplate.insert("centerServiceDAOImpl.saveUnItemLog", orderItem); |
| | | |
| | | if (saveFlag < 1) { |
| | | throw new DAOException(ResponseConstant.RESULT_CODE_INNER_ERROR, "保存回滚日志失败:" + JSONObject.toJSONString(orderItem)); |
| | | } |
| | | |
| | | |
| | | } |
| | | |
| | | /** |
| | | * 保存订单信息 |
| | | * |
| | |
| | | package com.java110.order.smo; |
| | | |
| | | import com.java110.dto.order.OrderDto; |
| | | import com.java110.dto.order.OrderItemDto; |
| | | import org.springframework.http.ResponseEntity; |
| | | |
| | | /** |
| | |
| | | |
| | | /** |
| | | * 创建全局事务ID |
| | | * |
| | | * @return |
| | | */ |
| | | ResponseEntity<String> createOId(OrderDto orderDto); |
| | | |
| | | /** |
| | | * 创建全局事务ID |
| | | * |
| | | * @return |
| | | */ |
| | | ResponseEntity<String> fallBackOId(OrderDto orderDto); |
| | | |
| | | /** |
| | | * 创建 订单项 |
| | | * @param orderItemDto |
| | | * @return |
| | | */ |
| | | ResponseEntity<String> createOrderItem(OrderItemDto orderItemDto); |
| | | } |
| | |
| | | import com.java110.order.smo.IOIdServiceSMO; |
| | | import com.java110.utils.util.BeanConvertUtil; |
| | | import com.java110.utils.util.StringUtil; |
| | | import com.java110.vo.ResultVo; |
| | | import org.slf4j.Logger; |
| | | import org.slf4j.LoggerFactory; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.http.HttpEntity; |
| | | import org.springframework.http.HttpHeaders; |
| | | import org.springframework.http.HttpMethod; |
| | | import org.springframework.http.HttpStatus; |
| | | import org.springframework.http.ResponseEntity; |
| | | import org.springframework.http.*; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.ArrayList; |
| | |
| | | return new ResponseEntity<String>("", HttpStatus.OK); |
| | | } |
| | | } |
| | | |
| | | @Override |
| | | public ResponseEntity<String> createOrderItem(OrderItemDto orderItemDto) { |
| | | |
| | | if (StringUtil.isEmpty(orderItemDto.getoId())) { |
| | | return new ResponseEntity<String>("请求报文中未包含事务ID", HttpStatus.NOT_FOUND); |
| | | } |
| | | |
| | | if (StringUtil.isEmpty(orderItemDto.getAction())) { |
| | | return new ResponseEntity<String>("请求报文中未包含动作", HttpStatus.NOT_FOUND); |
| | | } |
| | | |
| | | if (StringUtil.isEmpty(orderItemDto.getActionObj())) { |
| | | return new ResponseEntity<String>("请求报文中未包含动作对象", HttpStatus.NOT_FOUND); |
| | | } |
| | | |
| | | if (StringUtil.isEmpty(orderItemDto.getServiceName())) { |
| | | return new ResponseEntity<String>("请求报文中未包含服务", HttpStatus.NOT_FOUND); |
| | | } |
| | | if (StringUtil.isEmpty(orderItemDto.getLogText())) { |
| | | return new ResponseEntity<String>("请求报文中未包含回滚日志", HttpStatus.NOT_FOUND); |
| | | } |
| | | if (StringUtil.isEmpty(orderItemDto.getbId()) || orderItemDto.getbId().startsWith("-")) { |
| | | orderItemDto.setbId(GenerateCodeFactory.getBId()); |
| | | } |
| | | centerServiceDAOImpl.saveOrderItem(BeanConvertUtil.beanCovertMap(orderItemDto)); |
| | | |
| | | return ResultVo.createResponseEntity(ResultVo.CODE_OK, ResultVo.MSG_OK); |
| | | } |
| | | } |
| | |
| | | <artifactItems> |
| | | <artifactItem> |
| | | <groupId>com.java110</groupId> |
| | | <artifactId>java110-config</artifactId> |
| | | <artifactId>java110-interface</artifactId> |
| | | <version>${microcommunity.version}</version> |
| | | <type>jar</type> |
| | | <overWrite>true</overWrite> |
| | |
| | | |
| | | <dependency> |
| | | <groupId>com.java110</groupId> |
| | | <artifactId>java110-config</artifactId> |
| | | <artifactId>java110-interface</artifactId> |
| | | <scope>provided</scope> |
| | | </dependency> |
| | | </dependencies> |
| | |
| | | <artifactItems> |
| | | <artifactItem> |
| | | <groupId>com.java110</groupId> |
| | | <artifactId>java110-config</artifactId> |
| | | <artifactId>java110-interface</artifactId> |
| | | <version>${microcommunity.version}</version> |
| | | <type>jar</type> |
| | | <overWrite>true</overWrite> |
| | |
| | | <artifactItems> |
| | | <artifactItem> |
| | | <groupId>com.java110</groupId> |
| | | <artifactId>java110-config</artifactId> |
| | | <artifactId>java110-interface</artifactId> |
| | | <version>${microcommunity.version}</version> |
| | | <type>jar</type> |
| | | <overWrite>true</overWrite> |
| | |
| | | <artifactItems> |
| | | <artifactItem> |
| | | <groupId>com.java110</groupId> |
| | | <artifactId>java110-config</artifactId> |
| | | <artifactId>java110-interface</artifactId> |
| | | <version>${microcommunity.version}</version> |
| | | <type>jar</type> |
| | | <overWrite>true</overWrite> |