Compare commits

...

2 Commits

Author SHA1 Message Date
zhaotianfeng
7ea6567863 中台-小程序配置页面-新增 修改接口 加验证机构是否存在 2024-09-18 16:48:09 +08:00
zhaotianfeng
b8366bb7b4 小程序配置页面 增加取消按钮 2024-09-18 16:47:21 +08:00
5 changed files with 31 additions and 0 deletions

View File

@ -148,6 +148,7 @@
</el-form-item>
<el-form-item>
<el-button type="primary" @click="submitForm('deviceForm')">提交</el-button>
<el-button @click="resetForm('deviceForm')">取消</el-button>
</el-form-item>
</el-form>
<!-- </el-form>-->
@ -262,6 +263,11 @@ export default {
})
}
},
resetForm(formName) {
this.$refs[formName].resetFields();
this.clean();
this.open=false;
},
changeStatus(data){
console.log(123123123)
updateAppApi(data).then(res=>{

View File

@ -70,6 +70,13 @@ public class SysAppController extends BaseController {
@PostMapping
public ResponseObject add(@RequestBody SysApp sysApp) {
try {
// 先判断机构名称是否重复
SysApp s1 = new SysApp();
s1.setOrgId(sysApp.getOrgId());
Long aLong = sysAppService.queryCount(s1);
if (aLong>0){
return getFailureResult(500,"机构名称已经存在");
}
SysLog sysLog =new SysLog();
sysLog.setSystemName("2");
sysLog.setMoudle("小程序配置");
@ -88,6 +95,13 @@ public class SysAppController extends BaseController {
@PutMapping
public ResponseObject edit(@RequestBody SysApp sysApp) {
try {
// 先判断机构名称是否重复
SysApp s1= new SysApp();
s1.setOrgId(sysApp.getOrgId());
Long aLong = sysAppService.queryCount(s1);
if (aLong>0){
return getFailureResult(500,"机构名称已经存在");
}
SysLog sysLog =new SysLog();
sysLog.setSystemName("2");
sysLog.setMoudle("小程序配置");

View File

@ -67,6 +67,9 @@ legal_representative_id,legal_representative_contact,app_status,create_time,crea
select count(1)
from sys_app
<where>
<if test="orgId != null and orgId != ''">
and org_id = #{orgId}
</if>
<if test="id != null">
and id = #{id}
</if>

View File

@ -30,7 +30,9 @@ public interface SysAppService {
* @return 查询结果
*/
IPage<SysApp> queryByPage(@Param("page") Page page, SysApp sysApp);
// 根据机构名称查询
Long queryCount(SysApp sysApp);
/**
* 新增数据
*

View File

@ -50,6 +50,12 @@ public class SysAppServiceImpl implements SysAppService {
return this.sysAppMapper.queryAllByLimit(page, sysApp);
}
@Override
public Long queryCount(SysApp sysApp) {
long count = sysAppMapper.count(sysApp);
return count;
}
/**
* 新增数据
*