xiaogang
2022-08-13 8effc395f2953b487f452cf04616f547f41b0819
优化代码
15个文件已修改
85 ■■■■ 已修改文件
java110-bean/src/main/java/com/java110/dto/menu/MenuDto.java 11 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
java110-bean/src/main/java/com/java110/dto/privilegeUser/PrivilegeUserDto.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
java110-bean/src/main/java/com/java110/vo/api/menu/ApiMenuDataVo.java 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
java110-bean/src/main/java/com/java110/vo/api/staff/ApiStaffDataVo.java 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
java110-db/src/main/resources/mapper/community/FloorServiceDaoImplMapper.xml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
java110-db/src/main/resources/mapper/community/MenuServiceDaoImplMapper.xml 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
java110-db/src/main/resources/mapper/community/RouteServiceDaoImplMapper.xml 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
java110-db/src/main/resources/mapper/community/UnitServiceDaoImplMapper.xml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
java110-db/src/main/resources/mapper/community/VisitV1ServiceDaoImplMapper.xml 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
java110-db/src/main/resources/mapper/fee/ReturnPayFeeServiceDaoImplMapper.xml 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
service-community/src/main/java/com/java110/community/cmd/ownerRepair/ListStaffFinishRepairsCmd.java 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
service-dev/src/main/java/com/java110/dev/cmd/menu/ListMenusCmd.java 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
service-store/src/main/java/com/java110/store/cmd/resourceStore/ListResourceStoresCmd.java 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
service-user/src/main/java/com/java110/user/cmd/role/ListRoleStaffCmd.java 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
service-user/src/main/java/com/java110/user/cmd/user/QueryStaffInfosCmd.java 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
java110-bean/src/main/java/com/java110/dto/menu/MenuDto.java
@@ -15,6 +15,7 @@
    private String description;
    private String statusCd;
    private String gId;
    private String gName;
    private String pId;
    private String pName;
    private String isShowName;
@@ -70,8 +71,6 @@
    public void setDescription(String description) {
        this.description = description;
    }
    public String getStatusCd() {
        return statusCd;
@@ -152,4 +151,12 @@
    public void setStoreTypeName(String storeTypeName) {
        this.storeTypeName = storeTypeName;
    }
    public String getgName() {
        return gName;
    }
    public void setgName(String gName) {
        this.gName = gName;
    }
}
java110-bean/src/main/java/com/java110/dto/privilegeUser/PrivilegeUserDto.java
@@ -24,11 +24,9 @@
    private String userName;
    private String roleName;
    private Date createTime;
    private String statusCd = "0";
    public String getPrivilegeFlag() {
        return privilegeFlag;
@@ -46,7 +44,6 @@
        this.puId = puId;
    }
    public String getStoreId() {
        return storeId;
    }
@@ -62,7 +59,6 @@
    public void setUserId(String userId) {
        this.userId = userId;
    }
    public Date getCreateTime() {
        return createTime;
java110-bean/src/main/java/com/java110/vo/api/menu/ApiMenuDataVo.java
@@ -12,6 +12,7 @@
    private String isShow;
    private String description;
    private String gId;
    private String gName;
    private String pId;
    private String pName;
@@ -144,4 +145,12 @@
    public void setStoreTypeName(String storeTypeName) {
        this.storeTypeName = storeTypeName;
    }
    public String getgName() {
        return gName;
    }
    public void setgName(String gName) {
        this.gName = gName;
    }
}
java110-bean/src/main/java/com/java110/vo/api/staff/ApiStaffDataVo.java
@@ -46,7 +46,7 @@
    private String relCdName;
    private String parentTwoOrgId;
    public String getUserId() {
        return userId;
@@ -223,4 +223,12 @@
    public void setOrgLevel(String orgLevel) {
        this.orgLevel = orgLevel;
    }
    public String getParentTwoOrgId() {
        return parentTwoOrgId;
    }
    public void setParentTwoOrgId(String parentTwoOrgId) {
        this.parentTwoOrgId = parentTwoOrgId;
    }
}
java110-db/src/main/resources/mapper/community/FloorServiceDaoImplMapper.xml
@@ -267,7 +267,7 @@
        <if test="lift !=null and lift != ''">
            and bu.lift= #{lift}
        </if>
        order by t.seq,bu.unit_num asc
        order by t.seq,t.floor_num,bu.unit_num asc
        <!-- <if test="page != -1 and page != null ">
             limit #{page}, #{row}
         </if>limit 10;-->
java110-db/src/main/resources/mapper/community/MenuServiceDaoImplMapper.xml
@@ -222,7 +222,7 @@
    <select id="getMenuInfo" parameterType="Map" resultType="Map">
        select DISTINCT t.m_id mId,t.name,t.g_id gId,t.url,t.seq,t.p_id pId,t.description,t.is_show isShow,
        if(t.is_show='Y','显示','不显示') isShowName,
        t.m_id pId,t.name pName,mg.name menuGroupName,mg.store_type,st.name storeTypeName
        t.m_id pId,t.name pName,mg.name gName,mg.store_type,st.name storeTypeName
        from m_menu t,p_privilege p,m_menu_group mg,store_type st
        where t.status_cd= '0'
        and p.status_cd= '0'
