提交 1fe53228 编写于 作者: laizhilong's avatar laizhilong

Merge remote-tracking branch 'origin/master'

......@@ -40,8 +40,6 @@ export default {
redirect_uri: "RedirectURI",
region_id: "RegionId",
disabled: "是否禁用",
lic: "授权",
image: "图片",
accessid: "开放平台接入标识",
},
uiactions: {
......
......@@ -39,8 +39,6 @@ export default {
redirect_uri: "RedirectURI",
region_id: "RegionId",
disabled: "是否禁用",
lic: "授权",
image: "图片",
accessid: "开放平台接入标识",
},
uiactions: {
......
......@@ -114,16 +114,165 @@ mock.onGet(new RegExp(/^\/sysuserauths\/([a-zA-Z0-9\-\;]{1,35})\/select$/)).repl
console.groupEnd();
return [status, _items];
});
// URI参数传递情况未实现
// URI参数传递情况未实现
// URI参数传递情况未实现
// URI参数传递情况未实现
// URI参数传递情况未实现
// URI参数传递情况未实现
// URI参数传递情况未实现
// Create
mock.onPost(new RegExp(/^\/sysuserauths\/?([a-zA-Z0-9\-\;]{0,35})$/)).reply((config: any) => {
console.groupCollapsed("实体:sysuserauth 方法: Create");
console.table({url:config.url, method: config.method, data:config.data});
let status = MockAdapter.mockStatus(config);
if (status !== 200) {
return [status, null];
}
const paramArray:Array<any> = ['id'];
const matchArray:any = new RegExp(/^\/sysuserauths\/([a-zA-Z0-9\-\;]{1,35})$/).exec(config.url);
let tempValue: any = {};
if(matchArray && matchArray.length >1 && paramArray && paramArray.length >0){
paramArray.forEach((item: any, index: number) => {
Object.defineProperty(tempValue, item, {
enumerable: true,
value: matchArray[index + 1]
});
});
}
console.groupCollapsed("response数据 status: "+status+" data: ");
console.table(mockDatas[0]);
console.groupEnd();
console.groupEnd();
return [status, mockDatas[0]];
});
// Update
mock.onPut(new RegExp(/^\/sysuserauths\/?([a-zA-Z0-9\-\;]{0,35})$/)).reply((config: any) => {
console.groupCollapsed("实体:sysuserauth 方法: Update");
console.table({url:config.url, method: config.method, data:config.data});
let status = MockAdapter.mockStatus(config);
if (status !== 200) {
return [status, null];
}
const paramArray:Array<any> = ['id'];
const matchArray:any = new RegExp(/^\/sysuserauths\/([a-zA-Z0-9\-\;]{1,35})$/).exec(config.url);
let tempValue: any = {};
if(matchArray && matchArray.length >1 && paramArray && paramArray.length >0){
paramArray.forEach((item: any, index: number) => {
Object.defineProperty(tempValue, item, {
enumerable: true,
value: matchArray[index + 1]
});
});
}
//let items = mockDatas ? mockDatas : [];
//let _items = items.find((item: any) => Object.is(item.id, tempValue.id));
let data = JSON.parse(config.data);
mockDatas.forEach((item)=>{
if(item['id'] == tempValue['id'] ){
for(let value in data){
if(item.hasOwnProperty(value)){
item[value] = data[value];
}
}
}
})
console.groupCollapsed("response数据 status: "+status+" data: ");
console.table(data);
console.groupEnd();
console.groupEnd();
return [status, data];
});
// GetDraft
mock.onGet(new RegExp(/^\/sysuserauths\/getdraft$/)).reply((config: any) => {
console.groupCollapsed("实体:sysuserauth 方法: GetDraft");
console.table({url:config.url, method: config.method, data:config.data});
// GetDraft
let status = MockAdapter.mockStatus(config);
if (status !== 200) {
return [status, null];
}
console.groupCollapsed("response数据 status: "+status+" data: ");
console.table({});
console.groupEnd();
console.groupEnd();
return [status, {}];
});
// CheckKey
mock.onPost(new RegExp(/^\/sysuserauths\/?([a-zA-Z0-9\-\;]{0,35})\/checkkey$/)).reply((config: any) => {
console.groupCollapsed("实体:sysuserauth 方法: CheckKey");
console.table({url:config.url, method: config.method, data:config.data});
let status = MockAdapter.mockStatus(config);
if (status !== 200) {
return [status, null];
}
const paramArray:Array<any> = ['id'];
const matchArray:any = new RegExp(/^\/sysuserauths\/([a-zA-Z0-9\-\;]{1,35})\/checkkey$/).exec(config.url);
let tempValue: any = {};
if(matchArray && matchArray.length >1 && paramArray && paramArray.length >0){
paramArray.forEach((item: any, index: number) => {
Object.defineProperty(tempValue, item, {
enumerable: true,
value: matchArray[index + 1]
});
});
}
//let items = mockDatas ? mockDatas : [];
//let _items = items.find((item: any) => Object.is(item.id, tempValue.id));
let data = JSON.parse(config.data);
mockDatas.forEach((item)=>{
if(item['id'] == tempValue['id'] ){
for(let value in data){
if(item.hasOwnProperty(value)){
item[value] = data[value];
}
}
}
})
console.groupCollapsed("response数据 status: "+status+" data: ");
console.table(data);
console.groupEnd();
console.groupEnd();
return [status, data];
});
// Save
mock.onPost(new RegExp(/^\/sysuserauths\/?([a-zA-Z0-9\-\;]{0,35})\/save$/)).reply((config: any) => {
console.groupCollapsed("实体:sysuserauth 方法: Save");
console.table({url:config.url, method: config.method, data:config.data});
let status = MockAdapter.mockStatus(config);
if (status !== 200) {
return [status, null];
}
const paramArray:Array<any> = ['id'];
const matchArray:any = new RegExp(/^\/sysuserauths\/([a-zA-Z0-9\-\;]{1,35})\/save$/).exec(config.url);
let tempValue: any = {};
if(matchArray && matchArray.length >1 && paramArray && paramArray.length >0){
paramArray.forEach((item: any, index: number) => {
Object.defineProperty(tempValue, item, {
enumerable: true,
value: matchArray[index + 1]
});
});
}
//let items = mockDatas ? mockDatas : [];
//let _items = items.find((item: any) => Object.is(item.id, tempValue.id));
let data = JSON.parse(config.data);
mockDatas.forEach((item)=>{
if(item['id'] == tempValue['id'] ){
for(let value in data){
if(item.hasOwnProperty(value)){
item[value] = data[value];
}
}
}
})
console.groupCollapsed("response数据 status: "+status+" data: ");
console.table(data);
console.groupEnd();
console.groupEnd();
return [status, data];
});
// FetchDefault
mock.onGet(new RegExp(/^\/sysuserauths\/select$/)).reply((config: any) => {
mock.onGet(new RegExp(/^\/sysuserauths\/fetchdefault$/)).reply((config: any) => {
console.groupCollapsed("实体:sysuserauth 方法: FetchDefault");
console.table({url:config.url, method: config.method, data:config.data});
let status = MockAdapter.mockStatus(config);
......@@ -138,7 +287,7 @@ mock.onGet(new RegExp(/^\/sysuserauths\/select$/)).reply((config: any) => {
});
// FetchDefault
mock.onGet(new RegExp(/^\/sysuserauths\/select(\?[\w-./?%&=,]*)*$/)).reply((config: any) => {
mock.onGet(new RegExp(/^\/sysuserauths\/fetchdefault(\?[\w-./?%&=,]*)*$/)).reply((config: any) => {
console.groupCollapsed("实体:sysuserauth 方法: FetchDefault");
console.table({url:config.url, method: config.method, data:config.data});
if(config.url.includes('page')){
......@@ -173,3 +322,59 @@ mock.onGet(new RegExp(/^\/sysuserauths\/select(\?[\w-./?%&=,]*)*$/)).reply((conf
// URI参数传递情况未实现
// URI参数传递情况未实现
// Remove
mock.onDelete(new RegExp(/^\/sysuserauths\/([a-zA-Z0-9\-\;]{1,35})$/)).reply((config: any) => {
console.groupCollapsed("实体:sysuserauth 方法: Remove");
console.table({url:config.url, method: config.method, data:config.data});
let status = MockAdapter.mockStatus(config);
if (status !== 200) {
return [status, null];
}
const paramArray:Array<any> = ['id'];
const matchArray:any = new RegExp(/^\/sysuserauths\/([a-zA-Z0-9\-\;]{1,35})$/).exec(config.url);
let tempValue: any = {};
if(matchArray && matchArray.length >1 && paramArray && paramArray.length >0){
paramArray.forEach((item: any, index: number) => {
Object.defineProperty(tempValue, item, {
enumerable: true,
value: matchArray[index + 1]
});
});
}
let items = mockDatas ? mockDatas : [];
let _items = items.find((item: any) => Object.is(item.id, tempValue.id));
console.groupCollapsed("response数据 status: "+status+" data: ");
console.table(_items?_items:{});
console.groupEnd();
console.groupEnd();
return [status, _items?_items:{}];
});
// Get
mock.onGet(new RegExp(/^\/sysuserauths\/([a-zA-Z0-9\-\;]{1,35})$/)).reply((config: any) => {
console.groupCollapsed("实体:sysuserauth 方法: Get");
console.table({url:config.url, method: config.method, data:config.data});
let status = MockAdapter.mockStatus(config);
if (status !== 200) {
return [status, null];
}
const paramArray:Array<any> = ['id'];
const matchArray:any = new RegExp(/^\/sysuserauths\/([a-zA-Z0-9\-\;]{1,35})$/).exec(config.url);
let tempValue: any = {};
if(matchArray && matchArray.length >1 && paramArray && paramArray.length >0){
paramArray.forEach((item: any, index: number) => {
Object.defineProperty(tempValue, item, {
enumerable: true,
value: matchArray[index + 1]
});
});
}
let items = mockDatas ? mockDatas : [];
let _items = items.find((item: any) => Object.is(item.id, tempValue.id));
console.groupCollapsed("response数据 status: "+status+" data: ");
console.table(_items?_items:{});
console.groupEnd();
console.groupEnd();
return [status, _items?_items:{}];
});
......@@ -31,7 +31,7 @@ export default class SysUserAuthServiceBase extends EntityService {
this.APPLYDEKEY ='sysuserauth';
this.APPDEKEY = 'id';
this.APPDENAME = 'sysuserauths';
this.APPDETEXT = '';
this.APPDETEXT = 'username';
this.APPNAME = 'web';
this.SYSTEMNAME = 'ibzuaa';
}
......@@ -53,6 +53,123 @@ export default class SysUserAuthServiceBase extends EntityService {
return res;
}
/**
* Create接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof SysUserAuthServiceBase
*/
public async Create(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let masterData:any = {};
Object.assign(data,masterData);
if(!data.srffrontuf || data.srffrontuf !== "1"){
data[this.APPDEKEY] = null;
}
if(data.srffrontuf){
delete data.srffrontuf;
}
let tempContext:any = JSON.parse(JSON.stringify(context));
let res:any = await Http.getInstance().post(`/sysuserauths`,data,isloading);
return res;
}
/**
* Update接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof SysUserAuthServiceBase
*/
public async Update(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let masterData:any = {};
Object.assign(data,masterData);
let res:any = await Http.getInstance().put(`/sysuserauths/${context.sysuserauth}`,data,isloading);
return res;
}
/**
* Remove接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof SysUserAuthServiceBase
*/
public async Remove(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let res:any = Http.getInstance().delete(`/sysuserauths/${context.sysuserauth}`,isloading);
return res;
}
/**
* Get接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof SysUserAuthServiceBase
*/
public async Get(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let res:any = await Http.getInstance().get(`/sysuserauths/${context.sysuserauth}`,isloading);
return res;
}
/**
* GetDraft接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof SysUserAuthServiceBase
*/
public async GetDraft(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let res:any = await Http.getInstance().get(`/sysuserauths/getdraft`,isloading);
res.data.sysuserauth = data.sysuserauth;
return res;
}
/**
* CheckKey接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof SysUserAuthServiceBase
*/
public async CheckKey(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let res:any = Http.getInstance().post(`/sysuserauths/${context.sysuserauth}/checkkey`,data,isloading);
return res;
}
/**
* Save接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof SysUserAuthServiceBase
*/
public async Save(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let masterData:any = {};
Object.assign(data,masterData);
let res:any = await Http.getInstance().post(`/sysuserauths/${context.sysuserauth}/save`,data,isloading);
return res;
}
/**
* FetchDefault接口方法
*
......@@ -63,5 +180,8 @@ export default class SysUserAuthServiceBase extends EntityService {
* @memberof SysUserAuthServiceBase
*/
public async FetchDefault(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let tempData:any = JSON.parse(JSON.stringify(data));
let res:any = Http.getInstance().get(`/sysuserauths/fetchdefault`,tempData,isloading);
return res;
}
}
\ No newline at end of file
......@@ -109,42 +109,6 @@
</app-form-item>
</i-col>
<i-col v-show="detailsModel.lic.visible" :style="{}" :lg="{ span: 24, offset: 0 }">
<app-form-item name='lic' :itemRules="this.rules().lic" class='' :caption="$t('entities.sysopenaccess.main_form.details.lic')" uiStyle="DEFAULT" :labelWidth="130" :isShowCaption="true" :error="detailsModel.lic.error" :isEmptyCaption="false" labelPos="LEFT">
<ibiz-file-upload
:data="data"
formItemName="lic"
:value="data.lic"
:formState="formState"
folder="sysopenaccess"
ownertype="lic"
:ownerid="data.srfkey"
:show-ocrview="true"
:show-preview="true"
:show-edit="true"
:show-drag="false"
:persistence="false"
@formitemvaluechange="onFormItemValueChange"></ibiz-file-upload>
</app-form-item>
</i-col>
<i-col v-show="detailsModel.image.visible" :style="{}" :lg="{ span: 24, offset: 0 }">
<app-form-item name='image' :itemRules="this.rules().image" class='' :caption="$t('entities.sysopenaccess.main_form.details.image')" uiStyle="DEFAULT" :labelWidth="130" :isShowCaption="true" :error="detailsModel.lic.error" :isEmptyCaption="false" labelPos="LEFT">
<ibiz-image-upload
:data="data"
formItemName="image"
:value="data.image"
:formState="formState"
folder="sysopenaccess"
ownertype="image"
:ownerid="data.srfkey"
:show-ocrview="true"
:show-preview="true"
:persistence="true"
@formitemvaluechange="onFormItemValueChange"></ibiz-image-upload>
</app-form-item>
</i-col>
</row>
......@@ -497,8 +461,6 @@ export default class MainBase extends Vue implements ControlInterface {
redirect_uri: null,
region_id: null,
disabled: null,
lic: null,
image: null,
accessid: null,
sysopenaccess:null,
};
......@@ -627,18 +589,6 @@ export default class MainBase extends Vue implements ControlInterface {
{ required: false, type: 'number', message: '是否禁用 值不能为空', trigger: 'change' },
{ required: false, type: 'number', message: '是否禁用 值不能为空', trigger: 'blur' },
],
lic: [
{ type: 'string', message: '授权 值必须为字符串类型', trigger: 'change' },
{ type: 'string', message: '授权 值必须为字符串类型', trigger: 'blur' },
{ required: false, type: 'string', message: '授权 值不能为空', trigger: 'change' },
{ required: false, type: 'string', message: '授权 值不能为空', trigger: 'blur' },
],
image: [
{ type: 'string', message: '图片 值必须为字符串类型', trigger: 'change' },
{ type: 'string', message: '图片 值必须为字符串类型', trigger: 'blur' },
{ required: false, type: 'string', message: '图片 值不能为空', trigger: 'change' },
{ required: false, type: 'string', message: '图片 值不能为空', trigger: 'blur' },
],
accessid: [
{ type: 'string', message: '开放平台接入标识 值必须为字符串类型', trigger: 'change' },
{ type: 'string', message: '开放平台接入标识 值必须为字符串类型', trigger: 'blur' },
......@@ -764,10 +714,6 @@ export default class MainBase extends Vue implements ControlInterface {
region_id: new FormItemModel({ caption: 'RegionId', detailType: 'FORMITEM', name: 'region_id', visible: true, isShowCaption: true, form: this, isControlledContent: false , disabled: false, enableCond: 3 })
,
disabled: new FormItemModel({ caption: '是否禁用', detailType: 'FORMITEM', name: 'disabled', visible: true, isShowCaption: true, form: this, isControlledContent: false , disabled: false, enableCond: 3 })
,
lic: new FormItemModel({ caption: '授权', detailType: 'FORMITEM', name: 'lic', visible: true, isShowCaption: true, form: this, isControlledContent: false , disabled: false, enableCond: 3 })
,
image: new FormItemModel({ caption: '图片', detailType: 'FORMITEM', name: 'image', visible: true, isShowCaption: true, form: this, isControlledContent: false , disabled: false, enableCond: 3 })
,
accessid: new FormItemModel({ caption: '开放平台接入标识', detailType: 'FORMITEM', name: 'accessid', visible: true, isShowCaption: true, form: this, isControlledContent: false , disabled: false, enableCond: 3 })
,
......@@ -941,30 +887,6 @@ export default class MainBase extends Vue implements ControlInterface {
this.formDataChange({ name: 'disabled', newVal: newVal, oldVal: oldVal });
}
/**
* 监控表单属性 lic 值
*
* @param {*} newVal
* @param {*} oldVal
* @memberof MainBase
*/
@Watch('data.lic')
onLicChange(newVal: any, oldVal: any) {
this.formDataChange({ name: 'lic', newVal: newVal, oldVal: oldVal });
}
/**
* 监控表单属性 image 值
*
* @param {*} newVal
* @param {*} oldVal
* @memberof MainBase
*/
@Watch('data.image')
onImageChange(newVal: any, oldVal: any) {
this.formDataChange({ name: 'image', newVal: newVal, oldVal: oldVal });
}
/**
* 监控表单属性 accessid 值
*
......@@ -1048,8 +970,6 @@ export default class MainBase extends Vue implements ControlInterface {
}
/**
......
......@@ -85,14 +85,6 @@ export default class MainModel {
prop: 'disabled',
dataType: 'YESNO',
},
{
name: 'lic',
dataType:'FORMITEM',
},
{
name: 'image',
dataType:'FORMITEM',
},
{
name: 'accessid',
prop: 'id',
......
......@@ -56,6 +56,9 @@ public class SysUserAuthSearchContext extends QueryWrapperContext<SysUserAuth> {
{
this.query=query;
if(!StringUtils.isEmpty(query)){
this.getSearchCond().and( wrapper ->
wrapper.like("username", query)
);
}
}
}
......
......@@ -46,5 +46,114 @@ public class SysUserAuthResource {
@Lazy
public SysUserAuthMapping sysuserauthMapping;
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzuaa-SysUserAuth-Create-all')")
@ApiOperation(value = "新建账号绑定", tags = {"账号绑定" }, notes = "新建账号绑定")
@RequestMapping(method = RequestMethod.POST, value = "/sysuserauths")
public ResponseEntity<SysUserAuthDTO> create(@RequestBody SysUserAuthDTO sysuserauthdto) {
SysUserAuth domain = sysuserauthMapping.toDomain(sysuserauthdto);
sysuserauthService.create(domain);
SysUserAuthDTO dto = sysuserauthMapping.toDto(domain);
return ResponseEntity.status(HttpStatus.OK).body(dto);
}
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzuaa-SysUserAuth-Create-all')")
@ApiOperation(value = "批量新建账号绑定", tags = {"账号绑定" }, notes = "批量新建账号绑定")
@RequestMapping(method = RequestMethod.POST, value = "/sysuserauths/batch")
public ResponseEntity<Boolean> createBatch(@RequestBody List<SysUserAuthDTO> sysuserauthdtos) {
sysuserauthService.createBatch(sysuserauthMapping.toDomain(sysuserauthdtos));
return ResponseEntity.status(HttpStatus.OK).body(true);
}
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzuaa-SysUserAuth-Update-all')")
@ApiOperation(value = "更新账号绑定", tags = {"账号绑定" }, notes = "更新账号绑定")
@RequestMapping(method = RequestMethod.PUT, value = "/sysuserauths/{sysuserauth_id}")
public ResponseEntity<SysUserAuthDTO> update(@PathVariable("sysuserauth_id") String sysuserauth_id, @RequestBody SysUserAuthDTO sysuserauthdto) {
SysUserAuth domain = sysuserauthMapping.toDomain(sysuserauthdto);
domain .setId(sysuserauth_id);
sysuserauthService.update(domain );
SysUserAuthDTO dto = sysuserauthMapping.toDto(domain );
return ResponseEntity.status(HttpStatus.OK).body(dto);
}
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzuaa-SysUserAuth-Update-all')")
@ApiOperation(value = "批量更新账号绑定", tags = {"账号绑定" }, notes = "批量更新账号绑定")
@RequestMapping(method = RequestMethod.PUT, value = "/sysuserauths/batch")
public ResponseEntity<Boolean> updateBatch(@RequestBody List<SysUserAuthDTO> sysuserauthdtos) {
sysuserauthService.updateBatch(sysuserauthMapping.toDomain(sysuserauthdtos));
return ResponseEntity.status(HttpStatus.OK).body(true);
}
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzuaa-SysUserAuth-Remove-all')")
@ApiOperation(value = "删除账号绑定", tags = {"账号绑定" }, notes = "删除账号绑定")
@RequestMapping(method = RequestMethod.DELETE, value = "/sysuserauths/{sysuserauth_id}")
public ResponseEntity<Boolean> remove(@PathVariable("sysuserauth_id") String sysuserauth_id) {
return ResponseEntity.status(HttpStatus.OK).body(sysuserauthService.remove(sysuserauth_id));
}
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzuaa-SysUserAuth-Remove-all')")
@ApiOperation(value = "批量删除账号绑定", tags = {"账号绑定" }, notes = "批量删除账号绑定")
@RequestMapping(method = RequestMethod.DELETE, value = "/sysuserauths/batch")
public ResponseEntity<Boolean> removeBatch(@RequestBody List<String> ids) {
sysuserauthService.removeBatch(ids);
return ResponseEntity.status(HttpStatus.OK).body(true);
}
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzuaa-SysUserAuth-Get-all')")
@ApiOperation(value = "获取账号绑定", tags = {"账号绑定" }, notes = "获取账号绑定")
@RequestMapping(method = RequestMethod.GET, value = "/sysuserauths/{sysuserauth_id}")
public ResponseEntity<SysUserAuthDTO> get(@PathVariable("sysuserauth_id") String sysuserauth_id) {
SysUserAuth domain = sysuserauthService.get(sysuserauth_id);
SysUserAuthDTO dto = sysuserauthMapping.toDto(domain);
return ResponseEntity.status(HttpStatus.OK).body(dto);
}
@ApiOperation(value = "获取账号绑定草稿", tags = {"账号绑定" }, notes = "获取账号绑定草稿")
@RequestMapping(method = RequestMethod.GET, value = "/sysuserauths/getdraft")
public ResponseEntity<SysUserAuthDTO> getDraft() {
return ResponseEntity.status(HttpStatus.OK).body(sysuserauthMapping.toDto(sysuserauthService.getDraft(new SysUserAuth())));
}
@ApiOperation(value = "检查账号绑定", tags = {"账号绑定" }, notes = "检查账号绑定")
@RequestMapping(method = RequestMethod.POST, value = "/sysuserauths/checkkey")
public ResponseEntity<Boolean> checkKey(@RequestBody SysUserAuthDTO sysuserauthdto) {
return ResponseEntity.status(HttpStatus.OK).body(sysuserauthService.checkKey(sysuserauthMapping.toDomain(sysuserauthdto)));
}
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzuaa-SysUserAuth-Save-all')")
@ApiOperation(value = "保存账号绑定", tags = {"账号绑定" }, notes = "保存账号绑定")
@RequestMapping(method = RequestMethod.POST, value = "/sysuserauths/save")
public ResponseEntity<Boolean> save(@RequestBody SysUserAuthDTO sysuserauthdto) {
return ResponseEntity.status(HttpStatus.OK).body(sysuserauthService.save(sysuserauthMapping.toDomain(sysuserauthdto)));
}
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzuaa-SysUserAuth-Save-all')")
@ApiOperation(value = "批量保存账号绑定", tags = {"账号绑定" }, notes = "批量保存账号绑定")
@RequestMapping(method = RequestMethod.POST, value = "/sysuserauths/savebatch")
public ResponseEntity<Boolean> saveBatch(@RequestBody List<SysUserAuthDTO> sysuserauthdtos) {
sysuserauthService.saveBatch(sysuserauthMapping.toDomain(sysuserauthdtos));
return ResponseEntity.status(HttpStatus.OK).body(true);
}
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzuaa-SysUserAuth-searchDefault-all')")
@ApiOperation(value = "获取DEFAULT", tags = {"账号绑定" } ,notes = "获取DEFAULT")
@RequestMapping(method= RequestMethod.GET , value="/sysuserauths/fetchdefault")
public ResponseEntity<List<SysUserAuthDTO>> fetchDefault(SysUserAuthSearchContext context) {
Page<SysUserAuth> domains = sysuserauthService.searchDefault(context) ;
List<SysUserAuthDTO> list = sysuserauthMapping.toDto(domains.getContent());
return ResponseEntity.status(HttpStatus.OK)
.header("x-page", String.valueOf(context.getPageable().getPageNumber()))
.header("x-per-page", String.valueOf(context.getPageable().getPageSize()))
.header("x-total", String.valueOf(domains.getTotalElements()))
.body(list);
}
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzuaa-SysUserAuth-searchDefault-all')")
@ApiOperation(value = "查询DEFAULT", tags = {"账号绑定" } ,notes = "查询DEFAULT")
@RequestMapping(method= RequestMethod.POST , value="/sysuserauths/searchdefault")
public ResponseEntity<Page<SysUserAuthDTO>> searchDefault(@RequestBody SysUserAuthSearchContext context) {
Page<SysUserAuth> domains = sysuserauthService.searchDefault(context) ;
return ResponseEntity.status(HttpStatus.OK)
.body(new PageImpl(sysuserauthMapping.toDto(domains.getContent()), context.getPageable(), domains.getTotalElements()));
}
}
......@@ -22,9 +22,9 @@ spring:
max-file-size: 100MB
max-request-size: 100MB
datasource:
username: root
password: 'root'
url: jdbc:mysql://127.0.0.1:3306/ibzuaa?autoReconnect=true&useUnicode=true&characterEncoding=UTF-8&useOldAliasMetadataBehavior=true&allowMultiQueries=true
username: a_A_5d9d78509
password: '@6dEfb3@'
url: jdbc:mysql://172.16.180.232:3306/a_A_5d9d78509?autoReconnect=true&useUnicode=true&characterEncoding=UTF-8&useOldAliasMetadataBehavior=true&allowMultiQueries=true
driver-class-name: com.mysql.jdbc.Driver
filters: stat,wall,log4j2
#配置初始化大小/最小/最大
......@@ -45,7 +45,7 @@ spring:
pool-prepared-statements: false
max-pool-prepared-statement-per-connection-size: 20
isSyncDBSchema: false
defaultSchema: root
defaultSchema: a_A_5d9d78509
conf: classpath:liquibase/master.xml
#Mybatis-plus配置
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册