Authored by mali

清理不必要的代码

... ... @@ -26,8 +26,6 @@ public interface SellerWalletMapper {
SellerWallet selectByUidNType(SellerWallet condition);
void updateMoneyForTest();
int changeAllMoneyToAvail(@Param("uid") Integer uid, @Param("updateTime") Integer updateTime);
int rejoin(@Param("uid") Integer uid, @Param("amount") BigDecimal amount
... ...
... ... @@ -180,8 +180,4 @@
update seller_wallet set amount = amount + lock_amount ,lock_amount = 0,update_time = #{updateTime,jdbcType=INTEGER} where uid = #{uid}
</update>
<update id="updateMoneyForTest">
update seller_wallet set amount = amount + 10 where id = 3
</update>
</mapper>
\ No newline at end of file
... ...
package com.yohoufo.product.controller.test;
public class ExampleResultFactory {
public static Object createData() {
String methodName = Thread.currentThread().getStackTrace()[2].getMethodName();
switch (methodName) {
case "queryProductDetailBySKN":
return 1;
default:
return null;
}
}
}
package com.yohoufo.product.controller.test;
import com.yoho.tools.docs.ApiOperation;
import com.yohoufo.common.ApiResponse;
import com.yohoufo.common.annotation.IgnoreSession;
import com.yohoufo.common.annotation.IgnoreSignature;
import com.yohoufo.dal.order.SellerWalletMapper;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.util.concurrent.atomic.AtomicInteger;
/**
* Created by li.ma on 2018/11/21.
*/
@RestController
public class TestSynDbController {
private final Logger LOG = LoggerFactory.getLogger(TestSynDbController.class);
@Autowired
private SellerWalletMapper sellerWalletMapperl;
private AtomicInteger count = new AtomicInteger(0);
@ApiOperation(name = "ufo.product.testSynDb", desc="测试")
@IgnoreSignature
@IgnoreSession
@RequestMapping(params = "method=ufo.product.testSynDb")
public ApiResponse testSynDb() {
try {
sellerWalletMapperl.updateMoneyForTest();
count.addAndGet(1);
}catch (Throwable e) {
LOG.error("1999922222222344");
}
LOG.info("testSynDb count is {}", count.get());
return new ApiResponse.ApiResponseBuilder().code(200).message("热搜词列表").build();
}
}