@@ -231,6 +231,9 @@
        and mg.store_type = st.store_type_cd
        <if test="gId !=null and gId != ''">
            and t.g_id= #{gId}
        </if>
        <if test="gName !=null and gName != ''">
            and mg.name= #{gName}
        </if>
        <if test="name !=null and name != ''">
            and t.name like concat('%',#{name},'%')
@@ -333,6 +336,9 @@
        <if test="gId !=null and gId != ''">
            and t.g_id= #{gId}
        </if>
        <if test="gName !=null and gName != ''">
            and mg.name= #{gName}
        </if>
        <if test="name !=null and name != ''">
            and t.name like concat('%',#{name},'%')
        </if>
java110-db/src/main/resources/mapper/community/RouteServiceDaoImplMapper.xml
@@ -90,6 +90,9 @@
        <if test="serviceUrl != null and serviceUrl != ''">
            and s.url = #{serviceUrl}
        </if>
        <if test="appName != null and appName != ''">
            and a.name = #{appName}
        </if>
        <if test="page != -1 and page != null ">
            limit #{page}, #{row}
        </if>
@@ -155,5 +158,8 @@
        <if test="serviceUrl != null and serviceUrl != ''">
            and s.url = #{serviceUrl}
        </if>
        <if test="appName != null and appName != ''">
            and a.name = #{appName}
        </if>
    </select>
</mapper>
java110-db/src/main/resources/mapper/community/UnitServiceDaoImplMapper.xml
@@ -127,7 +127,7 @@
        <if test="userId !=null and userId != ''">
            and t.user_id= #{userId}
        </if>
        order by ff.seq,t.unit_id asc
        order by ff.seq,ff.floor_num,t.unit_num asc
       <!-- <if test="page != -1 and page != null ">
            limit #{page}, #{row}
        </if>limit 10;-->
java110-db/src/main/resources/mapper/community/VisitV1ServiceDaoImplMapper.xml
@@ -11,9 +11,9 @@
    <!-- 保存访客信息 add by wuxw 2018-07-03 -->
    <insert id="saveVisitInfo" parameterType="Map">
        insert into s_visit_info(
departure_time,v_name,ps_id,visit_gender,owner_id,reason_type,user_id,state_remark,v_id,visit_time,phone_number,free_time,visit_case,state,community_id,entourage,record_state
departure_time,v_name,ps_id,visit_gender,owner_id,reason_type,user_id,state_remark,v_id,visit_time,phone_number,free_time,visit_case,state,community_id,entourage,record_state,car_num,status_cd
) values (
#{departureTime},#{vName},#{psId},#{visitGender},#{ownerId},#{reasonType},#{userId},#{stateRemark},#{vId},#{visitTime},#{phoneNumber},#{freeTime},#{visitCase},#{state},#{communityId},#{entourage},#{recordState}
#{departureTime},#{vName},#{psId},#{visitGender},#{ownerId},#{reasonType},#{userId},#{stateRemark},#{vId},#{visitTime},#{phoneNumber},#{freeTime},#{visitCase},#{state},#{communityId},#{entourage},#{recordState},#{carNum},#{statusCd}
)
    </insert>
java110-db/src/main/resources/mapper/fee/ReturnPayFeeServiceDaoImplMapper.xml
@@ -187,10 +187,10 @@
        <if test="payTime !=null and payTime != ''">
            and t.pay_time= #{payTime}
        </if>
        <if test="startTime !=null ">
        <if test="startTime !=null and startTime != ''">
            and t.create_time &gt;= #{startTime}
        </if>
        <if test="endTime !=null ">
        <if test="endTime !=null and endTime != ''">
            and t.create_time &lt;= #{endTime}
        </if>
        <if test="detailId !=null and detailId != ''">
@@ -495,10 +495,10 @@
        <if test="communityId !=null and communityId != ''">
            and t.community_id= #{communityId}
        </if>
        <if test="startTime !=null ">
        <if test="startTime !=null and startTime !='' ">
            and t.create_time &gt;= #{startTime}
        </if>
        <if test="endTime !=null ">
        <if test="endTime !=null and endTime !=''">
            and t.create_time &lt;= #{endTime}
        </if>
    </select>
service-community/src/main/java/com/java110/community/cmd/ownerRepair/ListStaffFinishRepairsCmd.java
@@ -36,6 +36,9 @@
    @Autowired
    private IMenuInnerServiceSMO menuInnerServiceSMOImpl;
    //域
    public static final String DOMAIN_COMMON = "DOMAIN.COMMON";
    @Override
    public void validate(CmdEvent event, ICmdDataFlowContext context, JSONObject reqJson) throws CmdException {
        super.validatePageInfo(reqJson);
@@ -47,7 +50,7 @@
    public void doCmd(CmdEvent event, ICmdDataFlowContext context, JSONObject reqJson) throws CmdException, ParseException {
        RepairDto ownerRepairDto = BeanConvertUtil.covertBean(reqJson, RepairDto.class);
        String userId = reqJson.getString("userId");
        String viewListStaffRepairs = MappingCache.getValue("viewListStaffRepairs");
        String viewListStaffRepairs = MappingCache.getValue(DOMAIN_COMMON,"VIEW_LIST_STAFF_REPAIRS");
        List<Map> privileges = null;
        //这里加开关 其实让管理员看到所有单子这么做,不太优雅,建议 单独开发页面功能
        // 不要影响已办功能,add by 吴学文 2021-09-09
@@ -65,8 +68,8 @@
            ownerRepairDto.setStates(Arrays.asList(states));
        } else {
            //Pc WEB维修已办
//            String[] states={RepairDto.STATE_BACK, RepairDto.STATE_TRANSFER,RepairDto.STATE_PAY, RepairDto.STATE_PAY_ERROR, RepairDto.STATE_APPRAISE, RepairDto.STATE_RETURN_VISIT, RepairDto.STATE_COMPLATE};
//            ownerRepairDto.setStates(Arrays.asList(states));
            String[] states={RepairDto.STATE_BACK, RepairDto.STATE_TRANSFER,RepairDto.STATE_PAY, RepairDto.STATE_PAY_ERROR, RepairDto.STATE_APPRAISE, RepairDto.STATE_RETURN_VISIT, RepairDto.STATE_COMPLATE};
            ownerRepairDto.setStates(Arrays.asList(states));
        }
        int count = repairInnerServiceSMOImpl.queryStaffFinishRepairsCount(ownerRepairDto);
        List<RepairDto> ownerRepairs = null;
service-dev/src/main/java/com/java110/dev/cmd/menu/ListMenusCmd.java
@@ -24,7 +24,6 @@
    @Autowired
    private IMenuInnerServiceSMO menuInnerServiceSMOImpl;
    @Override
    public void validate(CmdEvent event, ICmdDataFlowContext context, JSONObject reqJson) throws CmdException {
        super.validatePageInfo(reqJson);
service-store/src/main/java/com/java110/store/cmd/resourceStore/ListResourceStoresCmd.java
@@ -68,6 +68,7 @@
        if (count > 0) {
            resourceStores = BeanConvertUtil.covertBeanList(resourceStoreInnerServiceSMOImpl.queryResourceStores(resourceStoreDto), ApiResourceStoreDataVo.class);
            //查询总价
            resourceStoreDto.setPage(Integer.valueOf(reqJson.getString("page")));
            subTotalPrice = new BigDecimal(resourceStoreInnerServiceSMOImpl.queryResourceStoresTotalPrice(resourceStoreDto));
            resourceStoreDto.setPage(PageDto.DEFAULT_PAGE);
            totalPrice = new BigDecimal(resourceStoreInnerServiceSMOImpl.queryResourceStoresTotalPrice(resourceStoreDto));
service-user/src/main/java/com/java110/user/cmd/role/ListRoleStaffCmd.java
@@ -32,13 +32,14 @@
    @Override
    public void doCmd(CmdEvent event, ICmdDataFlowContext context, JSONObject reqJson) throws CmdException {
        String storeId = context.getReqHeaders().get("store-id");
        PrivilegeUserDto privilegeUserDto = new PrivilegeUserDto();
        privilegeUserDto.setpId(reqJson.getString("roleId"));
        privilegeUserDto.setStoreId(storeId);
        privilegeUserDto.setPrivilegeFlag(PrivilegeUserDto.PRIVILEGE_FLAG_GROUP);
        privilegeUserDto.setPage(Integer.parseInt(reqJson.getString("page")));
        privilegeUserDto.setRow(Integer.parseInt(reqJson.getString("row")));
        int count = privilegeUserV1InnerServiceSMOImpl.queryPrivilegeUserInfoCount(privilegeUserDto);
service-user/src/main/java/com/java110/user/cmd/user/QueryStaffInfosCmd.java
@@ -101,13 +101,17 @@
            return;
        }
        for(ApiStaffDataVo apiStaffDataVo : staffs){
            for(OrgStaffRelDto tmpOrgStaffRelDto : orgStaffRels){
                if(!apiStaffDataVo.getUserId().equals(tmpOrgStaffRelDto.getStaffId())){
                    continue;
                }
                OrgDto org = new OrgDto();
                org.setOrgId(tmpOrgStaffRelDto.getOrgId());
                List<OrgDto> orgs = orgV1InnerServiceSMOImpl.queryOrgs(org);
                Assert.listOnlyOne(orgs, "查询组织表错误!");
               apiStaffDataVo.setOrgId(tmpOrgStaffRelDto.getOrgId());
                apiStaffDataVo.setParentTwoOrgId(orgs.get(0).getParentOrgId());
            }
        }
@@ -169,6 +173,7 @@
    /**
     * 刷入首字母
     *
     * @param staffs
     */
    private void refreshInitials(List<ApiStaffDataVo> staffs) {