Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
F
farming
Overview
Overview
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
郑云飞
farming
Commits
35d4cbb2
Commit
35d4cbb2
authored
Nov 08, 2024
by
zhengyunfei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1.轮播图添加启用禁用状态
2.商品添加是否免邮字段 3.订单添加发货备注字段
parent
bd58c187
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
149 additions
and
66 deletions
+149
-66
src/main/java/com/yunniu/farming/webadmin/model/Banner.java
+2
-0
src/main/java/com/yunniu/farming/webadmin/model/OrderMain.java
+1
-1
src/main/java/com/yunniu/farming/webadmin/service/impl/BannerServiceImpl.java
+9
-6
src/main/java/com/yunniu/farming/webadmin/service/impl/OrderMainServiceImpl.java
+2
-3
src/main/resources/application.properties
+3
-4
src/main/resources/mappings/BannerMapper.xml
+14
-15
src/main/resources/mappings/GroupOrderMapper.xml
+1
-2
src/main/resources/templates/banner/addOrEdit.html
+11
-2
src/main/resources/templates/banner/list.html
+9
-2
src/main/resources/templates/goods/addOrEdit.html
+9
-2
src/main/resources/templates/goods/list.html
+12
-2
src/main/resources/templates/groupBuy/addOrEdit.html
+1
-2
src/main/resources/templates/order/loanList.html
+75
-25
No files found.
src/main/java/com/yunniu/farming/webadmin/model/Banner.java
View file @
35d4cbb2
...
...
@@ -36,6 +36,8 @@ public class Banner {
private
String
pathUrls
;
//链接图片
private
Integer
bannerStatus
=
0
;
//状态 0启用,1停用
@TableField
(
exist
=
false
)
@JsonInclude
(
JsonInclude
.
Include
.
NON_NULL
)
private
String
[]
imgArr
;
...
...
src/main/java/com/yunniu/farming/webadmin/model/OrderMain.java
View file @
35d4cbb2
...
...
@@ -121,7 +121,7 @@ public class OrderMain {
@JsonInclude
(
JsonInclude
.
Include
.
NON_NULL
)
private
String
sdef4
;
// 自定义项4 支付回调标识
@JsonInclude
(
JsonInclude
.
Include
.
NON_NULL
)
private
String
sdef5
;
// 自定义项5
private
String
sdef5
;
// 自定义项5
发货备注
@JsonInclude
(
JsonInclude
.
Include
.
NON_NULL
)
private
Integer
idef6
;
// 自定义项6
@JsonInclude
(
JsonInclude
.
Include
.
NON_NULL
)
...
...
src/main/java/com/yunniu/farming/webadmin/service/impl/BannerServiceImpl.java
View file @
35d4cbb2
package
com
.
yunniu
.
farming
.
webadmin
.
service
.
impl
;
import
com.baomidou.mybatisplus.core.
conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.
toolkit.Wrappers
;
import
com.yunniu.farming.result.Result
;
import
com.yunniu.farming.util.*
;
import
com.yunniu.farming.util.COSUtil
;
import
com.yunniu.farming.util.FileUtil
;
import
com.yunniu.farming.util.ImageUtil
;
import
com.yunniu.farming.util.UUIDUtils
;
import
com.yunniu.farming.webadmin.dao.BannerDao
;
import
com.yunniu.farming.webadmin.model.Banner
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
...
@@ -13,13 +16,13 @@ import java.util.List;
@Service
public
class
BannerServiceImpl
{
@Autowired
private
BannerDao
mapper
;
/**
* 分页查询
* 分页查询
* @param item
* @return
*/
...
...
@@ -27,14 +30,14 @@ public class BannerServiceImpl {
//调用service 方法 返回查询结果集
return
this
.
mapper
.
findPageList
(
item
);
}
/**
* 普通带参查询
* @param doc
* @return
*/
public
Result
findByParam
(){
List
<
Banner
>
banners
=
this
.
mapper
.
selectList
(
new
QueryWrapper
<>(
));
List
<
Banner
>
banners
=
this
.
mapper
.
selectList
(
Wrappers
.<
Banner
>
lambdaQuery
().
eq
(
Banner:
:
getBannerStatus
,
0
));
return
Result
.
success
(
banners
);
}
...
...
src/main/java/com/yunniu/farming/webadmin/service/impl/OrderMainServiceImpl.java
View file @
35d4cbb2
...
...
@@ -16,7 +16,6 @@ import com.yunniu.farming.webadmin.model.*;
import
com.yunniu.farming.webadmin.service.GroupOrderService
;
import
com.yunniu.farming.webadmin.service.WxService
;
import
com.yunniu.farming.wx.WxConfigUtil
;
import
lombok.Data
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
...
@@ -25,7 +24,6 @@ import org.springframework.stereotype.Service;
import
org.springframework.transaction.annotation.Transactional
;
import
javax.servlet.http.HttpServletRequest
;
import
java.math.BigDecimal
;
import
java.text.DecimalFormat
;
import
java.util.Date
;
import
java.util.HashMap
;
...
...
@@ -256,7 +254,8 @@ public class OrderMainServiceImpl {
//待收货
order
.
setIstatus
(
OrderMain
.
STATUS_WAITING
);
// 发货备注
order
.
setSdef5
(
order
.
getRemark
());
this
.
orderMainDao
.
updateById
(
order
);
return
Result
.
success
();
...
...
src/main/resources/application.properties
View file @
35d4cbb2
#spring.datasource.url=jdbc:mysql://152.136.113.101:3306/farming?autoReconnect=true&useUnicode=true&allowMultiQueries=true&characterEncoding=utf-8&serverTimezone=GMT%2B8
#spring.datasource.username=root
#spring.datasource.password=Root_123456
spring.datasource.url
=
jdbc:mysql://
localhost
:3306/farming?characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowMultiQueries=true&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=Asia/Shanghai
spring.datasource.url
=
jdbc:mysql://
1.15.43.240
:3306/farming?characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowMultiQueries=true&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=Asia/Shanghai
spring.datasource.username
=
farming
spring.datasource.password
=
PKWB6psxa7FBApZB
#spring.datasource.url=jdbc:mysql://db
1.prd.jianghuxx.com
:3317/farming?characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowMultiQueries=true&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=Asia/Shanghai
#spring.datasource.url=jdbc:mysql://db
.dev.yyinhong.cn
:3317/farming?characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowMultiQueries=true&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=Asia/Shanghai
#spring.datasource.username=root
#spring.datasource.password=4f9fa23639242790
#7LwimZ27FqEnzIPg
...
...
@@ -85,4 +85,4 @@ spring.thymeleaf.check-template-location=true
#mybatis的mapper文件配置
mybatis-plus.mapper-locations
=
classpath:mappings/*Mapper.xml
mybatis-plus.global-config.db-config.id-type
=
auto
mybatis-plus.configuration.log-impl
=
org.apache.ibatis.logging.stdout.StdOutImpl
\ No newline at end of file
mybatis-plus.configuration.log-impl
=
org.apache.ibatis.logging.stdout.StdOutImpl
src/main/resources/mappings/BannerMapper.xml
View file @
35d4cbb2
...
...
@@ -3,7 +3,7 @@
<mapper
namespace=
"com.yunniu.farming.webadmin.dao.BannerDao"
>
<!-- 返回的结果集 -->
<resultMap
id=
"BaseResultMap"
type=
"com.yunniu.farming.webadmin.model.Banner"
>
<!-- WARNING - @mbggenerated This element is automatically generated by
<!-- WARNING - @mbggenerated This element is automatically generated by
MyBatis Generator, do not modify. -->
<id
column=
"banner_id"
property=
"bannerId"
jdbcType=
"INTEGER"
/>
<result
column=
"banner_urls"
property=
"bannerUrls"
jdbcType=
"VARCHAR"
/>
...
...
@@ -15,12 +15,12 @@
<!-- sql块 -->
<sql
id=
"Base_Column_List"
>
banner_id, banner_urls,path_urls, productid,
catalogid
banner_id, banner_urls,path_urls, productid,
catalogid, banner_status
</sql>
<!-- 普通条件查询 -->
<select
id=
"findByParam"
resultMap=
"BaseResultMap"
parameterType=
"com.yunniu.farming.webadmin.model.Banner"
>
...
...
@@ -36,7 +36,7 @@
</if>
</where>
</select>
...
...
@@ -45,7 +45,7 @@
<!-- FRICE TODO 带参数常规查询分页 Start -->
<select
id=
"findPageList"
resultMap=
"BaseResultMap"
parameterType=
"com.yunniu.farming.webadmin.model.Banner"
>
select
...
...
@@ -55,18 +55,18 @@
<if
test=
"bannerId != null"
>
AND banner_id = #{bannerId,jdbcType=INTEGER}
</if>
<if
test=
"productid != null"
>
AND productid = #{productid,jdbcType=INTEGER}
</if>
</where>
</select>
</mapper>
\ No newline at end of file
</mapper>
src/main/resources/mappings/GroupOrderMapper.xml
View file @
35d4cbb2
...
...
@@ -68,4 +68,4 @@
<select
id=
"getBySdef1"
resultType=
"com.yunniu.farming.webadmin.model.OrderMain"
>
select * from order_main where refundorderno = #{outRefundNo,jdbcType=VARCHAR}
</select>
</mapper>
\ No newline at end of file
</mapper>
src/main/resources/templates/banner/addOrEdit.html
View file @
35d4cbb2
...
...
@@ -66,6 +66,15 @@
</div>
</div>
</div>
<div
class=
"layui-form-item"
>
<label
class=
"layui-form-label"
>
<span
style=
"color: red"
>
*
</span>
启用状态
</label>
<input
lay-filter=
"demo-radio-filter"
name=
"bannerStatus"
th:checked=
"(${obj.bannerStatus}==0)"
title=
"启用"
type=
"radio"
value=
"0"
>
<input
lay-filter=
"demo-radio-filter"
name=
"bannerStatus"
th:checked=
"(${obj.bannerStatus}==1)"
title=
"禁用"
type=
"radio"
value=
"1"
>
</div>
...
...
@@ -110,6 +119,7 @@
var
form
=
document
.
querySelector
(
"#formId"
);
var
formdata
=
new
FormData
(
form
);
var
goodsImgArr
=
[
dataArr
.
length
];
for
(
var
i
=
0
;
i
<
dataArr
.
length
;
i
++
)
{
goodsImgArr
[
i
]
=
dataArr
[
i
].
base64
;
...
...
@@ -211,4 +221,4 @@
</script>
</body>
</html>
\ No newline at end of file
</html>
src/main/resources/templates/banner/list.html
View file @
35d4cbb2
...
...
@@ -113,6 +113,14 @@
[
{
type
:
'checkbox'
,
field
:
'goodsId'
,
fixed
:
"left"
}
,
{
field
:
'bannerUrls'
,
title
:
'图片'
,
toolbar
:
'#bannerUrls'
}
,
{
templet
:
function
(
d
)
{
var
bannerStatus
=
''
;
if
(
d
.
bannerStatus
==
'1'
)
bannerStatus
=
'禁用'
;
if
(
d
.
bannerStatus
==
'0'
)
bannerStatus
=
'启用'
;
return
bannerStatus
;
},
title
:
'状态'
}
,
{
field
:
''
,
width
:
150
,
title
:
'操作'
,
toolbar
:
'#table-handle'
,
fixed
:
"right"
}
]
]
...
...
@@ -274,4 +282,4 @@
</body>
</html>
\ No newline at end of file
</html>
src/main/resources/templates/goods/addOrEdit.html
View file @
35d4cbb2
...
...
@@ -117,6 +117,14 @@
<input
type=
"text"
class=
"layui-input"
name=
"iintanum"
id=
"iintanum"
th:value=
"${obj.iintanum}"
>
</div>
<label
class=
"layui-form-label"
>
是否免邮
</label>
<div
class=
"layui-input-inline"
>
<select
id=
"sdef1"
lay-filter=
"sdef1"
name=
"sdef1"
>
<option
th:selected=
"0==${obj.sdef1}"
value=
"0"
>
是
</option>
<option
th:selected=
"1==${obj.sdef1}"
value=
"1"
>
否
</option>
</select>
</div>
</div>
...
...
@@ -335,4 +343,4 @@
</script>
</body>
</html>
\ No newline at end of file
</html>
src/main/resources/templates/goods/list.html
View file @
35d4cbb2
...
...
@@ -180,6 +180,17 @@
,
{
field
:
'scondition'
,
title
:
'保存条件'
}
,
{
field
:
'specs'
,
title
:
'净重规格'
}
,
{
field
:
'istatus'
,
title
:
'状态'
,
toolbar
:
'#istatus'
}
,
{
templet
:
function
(
d
)
{
var
sdef1
=
''
;
if
(
d
.
sdef1
==
null
)
sdef1
=
'否'
;
if
(
d
.
sdef1
==
''
)
sdef1
=
'否'
;
if
(
d
.
sdef1
==
undefined
)
sdef1
=
'否'
;
if
(
d
.
sdef1
==
'1'
)
sdef1
=
'否'
;
if
(
d
.
sdef1
==
'0'
)
sdef1
=
'是'
;
return
sdef1
;
},
title
:
'是否免邮'
}
,
{
field
:
'tcreatetime'
,
title
:
'创建时间'
}
,
{
field
:
''
,
width
:
150
,
title
:
'操作'
,
toolbar
:
'#table-handle'
,
fixed
:
"right"
}
]
...
...
@@ -447,4 +458,4 @@
</body>
</html>
\ No newline at end of file
</html>
src/main/resources/templates/groupBuy/addOrEdit.html
View file @
35d4cbb2
...
...
@@ -496,4 +496,4 @@
</script>
</body>
</html>
\ No newline at end of file
</html>
src/main/resources/templates/order/loanList.html
View file @
35d4cbb2
...
...
@@ -226,6 +226,7 @@
}
,
{
field
:
'tordertime'
,
width
:
100
,
title
:
'下单日期'
}
,
{
field
:
'sremark'
,
width
:
100
,
title
:
'备注'
}
,
{
field
:
'sdef5'
,
width
:
100
,
title
:
'发货备注'
}
,
{
field
:
'trefundtime'
,
width
:
100
,
title
:
'退款时间'
}
,{
width
:
100
,
...
...
@@ -339,30 +340,80 @@
var
data
=
obj
.
data
;
if
(
obj
.
event
===
'deliver'
)
{
var
id
=
obj
.
data
.
id
;
layer
.
confirm
(
'确定接受订单吗?'
,
function
(
index
)
{
var
param
=
{};
param
.
id
=
id
;
param
.
istatus
=
30
;
$
.
ajax
({
url
:
"updateFwStatus"
,
data
:
JSON
.
stringify
(
param
),
type
:
"POST"
,
dataType
:
"json"
,
contentType
:
"application/json;charset=utf-8"
,
success
:
function
(
result
)
{
if
(
result
.
code
==
100
)
{
layer
.
msg
(
result
.
msg
,
{
icon
:
6
,
time
:
1000
},
function
()
{
layer
.
close
(
index
);
table
.
reload
(
'tableId'
);
});
}
else
{
layer
.
msg
(
result
.
msg
,
{
icon
:
5
});
}
}
});
layer
.
open
({
title
:
'确定接受订单吗?'
,
// 弹出框标题
area
:
[
'300px'
,
'300px'
],
// 弹出框大小
shade
:
0
,
// 不显示遮罩层
type
:
1
,
content
:
'<form class="layui-form" action="">'
+
'<div class="layui-form-item">'
+
'<label class="layui-form-label">发货备注</label>'
+
'<div class="layui-input-block">'
+
'<input type="text" name="remark" placeholder="请输入内容" autocomplete="off" class="layui-input">'
+
'</div>'
+
'</div>'
+
' <div class="layui-form-item">'
+
' <div class="layui-input-block">'
+
' <button type="submit" class="layui-btn" lay-submit lay-filter="confirm">确定</button>'
+
' <button type="reset" class="layui-btn layui-btn-primary">取消</button>'
+
' </div>'
+
' </div>'
+
'</form>'
,
success
:
function
()
{
// 对弹层中的表单进行初始化渲染
form
.
render
();
// 表单提交事件
form
.
on
(
'submit(confirm)'
,
function
(
data
)
{
var
field
=
data
.
field
;
// 获取表单字段值
console
.
log
(
"111111111111111"
,
field
)
var
param
=
{};
param
.
id
=
id
;
param
.
remark
=
field
.
remark
;
$
.
ajax
({
url
:
"updateFwStatus"
,
data
:
JSON
.
stringify
(
param
),
type
:
"POST"
,
dataType
:
"json"
,
contentType
:
"application/json;charset=utf-8"
,
success
:
function
(
result
)
{
if
(
result
.
code
==
100
)
{
layer
.
msg
(
result
.
msg
,
{
icon
:
6
,
time
:
1000
},
function
()
{
layer
.
close
(
index
);
table
.
reload
(
'tableId'
);
});
}
else
{
layer
.
msg
(
result
.
msg
,
{
icon
:
5
});
}
}
});
// return false; // 阻止默认 form 跳转
});
}
});
// layer.confirm( '确定接受订单吗?', function (index) {
//
// var param = {};
// param.id = id;
// param.istatus = 30;
//
// $.ajax({
// url: "updateFwStatus",
// data: JSON.stringify(param),
// type: "POST",
// dataType: "json",
// contentType: "application/json;charset=utf-8",
// success: function (result) {
// if (result.code == 100) {
// layer.msg(result.msg, {icon: 6, time: 1000}, function () {
// layer.close(index);
// table.reload('tableId');
// });
// } else {
// layer.msg(result.msg, {icon: 5});
// }
// }
// });
// });
}
else
if
(
obj
.
event
===
'edit'
)
{
var
id
=
obj
.
data
.
orderId
;
var
w
=
(
$
(
window
).
width
()
*
0.95
);
...
...
@@ -597,4 +648,4 @@
</body>
</html>
\ No newline at end of file
</html>
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