Your Name
2023-03-11 3d05409cbad212fd65ad5829be0d6047864fc8ae
优化代码
10个文件已修改
53 ■■■■ 已修改文件
java110-bean/src/main/java/com/java110/po/account/AccountPo.java 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
java110-db/src/main/resources/mapper/acct/AccountServiceDaoImplMapper.xml 31 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
service-acct/src/main/java/com/java110/acct/bmo/account/impl/GetAccountBMOImpl.java 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
service-acct/src/main/java/com/java110/acct/bmo/account/impl/OwnerPrestoreAccountBMOImpl.java 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
service-fee/src/main/java/com/java110/fee/bmo/account/impl/UpdateAccountBMOImpl.java 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
service-job/src/main/java/com/java110/job/adapt/payment/integral/PayFeeGiftIntegralAdapt.java 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
service-store/src/main/java/com/java110/store/cmd/store/PropertyDeleteStoreAndShopCmd.java 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
service-store/src/main/java/com/java110/store/cmd/store/PropertySaveStoreAndShopCmd.java 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
service-store/src/main/java/com/java110/store/cmd/store/SaveStoreInfoCmd.java 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
service-user/src/main/java/com/java110/user/smo/impl/OwnerV1InnerServiceSMOImpl.java 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
java110-bean/src/main/java/com/java110/po/account/AccountPo.java
@@ -12,6 +12,8 @@
    private String objType;
    private String partId;
    private String link;
    public String getAmount() {
        return amount;
@@ -68,4 +70,12 @@
    public void setPartId(String partId) {
        this.partId = partId;
    }
    public String getLink() {
        return link;
    }
    public void setLink(String link) {
        this.link = link;
    }
}
java110-db/src/main/resources/mapper/acct/AccountServiceDaoImplMapper.xml
@@ -7,17 +7,17 @@
    <!-- 保存账户信息 add by wuxw 2018-07-03 -->
    <insert id="saveBusinessAccountInfo" parameterType="Map">
        insert into business_account(
        amount,operate,acct_type,obj_id,acct_id,acct_name,b_id,obj_type,part_id
        amount,operate,acct_type,obj_id,acct_id,acct_name,b_id,obj_type,part_id,link
        ) values (
        #{amount},#{operate},#{acctType},#{objId},#{acctId},#{acctName},#{bId},#{objType},#{partId}
        #{amount},#{operate},#{acctType},#{objId},#{acctId},#{acctName},#{bId},#{objType},#{partId},#{link}
        )
    </insert>
    <insert id="saveAccount" parameterType="Map">
        insert into account(
        amount,acct_type,obj_id,acct_id,acct_name,b_id,obj_type,part_id
        amount,acct_type,obj_id,acct_id,acct_name,b_id,obj_type,part_id,link
        ) values (
        #{amount},#{acctType},#{objId},#{acctId},#{acctName},'-1',#{objType},#{partId}
        #{amount},#{acctType},#{objId},#{acctId},#{acctName},'-1',#{objType},#{partId},#{link}
        )
    </insert>
@@ -25,7 +25,7 @@
    <!-- 查询账户信息(Business) add by wuxw 2018-07-03 -->
    <select id="getBusinessAccountInfo" parameterType="Map" resultType="Map">
        select t.amount,t.operate,t.acct_type,t.acct_type acctType,t.obj_id,t.obj_id objId,t.acct_id,t.acct_id
        acctId,t.acct_name,t.acct_name acctName,t.b_id,t.b_id bId,t.obj_type,t.obj_type objType,t.part_id,t.part_id partId
        acctId,t.acct_name,t.acct_name acctName,t.b_id,t.b_id bId,t.obj_type,t.obj_type objType,t.part_id,t.part_id partId,t.link
        from business_account t
        where 1 =1
        <if test="amount !=null and amount != ''">
@@ -55,6 +55,9 @@
        <if test="partId !=null and partId != ''">
            and t.obj_type= #{partId}
        </if>
        <if test="link !=null and link != ''">
            and t.link= #{link}
        </if>
    </select>
