提交 86aa0f9e 编写于 作者: M MaxKey

account mgmt

上级 bdaf0ac7
...@@ -140,6 +140,9 @@ public class Apps extends JpaBaseEntity implements Serializable { ...@@ -140,6 +140,9 @@ public class Apps extends JpaBaseEntity implements Serializable {
@Column @Column
private String adapter; private String adapter;
@Column
protected int accountMgmt;
protected Accounts appUser; protected Accounts appUser;
@Column @Column
...@@ -583,6 +586,14 @@ public class Apps extends JpaBaseEntity implements Serializable { ...@@ -583,6 +586,14 @@ public class Apps extends JpaBaseEntity implements Serializable {
this.adapterName = adapterName; this.adapterName = adapterName;
} }
public int getAccountMgmt() {
return accountMgmt;
}
public void setAccountMgmt(int accountMgmt) {
this.accountMgmt = accountMgmt;
}
@Override @Override
public String toString() { public String toString() {
StringBuilder builder = new StringBuilder(); StringBuilder builder = new StringBuilder();
......
...@@ -4,23 +4,27 @@ ...@@ -4,23 +4,27 @@
<sql id="where_statement"> <sql id="where_statement">
<if test="id != null and id != ''"> <if test="id != null and id != ''">
and id = #{id} and id = #{id}
</if> </if>
<if test="name != null and name != ''"> <if test="name != null and name != ''">
and name like '%${name}%' and name like '%${name}%'
</if> </if>
<if test="protocol != null and protocol != ''"> <if test="protocol != null and protocol != ''">
and protocol = #{protocol} and protocol = #{protocol}
</if> </if>
<if test="credential != null and credential != ''"> <if test="credential != null and credential != ''">
and credential = #{credential} and credential = #{credential}
</if> </if>
<if test="category != null and category != ''"> <if test="category != null and category != ''">
and category = #{category} and category = #{category}
</if> </if>
<if test="vendor != null and vendor != ''"> <if test="vendor != null and vendor != ''">
and vendor = #{vendor} and vendor = #{vendor}
</if> </if>
<if test="accountMgmt == 1 or accountMgmt == 2">
and accountmgmt = #{accountMgmt}
</if>
</sql> </sql>
...@@ -67,6 +71,7 @@ ...@@ -67,6 +71,7 @@
principal, principal,
credentials, credentials,
accountmgmt,
visible, visible,
...@@ -108,6 +113,7 @@ ...@@ -108,6 +113,7 @@
#{principal}, #{principal},
#{credentials}, #{credentials},
#{accountMgmt},
#{visible}, #{visible},
...@@ -125,17 +131,17 @@ ...@@ -125,17 +131,17 @@
<update id="updateApp" parameterType="Apps" > <update id="updateApp" parameterType="Apps" >
update mxk_apps set update mxk_apps set
name = #{name}, name = #{name},
<if test="icon != null"> <if test="icon != null">
icon = #{icon}, icon = #{icon},
</if> </if>
loginurl = #{loginUrl}, loginurl = #{loginUrl},
protocol = #{protocol}, protocol = #{protocol},
category = #{category}, category = #{category},
secret = #{secret}, secret = #{secret},
description = #{description}, description = #{description},
vendor = #{vendor}, vendor = #{vendor},
vendorurl = #{vendorUrl}, vendorurl = #{vendorUrl},
credential = #{credential}, credential = #{credential},
sharedusername = #{sharedUsername}, sharedusername = #{sharedUsername},
...@@ -154,20 +160,21 @@ ...@@ -154,20 +160,21 @@
adaptername = #{adapterName}, adaptername = #{adapterName},
adapter = #{adapter}, adapter = #{adapter},
</if> </if>
principal = #{principal}, principal = #{principal},
credentials = #{credentials}, credentials = #{credentials},
accountmgmt = #{accountMgmt},
visible = #{visible}, visible = #{visible},
sortindex = #{sortIndex}, sortindex = #{sortIndex},
modifiedby = #{modifiedBy}, modifiedby = #{modifiedBy},
modifieddate = #{modifiedDate}, modifieddate = #{modifiedDate},
status = #{status}, status = #{status},
logouturl = #{logoutUrl}, logouturl = #{logoutUrl},
logouttype = #{logoutType} logouttype = #{logoutType}
where where
ID = #{id} ID = #{id}
</update> </update>
<select id="queryMyApps" parameterType="UserApps" resultType="UserApps"> <select id="queryMyApps" parameterType="UserApps" resultType="UserApps">
......
...@@ -33,6 +33,7 @@ import org.springframework.stereotype.Controller; ...@@ -33,6 +33,7 @@ import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.ModelAttribute; import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody; import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.servlet.ModelAndView; import org.springframework.web.servlet.ModelAndView;
...@@ -48,8 +49,14 @@ public class ApplicationsController extends BaseAppContorller { ...@@ -48,8 +49,14 @@ public class ApplicationsController extends BaseAppContorller {
} }
@RequestMapping(value={"/select"}) @RequestMapping(value={"/select"})
public ModelAndView select(){ public ModelAndView select(@RequestParam(name="accountMgmt",required=false) String accountMgmt){
return new ModelAndView("apps/selectAppsList"); ModelAndView modelAndView=new ModelAndView("apps/selectAppsList");
if(accountMgmt != null) {
modelAndView.addObject("accountMgmt", accountMgmt);
}else {
modelAndView.addObject("accountMgmt", 3);
}
return modelAndView;
} }
......
...@@ -313,6 +313,7 @@ apps.extendAttr.parameter.type=\u7c7b\u578b ...@@ -313,6 +313,7 @@ apps.extendAttr.parameter.type=\u7c7b\u578b
apps.extendAttr.parameter.value=\u503c apps.extendAttr.parameter.value=\u503c
apps.principal=\u51ed\u8bc1 apps.principal=\u51ed\u8bc1
apps.credentials=\u79d8\u94a5 apps.credentials=\u79d8\u94a5
apps.accountMgmt=\u8D26\u53F7\u7BA1\u7406
#adapter #adapter
apps.adapter.name=\u540D\u79F0 apps.adapter.name=\u540D\u79F0
apps.adapter.adapter=\u9002\u914D\u5668 apps.adapter.adapter=\u9002\u914D\u5668
......
...@@ -316,6 +316,7 @@ apps.extendAttr.parameter.type=type ...@@ -316,6 +316,7 @@ apps.extendAttr.parameter.type=type
apps.extendAttr.parameter.value=value apps.extendAttr.parameter.value=value
apps.principal=principal apps.principal=principal
apps.credentials=credentials apps.credentials=credentials
apps.accountMgmt=AccountMgmt
#adapter #adapter
apps.adapter.name=name apps.adapter.name=name
......
...@@ -315,7 +315,7 @@ apps.extendAttr.parameter.type=\u7c7b\u578b ...@@ -315,7 +315,7 @@ apps.extendAttr.parameter.type=\u7c7b\u578b
apps.extendAttr.parameter.value=\u503c apps.extendAttr.parameter.value=\u503c
apps.principal=\u51ed\u8bc1 apps.principal=\u51ed\u8bc1
apps.credentials=\u79d8\u94a5 apps.credentials=\u79d8\u94a5
apps.accountMgmt=\u8D26\u53F7\u7BA1\u7406
apps.adapter.name=\u540D\u79F0 apps.adapter.name=\u540D\u79F0
apps.adapter.adapter=\u9002\u914D\u5668 apps.adapter.adapter=\u9002\u914D\u5668
apps.adapter.protocol=\u534F\u8BAE apps.adapter.protocol=\u534F\u8BAE
......
...@@ -73,7 +73,7 @@ ...@@ -73,7 +73,7 @@
</td> </td>
<td> <td>
<input class="button btn btn-primary mr-3 window" type="button" id="selectAppsubmitBtn" value="<@locale code="button.text.select" />" <input class="button btn btn-primary mr-3 window" type="button" id="selectAppsubmitBtn" value="<@locale code="button.text.select" />"
wurl="<@base/>/apps/select" wurl="<@base/>/apps/select?accountMgmt=1"
wwidth="800" wwidth="800"
wheight="620" wheight="620"
target="window"/> target="window"/>
......
...@@ -31,8 +31,17 @@ ...@@ -31,8 +31,17 @@
</tr> </tr>
<tr> <tr>
<th><@locale code="apps.logoutUrl"/>:</th> <th><@locale code="apps.logoutUrl"/>:</th>
<td colspan="3">
<input type="text" class="form-control" id="logoutUrl" name="logoutUrl" size="100" title="" value="" required="" />
</td>
</tr>
<tr>
<th><@locale code="apps.accountMgmt"/>:</th>
<td> <td>
<input type="text" id="logoutUrl" class="form-control" name="logoutUrl" title="" value=""/> <select id="accountMgmt" name="accountMgmt" class="form-control form-select" >
<option value="1" ><@locale code="common.text.status.enabled"/></option>
<option value="2" selected ><@locale code="common.text.status.disabled"/></option>
</select>
</td> </td>
<th><@locale code="apps.logoutType"/></th> <th><@locale code="apps.logoutType"/></th>
<td> <td>
......
...@@ -31,8 +31,17 @@ ...@@ -31,8 +31,17 @@
</tr> </tr>
<tr> <tr>
<th><@locale code="apps.logoutUrl"/>:</th> <th><@locale code="apps.logoutUrl"/>:</th>
<td colspan="3">
<input type="text" class="form-control" id="logoutUrl" name="logoutUrl" title="" value="${model.logoutUrl!}" required="" />
</td>
</tr>
<tr>
<th><@locale code="apps.accountMgmt"/>:</th>
<td> <td>
<input type="text" id="logoutUrl" class="form-control" name="logoutUrl" title="" value="${model.logoutUrl!}"/> <select id="accountMgmt" name="accountMgmt" class="form-control form-select" >
<option value="1" <#if 1==model.accountMgmt!>selected</#if> ><@locale code="common.text.status.enabled"/></option>
<option value="2" <#if 2==model.accountMgmt!>selected</#if> ><@locale code="common.text.status.disabled"/></option>
</select>
</td> </td>
<th><@locale code="apps.logoutType"/></th> <th><@locale code="apps.logoutType"/></th>
<td> <td>
......
...@@ -31,6 +31,7 @@ ...@@ -31,6 +31,7 @@
<td width="300px" nowrap> <td width="300px" nowrap>
<form id="basic_search_form"> <form id="basic_search_form">
<input type="text" class="form-control" name="name" > <input type="text" class="form-control" name="name" >
<input type="hidden" class="form-control" name="accountMgmt" value="${accountMgmt}">
</form> </form>
</td> </td>
<td colspan="2"> <td colspan="2">
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册