2019.7.31 Daily

2019.7.31 Daily

daily

1. Open additional fund accounts to display taCodes

1.1 Database table

bgb_ttradeaccountotc_ttradeaccount_exbgb_tfundbgb_tinvestfundinfo(TA下拉数据)

1.2 Page processing instructions

  • Page initialization: the source of the transaction account bgb_ttradeaccount, the source of product data, and the source bgb_tfundof TA data from the bgb_tinvestfundinfotable (required to remove duplicates).

  • [Confirm] button: page data save and otc_tagentaccountapptable, 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_tinvestfundinfoAdded agency_codefields to the table

1564545051311

Add in DTO/DO/Queryagency_code

1
2
3
4
5
/** 
* Sales channel code
*/
@Column (name = "agency_code" , length = 16 , nullable = false )
private String agencyCode;

1.3.2 Specific implementation

  • Realize its corresponding method in Service-ApineutralizationImpl
  • The management platform is onlineApi
  • Front end call, get data, display alltaCode

2. Save additional account information

2.1 Database requirements

Page data storage and otc_tagentaccountappover-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 accountfundTradeAccount
    • Sales channelsagencyCode
    • TA codetaCode
    • Business Type (009)businType

2.2 Background interface implementation

2.2.1 Code Generator

  • Configure data source

    1564557931727

  • 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/generatedit all first , then import the project as needed, and then delete useless files

  • The reason for the first failure: the data source address was not written correctly

  • Reason for the second failure: There is an error Integerwith the BigDecimalgeneration, 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 insertmethod 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 Updateoperation)
    • 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_idmaintain the auto-increment sequence together

  1. Create a OperatorNoSequenceclass, define the indication and self-increment field name in it
  2. Use his nextValue()function to get the next value

Plans for tomorrow

  1. Do new tasks
  2. Learn more about business and look at professional terms

Guess you like

Origin blog.csdn.net/cpongo3/article/details/98633140