the first one: write in java.
@ Select ("select bureau_code from drt_opr_area")
List < String > getAllAreas ();
the second: write in xml.
< select id= "selectList" resultMap= "BaseResultMap" parameterType= "com.csg.intshop.entity.DrtShopConfig" >
select
<include refid="BaseColumnList" />
from drt_shop_config
where 1=1
<include refid="BaseCustomQueryCondition" />
</select>
I would like to ask: under what circumstances is it good to write java code, and under what circumstances do you choose to write xml? If it is a full table query, is there any difference in performance between the two writing methods?
for example: when there are many table fields, the full table query writing xml looks concise and readable. -sharp-sharp-sharp problem description
the environmental background of the problems and what methods you have tried
related codes
/ / Please paste the code text below (do not replace the code with pictures)