@@ -62,8 +65,8 @@
    <!-- 保存账户信息至 instance表中 add by wuxw 2018-07-03 -->
    <insert id="saveAccountInfoInstance" parameterType="Map">
        insert into account(
        amount,acct_type,obj_id,acct_id,status_cd,acct_name,b_id,obj_type,part_id
        ) select t.amount,t.acct_type,t.obj_id,t.acct_id,'0',t.acct_name,t.b_id,t.obj_type,t.part_id
        amount,acct_type,obj_id,acct_id,status_cd,acct_name,b_id,obj_type,part_id,link
        ) select t.amount,t.acct_type,t.obj_id,t.acct_id,'0',t.acct_name,t.b_id,t.obj_type,t.part_id,t.link
        from business_account t where
        1=1
        <if test="amount !=null and amount != ''">
@@ -96,7 +99,7 @@
    <select id="getAccountInfo" parameterType="Map" resultType="Map">
        select t.amount,t.acct_type,t.acct_type acctType,t.obj_id,t.obj_id objId,t.acct_id,t.acct_id
        acctId,t.status_cd,t.status_cd statusCd,t.acct_name,t.acct_name acctName,t.b_id,t.b_id bId,t.obj_type,t.obj_type
        objType,t.create_time createTime,td.`name` acctTypeName,t.part_id,t.part_id partId
        objType,t.create_time createTime,td.`name` acctTypeName,t.part_id,t.part_id partId,t.link
        from account t
        LEFT JOIN t_dict td on t.acct_type = td.status_cd and td.table_name = 'account' and td.table_columns =
        'acct_type'
@@ -143,6 +146,9 @@
        <if test="partId !=null and partId != ''">
            and t.part_id= #{partId}
        </if>
        <if test="link !=null and link != ''">
            and t.link= #{link}
        </if>
        order by t.create_time desc
        <if test="page != -1 and page != null ">
            limit #{page}, #{row}
@@ -178,6 +184,9 @@
        where 1=1
        <if test="acctId !=null and acctId != ''">
            and t.acct_id= #{acctId}
        </if>
        <if test="link !=null and link != ''">
            and t.link= #{link}
        </if>
        <if test="bId !=null and bId != ''">
            and t.b_id= #{bId}
@@ -226,6 +235,9 @@
        <if test="partId !=null and partId != ''">
            and t.part_id= #{partId}
        </if>
        <if test="link !=null and link != ''">
            and t.link= #{link}
        </if>
    </select>
@@ -250,6 +262,9 @@
        <if test="objId !=null and objId != ''">
           and t.obj_id = #{objId}
        </if>
        <if test="link !=null and link != ''">
            and t.link= #{link}
        </if>
    </update>
</mapper>
service-acct/src/main/java/com/java110/acct/bmo/account/impl/GetAccountBMOImpl.java
@@ -169,6 +169,7 @@
            Assert.listOnlyOne(ownerDtos, "业主不存在");
            accountPo.setAcctName(ownerDtos.get(0).getName());
            accountPo.setPartId(ownerDto.getCommunityId());
            accountPo.setLink(ownerDtos.get(0).getLink());
            accountInnerServiceSMOImpl.saveAccount(accountPo);
            List<AccountDto> accountDtos = accountInnerServiceSMOImpl.queryAccounts(accountDto);
            return accountDtos;
service-acct/src/main/java/com/java110/acct/bmo/account/impl/OwnerPrestoreAccountBMOImpl.java
@@ -93,6 +93,7 @@
        Assert.listOnlyOne(ownerDtos, "业主不存在");
        accountPo.setAcctName(ownerDtos.get(0).getName());
        accountPo.setPartId(reqJson.getString("communityId"));
        accountPo.setLink(ownerDtos.get(0).getLink());
        accountInnerServiceSMOImpl.saveAccount(accountPo);
        return BeanConvertUtil.covertBean(accountPo, AccountDto.class);
    }
