2019.7.31 Daily
daily
1. Open additional fund accounts to display taCodes
1.1 Database table
bgb_ttradeaccount
、otc_ttradeaccount_ex
、bgb_tfund
、bgb_tinvestfundinfo(TA下拉数据)
1.2 Page processing instructions
Page initialization: the source of the transaction account
bgb_ttradeaccount
, the source of product data, and the sourcebgb_tfund
of TA data from thebgb_tinvestfundinfo
table (required to remove duplicates).[Confirm] button: page data save and
otc_tagentaccountapp
table, only save transaction account field, channel, TA code, business type (009: open fund account).
1.3 Back-end business logic
1.3.1 DTO/DO/Query modification
bgb_tinvestfundinfo
Added agency_code
fields to the table
Add in DTO/DO/Queryagency_code
1 |
/** |
1.3.2 Specific implementation
- Realize its corresponding method in
Service-Api
neutralizationImpl
- The management platform is online
Api
- Front end call, get data, display all
taCode
2. Save additional account information
2.1 Database requirements
Page data storage and otc_tagentaccountapp
over-the-counter commission account declaration form, only save the transaction account number field, channel, TA code, business type (009: additional fund account).
- table:
otc_tagentaccountapp
- Save field:
- Trading account
fundTradeAccount
- Sales channels
agencyCode
- TA code
taCode
- Business Type (009)
businType
- Trading account
2.2 Background interface implementation
2.2.1 Code Generator
Configure data source
Configuration data sheet
1
2
3<table tableName="otc_tagentaccountapp" domainObjectName="AgentAccountApp">
<property name="subPackage" value="agentaccountapp"/>
</table>Configure the generated file location
Get
/src/generated
it all first , then import the project as needed, and then delete useless filesThe reason for the first failure: the data source address was not written correctly
- Reason for the second failure: There is an error
Integer
with theBigDecimal
generation, which needs to be corrected manually - Special thanks to : Senior Duns
2.2.2 Writing business logic
- According to the above database requirements, match fields
- Use the default generated
insert
method to quickly insert
2.2.3 Logical vulnerabilities
2.2.3.1 Problematic logic:
- As an insert operation, it should be inserted if it does not exist
- If it already exists (do
Update
operation)- Different: update
- Same: do not update
2.2.3.2 Correct logic
- When the user selects, it should be used to remove the used TA segment
- The user's choice must not exist
2.2.4 Maintain the auto-increment sequence together
Problem:otc_tagentaccountapp.agentaccountapp_id
and otc_ttradeorder.tradeorder_id
maintain the auto-increment sequence together
- Create a
OperatorNoSequence
class, define the indication and self-increment field name in it - Use his
nextValue()
function to get the next value
Plans for tomorrow
- Do new tasks
- Learn more about business and look at professional terms