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
c06927c5
Commit
c06927c5
authored
Nov 09, 2020
by
黎聪聪
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
2020年11月9日 17:39:44
parent
69c85cb6
Show whitespace changes
Inline
Side-by-side
Showing
23 changed files
with
275 additions
and
110 deletions
+275
-110
ConsultSheetMapper.java
.../java/com/cftech/consultsheet/dao/ConsultSheetMapper.java
+2
-1
ConsultSheetMapper.xml
...n/java/com/cftech/consultsheet/dao/ConsultSheetMapper.xml
+10
-7
ConsultSheetDto.java
...n/java/com/cftech/consultsheet/model/ConsultSheetDto.java
+19
-0
ConsultSheetService.java
.../com/cftech/consultsheet/service/ConsultSheetService.java
+2
-1
ConsultSheetServiceImpl.java
...ch/consultsheet/service/impl/ConsultSheetServiceImpl.java
+4
-6
MobileConsultSheetController.java
...cftech/consultsheet/web/MobileConsultSheetController.java
+4
-3
OrderMapper.java
...odule/src/main/java/com/cftech/order/dao/OrderMapper.java
+9
-1
OrderMapper.xml
...module/src/main/java/com/cftech/order/dao/OrderMapper.xml
+49
-1
OrderMobileDto.java
.../src/main/java/com/cftech/order/model/OrderMobileDto.java
+20
-0
OrderService.java
.../src/main/java/com/cftech/order/service/OrderService.java
+11
-5
OrderServiceImpl.java
.../java/com/cftech/order/service/impl/OrderServiceImpl.java
+42
-9
MobileOrderController.java
...main/java/com/cftech/order/web/MobileOrderController.java
+33
-28
ProductclassifyMapper.java
...com/cftech/productclassify/dao/ProductclassifyMapper.java
+2
-5
ProductclassifyMapper.xml
.../com/cftech/productclassify/dao/ProductclassifyMapper.xml
+6
-6
ProductclassifyDto.java
.../com/cftech/productclassify/model/ProductclassifyDto.java
+18
-0
ProductclassifyService.java
...ftech/productclassify/service/ProductclassifyService.java
+2
-1
ProductclassifyServiceImpl.java
...ductclassify/service/impl/ProductclassifyServiceImpl.java
+13
-16
MobileclassifyController.java
.../cftech/productclassify/web/MobileclassifyController.java
+3
-2
CfarticleMapper.java
...in/java/com/cftech/cms/cfarticle/dao/CfarticleMapper.java
+2
-2
CfarticleMapper.xml
...ain/java/com/cftech/cms/cfarticle/dao/CfarticleMapper.xml
+13
-0
CfarticleService.java
...va/com/cftech/cms/cfarticle/service/CfarticleService.java
+2
-2
CfarticleServiceImpl.java
...tech/cms/cfarticle/service/impl/CfarticleServiceImpl.java
+4
-9
MobileCfArticleController.java
...m/cftech/cms/cfarticle/web/MobileCfArticleController.java
+5
-5
No files found.
aidea-modules/consult-module/src/main/java/com/cftech/consultsheet/dao/ConsultSheetMapper.java
View file @
c06927c5
...
...
@@ -3,6 +3,7 @@ package com.cftech.consultsheet.dao;
import
com.alibaba.fastjson.JSONObject
;
import
com.cftech.consultsheet.model.ConsultSheet
;
import
com.cftech.consultsheet.model.ConsultSheetDto
;
import
com.cftech.core.generic.GenericDao
;
import
com.cftech.core.sql.Conds
;
import
com.cftech.core.sql.Sort
;
...
...
@@ -24,5 +25,5 @@ public interface ConsultSheetMapper extends GenericDao<ConsultSheet> {
List
<
ConsultSheet
>
fetchSearchByPage
(
Conds
conds
,
Sort
sort
,
int
page
,
int
pageSize
,
Long
id
);
List
<
ConsultSheet
>
consultSheetList
(
@Param
(
"name"
)
String
name
,
@Param
(
"id"
)
Long
id
,
@Param
(
"openid"
)
String
openid
);
List
<
ConsultSheet
>
consultSheetList
(
ConsultSheetDto
consultSheetDto
);
}
\ No newline at end of file
aidea-modules/consult-module/src/main/java/com/cftech/consultsheet/dao/ConsultSheetMapper.xml
View file @
c06927c5
...
...
@@ -203,15 +203,18 @@
from t_aidea_consult_sheet
where del_flag = 0
<if
test=
"openid!=null"
>
and open_id = {openid}
and open_id =
#
{openid}
</if>
<if
test=
"name!=null and name !=''"
>
and user_name like concat('%',#{name},'%')
AND CONCAT(consult_id ) LIKE '%${name}%'
</if>
<if
test=
"id!=null"
>
and id = #{id}
</if>
ORDER BY create_time
ORDER BY create_time DESC
<if
test=
"page!=null and pageSize !='' and pageSize!=null and page !=''"
>
limit #{page},#{pageSize}
</if>
</select>
<update
id=
"update"
parameterType=
"com.cftech.consultsheet.model.ConsultSheet"
>
...
...
aidea-modules/consult-module/src/main/java/com/cftech/consultsheet/model/ConsultSheetDto.java
0 → 100644
View file @
c06927c5
package
com
.
cftech
.
consultsheet
.
model
;
import
lombok.Data
;
/**
* @author :licc
* @date :Created in 2020/11/9 16:56
* @description:
*/
@Data
public
class
ConsultSheetDto
{
/*搜索条件*/
private
String
name
;
private
Long
id
;
private
String
appId
;
private
String
openid
;
private
Long
page
;
private
Long
pageSize
;
}
aidea-modules/consult-module/src/main/java/com/cftech/consultsheet/service/ConsultSheetService.java
View file @
c06927c5
...
...
@@ -3,6 +3,7 @@ package com.cftech.consultsheet.service;
import
com.alibaba.fastjson.JSONObject
;
import
com.cftech.consultsheet.model.ConsultSheet
;
import
com.cftech.consultsheet.model.ConsultSheetDto
;
import
com.cftech.core.generic.GenericService
;
import
com.cftech.core.sql.Conds
;
import
com.cftech.core.sql.Sort
;
...
...
@@ -35,7 +36,7 @@ public interface ConsultSheetService extends GenericService<ConsultSheet> {
* @Param
* @return
**/
JSONObject
consultSheetList
(
String
name
,
Long
id
,
String
appId
,
String
openid
);
JSONObject
consultSheetList
(
ConsultSheetDto
consultSheetDto
);
void
sendQyWechatMassage
(
ConsultSheet
consultSheet
);
}
aidea-modules/consult-module/src/main/java/com/cftech/consultsheet/service/impl/ConsultSheetServiceImpl.java
View file @
c06927c5
...
...
@@ -10,6 +10,7 @@ import com.cftech.base.org.model.Qyuser;
import
com.cftech.base.org.service.QyuserService
;
import
com.cftech.consultsheet.dao.ConsultSheetMapper
;
import
com.cftech.consultsheet.model.ConsultSheet
;
import
com.cftech.consultsheet.model.ConsultSheetDto
;
import
com.cftech.consultsheet.service.ConsultSheetService
;
import
com.cftech.core.generic.GenericDao
;
import
com.cftech.core.generic.GenericServiceImpl
;
...
...
@@ -117,14 +118,11 @@ public class ConsultSheetServiceImpl extends GenericServiceImpl<ConsultSheet> im
}
@Override
public
JSONObject
consultSheetList
(
String
name
,
Long
id
,
String
appId
,
String
openid
)
{
public
JSONObject
consultSheetList
(
ConsultSheetDto
consultSheetDto
)
{
JSONObject
rtnJson
=
new
JSONObject
();
try
{
MpAccountsEntity
mpAccountsAppid
=
mpAccountsService
.
getMpAccountsAppid
(
appId
);
if
(
StringUtils
.
isBlank
(
name
))
{
name
=
null
;
}
List
<
ConsultSheet
>
consultSheets
=
consultSheetMapper
.
consultSheetList
(
name
,
id
,
openid
);
MpAccountsEntity
mpAccountsAppid
=
mpAccountsService
.
getMpAccountsAppid
(
consultSheetDto
.
getAppId
());
List
<
ConsultSheet
>
consultSheets
=
consultSheetMapper
.
consultSheetList
(
consultSheetDto
);
if
(
consultSheets
!=
null
)
{
rtnJson
.
put
(
"errerNo"
,
0
);
rtnJson
.
put
(
"data"
,
consultSheets
);
...
...
aidea-modules/consult-module/src/main/java/com/cftech/consultsheet/web/MobileConsultSheetController.java
View file @
c06927c5
...
...
@@ -2,6 +2,7 @@ package com.cftech.consultsheet.web;
import
com.alibaba.fastjson.JSONObject
;
import
com.cftech.consultsheet.model.ConsultSheet
;
import
com.cftech.consultsheet.model.ConsultSheetDto
;
import
com.cftech.consultsheet.service.ConsultSheetService
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
...
@@ -30,7 +31,7 @@ public class MobileConsultSheetController {
}
/**
* @Author Licc
* @Description 咨询单列表
* @Description 咨询单列表
搜索
* @Date 13:01 2020/11/1
* @Param
* @return
...
...
@@ -38,8 +39,8 @@ public class MobileConsultSheetController {
@RequestMapping
(
value
=
"/consultSheetList"
,
method
=
{
RequestMethod
.
GET
,
RequestMethod
.
POST
},
produces
=
MediaType
.
APPLICATION_JSON_UTF8_VALUE
)
public
JSONObject
consultSheetList
(
String
name
,
Long
id
,
String
appId
,
String
openid
)
{
return
consultSheetService
.
consultSheetList
(
name
,
id
,
appId
,
openid
);
public
JSONObject
consultSheetList
(
ConsultSheetDto
consultSheetDto
)
{
return
consultSheetService
.
consultSheetList
(
consultSheetDto
);
}
@RequestMapping
(
value
=
"/test"
,
...
...
aidea-modules/order-module/src/main/java/com/cftech/order/dao/OrderMapper.java
View file @
c06927c5
...
...
@@ -48,7 +48,7 @@ public interface OrderMapper extends GenericDao<Order> {
* @Date 15:45 2020/10/30
* @Param
**/
List
<
OrderMobile
>
orderFall
(
@Param
(
"openid"
)
String
openid
,
@Param
(
"status"
)
Long
status
,
@Param
(
"id"
)
Long
id
);
List
<
OrderMobile
>
orderFall
(
OrderMobileDto
orderMobileDto
);
/**
* @return
...
...
@@ -66,4 +66,12 @@ public interface OrderMapper extends GenericDao<Order> {
* @Param
**/
OrderSizeVO
orderSize
(
@Param
(
"openid"
)
String
openid
);
/**
* @return
* @Author Licc
* @Description
* @Date 10:46 2020/11/1
* @Param
**/
List
<
OrderMobile
>
orderList
(
OrderMobileDto
orderMobileDto
);
}
\ No newline at end of file
aidea-modules/order-module/src/main/java/com/cftech/order/dao/OrderMapper.xml
View file @
c06927c5
...
...
@@ -487,7 +487,7 @@
<if
test=
"status!=null "
>
AND t.status =#{status}
</if>
ORDER BY t.create_time
ORDER BY t.create_time
DESC
</select>
<select
id=
"orderDetill"
resultType=
"com.cftech.order.model.ProductMobile"
>
...
...
@@ -504,7 +504,55 @@
</if>
</select>
<select
id=
"orderSize"
resultType=
"com.cftech.order.model.OrderSizeVO"
>
SELECT
SUM(status=0) AS confirm,
SUM(status=2) AS delivered,
SUM(status=3) AS received,
SUM(status=4) AS completed,
SUM(status=5) AS cancelled
FROM t_order WHERE del_flag = 0
</select>
<select
id=
"orderList"
resultType=
"com.cftech.order.model.OrderMobile"
parameterType=
"com.cftech.order.model.OrderMobileDto"
>
SELECT
t.id,
t.number,
t.pay_status AS payStatus,
t.total_amount AS totalAmount,
t.pay_time AS payTime,
t.trade_no AS tradeNo,
t.courier_number AS courierNumber,
t.order_cancel AS orderCancel,
t.status,
t.create_time AS createTime,
s.address_name AS addressName,
a.areaname AS province,
b.areaname AS city,
c.areaname AS area,
s.phone,
s.address
FROM
t_order t LEFT JOIN t_shipping_address s ON t.openid = s.open_id AND s.whether = 1
LEFT JOIN t_order_details d ON t.id =d.order_id
LEFT JOIN t_aidea_product p ON d.drugs_id = p.id
LEFT JOIN area a ON s.province_id = a.areaid
LEFT JOIN area b ON s.city_id = b.areaid
LEFT JOIN area c ON s.area_id = c.areaid
WHERE t.del_flag=0
<if
test=
"openid !=null and openid!= ''"
>
AND t.openid =#{openid}
</if>
<if
test=
"searchName!=null and searchName !=''"
>
AND CONCAT(t.number, p.product_name) LIKE '%${searchName}%'
</if>
<if
test=
"status!=null "
>
AND t.status = #{status}
</if>
ORDER BY t.create_time DESC
<if
test=
"page!=null and pageSize !='' and pageSize!=null and page !=''"
>
limit #{page},#{pageSize}
</if>
</select>
</mapper>
\ No newline at end of file
aidea-modules/order-module/src/main/java/com/cftech/order/model/OrderMobileDto.java
0 → 100644
View file @
c06927c5
package
com
.
cftech
.
order
.
model
;
import
lombok.Data
;
/**
* @author :licc
* @date :Created in 2020/11/9 14:03
* @description:
*/
@Data
public
class
OrderMobileDto
{
private
String
openid
;
private
String
search
;
private
String
searchName
;
private
Long
status
;
private
Long
page
;
private
Long
pageSize
;
private
Long
id
;
}
aidea-modules/order-module/src/main/java/com/cftech/order/service/OrderService.java
View file @
c06927c5
...
...
@@ -3,11 +3,8 @@ package com.cftech.order.service;
import
com.alibaba.fastjson.JSONObject
;
import
com.cftech.core.sql.Conds
;
import
com.cftech.core.sql.Sort
;
import
com.cftech.order.model.
Order
;
import
com.cftech.order.model.
*
;
import
com.cftech.core.generic.GenericService
;
import
com.cftech.order.model.OrderFromVO
;
import
com.cftech.order.model.ProductMobile
;
import
com.cftech.order.model.ProductOrder
;
import
com.qiniu.util.Json
;
import
org.apache.ibatis.annotations.Param
;
...
...
@@ -38,7 +35,7 @@ public interface OrderService extends GenericService<Order> {
* @Param
* @return
**/
JSONObject
confirm
(
String
openid
,
Long
status
,
Long
id
);
JSONObject
confirm
(
OrderMobileDto
orderMobileDto
);
/**
* @Author Licc
* @Description 订单数量
...
...
@@ -48,4 +45,13 @@ public interface OrderService extends GenericService<Order> {
**/
JSONObject
orderSize
(
String
openid
);
/**
* @Author Licc
* @Description 根据搜索条件查询订单
* @Date 19:05 2020/11/3
* @Param
* @return
**/
JSONObject
orderList
(
OrderMobileDto
orderMobileDto
);
}
aidea-modules/order-module/src/main/java/com/cftech/order/service/impl/OrderServiceImpl.java
View file @
c06927c5
...
...
@@ -156,26 +156,21 @@ public class OrderServiceImpl extends GenericServiceImpl<Order> implements Order
}
@Override
public
com
.
alibaba
.
fastjson
.
JSONObject
confirm
(
String
openid
,
Long
status
,
Long
id
)
{
public
com
.
alibaba
.
fastjson
.
JSONObject
confirm
(
OrderMobileDto
orderMobileDto
)
{
com
.
alibaba
.
fastjson
.
JSONObject
rtnJson
=
new
com
.
alibaba
.
fastjson
.
JSONObject
();
com
.
alibaba
.
fastjson
.
JSONObject
object
=
new
com
.
alibaba
.
fastjson
.
JSONObject
();
try
{
if
(
StringUtils
.
isEmpty
(
o
penid
)){
if
(
StringUtils
.
isEmpty
(
o
rderMobileDto
.
getOpenid
()
)){
rtnJson
.
put
(
"errorNo"
,
"0"
);
rtnJson
.
put
(
"errorMsg"
,
"openid不能为空"
);
return
rtnJson
;
}
if
(
status
==
null
){
if
(
orderMobileDto
.
getStatus
()
==
null
){
rtnJson
.
put
(
"errorNo"
,
"0"
);
rtnJson
.
put
(
"errorMsg"
,
"status不能为空"
);
return
rtnJson
;
}
if
(
id
==
null
){
rtnJson
.
put
(
"errorNo"
,
"0"
);
rtnJson
.
put
(
"errorMsg"
,
"id不能为空"
);
return
rtnJson
;
}
List
<
OrderMobile
>
orderMobiles
=
orderMapper
.
orderFall
(
openid
,
status
,
id
);
List
<
OrderMobile
>
orderMobiles
=
orderMapper
.
orderFall
(
orderMobileDto
);
for
(
OrderMobile
orderMobile
:
orderMobiles
)
{
Long
mobileId
=
orderMobile
.
getId
();
if
(
mobileId
!=
null
){
...
...
@@ -199,6 +194,11 @@ public class OrderServiceImpl extends GenericServiceImpl<Order> implements Order
public
com
.
alibaba
.
fastjson
.
JSONObject
orderSize
(
String
openid
)
{
com
.
alibaba
.
fastjson
.
JSONObject
rtnJson
=
new
com
.
alibaba
.
fastjson
.
JSONObject
();
try
{
if
(
StringUtils
.
isEmpty
(
openid
)){
rtnJson
.
put
(
"errorNo"
,
"0"
);
rtnJson
.
put
(
"errorMsg"
,
"openid不能为空"
);
return
rtnJson
;
}
OrderSizeVO
productMobiles
=
orderMapper
.
orderSize
(
openid
);
if
(
productMobiles
!=
null
){
rtnJson
.
put
(
"errorNo"
,
"0"
);
...
...
@@ -213,4 +213,37 @@ public class OrderServiceImpl extends GenericServiceImpl<Order> implements Order
return
rtnJson
;
}
@Override
public
com
.
alibaba
.
fastjson
.
JSONObject
orderList
(
OrderMobileDto
orderMobileDto
)
{
com
.
alibaba
.
fastjson
.
JSONObject
rtnJson
=
new
com
.
alibaba
.
fastjson
.
JSONObject
();
com
.
alibaba
.
fastjson
.
JSONObject
object
=
new
com
.
alibaba
.
fastjson
.
JSONObject
();
try
{
if
(
StringUtils
.
isEmpty
(
orderMobileDto
.
getOpenid
())){
rtnJson
.
put
(
"errorNo"
,
"0"
);
rtnJson
.
put
(
"errorMsg"
,
"openid不能为空"
);
return
rtnJson
;
}
if
(
orderMobileDto
.
getStatus
()==
null
){
rtnJson
.
put
(
"errorNo"
,
"0"
);
rtnJson
.
put
(
"errorMsg"
,
"订单状态不能为空"
);
return
rtnJson
;
}
List
<
OrderMobile
>
orderMobiles
=
orderMapper
.
orderList
(
orderMobileDto
);
for
(
OrderMobile
orderMobile
:
orderMobiles
)
{
Long
mobileId
=
orderMobile
.
getId
();
if
(
mobileId
!=
null
){
List
<
ProductMobile
>
mobiles
=
orderMapper
.
orderDetill
(
mobileId
);
orderMobile
.
setProductMobile
(
mobiles
);
}
}
object
.
put
(
"orderMobiles"
,
orderMobiles
);
rtnJson
.
put
(
"errorNo"
,
"0"
);
rtnJson
.
put
(
"data"
,
object
);
}
catch
(
Exception
e
){
e
.
printStackTrace
();
rtnJson
.
put
(
"errorNo"
,
"1"
);
}
return
rtnJson
;
}
}
\ No newline at end of file
aidea-modules/order-module/src/main/java/com/cftech/order/web/MobileOrderController.java
View file @
c06927c5
package
com
.
cftech
.
order
.
web
;
import
com.alibaba.fastjson.JSONObject
;
import
com.cftech.order.model.OrderMobileDto
;
import
com.cftech.order.service.OrderService
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.ibatis.annotations.Param
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.http.MediaType
;
import
org.springframework.web.bind.annotation.*
;
...
...
@@ -19,37 +21,40 @@ import org.springframework.web.bind.annotation.*;
public
class
MobileOrderController
{
@Autowired
private
OrderService
orderService
;
/**
* @return
* @Author Licc
* @Description
待确认订单
* @Description
订单信息
* @Date 15:43 2020/10/30
* @Param
**/
@RequestMapping
(
value
=
"/confirm"
,
method
=
{
RequestMethod
.
POST
},
produces
=
MediaType
.
APPLICATION_JSON_UTF8_VALUE
)
public
JSONObject
confirm
(
OrderMobileDto
orderMobileDto
)
{
return
orderService
.
confirm
(
orderMobileDto
);
}
/**
* @return
* @Author Licc
* @Description 订单数量
* @Date 19:03 2020/11/3
* @Param
**/
@RequestMapping
(
value
=
"/orderSize"
,
method
=
{
RequestMethod
.
POST
},
produces
=
MediaType
.
APPLICATION_JSON_UTF8_VALUE
)
public
JSONObject
orderSize
(
String
openid
)
{
return
orderService
.
orderSize
(
openid
);
}
/**
* @return
* @Author Licc
* @Description 根据搜索条件查询订单
* @Date 19:40 2020/11/3
* @Param
**/
@RequestMapping
(
value
=
"/
confirm"
,
method
=
{
RequestMethod
.
POST
},
produces
=
MediaType
.
APPLICATION_JSON_UTF8_VALUE
)
public
JSONObject
confirm
(
String
openid
,
Long
status
,
Long
id
)
{
return
orderService
.
confirm
(
openid
,
status
,
id
);
@RequestMapping
(
value
=
"/
orderList"
,
method
=
{
RequestMethod
.
POST
},
produces
=
MediaType
.
APPLICATION_JSON_UTF8_VALUE
)
public
JSONObject
orderList
(
OrderMobileDto
orderMobileDto
)
{
return
orderService
.
orderList
(
orderMobileDto
);
}
// /**
// * @Author Licc
// * @Description 订单数量
// * @Date 19:03 2020/11/3
// * @Param
// * @return
// **/
// @RequestMapping(value = "/orderSize",method = {RequestMethod.POST},produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
// public JSONObject orderSize(String openid){
// return orderService.orderSize(openid);
// }
// /**
// * @Author Licc
// * @Description 根据搜索条件查询订单
// * @Date 19:40 2020/11/3
// * @Param
// * @return
// **/
// @RequestMapping(value = "/orderSize",method = {RequestMethod.POST},produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
// public JSONObject orderSize(String openid){
// return orderService.orderSize(openid);
// }
}
aidea-modules/product-classify-module/src/main/java/com/cftech/productclassify/dao/ProductclassifyMapper.java
View file @
c06927c5
package
com
.
cftech
.
productclassify
.
dao
;
import
com.alibaba.fastjson.JSONObject
;
import
com.cftech.productclassify.model.ProductMenuVO
;
import
com.cftech.productclassify.model.ProductVO
;
import
com.cftech.productclassify.model.Productclassify
;
import
com.cftech.productclassify.model.*
;
import
com.cftech.core.generic.GenericDao
;
import
com.cftech.productclassify.model.ProductclassifyVO
;
import
org.apache.ibatis.annotations.Param
;
import
java.util.List
;
...
...
@@ -32,7 +29,7 @@ public interface ProductclassifyMapper extends GenericDao<Productclassify> {
* @Param
* @return
**/
List
<
ProductclassifyVO
>
productList
(
@Param
(
"productName"
)
String
productName
,
@Param
(
"classifyName"
)
String
classifyName
,
@Param
(
"dosagaFrom"
)
String
dosagaFrom
);
List
<
ProductclassifyVO
>
productList
(
ProductclassifyDto
productclassifyDto
);
/**
*
* @Description 商品分类菜单数据回填
...
...
aidea-modules/product-classify-module/src/main/java/com/cftech/productclassify/dao/ProductclassifyMapper.xml
View file @
c06927c5
...
...
@@ -233,22 +233,22 @@
<if
test=
"productName !=null and productName!=''"
>
and
t.product_name like concat('%',#{productName},'%')
</if>
<if
test=
"classifyName !=null and
product
Name!=''"
>
<if
test=
"classifyName !=null and
classify
Name!=''"
>
and
c.classify_name = #{classifyName}
c.id = #{classifyName}
</if>
<if
test=
"dosagaFrom !=null and
productName
!=''"
>
<if
test=
"dosagaFrom !=null and
dosagaFrom
!=''"
>
and
t.dosaga_from = #{dosagaFrom}
</if>
GROUP by t.id
ORDER BY
t.create_time
DESC
<if
test=
"page!=null and pageSize !='' and pageSize!=null and page !=''"
>
limit #{page},#{pageSize}
</if>
</select>
<!--商品分类菜单数据回填!-->
<select
id=
"productMenu"
resultType=
"com.cftech.productclassify.model.ProductMenuVO"
>
...
...
aidea-modules/product-classify-module/src/main/java/com/cftech/productclassify/model/ProductclassifyDto.java
0 → 100644
View file @
c06927c5
package
com
.
cftech
.
productclassify
.
model
;
import
lombok.Data
;
/**
* @author :licc
* @date :Created in 2020/11/9 14:54
* @description:
*/
@Data
public
class
ProductclassifyDto
{
private
String
productName
;
private
Long
classifyName
;
private
String
dosagaFrom
;
private
String
appId
;
private
Long
page
;
private
Long
pageSize
;
}
aidea-modules/product-classify-module/src/main/java/com/cftech/productclassify/service/ProductclassifyService.java
View file @
c06927c5
...
...
@@ -5,6 +5,7 @@ import com.cftech.core.sql.Conds;
import
com.cftech.core.sql.Sort
;
import
com.cftech.productclassify.model.Productclassify
;
import
com.cftech.core.generic.GenericService
;
import
com.cftech.productclassify.model.ProductclassifyDto
;
import
java.util.List
;
import
java.util.Map
;
...
...
@@ -33,7 +34,7 @@ public interface ProductclassifyService extends GenericService<Productclassify>
* @Param
* @return
**/
JSONObject
productList
(
String
productName
,
String
classifyName
,
String
dosagaFrom
,
String
appId
);
JSONObject
productList
(
ProductclassifyDto
productclassifyDto
);
/**
*
* @Description 商品分类菜单数据回填
...
...
aidea-modules/product-classify-module/src/main/java/com/cftech/productclassify/service/impl/ProductclassifyServiceImpl.java
View file @
c06927c5
...
...
@@ -6,11 +6,8 @@ import com.cftech.accounts.model.MpAccountsEntity;
import
com.cftech.accounts.service.MpAccountsService
;
import
com.cftech.core.sql.Sort
;
import
com.cftech.core.util.StringUtils
;
import
com.cftech.productclassify.model.ProductMenuVO
;
import
com.cftech.productclassify.model.ProductVO
;
import
com.cftech.productclassify.model.Productclassify
;
import
com.cftech.productclassify.model.*
;
import
com.cftech.productclassify.dao.ProductclassifyMapper
;
import
com.cftech.productclassify.model.ProductclassifyVO
;
import
com.cftech.productclassify.service.ProductclassifyService
;
import
com.cftech.core.generic.GenericDao
;
import
com.cftech.core.generic.GenericServiceImpl
;
...
...
@@ -54,20 +51,20 @@ public class ProductclassifyServiceImpl extends GenericServiceImpl<Productclassi
}
@Override
public
JSONObject
productList
(
String
productName
,
String
classifyName
,
String
dosagaFrom
,
String
appId
)
{
public
JSONObject
productList
(
ProductclassifyDto
productclassifyDto
)
{
JSONObject
rtnJson
=
new
JSONObject
();
try
{
MpAccountsEntity
mpAccountsAppid
=
mpAccountsService
.
getMpAccountsAppid
(
appId
);
if
(
StringUtils
.
isBlank
(
productName
))
{
productName
=
null
;
}
if
(
StringUtils
.
isBlank
(
classifyName
))
{
classifyName
=
null
;
}
if
(
StringUtils
.
isBlank
(
dosagaFrom
))
{
dosagaFrom
=
null
;
}
List
<
ProductclassifyVO
>
productVOS
=
productclassifyMapper
.
productList
(
product
Name
,
classifyName
,
dosagaFrom
);
MpAccountsEntity
mpAccountsAppid
=
mpAccountsService
.
getMpAccountsAppid
(
productclassifyDto
.
getAppId
()
);
// if (StringUtils.isBlank(productclassifyDto.getProductName()
)) {
//
productName = null;
//
}
//
if (StringUtils.isBlank(classifyName)) {
//
classifyName = null;
//
}
//
if (StringUtils.isBlank(dosagaFrom)) {
//
dosagaFrom = null;
//
}
List
<
ProductclassifyVO
>
productVOS
=
productclassifyMapper
.
productList
(
product
classifyDto
);
if
(
productVOS
==
null
){
rtnJson
.
put
(
"errorNo"
,
"1"
);
rtnJson
.
put
(
"errorNo"
,
"查询失败"
);
...
...
aidea-modules/product-classify-module/src/main/java/com/cftech/productclassify/web/MobileclassifyController.java
View file @
c06927c5
package
com
.
cftech
.
productclassify
.
web
;
import
com.alibaba.fastjson.JSONObject
;
import
com.cftech.productclassify.model.ProductclassifyDto
;
import
com.cftech.productclassify.service.ProductclassifyService
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
...
@@ -26,8 +27,8 @@ public class MobileclassifyController {
* @return
**/
@RequestMapping
(
value
=
"/productList"
,
method
=
{
RequestMethod
.
GET
,
RequestMethod
.
POST
},
produces
=
MediaType
.
APPLICATION_JSON_UTF8_VALUE
)
public
JSONObject
productList
(
@RequestParam
(
required
=
false
)
String
productName
,
@RequestParam
(
required
=
false
)
String
classifyName
,
@RequestParam
(
required
=
false
)
String
dosagaFrom
,
@RequestParam
(
required
=
true
)
String
appId
){
return
ProductclassifyService
.
productList
(
product
Name
,
classifyName
,
dosagaFrom
,
appId
);
public
JSONObject
productList
(
ProductclassifyDto
productclassifyDto
){
return
ProductclassifyService
.
productList
(
product
classifyDto
);
}
/**
* @Author Licc
...
...
cms-modules/cms-core-module/src/main/java/com/cftech/cms/cfarticle/dao/CfarticleMapper.java
View file @
c06927c5
...
...
@@ -77,7 +77,7 @@ public interface CfarticleMapper extends GenericDao<Cfarticle> {
* @Param
* @return
**/
List
<
Cfarticle
>
gateway
(
@Param
(
"title"
)
String
title
);
List
<
Cfarticle
>
gateway
(
@Param
(
"title"
)
String
title
,
@Param
(
"page"
)
Long
page
,
@Param
(
"pageSize"
)
Long
pageSize
);
/**
* @Author Licc
* @Description 栏目列表数据回填
...
...
@@ -94,6 +94,6 @@ public interface CfarticleMapper extends GenericDao<Cfarticle> {
* @Param
* @return
**/
List
<
CfarticleVO
>
columnDetails
(
@Param
(
"id"
)
Long
id
);
List
<
CfarticleVO
>
columnDetails
(
@Param
(
"id"
)
Long
id
,
@Param
(
"page"
)
Long
page
,
@Param
(
"pageSize"
)
Long
pageSize
,
@Param
(
"title"
)
String
title
);
}
\ No newline at end of file
cms-modules/cms-core-module/src/main/java/com/cftech/cms/cfarticle/dao/CfarticleMapper.xml
View file @
c06927c5
...
...
@@ -431,6 +431,12 @@ SELECT count(*) FROM wx_cms_cfarticle WHERE whether_banner= 1 and del_flag=0
<if
test=
"title!=null"
>
and t.title like '%${title}%'
</if>
ORDER BY
create_time
DESC
<if
test=
"page!=null and pageSize !='' and pageSize!=null and page !=''"
>
limit #{page},#{pageSize}
</if>
</select>
<select
id=
"column"
resultType=
"com.cftech.cms.cfarticle.model.columnVO"
>
SELECT
...
...
@@ -464,9 +470,16 @@ FROM wx_cms_cfarticle
WHERE del_flag=0
<if
test=
"id!=null"
>
AND `column`= #{id}
</if>
<if
test=
"title!=null and title!=''"
>
AND CONCAT(title,author) LIKE '%${title}%'
</if>
ORDER BY
create_time
DESC
<if
test=
"page!=null and pageSize !='' and pageSize!=null and page !=''"
>
limit #{page},#{pageSize}
</if>
</select>
</mapper>
\ No newline at end of file
cms-modules/cms-core-module/src/main/java/com/cftech/cms/cfarticle/service/CfarticleService.java
View file @
c06927c5
...
...
@@ -68,7 +68,7 @@ public interface CfarticleService extends GenericService<Cfarticle> {
* @Param
* @return
**/
JSONObject
geteway
(
String
title
,
String
appId
);
JSONObject
geteway
(
String
title
,
String
appId
,
Long
page
,
Long
pageSize
);
/**
* @Author Licc
* @Description 栏目列表列表数据回填
...
...
@@ -84,5 +84,5 @@ public interface CfarticleService extends GenericService<Cfarticle> {
* @Param
* @return
**/
JSONObject
columnDetails
(
Long
id
,
String
appId
);
JSONObject
columnDetails
(
Long
id
,
String
appId
,
Long
page
,
Long
pageSize
,
String
title
);
}
cms-modules/cms-core-module/src/main/java/com/cftech/cms/cfarticle/service/impl/CfarticleServiceImpl.java
View file @
c06927c5
...
...
@@ -166,11 +166,11 @@ String unCond = HtmlUtils.htmlUnescape(contents);
}
@Override
public
JSONObject
geteway
(
String
title
,
String
appId
)
{
public
JSONObject
geteway
(
String
title
,
String
appId
,
Long
page
,
Long
pageSize
)
{
JSONObject
rtnJson
=
new
JSONObject
();
try
{
MpAccountsEntity
mpAccountsAppid
=
mpAccountsService
.
getMpAccountsAppid
(
appId
);
List
<
Cfarticle
>
cfarticles
=
cfarticleMapper
.
gateway
(
title
);
List
<
Cfarticle
>
cfarticles
=
cfarticleMapper
.
gateway
(
title
,
page
,
pageSize
);
if
(
cfarticles
==
null
){
rtnJson
.
put
(
"errorNo"
,
"1"
);
rtnJson
.
put
(
"errorMsg"
,
"查询失败"
);
...
...
@@ -210,16 +210,11 @@ String unCond = HtmlUtils.htmlUnescape(contents);
}
@Override
public
JSONObject
columnDetails
(
Long
id
,
String
appId
)
{
public
JSONObject
columnDetails
(
Long
id
,
String
appId
,
Long
page
,
Long
pageSize
,
String
title
)
{
JSONObject
rtnJson
=
new
JSONObject
();
try
{
if
(
id
==
null
){
rtnJson
.
put
(
"errorNo"
,
"1"
);
rtnJson
.
put
(
"errorMsg"
,
"id不能为空"
);
return
rtnJson
;
}
MpAccountsEntity
mpAccountsAppid
=
mpAccountsService
.
getMpAccountsAppid
(
appId
);
List
<
CfarticleVO
>
cfarticleVOS
=
cfarticleMapper
.
columnDetails
(
id
);
List
<
CfarticleVO
>
cfarticleVOS
=
cfarticleMapper
.
columnDetails
(
id
,
page
,
pageSize
,
title
);
if
(
cfarticleVOS
==
null
){
rtnJson
.
put
(
"errorNo"
,
"1"
);
rtnJson
.
put
(
"errorMsg"
,
"查询失败"
);
...
...
cms-modules/cms-core-module/src/main/java/com/cftech/cms/cfarticle/web/MobileCfArticleController.java
View file @
c06927c5
...
...
@@ -153,8 +153,8 @@ public class MobileCfArticleController {
* @return
**/
@RequestMapping
(
value
=
"/gateway"
,
method
=
{
RequestMethod
.
GET
,
RequestMethod
.
POST
},
produces
=
MediaType
.
APPLICATION_JSON_UTF8_VALUE
)
public
com
.
alibaba
.
fastjson
.
JSONObject
gateway
(
String
title
,
String
appId
){
return
cfarticleService
.
geteway
(
title
,
appId
);
public
com
.
alibaba
.
fastjson
.
JSONObject
gateway
(
String
title
,
String
appId
,
Long
page
,
Long
pageSize
){
return
cfarticleService
.
geteway
(
title
,
appId
,
page
,
pageSize
);
}
/**
* @Author Licc
...
...
@@ -169,13 +169,13 @@ public class MobileCfArticleController {
}
/**
* @Author Licc
* @Description 栏目文章详情
* @Description 栏目文章详情
栏目文章搜索
* @Date 10:34 2020/10/30
* @Param
* @return
**/
@RequestMapping
(
value
=
"/columnDetails"
,
method
=
{
RequestMethod
.
GET
,
RequestMethod
.
POST
},
produces
=
MediaType
.
APPLICATION_JSON_UTF8_VALUE
)
public
com
.
alibaba
.
fastjson
.
JSONObject
columnDetails
(
Long
id
,
String
appId
){
return
cfarticleService
.
columnDetails
(
id
,
appId
);
public
com
.
alibaba
.
fastjson
.
JSONObject
columnDetails
(
Long
id
,
String
appId
,
Long
page
,
Long
pageSize
,
String
title
){
return
cfarticleService
.
columnDetails
(
id
,
appId
,
page
,
pageSize
,
title
);
}
}
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