service-fee/src/main/java/com/java110/fee/bmo/account/impl/UpdateAccountBMOImpl.java
@@ -71,6 +71,8 @@
            //获取业主id
            String ownerId = ownerRoomRelDtos.get(0).getOwnerId();
            paramObj.put("ownerId", ownerId);
            //根据业主id去查这个业主的账户余额
            AccountDto accountDto = new AccountDto();
            accountDto.setObjId(ownerId);
@@ -116,6 +118,8 @@
    }
    private AccountDto addAccountDto(JSONObject reqJson) {
        AccountPo accountPo = new AccountPo();
        accountPo.setAmount(reqJson.getString("cashBackAmount"));
        accountPo.setAcctId(GenerateCodeFactory.getGeneratorId(GenerateCodeFactory.CODE_PREFIX_acctId));
@@ -128,6 +132,7 @@
        List<OwnerDto> ownerDtos = ownerInnerServiceSMOImpl.queryOwners(ownerDto);
        accountPo.setAcctName(ownerDtos.get(0).getName());
        accountPo.setPartId(reqJson.getString("communityId"));
        accountPo.setLink(ownerDtos.get(0).getLink());
        accountInnerServiceSMOImpl.saveAccount(accountPo);
        return BeanConvertUtil.covertBean(accountPo, AccountDto.class);
    }
service-job/src/main/java/com/java110/job/adapt/payment/integral/PayFeeGiftIntegralAdapt.java
@@ -298,6 +298,7 @@
            Assert.listOnlyOne(ownerDtos, "业主不存在");
            accountPo.setAcctName(ownerDtos.get(0).getName());
            accountPo.setPartId(ownerDtos.get(0).getCommunityId());
            accountPo.setLink(ownerDtos.get(0).getLink());
            accountInnerServiceSMOImpl.saveAccount(accountPo);
            List<AccountDto> accountDtos = accountInnerServiceSMOImpl.queryAccounts(accountDto);
            return accountDtos;
service-store/src/main/java/com/java110/store/cmd/store/PropertyDeleteStoreAndShopCmd.java
@@ -250,6 +250,7 @@
        accountPo.setAcctType(AccountDto.ACCT_TYPE_CASH);
        accountPo.setAcctName(storePo.getName());
        accountPo.setPartId(reqJson.getString("shopId"));
        accountPo.setLink(reqJson.getString("link"));
        accountInnerServiceSMOImpl.saveAccount(accountPo);
    }
service-store/src/main/java/com/java110/store/cmd/store/PropertySaveStoreAndShopCmd.java
@@ -329,6 +329,7 @@
        accountPo.setAcctType(AccountDto.ACCT_TYPE_CASH);
        accountPo.setAcctName(storePo.getName());
        accountPo.setPartId(reqJson.getString("shopId"));
        accountPo.setLink(reqJson.getString("link"));
        accountInnerServiceSMOImpl.saveAccount(accountPo);
    }
service-store/src/main/java/com/java110/store/cmd/store/SaveStoreInfoCmd.java
@@ -128,6 +128,7 @@
        accountPo.setAmount("0");
        accountPo.setObjId(paramInJson.getString("storeId"));
        accountPo.setObjType(AccountDto.OBJ_TYPE_STORE);
        accountPo.setLink(paramInJson.getString("link"));
        int flag = accountInnerServiceSMOImpl.saveAccount(accountPo);
        if (flag < 1) {
            throw new CmdException("注册失败");
service-user/src/main/java/com/java110/user/smo/impl/OwnerV1InnerServiceSMOImpl.java
@@ -87,6 +87,7 @@
            Assert.listOnlyOne(ownerDtos, "业主不存在");
            accountPo.setAcctName(ownerDtos.get(0).getName());
            accountPo.setPartId(communityId);
            accountPo.setLink(ownerDtos.get(0).getLink());
            accountInnerServiceSMOImpl.saveAccount(accountPo);
        } finally {
            DistributedLock.releaseDistributedLock(requestId, key);