日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

【ssi】增删改查六操作小框架(八)

發(fā)布時間:2025/1/21 编程问答 22 豆豆
生活随笔 收集整理的這篇文章主要介紹了 【ssi】增删改查六操作小框架(八) 小編覺得挺不錯的,現(xiàn)在分享給大家,幫大家做個參考.

(七)Struts_admin.xml

<!-- 2012年07月31日 atip-15 異議信息管理action 團長 -->
??<action name="dissent_*" method="{1}" class="dissentAction">
????<result name="success" type="json" />
??</action>

七、復雜應用實例清單

下述清單中是一個復雜應用的實例。代碼位于svn://10.10.114.15/netsale/code/ATIP3/branches/atip-11/src/java/com/sinosig/atip/punishiment包下。完整代碼中有比較充分的注釋,此清單只提供主要的功能代碼。紅色字體是類名,藍色字體是方法名。

(一)Action

public class InnerPunishAction extends SimplePagedAction<InnerPunishment> {
????protected String checkForSeachSingleInfo(InnerPunishment param) {
??????if (null != param.getPunishId()) {
????????return CheckUtil.CHECKSUCCESS();
??????} else {
????????return "請選擇一條數(shù)據(jù)進行操作!";
??????}
????}
??}

(二)Service

public class InnerPunishServiceImpl extends
??????AbstractPagedInfoServImpl<InnerPunishment> implements
??????InnerPunishService {
????public Integer queryCount(InnerPunishment param) throws SAABException {
??????return dao.getCountByQuery("innerPunish.queryTotalCount", param);
????}
??
??protected InnerPunishment parseMap(Map<String, Object> map) {
??????InnerPunishment inner = new InnerPunishment();
??
??????BigDecimal punishId = (BigDecimal) map.get("PUNISHID");
??????if (null != punishId) {
????????inner.setPunishId(punishId.intValue());
??????}
??
??????String temp = (String) map.get("DISPATCHUNIT");
??????if (StringUtils.isNotBlank(temp)) {
????????inner.setDispatchUnit(temp);
??????}
??
??????temp = (String) map.get("PENALTYNUMBER");
??????if (StringUtils.isNotBlank(temp)) {
????????inner.setPenaltyNumber(temp);
??????}
??
??????Date dispatchDate = (Date) map.get("DISPATCHDATE");
??????if (null != dispatchDate) {
????????inner.setDispatchDate(dispatchDate);
??????}

??????inner.setSubList(queryPunishSubList(inner));

??????return inner;
????}
??
????public InnerPunishment querySingleData(String statementId,
????????InnerPunishment param) throws SAABException {
??????param.setPunishmentType("01");
??????InnerPunishment result = (InnerPunishment) dao.getObjectByQuery(
??????????"innerPunish.queryById", param);
??????result.setSubList(queryPunishSubList(result));
??????return result;
????}
??
????private List<BLPunishmentSub> queryPunishSubList(InnerPunishment param) {
??
??????List<BLPunishmentSub> subList = new ArrayList<BLPunishmentSub>();
??
??????try {
????????subList = dao.getObjectsByQuery("innerPunish.querySubByPunishID",
????????????param);
??????} catch (SAABException e) {
????????// 如果發(fā)生異常,僅記錄日志。關聯(lián)子表設置為空表
????????logger.error("關聯(lián)查詢內(nèi)部處罰管理信息子表時發(fā)生異常。參數(shù)是:" + param + ",異常是:" + e
????????????+ ",異常原因是:" + e.getCause() + ",異常信息是:" + e.getMessage());
??????}
??
??????return subList;
????}
??}

轉(zhuǎn)載于:https://blog.51cto.com/winters1224/1029928

總結(jié)

以上是生活随笔為你收集整理的【ssi】增删改查六操作小框架(八)的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網(wǎng)站內(nèi)容還不錯,歡迎將生活随笔推薦給好友。