old mode 100644
new mode 100755
| | |
| | | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.java110.core.base.dao.BaseServiceDao; |
| | | import com.java110.dto.resourceStore.ResourceStoreDto; |
| | | import com.java110.store.dao.IResourceStoreServiceDao; |
| | | import com.java110.utils.constant.ResponseConstant; |
| | | import com.java110.utils.exception.DAOException; |
| | | import com.java110.utils.util.DateUtil; |
| | | import org.slf4j.Logger; |
| | | import org.slf4j.LoggerFactory; |
| | | import com.java110.core.log.LoggerFactory; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.List; |
| | |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 保存物品信息 |
| | | * |
| | | * @param info |
| | | * @throws DAOException |
| | | */ |
| | | @Override |
| | | public void saveResourceStoreInfo(Map info) throws DAOException { |
| | | logger.debug("保存物品信息入参 info : {}", info); |
| | | int saveFlag = sqlSessionTemplate.insert("resourceResourceStoreServiceDaoImpl.saveResourceStoreInfo", info); |
| | | if (saveFlag < 1) { |
| | | throw new DAOException(ResponseConstant.RESULT_PARAM_ERROR, "保存物品信息数据失败:" + JSONObject.toJSONString(info)); |
| | | } |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 查询资源信息(instance) |
| | |
| | | return Integer.parseInt(businessResourceStoreInfos.get(0).get("count").toString()); |
| | | } |
| | | |
| | | /** |
| | | * 查询资源总价 |
| | | * |
| | | * @param info 资源信息 |
| | | * @return 资源数量 |
| | | */ |
| | | @Override |
| | | public String queryResourceStoresTotalPrice(Map info) { |
| | | logger.debug("查询资源数据 入参 info : {}", info); |
| | | List<Map> businessResourceStoreInfos = sqlSessionTemplate.selectList("resourceResourceStoreServiceDaoImpl.queryResourceStoresTotalPrice", info); |
| | | if (businessResourceStoreInfos == null || businessResourceStoreInfos.size() < 1) { |
| | | return "0"; |
| | | } |
| | | return businessResourceStoreInfos.get(0).get("totalPrice").toString(); |
| | | } |
| | | |
| | | |
| | | } |