Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
A
Aidea
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
sa_aidea
Aidea
Commits
774ca8e5
Commit
774ca8e5
authored
Sep 29, 2020
by
黎聪聪
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
二维码管理
parent
6c482644
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
342 additions
and
91 deletions
+342
-91
wxQrcodePform.html
...src/main/webapp/WEB-INF/views/wxQrcode/wxQrcodePform.html
+23
-3
wxQrcodeform.html
.../src/main/webapp/WEB-INF/views/wxQrcode/wxQrcodeform.html
+88
-3
wxQrcodelist.html
.../src/main/webapp/WEB-INF/views/wxQrcode/wxQrcodelist.html
+28
-18
WxQrcodeMapper.java
.../main/java/com/cftech/shop/qrcode/dao/WxQrcodeMapper.java
+10
-0
WxQrcodeMapper.xml
...c/main/java/com/cftech/shop/qrcode/dao/WxQrcodeMapper.xml
+35
-11
Orgunit.java
...e/src/main/java/com/cftech/shop/qrcode/model/Orgunit.java
+17
-0
QyUser.java
...le/src/main/java/com/cftech/shop/qrcode/model/QyUser.java
+19
-0
WxQrcode.java
.../src/main/java/com/cftech/shop/qrcode/model/WxQrcode.java
+3
-2
WxQrcodeVO.java
...main/java/com/cftech/shop/qrcode/model/vo/WxQrcodeVO.java
+2
-1
WxQrcodeService.java
.../java/com/cftech/shop/qrcode/service/WxQrcodeService.java
+10
-0
WxQrcodeServiceImpl.java
.../cftech/shop/qrcode/service/impl/WxQrcodeServiceImpl.java
+22
-0
WxQrcodeController.java
...n/java/com/cftech/shop/qrcode/web/WxQrcodeController.java
+85
-53
No files found.
behavior-modules/wx-qrcode-module-web/src/main/webapp/WEB-INF/views/wxQrcode/wxQrcodePform.html
View file @
774ca8e5
...
...
@@ -99,13 +99,31 @@
<label>
二维码类别
</label>
<select
class=
"form-control select2"
name=
"typeselect"
id=
"typeselect"
style=
"width: 100%;"
>
<option
value=
"0"
>
门店
</option>
<option
value=
"1"
>
SA人员
</option>
<option
value=
"2"
>
门店车辆
</option>
<option
value=
"1"
>
医师二维码
</option>
<option
value=
"2"
>
客服二维码
</option>
<option
value=
"3"
>
医生二维码
</option>
<option
value=
"4"
>
组织二维码
</option>
</select>
</div>
</div>
<!--<div class="form-group form-md-line-input col-md-20">
<label>所属栏目</label>
<div class="input-group">
<input type="text" name="column" id="column"
value="$!{data.column}"
class="form-control" style="display: none">
<input type="text" id="columnName"
name="columnName" value="$!{columnName}"
class="form-control" disabled>
<span class="input-group-btn">
<button type="button" id="columnSelect"
class="btn btn-info btn-flat">选择</button>
</span>
</div>
</div>-->
<div
class=
"row"
>
<div
class=
"form-group form-md-line-input col-md-12"
>
<label>
描述
</label>
...
...
@@ -179,6 +197,8 @@
Cfapp
.
init
();
recdTypeAdd
.
init
();
});
//选择栏目
var
recdTypeAdd
=
function
()
{
...
...
behavior-modules/wx-qrcode-module-web/src/main/webapp/WEB-INF/views/wxQrcode/wxQrcodeform.html
View file @
774ca8e5
...
...
@@ -110,13 +110,30 @@
<label>
二维码类别
</label>
<select
class=
"form-control select2"
name=
"typeselect"
id=
"typeselect"
style=
"width: 100%;"
>
<option
value=
"0"
>
门店
</option>
<option
value=
"1"
>
SA人员
</option>
<option
value=
"2"
>
门店车辆
</option>
<option
value=
"0"
>
客服二维码
</option>
<option
value=
"1"
>
药师二维码
</option>
<option
value=
"2"
>
医生二维码
</option>
<option
value=
"3"
>
组织二维码
</option>
</select>
</div>
<div
class=
"form-group form-md-line-input col-md-6"
>
<label>
选择二维码所绑定的对象
</label>
<div
class=
"input-group"
>
<input
type=
"text"
name=
"bindId"
id=
"bindId"
value=
"$!{data.bindId}"
class=
"form-control"
style=
"display: none"
>
<input
type=
"text"
id=
"columnName"
name=
"columnName"
value=
"$!{columnName}"
class=
"form-control"
disabled
>
<span
class=
"input-group-btn"
>
<button
type=
"button"
id=
"columnSelect"
class=
"btn btn-info btn-flat"
>
选择
</button>
</span>
</div>
</div>
</div>
<div
class=
"row"
>
<div
class=
"form-group form-md-line-input col-md-12"
>
<label>
描述
</label>
...
...
@@ -197,8 +214,76 @@
$
().
ready
(
function
()
{
Cfapp
.
init
();
recdTypeAdd
.
init
();
});
// var Id ="";
// $("#typeselect").click(function () {
// var value = $("#typeselect").val();
// if (value=="医师二维码"){
// Id = 1;
// }else if (value=="客服二维码"){
// Id = 2;
// }else if (value=="医生二维码"){
// Id = 3;
// }else if (value=="组织二维码"){
// Id = 4;
// }
// })
// var columnUrl = "#springUrl('/a/wxQrcode/listUser?userId=" + Id + "')";
// var cfArticleUrl = "#springUrl('/a/cfarticle/listData')";
var
columnUrl
=
""
;
//选择栏目
$
(
"#columnSelect"
).
click
(
function
()
{
var
Id
=
$
(
"#typeselect"
).
val
()
if
(
Id
==
"3"
){
columnUrl
=
"#springUrl('/a/wxQrcode/listOrg')"
}
else
{
columnUrl
=
"#springUrl('/a/wxQrcode/listUser?userId="
+
Id
+
"')"
}
Cfapp
.
f7
({
dataUrl
:
columnUrl
,
checkType
:
'single'
,
// 多选为multi
title
:
"选择二维码绑定对象"
,
btnoktext
:
"确定"
,
btncanceltext
:
"取消"
,
columns
:
[
'选择'
,
'人员名称'
],
isSearch
:
'0'
,
searchColumns
:
[
"name"
],
//搜索的字段名称
searchColumnsRemarks
:
[
'人员名称'
],
//搜索的字段备注
aoColumns
:
[{
"mData"
:
"id"
},
{
"mData"
:
"name"
}
],
aoColumnDefs
:
[{
"aTargets"
:
[
0
],
"mData"
:
"id"
,
"mRender"
:
function
(
a
,
b
,
c
,
d
)
{
return
'<input class="bindId" value="'
+
a
+
'" type="radio" id="'
+
a
+
'" name="sel" data-value="'
+
a
+
'" data-name="'
+
c
.
name
+
'">'
;
}
},
{
"aTargets"
:
[
1
],
"mData"
:
"name"
,
"mRender"
:
function
(
a
,
b
,
c
,
d
)
{
//a表示createtime对应的值,c表示当前记录行对象
return
a
;
}
}],
success
:
function
()
{
},
cancel
:
function
()
{
},
storeFields
:
'bindId'
,
// 储存的字段
displayFields
:
'columnName'
})
});
var
recdTypeAdd
=
function
()
{
var
initForm
=
function
()
{
...
...
behavior-modules/wx-qrcode-module-web/src/main/webapp/WEB-INF/views/wxQrcode/wxQrcodelist.html
View file @
774ca8e5
...
...
@@ -97,9 +97,10 @@
<select
class=
"form-control select2"
name=
"type"
id=
"type"
>
<option
value=
"-1"
selected=
"selected"
>
全部
</option>
<option
value=
"0"
>
门店
</option>
<option
value=
"1"
>
Sa人员
</option>
<option
value=
"2"
>
门店车辆
</option>
<option
value=
"1"
>
医师二维码
</option>
<option
value=
"2"
>
客服二维码
</option>
<option
value=
"3"
>
医生二维码
</option>
<option
value=
"4"
>
组织二维码
</option>
</select>
</div>
</div>
...
...
@@ -201,7 +202,7 @@
var
sSource
=
"#springUrl('/a/wxQrcode/listData')"
;
var
aoData
=
{
iDisplayStart
:
1
,
iDosplayLength
:
2
0
iDosplayLength
:
1
0
}
var
retrieveData
=
function
(
sSource
,
aoData
,
fnCallback
)
{
...
...
@@ -253,9 +254,11 @@
},
{
"mData"
:
"ticket"
},{
"mData"
:
"storeName"
},
{
"mData"
:
"qrcodeNames"
},
{
"mData"
:
"sceneId"
},
...
...
@@ -285,16 +288,12 @@
}
},{
"aTargets"
:
[
2
],
"mData"
:
"
storeName
"
,
"mData"
:
"
qrcodeNames
"
,
"mRender"
:
function
(
a
,
b
,
c
,
d
)
{
if
(
a
!==
null
&&
a
!==
''
)
{
return
'<font color="blue">'
+
a
+
'</font>'
;
}
else
if
(
c
.
empName
!==
null
&&
c
.
empName
!==
''
)
{
return
'<font color="green">'
+
c
.
empName
+
'</font>'
;
}
else
if
(
c
.
carName
!==
null
&&
c
.
carName
!==
''
)
{
return
'<font color="orange">'
+
c
.
carName
+
'</font>'
;
}
else
{
return
'<font color="red">未被绑定</font>'
;
return
a
;
}
else
{
return
""
;
}
}
...
...
@@ -303,7 +302,7 @@
"aTargets"
:
[
3
],
"mData"
:
"sceneId"
,
"mRender"
:
function
(
a
,
b
,
c
,
d
)
{
return
'<a href="#springUrl("/a/wxQrcode/form?id='
+
c
.
id
+
'")" data-id="'
+
c
.
id
+
'" data-action="view">'
+
a
+
'</a>'
;
return
a
;
}
},
...
...
@@ -312,11 +311,15 @@
"mData"
:
"type"
,
"mRender"
:
function
(
a
,
b
,
c
,
d
)
{
if
(
a
==
'0'
)
{
return
'
门店
'
;
return
'
客服二维码
'
;
}
else
if
(
a
==
'1'
)
{
return
'
SA人员
'
;
return
'
医师二位码
'
;
}
else
if
(
a
==
'2'
){
return
'门店车辆'
;
return
'医生二维码'
;
}
else
if
(
a
==
"3"
){
return
'组织二维码'
;
}
else
{
return
""
;
}
}
},
...
...
@@ -329,6 +332,13 @@
return
formatDates
(
a
,
"yyyy-MM-dd HH:mm:ss"
);
}
},
{
"aTargets"
:
[
6
],
"mData"
:
"description"
,
"mRender"
:
function
(
a
,
b
,
c
,
d
)
{
//a表示createtime对应的值,c表示当前记录行对象
return
a
;
}
},
{
"aTargets"
:
[
7
],
"mData"
:
"id"
,
...
...
behavior-modules/wx-qrcode-module/src/main/java/com/cftech/shop/qrcode/dao/WxQrcodeMapper.java
View file @
774ca8e5
package
com
.
cftech
.
shop
.
qrcode
.
dao
;
import
com.alibaba.fastjson.JSONObject
;
import
com.cftech.shop.qrcode.model.QyUser
;
import
com.cftech.shop.qrcode.model.WxQrcode
;
import
com.cftech.core.generic.GenericDao
;
import
com.cftech.shop.qrcode.model.vo.WxQrcodeVO
;
import
org.apache.ibatis.annotations.Param
;
import
org.apache.poi.ss.formula.functions.T
;
import
java.util.List
;
...
...
@@ -26,4 +29,11 @@ public interface WxQrcodeMapper extends GenericDao<WxQrcode> {
List
<
WxQrcode
>
fetchSingleSearchInfo
(
Map
<
String
,
Object
>
params
);
List
<
QyUser
>
fromUser
(
@Param
(
"userId"
)
int
userId
,
@Param
(
"name"
)
String
name
);
List
<
WxQrcode
>
fromOrg
(
@Param
(
"name"
)
String
name
);
int
countUser
(
int
userId
);
int
countOrg
();
}
\ No newline at end of file
behavior-modules/wx-qrcode-module/src/main/java/com/cftech/shop/qrcode/dao/WxQrcodeMapper.xml
View file @
774ca8e5
...
...
@@ -129,8 +129,9 @@
</select>
<select
id=
"count"
parameterType=
"java.util.Map"
resultType=
"java.lang.Integer"
>
SELECT COUNT(1) FROM t_shop_wxqrcode t
left join t_orgunit o on o.id = t.org_id
SELECT COUNT(1) FROM t_shop_wxqrcode t
LEFT JOIN t_qyuser q ON q.id = t.bind_id
LEFT JOIN t_orgunit o ON o.id = t.bind_id AND t.type='3'
<include
refid=
"sqlWhere"
/>
<if
test=
"orgId > 0"
>
and instr(o.parent_ids,',${orgId},')>0
...
...
@@ -139,13 +140,25 @@
</select>
<select
id=
"fetchSearchByPageVO"
parameterType=
"java.util.Map"
resultMap=
"resultMapVO"
>
SELECT t.id id, s.name store_name, u.name emp_name,c.name car_name, t.scene_id scene_id,
t.type type, t.ticket ticket, t.create_time create_time, t.description description
FROM t_shop_wxqrcode t
left join t_dc_store s on s.id = t.bind_id and t.type='0'
left join t_qyuser u on u.id = t.bind_id and t.type='1'
LEFT JOIN t_fours_store_car sc on sc.id=t.bind_id and t.type='2'
LEFT JOIN t_fours_base_cars c on c.id=sc.carid
SELECT
t.id,
t.ticket,
t.scene_id sceneId,
t.type,
t.create_time createTime,
t.description,
q.`name`,
o.org_name,
CASE
WHEN t.type = '0' OR t.type = '1' OR t.type = '2' THEN
q.`name`
WHEN t.type = '3' THEN
o.org_name ELSE ''
END qrcodeNames
FROM
t_shop_wxqrcode t
LEFT JOIN t_qyuser q ON q.id = t.bind_id
LEFT JOIN t_orgunit o ON o.id = t.bind_id AND t.type='3'
<include
refid=
"sqlWhere"
/>
<if
test=
"sort!=null"
>
ORDER BY ${sort.param} ${sort.type}
</if>
<if
test=
"limit>0"
>
limit #{offset},#{limit}
</if>
...
...
@@ -208,7 +221,7 @@
</if>
<if
test=
"updateBy != null"
>
update_by = #{updateBy, jdbcType=BIGINT},
</if>
,
update_time = now()
</if>
update_time = now()
</set>
where id=#{id,jdbcType=BIGINT}
</update>
...
...
@@ -229,5 +242,16 @@
limit 0,1
</select>
<select
id=
"fromUser"
resultType=
"com.cftech.shop.qrcode.model.QyUser"
>
select id,name from t_qyuser where user_type=#{userId}
<if
test=
" name !=null and name != '' "
>
and name like '%${name}%'
</if>
</select>
<select
id=
"fromOrg"
resultType=
"com.cftech.shop.qrcode.model.Orgunit"
>
select id,org_name name from t_orgunit
<if
test=
" name !=null and name != '' "
>
where org_name like '%${name}%'
</if>
</select>
<select
id=
"countUser"
resultType=
"java.lang.Integer"
>
select count(1) from t_qyuser where user_type=#{userId}
</select>
<select
id=
"countOrg"
resultType=
"java.lang.Integer"
>
select count(1) from t_orgunit
</select>
</mapper>
\ No newline at end of file
behavior-modules/wx-qrcode-module/src/main/java/com/cftech/shop/qrcode/model/Orgunit.java
0 → 100644
View file @
774ca8e5
package
com
.
cftech
.
shop
.
qrcode
.
model
;
import
lombok.Data
;
/**
* @author :licc
* @date :Created in 2020/9/29 10:44
* @description:
*/
@Data
public
class
Orgunit
{
/* 人员id*/
private
Long
id
;
/* 人员name*/
private
String
name
;
}
behavior-modules/wx-qrcode-module/src/main/java/com/cftech/shop/qrcode/model/QyUser.java
0 → 100644
View file @
774ca8e5
package
com
.
cftech
.
shop
.
qrcode
.
model
;
import
lombok.Data
;
import
java.security.PrivateKey
;
/**
* @author :licc
* @date :Created in 2020/9/28 15:19
* @description:
*/
@Data
public
class
QyUser
{
/* 人员id*/
private
Long
id
;
/* 人员name*/
private
String
name
;
}
behavior-modules/wx-qrcode-module/src/main/java/com/cftech/shop/qrcode/model/WxQrcode.java
View file @
774ca8e5
...
...
@@ -13,7 +13,7 @@ import java.util.Date;
* @date: 2017-12-04 17:56
*/
@Data
public
class
WxQrcode
implements
Serializable
{
public
class
WxQrcode
implements
Serializable
{
/* 主键id */
private
Long
id
;
...
...
@@ -46,7 +46,8 @@ public class WxQrcode implements Serializable {
private
Long
createBy
;
/* 更新人 */
private
Long
updateBy
;
/* 绑定对象 */
private
String
qrcodeNames
;
public
WxQrcode
()
{
this
.
delFlag
=
false
;
this
.
status
=
"0"
;
...
...
behavior-modules/wx-qrcode-module/src/main/java/com/cftech/shop/qrcode/model/vo/WxQrcodeVO.java
View file @
774ca8e5
...
...
@@ -46,5 +46,6 @@ public class WxQrcodeVO implements Serializable {
*/
private
String
description
;
/* 绑定对象 */
private
String
qrcodeNames
;
}
behavior-modules/wx-qrcode-module/src/main/java/com/cftech/shop/qrcode/service/WxQrcodeService.java
View file @
774ca8e5
package
com
.
cftech
.
shop
.
qrcode
.
service
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONObject
;
import
com.cftech.shop.qrcode.model.QyUser
;
import
com.cftech.shop.qrcode.model.WxQrcode
;
import
com.cftech.core.generic.GenericService
;
import
com.cftech.core.sql.Conds
;
...
...
@@ -26,4 +29,11 @@ public interface WxQrcodeService extends GenericService<WxQrcode> {
boolean
updateBindId
(
WxQrcode
wxQrcode
);
List
<
WxQrcode
>
fetchSingleSearchInfo
(
Conds
conds
,
Sort
sort
,
int
page
,
int
pageSize
);
List
<
QyUser
>
fromUser
(
int
userId
,
String
name
);
List
<
WxQrcode
>
fromOrg
(
String
name
);
int
countUser
(
int
userId
);
int
countOrg
();
}
behavior-modules/wx-qrcode-module/src/main/java/com/cftech/shop/qrcode/service/impl/WxQrcodeServiceImpl.java
View file @
774ca8e5
package
com
.
cftech
.
shop
.
qrcode
.
service
.
impl
;
import
com.alibaba.fastjson.JSONObject
;
import
com.cftech.shop.qrcode.model.QyUser
;
import
com.cftech.shop.qrcode.model.WxQrcode
;
import
com.cftech.shop.qrcode.dao.WxQrcodeMapper
;
import
com.cftech.shop.qrcode.model.vo.WxQrcodeVO
;
...
...
@@ -83,4 +85,24 @@ public class WxQrcodeServiceImpl extends GenericServiceImpl<WxQrcode> implements
return
wxQrcodeMapper
.
fetchSingleSearchInfo
(
params
);
}
@Override
public
List
<
QyUser
>
fromUser
(
int
userId
,
String
name
)
{
return
wxQrcodeMapper
.
fromUser
(
userId
,
name
);
}
@Override
public
List
<
WxQrcode
>
fromOrg
(
String
name
)
{
return
wxQrcodeMapper
.
fromOrg
(
name
);
}
@Override
public
int
countUser
(
int
userId
)
{
return
wxQrcodeMapper
.
countUser
(
userId
);
}
@Override
public
int
countOrg
()
{
return
wxQrcodeMapper
.
countOrg
();
}
}
\ No newline at end of file
behavior-modules/wx-qrcode-module/src/main/java/com/cftech/shop/qrcode/web/WxQrcodeController.java
View file @
774ca8e5
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment