forked from knyin/finance
修正银行卡信息中的银行名称和增加开户行信息
parent
a9a4f0c4d8
commit
61e12467fd
|
@ -56,6 +56,7 @@ export const loadMenus = (next, to) => {
|
|||
const sdata = JSON.parse(JSON.stringify(res))
|
||||
const rdata = JSON.parse(JSON.stringify(res))
|
||||
const sidebarRoutes = filterAsyncRouter(sdata)
|
||||
|
||||
const rewriteRoutes = filterAsyncRouter(rdata, false, true)
|
||||
rewriteRoutes.push({ path: '*', redirect: '/404', hidden: true })
|
||||
|
||||
|
|
|
@ -0,0 +1,185 @@
|
|||
<template>
|
||||
<div class="app-container">
|
||||
<!--工具栏-->
|
||||
<div class="head-container">
|
||||
<!-- <div v-if="crud.props.searchToggle">-->
|
||||
<!-- <!– 搜索 –>-->
|
||||
<!-- <label class="el-form-item-label">申请类型</label>-->
|
||||
<!-- <el-input v-model="query.purchaseType" clearable placeholder="申请类型" style="width: 185px;" class="filter-item" @keyup.enter.native="crud.toQuery" />-->
|
||||
<!-- <rrOperation :crud="crud" />-->
|
||||
<!-- </div>-->
|
||||
<!--如果想在工具栏加入更多按钮,可以使用插槽方式, slot = 'left' or 'right'-->
|
||||
<crudOperation :permission="permission" />
|
||||
<!--表单组件-->
|
||||
<el-dialog append-to-body :close-on-click-modal="false" :before-close="crud.cancelCU" :visible.sync="crud.status.cu > 0" :title="crud.status.title" width="800px">
|
||||
<el-form ref="form" :inline="true" :model="form" :rules="rules" size="small" label-width="150px">
|
||||
<el-form-item v-show="false" label="申请人" prop="user.id" hidden="hidden">
|
||||
<el-input v-model="form.user.id" />
|
||||
</el-form-item>
|
||||
<el-form-item label="申请人" prop="user.nickName">
|
||||
<el-input v-model="form.user.nickName" disabled />
|
||||
</el-form-item>
|
||||
<el-form-item label="手机" prop="user.phone">
|
||||
<el-input v-model="form.user.phone" disabled />
|
||||
</el-form-item>
|
||||
<el-form-item label="部门" prop="user.dept.name">
|
||||
<el-input v-model="form.user.dept.name" disabled />
|
||||
</el-form-item>
|
||||
<el-form-item label="申请金额">
|
||||
<el-input v-model="form.fee" style="" />
|
||||
</el-form-item>
|
||||
<el-form-item label="申请事由">
|
||||
<el-input v-model="form.reason" />
|
||||
</el-form-item>
|
||||
<el-form-item label="货物/服务名称">
|
||||
<el-input v-model="form.productName" style="" />
|
||||
</el-form-item>
|
||||
<el-form-item label="申请类型">
|
||||
<el-select v-model="form.purchaseType" filterable placeholder="请选择" style="width:185px">
|
||||
<el-option
|
||||
v-for="item in dict.purchase_type"
|
||||
:key="item.id"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="品牌/规格/参数/型号">
|
||||
<el-input v-model="form.productInfo" style="" />
|
||||
</el-form-item>
|
||||
<el-form-item label="数量">
|
||||
<el-input v-model="form.productCount" style="" />
|
||||
</el-form-item>
|
||||
<el-form-item label="预算单价">
|
||||
<el-input v-model="form.productPrice" style="" />
|
||||
</el-form-item>
|
||||
<el-form-item label="预算总价">
|
||||
<el-input v-model="form.totalFee" style="" />
|
||||
</el-form-item>
|
||||
<el-form-item label="资金来源">
|
||||
<el-select v-model="form.feeSource" filterable placeholder="请选择" style="width:185px">
|
||||
<el-option
|
||||
v-for="item in dict.fee_source"
|
||||
:key="item.id"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="项目名称">
|
||||
<el-input v-model="form.projectName" style="" />
|
||||
</el-form-item>
|
||||
<el-form-item label="项目编号">
|
||||
<el-input v-model="form.projectNo" style="" />
|
||||
</el-form-item>
|
||||
<el-form-item label="预计采购时间">
|
||||
<el-date-picker v-model="form.purchaseTime" type="datetime" style="width:185px" />
|
||||
</el-form-item>
|
||||
<el-form-item label="备注">
|
||||
<el-input v-model="form.remark" style="width: 535px;" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="text" @click="crud.cancelCU">取消</el-button>
|
||||
<el-button :loading="crud.status.cu === 2" type="primary" @click="crud.submitCU">确认</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
<!--表格渲染-->
|
||||
<el-table ref="table" v-loading="crud.loading" :data="crud.data" size="small" style="width: 100%;" @selection-change="crud.selectionChangeHandler">
|
||||
<el-table-column type="selection" width="55" />
|
||||
<el-table-column prop="user.nickName" label="申请人" />
|
||||
<el-table-column prop="reason" label="申请事由" />
|
||||
<el-table-column prop="fee" label="申请金额" />
|
||||
<el-table-column prop="productName" label="货物/服务名称" />
|
||||
<el-table-column prop="purchaseType" label="申请类型">
|
||||
<template slot-scope="scope">
|
||||
{{ dict.label.purchase_type[scope.row.purchaseType] }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- <el-table-column prop="productInfo" label="品牌/规格/参数" />-->
|
||||
<el-table-column prop="productCount" label="数量" />
|
||||
<el-table-column prop="productPrice" label="预算单价" />
|
||||
<el-table-column prop="totalFee" label="预算总价" />
|
||||
<el-table-column prop="feeSource" label="资金来源">
|
||||
<template slot-scope="scope">
|
||||
{{ dict.label.fee_source[scope.row.feeSource] }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- <el-table-column prop="projectName" label="项目名称" />-->
|
||||
<!-- <el-table-column prop="projectNo" label="项目编号" />-->
|
||||
<el-table-column prop="purchaseTime" label="预计采购时间" />
|
||||
<el-table-column prop="applyTime" label="申请时间" />
|
||||
<el-table-column prop="remark" label="备注" />
|
||||
|
||||
<!-- 表格的操作部分 添加和删除 -->
|
||||
<el-table-column v-if="checkPer(['admin','purchase:edit','purchase:del'])" label="操作" width="150px" align="center">
|
||||
<template slot-scope="scope">
|
||||
<udOperation
|
||||
:data="scope.row"
|
||||
:permission="permission"
|
||||
/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!--分页组件-->
|
||||
<pagination />
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import crudPurchase from '@/api/system/purchase'
|
||||
import CRUD, { presenter, header, form, crud } from '@crud/crud'
|
||||
import rrOperation from '@crud/RR.operation'
|
||||
import crudOperation from '@crud/CRUD.operation'
|
||||
import udOperation from '@crud/UD.operation'
|
||||
import pagination from '@crud/Pagination'
|
||||
import user from '@/views/system/user/index.vue'
|
||||
import { mapGetters } from 'vuex'
|
||||
import store from '@/store'
|
||||
|
||||
const defaultForm = { user: { dept: {}}, purchaseId: null, userId: null, reason: null, fee: null, productName: null, purchaseType: null, productInfo: null, productCount: null, productPrice: null, totalFee: null, feeSource: null, projectName: null, projectNo: null, purchaseTime: null, applyTime: null, remark: null, createBy: null, updateBy: null, createTime: null, updateTime: null }
|
||||
export default {
|
||||
name: 'MyBusiness',
|
||||
components: { pagination, crudOperation, rrOperation, udOperation },
|
||||
mixins: [presenter(), header(), form(defaultForm), crud()],
|
||||
dicts: ['purchase_type', 'fee_source'],
|
||||
|
||||
// 创建一个增加读取更新删除对象
|
||||
cruds() {
|
||||
return CRUD({ title: '经费支出申请', url: 'api/purchase', idField: 'purchaseId', sort: 'purchaseId,desc', crudMethod: { ...crudPurchase }})
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
permission: {
|
||||
add: ['admin', 'purchase:add'],
|
||||
edit: ['admin', 'purchase:edit'],
|
||||
del: ['admin', 'purchase:del']
|
||||
},
|
||||
rules: {
|
||||
},
|
||||
queryTypeOptions: [
|
||||
{ key: 'purchaseType', display_name: '申请类型' }
|
||||
]
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapGetters([
|
||||
'user'
|
||||
])
|
||||
},
|
||||
methods: {
|
||||
// 钩子:在获取表格数据之前执行,false 则代表不获取数据
|
||||
[CRUD.HOOK.beforeRefresh]() {
|
||||
return true
|
||||
},
|
||||
[CRUD.HOOK.beforeToAdd]() {
|
||||
this.form.user = this.user
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
|
@ -37,10 +37,11 @@
|
|||
<el-form-item label="备注">
|
||||
<el-input v-model="form.remark" />
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="创建者">
|
||||
|
||||
<el-form-item label="创建者">
|
||||
<el-input v-model="form.createBy" />
|
||||
</el-form-item>
|
||||
<el-form-item label="更新者">
|
||||
<!-- <el-form-item label="更新者">
|
||||
<el-input v-model="form.updateBy" />
|
||||
</el-form-item>
|
||||
<el-form-item label="创建日期">
|
||||
|
@ -60,10 +61,10 @@
|
|||
<el-table-column type="selection" width="55" />
|
||||
<el-table-column prop="projectNo" label="科研项目编号" />
|
||||
<el-table-column prop="projectName" label="科研项目名称" />
|
||||
<el-table-column prop="projectFee" label="项目预算" />
|
||||
<el-table-column prop="projectFee" label="预算余额(万)" />
|
||||
<el-table-column prop="projectUser.nickName" label="项目负责人" />
|
||||
<el-table-column prop="remark" label="备注" />
|
||||
<!-- <el-table-column prop="createBy" label="创建者" />-->
|
||||
<el-table-column prop="createBy" label="创建者" />
|
||||
<!-- <el-table-column prop="updateBy" label="更新者" />-->
|
||||
<!-- <el-table-column prop="createTime" label="创建日期" />-->
|
||||
<!-- <el-table-column prop="updateTime" label="更新时间" />-->
|
||||
|
@ -85,7 +86,6 @@
|
|||
<script>
|
||||
import crudProject from '@/api/system/project'
|
||||
import CRUD, { presenter, header, form, crud } from '@crud/crud'
|
||||
import rrOperation from '@crud/RR.operation'
|
||||
import crudOperation from '@crud/CRUD.operation'
|
||||
import udOperation from '@crud/UD.operation'
|
||||
import pagination from '@crud/Pagination'
|
||||
|
@ -94,7 +94,7 @@ import UserSelect from '@/views/system/user/user-select.vue'
|
|||
const defaultForm = { projectUser: {}, projectId: null, projectNo: null, projectName: null, projectFee: null, projectUserId: null, remark: null, createBy: null, updateBy: null, createTime: null, updateTime: null }
|
||||
export default {
|
||||
name: 'Project',
|
||||
components: { UserSelect, pagination, crudOperation, rrOperation, udOperation },
|
||||
components: { UserSelect, pagination, crudOperation, udOperation },
|
||||
mixins: [presenter(), header(), form(defaultForm), crud()],
|
||||
cruds() {
|
||||
return CRUD({ title: '科研信息', url: 'api/project', idField: 'projectId', sort: 'projectId,desc', crudMethod: { ...crudProject }})
|
||||
|
|
|
@ -44,7 +44,7 @@
|
|||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="品牌/规格/参数">
|
||||
<el-form-item label="品牌/规格/参数/型号">
|
||||
<el-input v-model="form.productInfo" style="" />
|
||||
</el-form-item>
|
||||
<el-form-item label="数量">
|
||||
|
@ -110,6 +110,8 @@
|
|||
<el-table-column prop="purchaseTime" label="预计采购时间" />
|
||||
<el-table-column prop="applyTime" label="申请时间" />
|
||||
<el-table-column prop="remark" label="备注" />
|
||||
|
||||
<!-- 表格的操作部分 添加和删除 -->
|
||||
<el-table-column v-if="checkPer(['admin','purchase:edit','purchase:del'])" label="操作" width="150px" align="center">
|
||||
<template slot-scope="scope">
|
||||
<udOperation
|
||||
|
@ -142,6 +144,8 @@ export default {
|
|||
components: { pagination, crudOperation, rrOperation, udOperation },
|
||||
mixins: [presenter(), header(), form(defaultForm), crud()],
|
||||
dicts: ['purchase_type', 'fee_source'],
|
||||
|
||||
// 创建一个增加读取更新删除对象
|
||||
cruds() {
|
||||
return CRUD({ title: '经费支出申请', url: 'api/purchase', idField: 'purchaseId', sort: 'purchaseId,desc', crudMethod: { ...crudPurchase }})
|
||||
},
|
||||
|
|
|
@ -16,8 +16,8 @@
|
|||
<el-form-item label="银行卡号" prop="bankNo">
|
||||
<el-input v-model="form.bankNo" style="" />
|
||||
</el-form-item>
|
||||
<el-form-item label="银行卡所属支行" prop="bankName">
|
||||
<el-input v-model="form.bankName" style="" />
|
||||
<el-form-item label="银行名称" prop="bankName">
|
||||
<el-input v-model="form.bankName" />
|
||||
</el-form-item>
|
||||
<el-form-item label="是否常用账号">
|
||||
<el-radio-group v-model="form.bankUse">
|
||||
|
@ -28,6 +28,9 @@
|
|||
<el-form-item label="备注">
|
||||
<el-input v-model="form.remark" style="" />
|
||||
</el-form-item>
|
||||
<el-form-item label="开户行">
|
||||
<el-input v-model="form.bankLocation" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="text" @click="crud.cancelCU">取消</el-button>
|
||||
|
@ -39,7 +42,8 @@
|
|||
<el-table-column type="selection" width="55" />
|
||||
<el-table-column prop="user.nickName" label="所属用户" />
|
||||
<el-table-column prop="bankNo" label="银行卡号" />
|
||||
<el-table-column prop="bankName" label="银行卡所属支行" />
|
||||
<el-table-column prop="bankName" label="银行名称" />
|
||||
<el-table-column prop="bankLocation" label="开户行" />
|
||||
<el-table-column prop="bankUse" label="是否常用账号" />
|
||||
<el-table-column prop="remark" label="备注" />
|
||||
<el-table-column v-if="checkPer(['admin','userBank:edit','userBank:del'])" label="操作" width="150px" align="center">
|
||||
|
|
|
@ -31,7 +31,6 @@ import java.io.Serializable;
|
|||
* @website https://eladmin.vip
|
||||
* @description /
|
||||
* @author author
|
||||
* @date 2023-10-31
|
||||
**/
|
||||
@Entity
|
||||
@Data
|
||||
|
@ -56,7 +55,7 @@ public class UserBank extends BaseEntity implements Serializable {
|
|||
|
||||
@Column(name = "`bank_name`",nullable = false)
|
||||
@NotBlank
|
||||
@ApiModelProperty(value = "银行卡所属支行")
|
||||
@ApiModelProperty(value = "银行名称")
|
||||
private String bankName;
|
||||
|
||||
@Column(name = "`bank_use`")
|
||||
|
@ -67,6 +66,25 @@ public class UserBank extends BaseEntity implements Serializable {
|
|||
@ApiModelProperty(value = "备注")
|
||||
private String remark;
|
||||
|
||||
@Column(name = "`create_by`")
|
||||
@ApiModelProperty(value = "创建者")
|
||||
private String createBy;
|
||||
|
||||
@Column(name = "`update_by`")
|
||||
@ApiModelProperty(value = "更新者")
|
||||
private String updateBy;
|
||||
|
||||
@Column(name = "`create_time`")
|
||||
@ApiModelProperty(value = "创建日期")
|
||||
private Timestamp createTime;
|
||||
|
||||
@Column(name = "`update_time`")
|
||||
@ApiModelProperty(value = "更新时间")
|
||||
private Timestamp updateTime;
|
||||
|
||||
@Column(name = "`bank_location`")
|
||||
@ApiModelProperty(value = "开户行")
|
||||
private String bankLocation;
|
||||
|
||||
public void copy(UserBank source){
|
||||
BeanUtil.copyProperties(source,this, CopyOptions.create().setIgnoreNullValue(true));
|
||||
|
|
|
@ -35,7 +35,7 @@ import me.zhengjie.modules.system.service.dto.UserBankDto;
|
|||
/**
|
||||
* @website https://eladmin.vip
|
||||
* @author author
|
||||
* @date 2023-10-31
|
||||
* @date 2023-12-21
|
||||
**/
|
||||
@RestController
|
||||
@RequiredArgsConstructor
|
||||
|
|
|
@ -23,7 +23,7 @@ import java.io.Serializable;
|
|||
* @website https://eladmin.vip
|
||||
* @description /
|
||||
* @author author
|
||||
* @date 2023-10-31
|
||||
* @date 2023-12-21
|
||||
**/
|
||||
@Data
|
||||
public class UserBankDto implements Serializable {
|
||||
|
@ -37,7 +37,7 @@ public class UserBankDto implements Serializable {
|
|||
/** 银行卡号 */
|
||||
private String bankNo;
|
||||
|
||||
/** 银行卡所属支行 */
|
||||
/** 银行名称 */
|
||||
private String bankName;
|
||||
|
||||
/** 是否常用账号 */
|
||||
|
@ -57,5 +57,9 @@ public class UserBankDto implements Serializable {
|
|||
|
||||
/** 更新时间 */
|
||||
private Timestamp updateTime;
|
||||
|
||||
private UserDto user;
|
||||
|
||||
/** 开户行 */
|
||||
private String bankLocation;
|
||||
}
|
|
@ -22,7 +22,7 @@ import me.zhengjie.annotation.Query;
|
|||
/**
|
||||
* @website https://eladmin.vip
|
||||
* @author author
|
||||
* @date 2023-10-31
|
||||
* @date 2023-12-21
|
||||
**/
|
||||
@Data
|
||||
public class UserBankQueryCriteria{
|
||||
|
|
|
@ -30,18 +30,19 @@ import org.springframework.data.domain.Page;
|
|||
import org.springframework.data.domain.Pageable;
|
||||
import me.zhengjie.utils.PageUtil;
|
||||
import me.zhengjie.utils.QueryHelp;
|
||||
|
||||
import java.util.*;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.io.IOException;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.LinkedHashMap;
|
||||
import me.zhengjie.utils.PageResult;
|
||||
|
||||
/**
|
||||
* @website https://eladmin.vip
|
||||
* @description 服务实现
|
||||
* @author author
|
||||
* @date 2023-10-31
|
||||
* @date 2023-12-21
|
||||
**/
|
||||
@Service
|
||||
@RequiredArgsConstructor
|
||||
|
@ -50,7 +51,6 @@ public class UserBankServiceImpl implements UserBankService {
|
|||
private final UserBankRepository userBankRepository;
|
||||
private final UserBankMapper userBankMapper;
|
||||
|
||||
|
||||
@Override
|
||||
public PageResult<UserBankDto> queryAll(UserBankQueryCriteria criteria, Pageable pageable){
|
||||
Page<UserBank> page = userBankRepository.findAll((root, criteriaQuery, criteriaBuilder) -> QueryHelp.getPredicate(root,criteria,criteriaBuilder),pageable);
|
||||
|
@ -73,36 +73,18 @@ public class UserBankServiceImpl implements UserBankService {
|
|||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void create(UserBank resources) {
|
||||
if (resources.getBankUse() == null){
|
||||
resources.setBankUse("否");
|
||||
}
|
||||
handleBankUse(resources);
|
||||
userBankRepository.save(resources);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void update(UserBank resources) {
|
||||
handleBankUse(resources);
|
||||
UserBank userBank = userBankRepository.findById(resources.getBankId()).orElseGet(UserBank::new);
|
||||
ValidationUtil.isNull( userBank.getBankId(),"UserBank","id",resources.getBankId());
|
||||
userBank.copy(resources);
|
||||
userBankRepository.save(userBank);
|
||||
}
|
||||
|
||||
/**
|
||||
* 常用银行卡处理
|
||||
* */
|
||||
private void handleBankUse(UserBank resources) {
|
||||
if (Objects.equals("是", resources.getBankUse())) {
|
||||
userBankRepository.findByBankUseAndUser("是", resources.getUser()).ifPresent(userBank ->{
|
||||
userBank.setBankUse("否");
|
||||
userBankRepository.save(userBank);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deleteAll(Long[] ids) {
|
||||
for (Long bankId : ids) {
|
||||
|
@ -117,13 +99,14 @@ public class UserBankServiceImpl implements UserBankService {
|
|||
Map<String,Object> map = new LinkedHashMap<>();
|
||||
map.put("所属用户", userBank.getUser().getNickName());
|
||||
map.put("银行卡号", userBank.getBankNo());
|
||||
map.put("银行卡所属支行", userBank.getBankName());
|
||||
map.put("银行名称", userBank.getBankName());
|
||||
map.put("是否常用账号", userBank.getBankUse());
|
||||
map.put("备注", userBank.getRemark());
|
||||
map.put("创建者", userBank.getCreateBy());
|
||||
map.put("更新者", userBank.getUpdateBy());
|
||||
map.put("创建日期", userBank.getCreateTime());
|
||||
map.put("更新时间", userBank.getUpdateTime());
|
||||
map.put("开户行", userBank.getBankLocation());
|
||||
list.add(map);
|
||||
}
|
||||
FileUtil.downloadExcel(list, response);
|
||||
|
|
|
@ -24,7 +24,7 @@ import org.mapstruct.ReportingPolicy;
|
|||
/**
|
||||
* @website https://eladmin.vip
|
||||
* @author author
|
||||
* @date 2023-10-31
|
||||
* @date 2023-12-21
|
||||
**/
|
||||
@Mapper(componentModel = "spring", unmappedTargetPolicy = ReportingPolicy.IGNORE)
|
||||
public interface UserBankMapper extends BaseMapper<UserBankDto, UserBank> {
|
||||
|
|
|
@ -0,0 +1,23 @@
|
|||
## 二、目录与分类
|
||||
|
||||
1、分类框架
|
||||
|
||||
在Spring Boot框架下,通常会将应用程序的功能划分为不同的模块或组件。根据您提供的信息,您的应用程序似乎被划分为了mnt、quartz、security和system这几个模块。
|
||||
|
||||
- mnt模块:可能是指"maintenance"(维护)模块,用于处理应用程序的维护相关功能,如日志记录、监控和性能优化等。
|
||||
- quartz模块:可能是指Quartz调度框架相关的模块,Quartz是一个功能强大的作业调度器,用于在特定的时间点或按照一定的规则执行任务。
|
||||
- security模块:可能是指安全模块,用于处理应用程序的安全相关功能,如用户认证、授权、权限管理等。
|
||||
- system模块:可能是指系统模块,用于处理应用程序的系统级功能,如配置管理、异常处理、国际化等。
|
||||
|
||||
请注意,这些模块的具体功能和实现可能因应用程序的需求而有所不同。这只是根据您提供的信息给出的一种可能的解释。实际上,模块的划分和命名是根据具体的应用程序需求和架构设计来确定的。
|
||||
|
||||
2、分类框架2
|
||||
|
||||
在软件开发中,通常会将应用程序的逻辑划分为不同的层次,以便于维护和管理。其中,常见的一种架构风格是三层架构,即将应用程序的逻辑划分为表示层、业务逻辑层和数据访问层。
|
||||
|
||||
在这种架构风格中,通常会使用以下术语来描述不同的层次:
|
||||
|
||||
- Domain(领域层):表示应用程序的业务领域,包含了业务实体、值对象、服务等,是应用程序的核心。
|
||||
- Repository(数据访问层):用于访问和管理应用程序的数据存储,可以是关系型数据库、NoSQL数据库、文件系统等。
|
||||
- Service(业务逻辑层):用于实现应用程序的业务逻辑,协调和管理领域对象和数据访问对象之间的交互。
|
||||
- REST通常被视为表示层(Presentation Layer)的一种实现方式。表示层负责处理用户请求和响应,将用户的输入转化为对应的业务逻辑操作,并将结果返回给用户。
|
Loading…
Reference in New Issue