| | |
| | | private String objType; |
| | | private String partId; |
| | | |
| | | private String link; |
| | | |
| | | |
| | | public String getAmount() { |
| | | return amount; |
| | |
| | | public void setPartId(String partId) { |
| | | this.partId = partId; |
| | | } |
| | | |
| | | public String getLink() { |
| | | return link; |
| | | } |
| | | |
| | | public void setLink(String link) { |
| | | this.link = link; |
| | | } |
| | | } |
| | |
| | | <!-- 保存账户信息 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> |
| | | |
| | |
| | | <!-- 查询账户信息(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 != ''"> |
| | |
| | | <if test="partId !=null and partId != ''"> |
| | | and t.obj_type= #{partId} |
| | | </if> |
| | | <if test="link !=null and link != ''"> |
| | | and t.link= #{link} |
| | | </if> |
| | | |
| | | </select> |
| | | |
| | |
| | | <!-- 保存账户信息至 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 != ''"> |
| | |
| | | <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' |
| | |
| | | <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} |
| | |
| | | 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} |
| | |
| | | <if test="partId !=null and partId != ''"> |
| | | and t.part_id= #{partId} |
| | | </if> |
| | | <if test="link !=null and link != ''"> |
| | | and t.link= #{link} |
| | | </if> |
| | | </select> |
| | | |
| | | |
| | |
| | | <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> |
| | |
| | | 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; |
| | |
| | | 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); |
| | | } |
| | |
| | | //获取业主id |
| | | String ownerId = ownerRoomRelDtos.get(0).getOwnerId(); |
| | | paramObj.put("ownerId", ownerId); |
| | | |
| | | |
| | | //根据业主id去查这个业主的账户余额 |
| | | AccountDto accountDto = new AccountDto(); |
| | | accountDto.setObjId(ownerId); |
| | |
| | | } |
| | | |
| | | private AccountDto addAccountDto(JSONObject reqJson) { |
| | | |
| | | |
| | | AccountPo accountPo = new AccountPo(); |
| | | accountPo.setAmount(reqJson.getString("cashBackAmount")); |
| | | accountPo.setAcctId(GenerateCodeFactory.getGeneratorId(GenerateCodeFactory.CODE_PREFIX_acctId)); |
| | |
| | | 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); |
| | | } |
| | |
| | | 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; |
| | |
| | | accountPo.setAcctType(AccountDto.ACCT_TYPE_CASH); |
| | | accountPo.setAcctName(storePo.getName()); |
| | | accountPo.setPartId(reqJson.getString("shopId")); |
| | | accountPo.setLink(reqJson.getString("link")); |
| | | accountInnerServiceSMOImpl.saveAccount(accountPo); |
| | | } |
| | | |
| | |
| | | accountPo.setAcctType(AccountDto.ACCT_TYPE_CASH); |
| | | accountPo.setAcctName(storePo.getName()); |
| | | accountPo.setPartId(reqJson.getString("shopId")); |
| | | accountPo.setLink(reqJson.getString("link")); |
| | | accountInnerServiceSMOImpl.saveAccount(accountPo); |
| | | } |
| | | |
| | |
| | | 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("注册失败"); |
| | |
| | | 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); |